« first day (543 days earlier)      last day (3466 days later) » 

6:00 PM
@Gemtastic I just realized that you're Swedish. Where did you come from?
 
@SimonAndréForsberg Göteborg
Though at this site, shouldn't one say "where do you code from?" ;P
 
@Gemtastic that's where I worked! (Although Bing translation called it New York)
you're not the only Java programmer that doesn't drink coffee, btw!
 
woa nsfw
 
@SimonAndréForsberg I'm glad to hear that. It feels a bit ironic though. Not being a programmer that turns coffee into code :P
@SimonAndréForsberg Worked? The advertising agency?
 
@Gemtastic yup.
 
6:04 PM
@SimonAndréForsberg I see :)
 
6:19 PM
Anyone here want to check something for me? aviation.stackexchange.com/questions/9376/… <--- that link, for me it says '1 more comment' under the post, but, when I click it, there's nothing... anyone else the same?
 
@rolfl same thing here
 
@rolfl same here
 
@Gemtastic you could turn Pizza into Code?
@rolfl Weird
 
@Malachi Acording to a certain someone at SO I turn home-made thai-food into code :P
 
lol
 
6:25 PM
Quite literay; I wrote a program that prints the recipe XD
It's more advanced than it sounds like, I did it for the luls and to practice OOP
 
lol
any VB Experts around?
how can I make this much more readable
If Rule1 = True Or Rule2 = True Or Rule3 = True Or Rule4 = True Or Rule5 = True Or Rule7 = True Or Rule8 = True Or Rule9 = True Or Rule10 = True Or Rule11 = True Or Rule12 = True Or Rule13 = True Or Rule14 = True Or Rule15 = True Then
                Return True
oh yeah and I am out of stars
 
0
Q: '1 more comment' but no more comments

rolflThe following post has 'show 1 more comment' link, but, when I click it, there are no more comments: Why is the de-icing fluid sprayed on jets coloured orange? Clicked:

Thanks all.
 
@Malachi why are you = Trueing them all??
 
@Vogel612 not my code, I am cleaning it up. but I would do that too!
lol
 
also, you could stuff it all into an array, and iterate over that...
 
6:28 PM
it's like that throughout the whole code
it's going to end up a return statement because the method is a boolean method, but the dang thing does so much more than just return a boolean
 
=TRUE... ALL THE RULES
 
-3
Q: Determining the time complexities effectively

user2773985I am working on a problem "3Sum", in which, given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. I wrote my naive implementation which was O(n^3) since it was checking for every possible combin...

 
so this is what I have
Return Rule1 Or Rule2 Or Rule3 Or Rule4 Or Rule5 Or Rule7 Or Rule8 Or Rule9 Or Rule10 Or Rule11 Or Rule12 Or Rule13 Or Rule14 Or Rule15
all of those rules are set inside this method, it should probably be it's own class I think
 
hmm... yea...
Any<T> is calling
 
but I am not going to fix that just yet.
@Vogel612 ????
 
6:33 PM
 Return rules.Any(x => x);
 
@Vogel612 can I do that in VB.NET?
 
I don't have the slightest clue...
but that's probably how I'd do it in c#..
 
so I need to create a collection of booleans and then say if any of them are true return true
 
@Malachi sounds like a question for Ducky or Mug
 
and set them accordingly
@Vogel612 sounds like he has the right idea though @Phrancis
 
6:36 PM
Yeah that sure sounds simpler
 
I am wondering about the on-topicness on this one...
0
Q: Loop and switch between videos (RPi GPIO)

jmcclaireI've been told synchronization using time.sleep() is not a good idea. Also, after the loop has been running for a while it ends up crashing. Can anyone suggest a better/cleaner way to do a video loop as the default with switching videos (OMXPlayer)? I'm pretty novice so the simpler the better as ...

> Also, after the loop has been running for a while it ends up crashing.
 
@SimonAndréForsberg broken/not written
 
