« first day (547 days earlier)      last day (3470 days later) » 

12:04 AM
@SimonAndréForsberg Hey!
Uh, still working on that binary...
 
12:25 AM
@EngieOP is compiling for Windows that messed up?
 
 
2 hours later…
2:26 AM
0
Q: Nicely written code for displaying links to a chat room

EdeniaSo, i have wrote some quick lines of code. It is a program you can compile on Windows. The program is an invitation of a chat system for programmers. Once you press enter, you will open the link with your default internet browser. You can learn more from the program itself. 102 lines of code 4 ...

 
3:16 AM
Python folk, some validation of my comment, please:
math.floor does not return an int, it returns a float that has no decimal component: docs.python.org/2/library/math.html Additionally, when I put your code in ideone, and add some exception handling, I get: ideone.com/8ENwXFrolfl ♦ 50 secs ago
 
4:00 AM
0
Q: How do I print a character multiple times on the same line in Java?

AntuanI'm given a word and need to print the character "a" for the length of the word given: this what I have so far: =>Assume I that word has a already a value private void putAs(){ String a = "a"; int length = word.length(); for( int i = 0 ; i <= length ; i++){ ...

 
 
3 hours later…
7:16 AM
0
Q: Executing AsyncHandler to retrieve JSON data

Steve SmithExcuse my terminology, I'm sure it is wrong. I found this earlier question "Handling AsyncTask, is there a better way?" that seemed to describe pretty well what I was trying to achieve, so I have done my best to implement the same structure in my app to handle the JSON query in the background and...

 
7:26 AM
http://qt-project.org/doc/qt-4.8/deployment-windows.html

I think I'm just going to hop on a windows computer tmrw, and build it there.
 
 
1 hour later…
8:33 AM
Monking
 
0
Q: proper return statements when adding objects to grid

bspymasterBefore I start, let me say that although this question is marked as a python question because my example uses python code, by no means is this question restricted to python. It's a more conceptual question, and I apologize if I should be asking this on Stack Overflow instead. Here's my question: ...

0
Q: Huffman Encoding

vmpI am trying to write huffman encoding. The main intention of this program is to read the original input string,calculate the frequency of occurence of the character, form the encoded codes and print the encoded string. The code gives a problem when I try to match the original string with diction...

 
9:03 AM
0
Q: I don't understand this approach when encrypting data on client side and passing it to server side. What should be private?

HelpNeederSo I'm passing the data to PHP server side which will use the information later as this: <script> function encrypt() { var salt = CryptoJS.lib.WordArray.random(128/8); var key256Bits500Iterations = CryptoJS.PBKDF2("'.$token.'", salt, { keySize: 256/32, iterations: 500 }); ...

 
9:36 AM
0
Q: Random result in listview android

Mohammad RezaI want to make a activity and its show a view pager and each page containing a list view with custom data, so i write below codes but when i run my application the result in list view is random , anyone know how to fix it? (I am completely newbie to java and android so sorry for code ) My Main...

 
Monking.
 
0
Q: Simulation Framework

RononDexI started creating a small abstract simulation framework and would be happy if someone could take a look at the code and give me feedback on it. The code can be found here: https://github.com/RononDex/Simulation It is currently not in a 100% finished and tested state. It should be multi thread...

 
10:05 AM
Why do my parents have to threaten me to Invite them to my own formal.....
 
 
1 hour later…
11:19 AM
Ow yeah, I finally managed to implemented that gray code adder that I was unable to implement before *-*
 
gray code adder?
Is your code adder color-discriminating? :P
 
0
Q: Elementwise perfect forwarding of a member range

