« first day (635 days earlier)      last day (3375 days later) » 

10:02 PM
@CaptainObvious Does C need to look that ugly?
 
That's why he's posting a CodeReview?
 
@nhgrif True, I don't got an issue with him posting it here, but I'm really wondering about the quality of that code
 
> Lexmark was really serious about this, so serious that it began sticking tiny microchips into its cartridges. These performed two functions; they authenticated with the printer, making it difficult for third-party cartridges to be used, and they ran a tiny program that calculated how much ink had been used up, regardless of how much actually existed in the cartridge.
> When the program calculated that the ink had run dry, the cartridge stopped working—which put an obvious limit of cartridge refills.
 
My mom's Canon is similar.
It beeps to change the ink when the cartridge is half full.
But, if you don't change the cartridge, it still works.
 
this is something Lexmark did not for consumer convenience, but to prevent 3rd party suppliers.
 
10:08 PM
I bet they deliberately did it for customer inconvenience.
To steal their money.
 
At the time Lexmark offered two printer cartridges.
One was way more expensive, but allowed refills.
But they were the same size... you bought them with the same amount of ink.
 
0
Q: Optimize Javascript with JQuery code

ohiocowboyI this form where if you enter the customer number the alternate Id is disabled, and visa versa. When I submit a bad form via ajax. When the response comes back both fields are able to be edited. Below is the code I wrote to fix that. What I'm looking for is a better way to accomplish this. I rea...

0
Q: Improving genetic algorithm fitness function

TimI'm attempting to speed up my genetic algorithm that modifies images. After searching, I've found that my fitness function is the bottleneck, taking sometimes up to 11 seconds to complete. The fitness function compares to images and returns a float. To test, I used some large images of the same s...

0
Q: Get the first 10 lines of a file

qedGet the first 10 lines of a file. If the file has less than 10 lines, then the whole is retrieved. Any suggestions for improvement are welcome. package je3.io; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; /** * Created by IDEA on 29/01/15. */ publi...

 
The article is interesting though. It started about garage door openers.
He's talking about a GDO company called Chamberlain and how they tried preventing their customers from using 3rd party remotes.
By the end of the article, the ironic part is that the author ended up buying a replacement Chamberlain remote.
Not because the 3rd party remote wouldn't work, but because the 3rd party remote was ugly, and more importantly, the 3rd party remote was more expensive.
 
Monking!
 
hey @Duga
 
10:17 PM
0
Q: Dijkstra's algorithm, Python

bobhob314I was hoping that some more experienced programmers could help me make my implementation of Dijkstra's algorithm more efficient. So far, I think that the most susceptible part is how I am looping through everything in X and everything in graph[v]. My graph is formatted as g = {1:{1:2}, 2:{2:3,...

0
Q: my first program

gavinany advice would be great, watched a few videos over the last 3 weeks and made a program up what do you think ? import java.util.Scanner; public class n_com { public static void main (String args []){ Scanner input = new Scanner (System.in); double training,p_h,computer_training,comput...

1
Q: Spring configuration without XML is this reality?

Marc-AndreWe're doing a website for Cardshifter, and now I've converted the plain html files and css into a Spring MVC web application. Here is the typical configuration classes that I used in most of the project I work with. package com.cardshifter.io.web.config; import org.springframework.context.anno...

 
"my first title"
2
 
 
Sometimes questions have great titles:
6
Q: How do pilots see at night if airplanes dont have front lights

Francisco FragaHow can pilots identify threats ahead of them if they don't have front lights like cars.

 
@rolfl I saw that, but I'm out of votes :(
 
Sorted ;-)
 
10:25 PM
I used to wonder why you mods didn't vote on everything you saw.
Now I know why.
 
I only vote on things I read and understand.
 
Oh?
 
That happens to be a fair amount, but not as much as you would think.
 
You couldn't possible have read my long post that one time - at least not thoroughly.
 
For most of the mod activities I can just scan the things and move on.
Surprisingly, that one was easy.
 
10:27 PM
Oh.
 
I have started upcoming fewer questions and now downvote more bad ones.
 
@CaptainObvious I tried to compile using compilejava.net and got 14 compiler errors...
 
@Phrancis Not surprisingly.
It doesn't have the closing brace.
 
I added the closing braces, too
/tmp/java_fUDozW/n_com.java:18: error: unmappable character for encoding ASCII
        System.out.print("please enter cost of training people up on the computer p/h ?? ");
                                                                                      ^
 
That's odd.
 
10:29 PM
X 14 similar errors
 
I don't see any non-ascii characters.
 
Might be the online compiling website's fault
 
Unless it is reading the ?? or p/h being interpreted funny.
 
@Jamal Don't forget to comment on the bad ones!
 
Morning
 
10:34 PM
Morning.
How'd you like the paper?
 
@Phrancis - pound symbol is not ASCII
 
@Mehrad Monking!
 
£ -> ??
 
@Hosch250 I was expecting a 10+ pages paper so it was kinda short :D
 
and, Java source-code files can be specified to be a Unicode charset (UTF-8, etc).
 
10:36 PM
It was only supposed to be 3 pages.
 
you crammed a fair amount of content in it though @Hosch250
 
I do that.
 
overall, I liked it no doubt
 
So, Java code can be all in unicode, and variable names in unicode, etc.
That online site (like ideone), does not like that.
If you change all those symbols to be \u00A3 you will be fine.
 
@rolfl valuable pieces of paper with values on them in some part of world
@Hosch250 any other one coming up ?
 
10:38 PM
Maybe.
Next week is a 2-2.5 page paper on a philosopher.
 
@Hosch250 let me know what's the exact topic when you find out
please
 
@rolfl ok
 
Guys, 00.00 is a float number you reckon? :D
I think it's the only number I never dealt with :D
it causes some drama for the OleDb reader
 
@rolfl Yep that did it, nice catch!
 
The "first program" just got rolled back...
 
10:44 PM
Fixed
 
I don't agree because that means I have to do work to get it to compile. — ferada 3 mins ago
@rolfl / @Mat'sMug what do you think about that? ^^
 
I might go to bed soon though, but I hope you can do the discussion :)
omitting java.util imports only requires reviewers to do a keyboard shortcut to auto-import...
 