@Malachi if it's .net 3.5+, use LINQ ... IEnumerable.Any()
 
~yes
 
VB.NET == [C# with an ugly syntax]
4
 
6:44 PM
~♫ celebrating
 
0
A: BOOL declaration

nhgrifI want to address a couple issues the other answers do not address. First, if we're going to override a view controller life cycle method such as viewWillAppear:, we mustn't forget to call super: - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; // my code } Nex...

 
Hi @nhgrif
 
3 good answers on there, though I think yours is the most thorough
 
Data Center Maintenance Sat, Nov 1 2014 - 15:00 UTC (11AM EDT) - 19:00 UTC (3PM EDT)We will be performing... http://tmblr.co/Z7Lcqt1UKKzPv
 
6:52 PM
@Mat'sMug I can't star that, but it's the thought that counts
@Mat'sMug I have to have an Enumerable of them though right?
I suppose I could do a dictionary? or .....
 
^^ RSA
 
oh wait..... I don't know if this is 3.5 or not.... guess I will find out huh?
 
monking
 
monking
 
If I wanted to write an iPhone app and have never done iPhone app development, would I be better off with objective C or swift?
 
6:58 PM
android.
3
;-)
 
@rolfl Why would I develop for a platform I don't own or use?
 
@Mat'sMug I'm out of stars.....
 
@nhgrif Good answer! My review was really restricted to the property declaration and usage, yours is more general. And it seems that it caused some points for me as well :)
 
@Donald.McLean Considering the uglyness of the syntax of Obj-C, I'd try Swift. (No offense to all Obj-C'ers)
@Donald.McLean depends on what you are developing.
 
I assume that iOS development without knowing Objective-C would be difficult. There is a lot of documentation, sample code and online resources which are only available in Objective-C.
 
7:14 PM
@SimonAndréForsberg I'm getting kind of tired of some of the limitations in the iTunes music player.
 
@Donald.McLean so a music player app it is then, I guess.
 
0
Q: Loop and switch between videos (RPi GPIO)

jmcclaireI've been told synchronization using time.sleep() is not a good idea. Also, after the loop has been running for a while it ends up crashing. Can anyone suggest a better/cleaner way to do a video loop as the default with switching videos (OMXPlayer)? I'm pretty novice so the simpler the better as ...

I'm really hesitant if it's off-topic or not. Doing synchronyzation with thread sleep is broken... but multithreading can be hard. Is this broken code ?
 
no clue....
that said...
Toodles!
 
Bye @Vogel612!
 
@Marc-Andre I was wondering the same thing a bit further up in chat
I actually just have to add a second close vote.
 
7:25 PM
@SimonAndréForsberg Normally I would let a multithread question go by without problem... But synchronization with Thread.sleep ... is just so awful that it feels like it's broken not because of some complicated issue but just a simple I don't care about googling a bit...
 
@Marc-Andre maybe that would be a good start to an answer?
 
I do not answer question that I feel could be off-topic
3
 
Fair point
 
That would be different if I would consider the question on-topic, but I'm not decided yet ;).
 
@SimonAndréForsberg Yes.
 
7:37 PM
no Java Compiler here at work right now, can someone check out my code and make sure it performs correctly for the OP
0
A: Finding unique triplets in an array adding up to 0

MalachiInstead of While loops for more than one incrementation while(k+1<num.length && num[k]==num[k+1]) k++; And while(j+1<num.length && num[j]==num[j+1]) j++; And while(i+1<num.length && num[i]==num[i+1]) i++; you should use an if statement inside the for loop right before the end...

 
le gasp the unchecked code post :O
 
@Malachi if you're still on .net 2.0.... my sympathies..
 
@Gemtastic what?... I was thinking more along a logic perspective, but couldn't check all the work in my head.... lol
@Mat'sMug IKR. it happens around here quite often
 
@Malachi It's tough. I code in my dreams so I can kinda relate... feels like forever until you wake up and can put it into the IDE XD
 