Frederik AalundPerfect forwarding is usually done with std::forward. E.g., template<typename T> void foo( T&& t ) { bar(std::forward<T>(t)); } for some function bar(). Sometimes, only a member of t, say t.x, needs to be forwarded. This is also a solved problem template<typename T> void foo( T&& t ) { ...

 
@Gemtastic Nope, it performs an addition between two Gray codes without conveerting them back and forth to binary.
 
@Morwenn I think you need to explain to this n00b what you mean by "gray code" to me that sounds like a comment...
 
The reflected binary code, also known as Gray code after Frank Gray, is a binary numeral system where two successive values differ in only one bit (binary digit). The reflected binary code was originally designed to prevent spurious output from electromechanical switches. Today, Gray codes are widely used to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems. == Name == Bell Labs researcher Frank Gray introduced the term reflected binary code in his 1947 patent application, remarking that the code had "as yet no recognized name...
 
12:19 PM
0
Q: Abstract classes and interfaces in a game inventory system

toreauAfter reading a lot about interfaces, which I'm new to, I've tried implementing it in my inventory system for a game I'm working on. I have managed to create something proof of concept which seems to work as intended, but I wanted to check with more experienced C# programmers if this is the corre...

 
12:35 PM
Reviewers! There's a big fat orange 7 on my screen!
 
12:45 PM
?
 
0
Q: O(N) vs O(N * N) for Word Frequency Algorithm

ng-hacker-319I am trying to come up with a better solution to the following problem: Statement You are supposed to write a function which takes the contents of a document in string format and also a whole number, n, providing how many results to return. (So that's two arguments for the function.) The funct...

 
hrm, I didn't know you could actually forward a single member in C++11/14...
hooray for learning something from reading a question
 
Haha :D
 
heya Morwenn
 
1:01 PM
Hey! :)
 
how's life been treating you?
 
I'm still alive an I have an internet connection. That could be worse.
 
that's sounding...not so great :/
 
1:22 PM
Actually, I am waiting for an answer to the question "when will I be abe to start working"? I have few information from my potential job and nobody else seems to be willing to hire me anyway.
 
you in an area where there's a lack of technical jobs?
 
Not really.
 
that's kind of sad. You're more knowledgable than 99% of the people I've worked with in the past few years
 
0
Q: Inheritance with one class different

oskarmI reach a point in my code sometimes, where classes inherit (or implement interface) from a base class, but one child class is different. Consider first my event implementations for Guava's EventBus: Base class / interface: public interface IEvent<T> { public T getContent(); } One imple...

 
@Morwenn What are you job-hunting for specifically?
(if you don't mind me asking)
 
 
1 hour later…
2:54 PM
monking
 
monking
 
0
Q: Optimize QuadTree to Find K Nearest Neighbors More Efficiently

user2284725I'm looking a way to make my k nearest neighbors search more efficient. The context of the question is that I'm given a list of topics that have a unique ID (integer) and a (x,y) coordinate (floats) associated with each topic. Subsequently, I'm given another point and the number of nearest topics...

 
3:11 PM
 
@rolfl Sorry!
 
All your fault!
 
Code Review also slipped from 21 to 22 on my site-badge rankings.
;-)
One-vote-short also needs some attention ;-) : data.stackexchange.com/codereview/query/169776/one-vote-short
 
3:29 PM
We lost site-badge ranking to wordpress!?
@rolfl looks like @janos will pass by me in not too long.
 
Can't say for sure, wordpress may have dropped positions too.
Janos has also slowed down to relatively human speeds recently too
Unfortunately, you have slowed down even more, @Simon
 
yeah, I have been focusing a lot on coding recently, and not much on reviewing.
I did come up with a few things to code today that I could put up for review once I coded them (shouldn't take too long), I just need to pick a language first.... I think I'll go for Scala, Haskell, or C++.
 
if you go for Haskell I'll be happy to review it
but be aware I'm not a very proficient Haskeller
 
3:45 PM
@mariosangiorgio have you seen my previous Haskell question?
12
Q: Calculating Luhn-algorithm checksum digit

Simon André ForsbergToday I decided to learn some basic Haskell, and for starters I made a program for calculating the checksum of a Swedish personal identification number. It uses the Luhn-algorithm, aka. IBM MOD-10. Explanation of this code can be found on Swedish Wikipedia and English Wikipedia Here's a descrip...

I think Scala or Haskell would be the most challenging to code in, as they're more functional oriented, which certainly requires a different way of thinking
 
@SimonAndréForsberg nope, I've been away from CodeReview for a few weeks
I'm going to give it a look now
 
it's been 3-4 months already since I posted that o_O
time sure flies by
there is really some truth to what @RubberDuck said btw...
yesterday, by RubberDuck
Why does == to my brain?
Having spent some time with both Haskell and Brainfuck, I do see the similarity...
 
I've never touched Brainfuck but it's a sure thing that if you're not familiar with the language Haskell could be extremely cryptic
and that's a pity because most of its features actually forces you to write cleaner code
 
sounds like COBOL
 
LOL
2
Haskell gets cryptic because it has a syntax very different from the ones of the C-like languages we are used to. So it is a matter of habit. Then there is another source of crypticness and it is that Haskell code is usually very concise because you can factor a lot of common structure away and must of the functions are indeed just a composition of other (often very abstract) functions
 
4:24 PM
the problem is just to find the right functions, eh? :)
 