I think it is nice to include the imports, and I always do.
 
If an old question has a crappy title, I usually skip the comment. So many of those questions.
 
10:51 PM
I think it makes for a better question.
but, I acknowledge that custom is to not include the imports.
that goes for C and C++ etc as well.
 
Ugh, I can't even reply on mobile. But I'm almost home.
 
Okay, I tried to come up with something for a review for the most upvoted unanswered post on the site. Someone kill this for me, please.
0
A: Tiny Lua library to get char pointer from string

Alexis KingI'm no Lua expert, but I can at least give you a pointer (no pun intended) about your C code. Your get_pointer function looks like it works fine, but it could be made even more concise! Lua provides a luaL_checkstring function that combines luaL_checktype and luaL_tostring. Therefore, you could ...

 
Hi @ferada
 
Hey ferada. I agree with your sentiments on the imports.
 
Good evening @Phrancis
 
10:54 PM
0
Q: code enhancement for existing npm package

mapu utI am trying to write better code of the npm package... went through the code didnt get idea how to write proper code... need some inputs from you guys... providing the code below... https://github.com/taylorharwin/iss_node //An implementation of SpaceStream that produces a transform stream, ...

 
I am just not sure if it can be made a site policy, as such.
 
@rofl right, i was just writing that i don't use an IDE at the moment, so no auto-import for me
Also, for Java that might be an option, for other languages it's more complicated.
 
On the other hand, if you find a question is harder to read, or manage, because they are not included, then feel free to downvote it as well....
Yeah, I hate the C/C++ wihtout imports.
I often copy/paste the code to see if it runs, but I don't know the language well enough to know which libraries are needed.
 
:) yeah same for me, Haskell is the worst in that case.
 
But, I think the subject is worthy of a meta post.
Many questions are just snippets though....
but, when the code is supposed to be run, then it should have the imports.
 
11:01 PM
0
Q: Optimize python script for generating Point Cloud

dorfyI'm new to python. I'm trying to produce a 3D point cloud from a depth image and some camera intrinsics. The image is 640x480, and is a numpy array of bytes. The output is a (rows * columns) x 3 array of points. I've gotten the function to work perfectly, but it's way too slow! (takes like 2 seco...

 
TTGH
 
take care @Phrancis
 
1
Q: Traversing trees with Lenses

genisageI've recently started learning about lenses and for practice, I wrote a function that finds all paths from the root to a leaf of a tree for which the total of the nodes' weights is equal to a given value. My first version works on binary trees and is my first attempt at wrapping my head around l...

0
Q: How to speed up the following code

user146290I wrote the following code to do some calculations. y1 = 0; for k = 1:L-1 for i = 0:N total1 = i*log(x) + 2*(n-m-i+k)*log(sig); for j = 0:N total2 = j*log(y) + 2*(n-m-j+k)*log(sig); for p = 0:100 total3 = 0; for q = 0:10...

0
Q: A banded interpolator, for any type and any interpolation method

Nick UdellThis is an extension of my Attributes system I wrote about in these questions: Lvl 1 upgradeable attributes Lvl2 upgradeable attributes It is unrelated to the core functionality under review in those questions, but I present them for reference. I wrote a banded interpolator. This takes a set...

0
Q: A super string cleaner

Jonny PiazziI'm need a method that clean up a string considering this few rules: Remove or not Spaces. Remove or not Special Chars. Remove or not Numbers. Descaptalize or not the string (this is don't really needed but i included it anyway). I did some google if exists something that already do ...