7:53 PM
I've never dreamt about code, that I can remember. Pretty sure I've dreamt about algorithms though.
 
I also don't dream about code. Unless you include day-dreaming...
 
Huh. Looks like the order of inherited types matters. MyType : Class, Interface is fine but MyType : Interface, Class isn't
the more you know
 
I dream about it almost every night. In the more code heavy days I will wake up in the middle of the night to code XD
 
@Gemtastic Believe it or not, code is not everything.
 
@SimonAndréForsberg To me, right now it is
But that's because I'm studying it
 
7:58 PM
What/Where are you studying? Chalmers or something?
 
@Gemtastic TS
I love writing Code or at least troubleshooting it and making it clean.
do you have any test Arrays that you can post along with their expected results? — Malachi 19 secs ago
 
TS?
I just love doing any coding atm :P
 
@Gemtastic TS = Theoretical Star, we say that when all we have left are thoughts of starring wonderful chat posts for the day.
hey, do me a favor and vote on this question and the wonderful answer to it? please. codereview.stackexchange.com/q/40146/18427
 
Do 10K users really ask for up votes on their own answer here ?
 
@MartinR Even 20K users do some times.
How else do you think we got to so much rep?
 
8:14 PM
@SimonAndréForsberg s/20K/40K/
 
@Malachi Ah, I see :P
@SimonAndréForsberg I'm just studying at a lowly YH school, but I'm giving it my all
 
@Gemtastic YH? Yrkeshögskola?
 
@SimonAndréForsberg Yup
 
This place seems to be crawling with Swedes every now and then, but it seems like I'm the only one that has really stuck around.
 
32
Q: Let's make More Community Ads!

rolflBack in April we got together and put together a shortlist of community ads that can be posted to other graduated sites. That was a very successful campaign with probably a thousand or two "click throughs" to Code Review. Let's reboot the process and roll the ads out again! What are Community P...

 
8:25 PM
Maybe they have other things to do? I dunno, fika downtown is high on a lot of peeps to-do list
 
2 days left to the community ads competition closing
4
Any suggestions on threshold for 'good enough' to go through to the various sites?
 
@SimonAndréForsberg it's frequently crawling with Canadians as well ;-)
 
cough cough 18 cough
 
Crawling.
 
Holy crap this is still going on over at PPG!
0
A: Evolution of "Hello World!" (testing new type of challenge)

NitAnswer 97 - Dart //[]([.]c;#i main() { print('Hello World!');} //#[;]#bye;dnl</> Distance: 7 It's about time we got an #include of some sort.

@Pimgd!
 
8:33 PM
John Skeet one catches the eye, at least with the timing of CR graduating. There are so many good ones though
 
I've already downvoted the Skeet ad once, I'd rather have a "come beat Monkey's rep!"
I am surprised this one doesn't have more votes though:
13
A: Let's make More Community Ads!

Mat's MugI wanted to reuse the "tough questions, smart answers" slogan from the previous round, so I combined it with @flambino's idea and got this: Too crowded?

 
@Mat'sMug - (and others), I confirmed with the powers-that-be that the Skeet one is OK to publish from an SE perspective too.
 
0
Q: Threaded generalised transform

DanielI'm writing an application which works with huge amounts of sequential data, and often found the need to use std::transform. I see two potential improvements to std::transform: Allow for variable number parameters. Take advantage of the linear separability of the data by multithreading. Can a...

 
@SimonAndréForsberg I really like that one.
 
8:40 PM
So, now would be a time to promote your promotions then too ;-)
 
@RubberDuck Grab all the sock-puppets ducks you can and upvote it!
 
I already did.
I also downvoted the Jon Skeet one.....
I think this might be my favorite though.
Or maybe it's this one.
 
^^ That I like a lot, no surprise it's at the top
 
@santa thanks!
 
9:07 PM
@Mat'sMug how do I import LINQ into a VB class?
nevermind I am going to try importing Generic for the .Exists
 