@Simon - people with OOP type experience learn an instinct to identify objects. You now need to learn the instinct to identify, and create (or reuse) functions.
In java, everything is an Object.... ideally. In Haskell, everything is a function. The trick is knowing which one.
 
hey
 
4:45 PM
straw
 
0
Q: a function to count the longest increasing sequence of an inputted array of intigers

carriasthis is my finished function to find the length of the longest consecutive sequence of an inputted array of integers. it's for an assessment so things like the numerical method used and the format of input are out of my hands and as far as I can tell works perfectly. however, our lecturer has bar...

 
5:02 PM
@rolfl yeah, I guess I have to practice that. You done much functional programming, monkey?
 
@rolfl I second that
I mean, I've only done Java for 8 soon 9 weeks, but it's already bashed into my head :P
 
@SimonAndréForsberg I did for a bit, but I found my brain can only think one way at a time.... so I 'forgot' the functional instincts.
I'm not smart enough to be bothg a good OOP and a functioanl programmer at the same time.
 
@SimonAndréForsberg exactly :)
looking at your code I also see that you didn't use much the type system. In general I am extremely in favour of modelling all the domain objects with their own type
I saw a good F# talk on this subject. Let me try to find it
here we go
http://vimeo.com/97507575
http://fsharpforfunandprofit.com/posts/designing-with-types-intro/
 
@rolfl and then there's also the part about spelling correctly, eh?
@mariosangiorgio I assume the same concepts can be applied to Scala and Haskell?
 
5:19 PM
0
Q: Map with different types for values

res1I am trying to implements a map (that can work as a cache) that has strings as keys and values of different types. In my real case once set the key/values in the map will not change. I used these classes, I take as example the Item 29 on Effective Java book 2nd edition. this is the class for va...

 
@SimonAndréForsberg yes, of course. You should actually apply these principles also to object oriented programming but most of the times it is a bit to annoying to create a new class for everything. I mean, in Haskell or in F# you can create a new type with a single line of code. In C# you have much more boilerplate code that can discourage you from writing a new class for each of your domain objects, even if you really should
 
@SimonAndréForsberg Typos are an artefact of a mind that moves faster than motor neurons... ;-)
 
5:39 PM
@SimonAndréForsberg have a look at this alternative approach
https://gist.github.com/mariosangiorgio/5404bc29f2a40497b657
I am not too sure that using a tuple is really the right thing in this case, but I hope it gives you the idea of a different approach
 
@mariosangiorgio yeah, something tells me that using a tuple isn't the best way to handle it. In fact, Luhn algorithm can be applied (and is applied) to many other 'strings' (sequences of digits), of varying lengths.
 
@SimonAndréForsberg I tried to use a tuple because I wanted to enforce the length. Probably a more generic solution using an [Int] and enforcing its length somewhere else would be better
still I think that you should not be able to create a swedish id containing a number of digits different than 9 + checksum
probably we need:
checksum :: [Int] -> Checksum
and then to define a type SwedishIdNumber that contains a sequence of 9 items (which could be an [Int] or a tuple) and the checksum
 
6:19 PM
0
Q: Support smaller number of frames than pages