0
Q: Get the tail of a file in java

qedPrint the tail of a file, if the file has less than 10 lines, then all is printed. Any suggestions for improvement are welcome. package je3.io; import java.io.IOException; import java.io.RandomAccessFile; /** * Created by IDEA on 29/01/15. */ public class Tail { public static String[] t...

 
11:28 PM
The code from the post below does not compile for me, and I believe I see the bug. Should I flag it?
2
Q: Sum the Multiples of 3 and 5

user3735671 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below N. #include <stdio.h> int main(){ int i=0,j,k,l,sum=0; scanf("%d",&i); if(i<=100000&&i>0){ ...

 
Sure.
@CaptainObvious Should have seen that question coming....
@SirPython Care to share what you think the problem is, though?
 
Hello
(I always seem to say "Hello" when I come)
3
 
@SirPython It's just missing a closing } right?
 
@MannyMeng /s/Hello/Monking! ;)
 
@Mat'sMug sigh, why Monking...
 
11:43 PM
Ask the monkey :)
 
@monkey why Monking?
 
lol
 
@monkey Well...
 
16
A: What's a Zombie? And what are the many other memes of Code Review?

Vogel612Meme: Monking Originator: Morwenn Cultural Height: The 2nd Monitor Background: A morning greeting to the Monkey doing his monkey-business, in other words: monking Examples: A small chat search Variations: Monkernoon, Monkevening, Monknight, ... Important is only that it begins with Monk... ;...

 
@MannyMeng, Monking is a portmanteau for Morning + Monkey
 
11:50 PM
I know...
But it's not morning here...
 
such as saying Fantabulous which is Fantastic + fabulous
 
It's always monking somewhere in the world...
 
Unfortunately, "somewhere else" is not here...
 
well since we don't have every single person's time zone, we enter and say Morning hoping others don't pummel us for saying it. @MannyMeng
2
 
We need to discuss this post. Please join us in The 2nd Monitor. — Mat's Mug 2 hours ago
 
11:52 PM
Sigh...
 
@Mat'sMug did OP ever show up?
 
One +1 short.... hmmmm
 
@Mat'sMug is it possible to fine possible same two unknown strings using regex?
 
Thanks, santa ;-)
 
@rolfl This answer definitely needs more upvotes:
4
A: N-Queens functional

rolflWhat an interesting challenge. Learning Java8 is on my list, so here's some suggestions I have, but bear in mind that I am learning too.... First up, lets use functions for the functions we have. Starting with the safe function: private static boolean safe(Pos p, Pos q) { return p.x != q.x &&

 
11:55 PM
Unknown strings @Mehrad? What do you mean?
 
@RubberDuck Not that I know of.
But his post turned into a forum thing, and it's a mess
 
Hopefully they do.
 
And I can't VTC anymore
 
@RubberDuck say I don't know what words are duplicates but say Possible in the sentence above was and I wanted to pick up on it.
HELLO old school iteration ...
not a big fan of it. I like smart ways
 
Help! What should I do here:
0
Q: Sum the Multiples of 3 and 5

user3735671 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below N. #include <stdio.h> int main(){ int i=0,j,k,l,sum=0; scanf("%d",&i); if(i<=100000&&i>0){ ...

Someone flagged as off-topic
 
11:58 PM
Yeah. That ^^^. Split and iterate.
 
0
Q: Help spot deficiencies in our Help Center

200_successRegular participants will be familiar with procedures and practices on Code Review. For example, we have rules against asking hypothetical questions appending to or modifying the question after receiving answers answering in comments, even if the answer is brief Those practices have been dev...

 
I'm not sure how you'd regex an unknown.
 
RELOAD!
[Cardshifter/Cardshifter] 3 commits. 1 issue comment.
[Cardshifter/cardshifter.github.io] 9 commits. 2 closed issues. 1 issue comment.
 

« first day (635 days earlier)      last day (3375 days later) »