9:19 PM
Huh. I may have actually found a way to unit test EF
That is, as soon as I receive confirmation from the others that I didn't break the actual application
2
 
9:31 PM
I don't know why they don't just return true from this method when one of the rules evaluates to true, right now they are going through all the rules and then saying if the first one is true then return true, sigh
I don't need all these variables...
 
0
Q: Finding the Mode in an Array in Javascript

user2801122I am a beginner in Javascript and just wanted to get my code reviewed. Here I have created a function that takes in an array and returns the mode. If there is no more then I just want the function to return the first number. It seems a little to long and I feel like there may be more clever ways ...

 
Anyone know a good tool for copying a filesystem in parts of a certain size?
 
that might be a good question for Superuser people....maybe
 
@TheKittyKat The Linux dd command? USE AT YOUR OWN RISK
 
you might get more help asking here, I don't know what the response time is though

 Root Access

For all you Super Users out there. You have backups, right?
impressive @TheKittyKat 535 rep in 17 days, Nice!
 
9:42 PM
..... More of a few days then heaps of not doing anything
 
this service would be so much easier to maintain if it were in C# instead of VB
@TheKittyKat some of us are only on here on the weekends or in spare time.
@TheKittyKat welcome to Code Review, Glad to have you here
3
 
Thanks <3
 
Holy shit.
Received an exception out of nowhere, first search result is the exact same setup: recent change to the DbContext by adding a constructor (exact same constructor I added) which causes problems with Unity's dependency injection
Added 1 line of code straight from the answer and it works
Buddha is watching over me
 
9:58 PM
@TheKittyKat what are you actually trying to do?
 
Large amount of data however small storage to transfer between the locations
 
0
Q: How to rename and move files in a subdirectory with an index and the folder name … better?

krismajeanI'm putting together a script to take .mp4 files organized into folders that described the video (eg. cat) and I'd like to do the following: rename them with the folder name and a number; move the video into a folder named and numbered in the same manner parse the video into frames using ffmpeg...

 
that is a tough problem. transferring over the web or something? I have a program I would recommend to safely copy an entire hard disk or partition, but it would be non trivial to break it up into parts and recombine them
 
Can't use web.
 
@TheKittyKat tar
8
A: Create a tar archive split into blocks of a maximum size

jordanmYou can pipe tar to the split command: tar cvzf - dir/ | split --bytes=200MB - sda1.backup.tar.gz.

 
10:05 PM
@rolfl that does sound like a much better option than dd :) Why didn't I think of that?
 
Did someone say tar
 
He did say filesystem though, perhaps I took it too literary...
 
Personally I'd try tar --version but I think it will blow up
 
The big filesystem is full so creating an archive of everythig at once wouldn't be fun
Unless tar is somehow pausable at each split
and even then the filesystem may change in between
 
@Malachi System.Linq
 
10:11 PM
@Mat'sMug I sent that idea packing
 
Guess I will just manually find files that aren't too big and copy over time
 
@Mat'sMug turns out that I should return Early from all the logic of those rules. like if I know that rule 1 is true then I don't need to do the rest I just return true.
anyway. TTQW
 
help help I'm getting distracted by sites about xkcd
 
@Malachi .Any() won't keep evaluating the collection once one condition has returned true
 
10:28 PM
@SimonAndréForsberg @Donald.McLean Considering the ugliness of Swift, I'd highly recommend starting with Objective-C. At the end of the day, you're ultimately using Foundation/UIKit/etc. for most of what you're doing, so mostly the difference between the two is syntax. Take VB.NET versus C#.NET, for example.
 
@nhgrif Oh? Apparently I need to take a closer look at Swift code.
 
Swift's syntax is most likely closer to what you're familiar with. Objective-C's syntax isn't. Most of the existing examples and documentation exist in Objective-C but not necessarily Swift (the official documentation is pretty well bilingual now).
 