Erik ErikssonI've written a FIFO (First-In First-Out) Algorithm function, and I am trying to provide support for smaller number of frames than pages. private void pageFaultFIFO(int pageNumber){ pageFaults++; for(int i = 0; i<pageTable.length; i++){ if(pageTable[i] == freePos) ...

 
7:12 PM
Thanks santas!
 
Did the chat die? I see stars from 2 days ago in the sidebar
Maybe nothing funny was said because I was away..
2
 
Not much was said at all
 
@JeroenVannevel Well, also less stars as I'm barely active
 
I did some attempts but I'm not fun totalk to :(
 
I was too busy with some language-lawyer stuff to be active here, sorry :/
Also, I had a rehearsal with my band.
And I took a shower, that was great.
And I read two chapters from a book.
 
7:18 PM
I'm being sick, so not much input from here
 
7:29 PM
That was answer #80! :D
 
So what? You got a silver badge? :p
 
I am recieving a lotnof input from the 'net, but my output is pretty low. I should probably construct a little practice program that compares stuff...
 
@Morwenn I will, after tag recalc.
 
Unless we decide to burninate first.
 
Good luck. I don't think the CMs are very active today. ;-)
 
7:33 PM
By the way, the question was already 2 yers old .___.
 
0
Q: Best way to upload file using Xcode and PHP