@Pimgd This fetches arbitary JavaScript from StackOverflow and eval()s it. This is probably the worst thing ever; you've been warned!
 
As I'm perfectly comfortable with Objective-C and all of the frameworks you use for iOS development, I can look at an Objective-C tutorial, example, etc., and write it quite naturally in Swift as I've come to understand its syntax.
But for someone unfamiliar with Objective-C, Swift, or the frameworks, I think this would be harder to accomplish... and you'll have an easier time finding information about Objective-C.
 
@nhgrif do you use the playgrounds feature of swift? it seemed to run really slow for me
 
10:36 PM
No. I actually don't write a ton of Swift. But what I've found is that the playground hates loops with a passion.
 
yeah that was exactly my problem. allocating a million objects was pretty much impossible
 
We are investigating a network incident that blipped the sites over here, but are online at this time.
 
0
Q: Auction function for a game

SmugglarenThis is an auction function for a game where you can bid on houses on the website. You set a limit, and if posts limit below current bet or below your limit, it will raise the bid from current plus 1, until the limit is met. If your bid is over a player's limit, it updates it with your limit. L...

0
Q: Dividing code into functions. Is it good approach?

mstysfI have been writing swift code for a while. And I have read a lot of tutorials about how functional paradigms can be applied to swift. Here is currently what I do. I defined a simple operator. Looks like this. infix operator >>> {associativity left} func >>><A,B>(a: A?, f: A -> B?) -> B? { i...

 
10:58 PM
@CaptainObvious It's always good to divide code into functions.
 
0
A: Generic class for displaying UIAlertView / UIAlertController on iOS

nhgrifAs a start, this is confusing: - (BOOL) supportsiOS8 { Class kAlertViewClass = NSClassFromString(@"UIAlertController"); return !kAlertViewClass ? NO : YES; } There was a time when I was uncomfortable with ternary operators. They're admittedly kind of weird. I've gotten used to them, ...

 
11:13 PM
@Malachi Linq's Any returns as soon as one of the elements is true...
 
I am quite certain that this is how Tetris really works...
 
lol!
> LINE PIECE
3
 
0
Q: Will this design be considered as a bad design?

Jabir Al FatahThis is my very first website which is going to be published online. Along the way it's gonna be a complete website. Now, firstly, I am a very beginner in this field, and I want to be a good web designer in future. With that being kept in mind, I want to know my weak point in designing and impro...

 
Will this title be considered as a bad title?
 
11:34 PM
0
Q: Project euler #7 with c

Egemen Sarımadeni wrote these codes for question.it can be compiled but when i run it,i can only see a black screen. thank you for your helpings. #include<stdio.h> #include<conio.h> bool controllingprimenumber(long number){ int k=0; int i=2; while(i<number) { if(number%i==0) { ...

0
Q: Function to run MySQL SELECT queries with no leaks

CornwellI am upgrading an old massive website that is a Classic ASP \ ASP.net hybrid. I still have a long way to mvc... Right now I want to convert all code that uses ODBC to the mysql connector specific code. I've made there 2 functions: 1: DataTable GetData(string query, List<MySqlParameter> sqlPara...

 
@Mat'sMug x4
 
Well it works. Just not forever. I was recommended to post my code on here by an elite member on stack overflow...I'll delete it in a day or two if nobody replies. Thanks! — jmcclaire 3 hours ago
 
11:52 PM
Want another helping of broken code?
 
you would think "working code" would be a pretty objective term, but it seems there's a lot of room for interpretation
 
> i wrote these codes for question.it can be compiled but when i run it,i can only see a black screen. thank you for your helpings.
 
"it works, just not forever" "it works, just not for some inputs" "it works, for some definition of 'works'"
 
"it works, just only when it does"
 
it works, if you squint at it real hard
 
11:58 PM
Input on this edit? Seems like editor changed the OP code...
 

« first day (543 days earlier)      last day (3466 days later) »