Ahmed AlkaabiI have an app build with Xcode, the user can upload video to the server, to upload the video you need to write the name of the video in a text. The code will insert the Date, Time, User Name, The video link and other information. What I am doing in the code blow is booth (uploading the video and...

 
Yeah, I'm digging around a bit. There is still one C++ zombie, but it's Qt.
 
I'm surprised that my question got attention on SO.
 
7:56 PM
user image
3
 
XD
 
Hmm... New featured meta q?
Or rather, not so new featured meta.
12
Q: First Post Review Queue — what is it? Why is it a bad idea to click "No Action Needed"?

rolflWhen you pass 350 reputation you gain access to the Review Queues. One of them is the "First Post" queue. What is this queue, what purpose does it serve, and how should I process items in that queue?

There we go
 
0
Q: Speed distance and time calculator, how to increase efficiency and OOP?

SharkyDoesCodeThis is a speed distance and time calculator - the comments should explain most of the odd looking code if there is any. I am looking for suggestions to improve the efficiency of the program and how better to structure it - is my approach the best from a 'best practices', efficiency and OOP point...

 
9:03 PM
0
Q: Shell sort seems inefficient

donquixto DacI am testing various sorting algorithms. Right now I am testing shell sort, insertion sort and selection sort. I ran all three algorithms on a randomly-generated list of 1000 integers. The selection sort took 41 seconds, insertion sort took 34 seconds and shell sort sort took over 3 minutes. What...

 
monking!
 
Monking!
 
I'm planning to get an FPGA board. Is there a hardware description lolcode?
 
Lurking Monking
 
Or should I ask that on SO?
 
9:17 PM
I just spent 1 hour looking at generated assembly. My eyes are burning.
2
And bleeding.
Burning blood is falling from my rotten eyes.
 
Maybe you should see a doctor about this @Morwenn
 
Was it asm generated by a compiler or a hand-crafted beauty?
 
By compiler of course.
 
oooh the blood is burning, so generated
yeah my bad
 
Now, I might have to file a bug report in GCC's Bugzilla.
 
9:31 PM
0
Q: Python checking if code has errors1

Ez2EarnI have been assigned to write a program called author functions. One of the functions that I wrote appears to be right in my opinion, but I was wondering if there was any different way of writing the same thing, or if there is any errors in my function. The code is below. Thanks! def clean_up(s)...

0
Q: Triangular, pentagonal, and hexagonal - Project Euler Problem 45

Rezo MegrelidzeProject Euler Problem 45 Triangle, pentagonal, and hexagonal numbers are generated by the following formulae: Triangle Tn=n(n+1)/2 1, 3, 6, 10, 15, ... Pentagonal Pn=n(3n−1)/2 1, 5, 12, 22, 35, ... Hexagonal Hn=n(2n−1) 1, 6, 15, 28, 45, ... It can be ver...

 
9:53 PM
0
Q: Implementation similar to boost::optional for modelling function failure:

gctThe idea being you can have a simple type called maybe that wraps another type, which provides the ability to possibly not return a value from a function. I'm sure it's not perfect yet, but it's got the broad strokes I'm looking for. I'm mostly looking for corner cases I've missed and anything ...

 
10:23 PM
101
Q: Trying to share a question with Facebook: Outcome quite unexpected

KrumiaSo I tried to share this innocent enough question with Facebook: Why is this program erroneously rejected by three C++ compilers? And this is what popped up: And indeed, the shared post directs me to a particularly disturbing article with the same title in gawker.com. I checked the meta tags...

 
0
Q: php session helper class

trollzI build a small helper class for sessions in php. Is there anything to complain about? Perhaps important security holes? class Session { /** * The original reference for the $_SESSION array. */ private $reference; /** * Copy of $_SESSION. Need for check if key or value exists. ...

 
@JeroenVannevel interesting feature bug...
 
0
Q: Ruby infixed math parser

joshhartiganIt only does expressions with 2 operands yet, but I'm wondering if there are any ways I can improve this: # infix.rb: parse infix-operated math expressions class String def is_number? true if Float(self) rescue false end end class InfixParser @operations = [ '/', '*', '+', '-' ] t...

 
:I
 
10:41 PM
note to self: come back here and upvote this post. — Mat's Mug May 30 at 15:23
@Mat'sMug Did you come back there?
+1, very nice answer! (note to self: upvoting one's opponent in a rep race is kinda counter-productive)Mat's Mug May 31 at 0:03
nevermind...
 
waits for flags
 
@Jamal How did you know? :)
 
I know things
 
The funny thing is that I stumbled upon the question just by chance, and then I took a look at the answer, didn't recognize it, wanted to see who posted it, and.... it was me!?
2
 
Would you look at that lovely answer! I couldn't have done it better myself! Oh look, it's mine :O
 
10:47 PM
I guess I'll pimp today's answer (specifically the question, as there is another answer):
3
Q: BMI calculation

TonyI'm very new to C++ and would like you all to review the source code I wrote for a program that calculates the user's BMI and loops the program back to the start if the user needs to do additional calculations. #include <iostream> #include <stdlib.h> using namespace std; float bmiNumber(float p...

(and it does look like a tornado has hit that question code)
 
0
Q: Room for improvement Caesar decipher

ambitious_roiI have recently started learning Python and one of the assignments I have been working on is Caesar decipher.Can you tell me how I can make my code better? def caesar(code, shift): ''' (str, int) -> str Shift every letter in the code by the integer 'shift'. >>> caesar('ABC', 2) CDE >>>...

 
11:06 PM
Huh, brushing off my C has been fun recently. Compare: ideone.com/Z6kddP and codereview.stackexchange.com/questions/68667/…
 
0
Q: Basic Calculator. Is there a more efficient way to structure this code and how can I make it more readable?

hysteriaisticI created this code to make a basic calculator after viewing a few examples. I added the function to continue the calculations myself. I am wondering if there is a way to make this more efficient as I feel I've used some unnecessary code but I can't make it work without. I also was looking for f...

 
You've earned the "Yearling" badge (Active member for a year, earning at least 200 reputation).
Happy CR Birthday to me!
 
Hey, congrats, Simon
 
Thanks @rolfl. Just a few days after you :)
 
What, you got 200 rep this past year too?
 
11:16 PM
yup, apparently I managed to do that.
 
I've taken a few 'low key' days ..... and, it's been good, lazing in bed, watching rugby, eating candy
But, it's time to get down to business again... but it seems like the site's been slow, and lots of closed questions
I wonder if there's a problem with new people getting peeved with lots of closed Q's
 
I still need to finish my Java assignment.
 
They should be reading things before posting, but....
hey @Jamal - no UML this time?
 
Nope, just code. This involves collections, logging, and threads.
 
Those are three pillars of Java, sounds like a useful assignment.
 
11:22 PM
All of the given code came from a class diagram that was reverse-engineered with Visual Paradigm.
 
Any French natives in the house that feel really compelled to translate my resume from English to French?
 
Most of the french-speaking folk here speak Quebec french anyway ;-)
translate: my resume from English to French?
(from English) my resume from English to French?
translate fr: my resume from English to French?
(from English) mon CV de l'anglais au Français ?
 
that's a great translation
I'm totally okay with Quebec French. It just makes me look exotic
 
Hmmm, is it common to put a space before the ? in French?
The logical person would be @Morwenn - but he's been to band practice, and probably not sober.
 
I've seen that before, yes
But I've never been taught it in school
And most French don't really care themselves either I think
 
11:25 PM
You gotta love the Europeans... here's a Belgian!!!, speaking English, asking for a French resume... probably because he already did the German one too ;-)
 
Okay hold up
 
OOpps
 
I'm Belgian
/exit
 
Sorry, deepest and sincerest apologies.
 
It's fun with all the languages!
 
11:26 PM
Which means the Flemish, German, English, and now the french Resume's are done ;)
 
Yesterday I was at bassleader, a big music event
Talked to lots of people, most of them were either Dutch, French or German
 
Actually, as a Belgian, I am surprised the French is not top-notch?
 
Meh, French is fairly bad for most people
although informatics is particularly bad in that regard
I can hold a decent conversational level
and I've totally got that French throat sound down when I've drunk some beers
 
Right, but Italian and Spanish are too far removed, right? Or do you have those at conversational level too?
 
nah, those are too far.
Although I am taking a few online lessons for Spanish!
Going to Argentina next year to teach, gotta make sure I can talk the local language
 
11:29 PM
"a few beers later" everyone's great at everything. ;P
 
German is way easier
You just take the Dutch words and shout them
3
 
People even become prettier!
@JeroenVannevel XD
RAUS! SCHNELL SCHNELL!
 
@JeroenVannevel Nice, I haven't been to South America....
 
WIE SIND SIE KODEN SO VERBOTEN?!
 
@rolfl Same here, haven't left Europe so far. It'll be an awesome experience
PS: did I announce my birthday ended 31 minutes ago?
 
11:32 PM
I used to think less of the Americans because so few of them have passports, then I realized just how big, and diverse the USofA actually is.... there's so much to see and do there, that leaving the borders is almost unnecessary.
The same is true for Europe.
HAPPY BIRTHDAY!
Still sober?
 
@rolfl Hah definitely. They've got every ecosystem under there, although the different languages do make for a nice extra
 
MURICA
 
Yeah, I am now
I got home at 8:30am after coming by train from Antwerp and then another 45 minutes by bike
and I had to go for a family dinner at 11:30
 
@JeroenVannevel knowing quite a lot of Dutch and German people, that is..... actually entirely true.
@rolfl the closest I've been to South America is Honduras, which is technically Central America.
@JeroenVannevel Happy day-after birthday :)
@rolfl I've been to plenty of different European countries, but I'd really like to discover U.S. more as well. Only been to Miami. Once. And only the airport.
 
I've been to Costa Rica... which is pretty close, but not close enough.... it is closer than Honduras
I have dinner on the table... gotta run... but, I have been to > 30 countries ;-)
(been to means walked the streets of ...)
 
11:41 PM
30 countries? Hmm... counting time! Sweden, Norway, Denmark, Finland, Germany, Netherlands, Egypt, Thailand, U.S.A, Honduras, France, Italy, Poland.... hmm... that's it? I'm disappointed in myself.
Good thing I'll be going to Czech Republic at the end of the year.
 
The Old Town in Prague is wonderful
And I loved the cuisine
It was very belgian-y, very farmer-y
 
I'd better check Czech that out then!
2
 
:|
Alright, I can dig it
There must be a name for this.. The Google-Translate-Phenomenom or something
The result of the translation always looks so correct
but as soon as I show it to my teachers, half of it is struck through
As if it somehow hits a blind spot in your brain. Perhaps a validation check on Google Translate input
 

« first day (547 days earlier)      last day (3470 days later) »