« first day (623 days earlier)      last day (3388 days later) » 
00:00 - 16:0016:00 - 00:00

4:01 PM
Monking
Hmm
> Is Android Studio a fork of IntelliJ IDEA?

No. Android Studio and the Android plugin for IntelliJ IDEA are built from the same code, and all of the changes in Android Studio are, and will continue to be, available in IntelliJ IDEA releases
- See more at: http://blog.jetbrains.com/idea/2013/05/intellij-idea-and-android-studio-faq/#sthash.P5BGJk0h.dpuf
 
@rolfl Good morning. I just read the chat transcript. Can't believe there has been so much activity over what was essentially a private matter.
 
0
Q: Function "between"

EdeniaThis is a function to determine if a number is between x and y. It is part of a library of mine called EOL or "Everything in One Line" bool between (WORD n, WORD x, WORD y) { return (n >= x && n <= y) ? (true) : (false); }

 
@CaptainObvious That was fast. Had your coffee today I see.
 
@CaptainObvious On what groudns would that be off-topic?
I understand it's not exactly a great question though
 
It looks hypothetical and lacks context (what is a WORD?).
 
4:13 PM
Anyone experienced with Genymotion?
 
@Jamal No idea. A friend of DWORD maybe?
 
@Jamal In Delphi at least, it is a 2-byte unsigned integer value. 0..65535
 
@Morwenn Probably. I would at least expect an #include to make it clear. That's not the main concern with the question, though.
 
@SimonAndréForsberg a ushort in C# terms
 
C does have bool now.
 
4:16 PM
I see - I thought they had to show that in their code, however.
Oh
Nevermind.
 
@Hosch250 And by "now" we mean "for the last 15 years".
 
Yup.
C99 +
I don't do C, but I couldn't believe it didn't have a bool.
So I Binged it.
 
@JeroenVannevel a 404 type not found in Java terms (unfortunately...)
2
 
If you want a bit of history for C...
We always talk about C89, C99 and C11 but there are many more intermediate versions...
 
Of course, C++ ha a new version every three years, until they speed up the development process too.
C++03 and the current version are usually the most famous.
 
4:22 PM
Every three years? Well, that's the plan now.
And there are almost no differences between C++98 and C++03.
 
C++11, C++14, (C++17?)
I've heard of C++98 too, but that is it.
 
Actualy, C++03 only fixes some details, add editorial changes and also value initialization to C++98. Compilers don't make a difference anyway.
 
> Render dirty regions requested: true
2
Naughty OpenGL
 
Thanks Santa!
 
4:34 PM
@JeroenVannevel We want to see dem dirty regions
 
I finally got my emulators running. Finally.
Only took me 2 hours
 
@JeroenVannevel For the android emolator?
 
@skiwi Sí
You'd think it's as easy as creating a new AVD
Nothing is less true
 
If you're using an Intel CPU, make sure to install the Intel version of the emulator
 
When I set up for the Windows Phone emulators, it took hours.
 
4:37 PM
Intel HAXM I believe it's called, not sure though been a few months
 
First you mess around with SDK files. Some stupid SDK manager offering you 150 downloads instead of just telling you which ones you need to develop for each SDK level
 
I had to go into my BIOS and enable Hyper-V, and my BIOS was different than the instructions...
 
But yes, then there is HAXM
But I couldn't run HAXM because I had Hyper-V enabled
so I had to disable Hyper-V
I didn't want to reboot my pc though
 
Only 5 more till 200...
 
And once I had Hyper-V enabled, it didn't work for several minutes, so I got in a chat with HP.
 
4:38 PM
so I installed Genymotion and after some messing around with that (of course it had 4 known issues), it finally worked
 
And of course, it worked then, and they thought I was an idiot.
 
now I just have to re-do everything on my laptop
 
Ah Hyper-V, I believe I have changed that around as well, to find out VMWare or something didn't work anymore, but I think I didn't care about it back then
 
Yes! I finally hit 300!
 
I should probably take a break now that everything is setup.
Time for a movie! Tonight I'll find an API and create something small as exercise for the exam
It's Java, how hard can it be after all
 
4:45 PM
0
Q: execute startup method asynchronously

Michele MariottiI'd like to have this code reviewed. The goal is to call startManager on application start so that the manager is initialized in background without blocking application main thread. Is it a safe implementation? Any reccomandation or best practice? (use an Executor, use a synchronized block, ....

 
@JeroenVannevel Java 6, fun fun fun!
 
@SirPython good start. Keep it up.
 
@skiwi Actually..
oh no, nevermind
 
@skiwi Android API 16 or something and above support Java 7.
 
I think it was just a display thing. A code snippet showed setOnClickListener(View -> search());
But clicking it expanded it to ugly java code
 
4:50 PM
@SimonAndréForsberg Yeah... for projects that's a good idea, commercial not so much
 
@JeroenVannevel yup, that's a display thing.
 
@JeroenVannevel Haha, yes
 
IDEs are smart these days.
@skiwi "projects" are either "commercial" or "non-commercial". Saying "projects that's a good idea, commercial not so much" is.... fill in the missing word here
 
Bah, strange. If I use PushBullet from my laptop, it only shows up on my phone. If I use it on my phone, it shows up on my desktop and laptop
Sweden!
 
@JeroenVannevel Did you get my ping from earlier?
 
4:59 PM
Euh
 
About the RoamingSettings?
 
I think I might but I didn't really register it. I just woke up
You fixed it?
 
OK.
Halfway.
 
You're better off referring to SO though
I don't know any more than I've told so far
 
I found how to signal a change that I can handle elsewhere in my code.
 
5:00 PM
0
Q: Class for easier to read IProgress<Class> handling

TeX HeXThe recommended way to report something as "progress" back from a async function is to use IProgress<Type> or IProgress<Class>. When the caller invokes the async function, it can provide an implementation for IProgress. This object is then used inside the called instance to report back progress....

-1
Q: opencv im2bw implementation

GiladI would like to create a function like Matlab's function im2bw here is what I have done please comment if you think I'm mistaken here; cv::Mat AutomaticMacbethDetection::im2bw(cv::Mat src, double grayThresh) { cv::Mat dst; cv::threshold(src,dst,grayThresh,1,CV_THRESH_BINARY); return...

 
So now I can change it, signal it, and tell the VM to update manually, no cross binding or anything.
Also, this will make it so a change on one device is loaded on all devices.
 
5:17 PM
@Mehrad I just looked at your question, and I don't think I know enough about this to provide an answer.
Other than what we discussed here a couple days ago.
 
5:32 PM
0
Q: Make this code more elegant

f.rodriguesIn the bit of code below: How can I make add_day, add_ week and add_month work as a single function? They are almost copy-paste of one another. I'm trying to follow the DRY rule. How can I remove those try/except blocks? How can I set this so that I don't use the variables day/week/cur_day? ...

 
@Yuushi: Could you please confirm this for me?
 
-1
Q: How to make circular queue in data structure using c++

Muhammad Amireveryone how are you? i am beginner in C++ data structure, please can any tell me how to implement queue data structure? Thanks in advance : )

 
@Jamal _WINDOWS_H is the header guard in <windows.h>; it isn't a macro defined by the asker.
 
Ah. I can remove that part entirely, then. Thanks!
 
@Jamal Well, you could tell that #include <windows.h> is enough since the check will probably be done inside.
 
5:45 PM
@Morwenn indeed
 
@Vogel612 posted that answer you planned on posting:
0
A: Frequently Posted Comments

Simon André ForsbergThis is intended as a ready copy & paste version for including in the Auto-Comments script ###Broken Code I'm afraid this question does not match what this site is about. Code Review is about improving existing, working code. Code Review is not the site to ask for help in fixing or changing *wha...

 
6:18 PM
0
Q: c# sqlite insert code optimization

JASI just started working with SQLite in C# to test various features of an application. In building my first SQLite example I wanted to insert a large csv into a table (Person) with two columns, A and B. The csv file is 50MB in size and contains multiple rows of the same data ("abc, def"). I wrote...

 
6:32 PM
0
Q: My Python code for Project Euler #14 takes quite a long time

Siddhesh Mhadnakimport time start = time.clock() def collatzChain(n): count = 1 while n != 1: if n % 2 != 0: count += 1 n = (n * 3) + 1 if n % 2 == 0: count += 1 n = n / 2 return count chainLengths = [] startNum = 999999 while startNum

 
6:45 PM
@SimonAndréForsberg can't you reformat in a way to make it readable without horizontal scrolling?
 
0
Q: Snake game c++ - beginner

MarkoThis is my first game that I made. How would be code improved to be better? How can I change functions khbit(),system("cls") and getch() that will work on linux too? #include <iostream> #include <time.h> #include <stdlib.h> #include <unistd.h> #include <conio.h> using namespace std; int snake...

 
@janos You can just triple-click on the line you want to select the whole thing
 
@janos That's not the point. Ther auto-comment userscript 'plugin' will take those, and make the comments available for when you comment... It becomes part of the user-interface on Code Review
 
How about if you write this way:
> \###Broken Code
> I'm afraid this question does not match what this site is about. Code Review is about improving existing, working code. Code Review is not the site to ask for help in fixing or changing *what* your code does. Once the code does what you want, we would love to help you do the same thing in a cleaner way! Please see our [help center](http://codereview.stackexchange.com/help/on-topic) for more information.

> \###Answers Invalidated
> I have rolled back the last edit. Please see \*\[what you may and may not do after receiving answers](http://meta.codereview.stackexchange.co
 
@janos it's community wiki you know :)
 
6:59 PM
in a post it will look a bit different
ok I'll test it there
I edited the first 2 for a test, can you check if it's still usable for you that way? meta.codereview.stackexchange.com/a/4978/12390
 
@janos to copy into the auto-comments script, it is better if it is not formatted.
so it should be *what*, not what
 
I see *what*, don't you?
ah, I didn't fix everywhere. look in the 2nd
well how about now?
 
missing line break after "answers invalidated"
 
ok updated again
 
other than that, I think that works
 
7:04 PM
I would think (but maybe I'm wrong) that you can still copy-paste this, but now it's also easy to read
ok I'll update the rest. If it doesn't work out, then you can always roll back
 
First Physics question, 3 view, already Favorited.
0
Q: Gravity and bottomless pits

Hosch250Assuming that someone is theoretically able to make a hole through the center of a large planet, and then jumps down the hole, what will happen? Given my understanding of gravity and energy, my estimate is that in the absence of any resistive forces, the person would fall right through to the ot...

 
@SimonAndréForsberg never mind, rolled it back
 
@janos I have a standard non-working code response, should I post it there?
Welcome to Code Review! Code Review provides reviews for working code, not code that does not complete its purpose. You may find help with your question at Stack Overflow, and once the problem is solved, be sure to come back here and post your full program for review so we can suggest improvements.
 
to which question?
 
To the Meta question.
10
Q: Frequently Posted Comments

Simon André ForsbergOn Code Review we often encounter questions with the same kind of problem over and over again. Some of us are using the auto comments script which allows you to maintain a list of comments to post. What are some useful tin-can comments that can be good to have in your list of comments? If you ...

 
7:19 PM
@janos your version didn't work?
@Hosch250 can be added to the existing non-working code answer.
 
Anyone interested in starting a Java-based project that allows people to manage their own personalized set of close reasons on a public server I will host? (using Java, REST, and so on?)
The userscript, if I recall, can pull the data from the server.
 
@rolfl I don't know if this is a dealbreaker, but there's a stackapp for that which you can use as a chrome plugin
 
@rolfl so essentially, the same thing as auto-comments but for close reasons?
 
yes, that, but also for auto comments....
 
@SimonAndréForsberg it worked, but I'm not using that plugin so I might miss something, and then I don't want to be blamed if something doesn't work later
 
7:22 PM
It might be just me, but I'm quite happy with the close reasons we have?
 
Let me list my concern with the auto-comment script... I have to manage it on many different machines.
I would use it if it had a centralized store for the content.
 
@rolfl so a Java-based project both for auto-comments and for close reasons?
> The Auto Comments script also has support for a "remote" feature where you can use this URL: zomis.net/codereview/auto-comments
 
12
A: AutoReviewComments - Pro-forma comments for SE

Benjolstatus-completed There are two 'major' changes to V1.2.2 'Remote' comment source You can now define an external source for your comments, and 'import' them. This means that you don't have to manually copy comments from site to site and PC to PC. To do this, you click on the 'remote' link; ent...

 
Which do you think is nicer/cleaner:
Code Review provides reviews for working code, not code that does not complete its purpose.
I'm afraid this question does not match what this site is about. Code Review is about improving existing, working code.
 
1 min ago, by Simon André Forsberg
> The Auto Comments script also has support for a "remote" feature where you can use this URL: http://www.zomis.net/codereview/auto-comments
But the comments I find useful are different to the ones you do.
what I am saying is that the remote site should be smartened up, and instead of being a static page, should be a user-personalized output with a server-side editing function.
 
7:27 PM
@rolfl ok, I understand. I like your idea.
 
available as "http://somehost/autocomment/rolfl/"
 
I like the idea, but I won't help.
I dislike Java, and I'm busy as it is.
 
Then, also have an editing frontend to allow people to customize their side.
 
I'd be willing to help.
Will you also work on this project, monkey?
 
Yes.
 
7:28 PM
I might possibly be interested... if time permits
 
And I can offer a host site as well.
 
I can also offer a host site (or two)
 
I'd be interested in seeing something akin to a User Requirements Document if you don't mind setting one up
 
So, is Spring MVC fine with you @rolfl?
 
I was hoping for a more RESTful & Javascript interface.
 
7:29 PM
Which do you think is nicer/cleaner:
Code Review provides reviews for working code, not code that does not complete its purpose.
I'm afraid this question does not match what this site is about. Code Review is about improving existing, working code.
 
Could go for ASP.NET Web API
Very resty
 
I need to learn REST and Javascript .... this ties in with some other goals.
 
@rolfl REST and Spring MVC isn't mutually exclusive, is it?
 
Hmmm... @Simon, I probably don't know enough about Spring MVC to know whether I have just contradicted myself.
2
@SimonAndréForsberg That
 
@rolfl I don't know enough about REST to know whether you just contradicted yourself.
Spring MVC is a framework for the web-based stuff. You can pretty much do anything web-wise with it.
 
7:33 PM
The Restful server would sit well in many places, but probably won't have any UI component at all. Java is convenient for me, but I would also be intrigued by node.js as well.
 
REST is really just a way of building your URLs
 
I ocnsider Spring and MVC to be GUI components.
 
If you can define custom routes in Spring MVC (which you can), then you can make it RESTful
Make sure you can configure each call's URL and HTTP verb and that you don't rely on stateful operations
And you've got a REST interface
 
@rolfl Spring and MVC are not GUI components. I'd say that Spring MVC is purely back-end. There's nothing GUI about back-end.
 
@Jamal This means a class declaration and an array variable declaration in one statement, or what the heck? -- class Past { /* declaration */ } past[50];
 
7:35 PM
Or perhaps I have been missing out on something when it comes to Spring MVC :)
 
I have never Sprung Spring.
Things with MVC are foreign to me.
 
Is it something you'd be interested in learning a bit about for this project?
 
Yes, interested, if it's an appropriate tool for the job.
 
I think it is.
There are other appropriate tools as well, of course.
 
0
Q: Is there an equivalent to ASP.NET WEB API in JAVA world?

user3531270I've been a .NET web developer for several years now, working with asp.net web forms and c#, wcf etc.But recently developed touch enabled customer facing application. Its device-agnostic application designed for any platform capable of running HTML5 applications (iOS, Android, Windows8), for Mobi...

I've played around with spring MVC for a class last year
if you ask me, it's typical Java
 
7:40 PM
@JeroenVannevel is that good or bad? :)
 
Bad of course
It feels really.. how do I put this.. antic
 
@Jamal (or somebody else who knows C++) am I right that this will always be true? if(field[x][y]==' '||'H')
 
@janos Not a C++ guy but that would really surprise me if it worked
 
g++ compiles it
 
7:45 PM
16 mins ago, by skiwi
I'd be interested in seeing something akin to a User Requirements Document if you don't mind setting one up
I think I should do that, and get back to you.
I need to install a new component on my home furnace.... IRL.
 
@rolfl Didn't know you had HVAC skills too. Is there anything you're not skilled at?
 
8:01 PM
0
Q: Generic publisher class

munyengmThe code below is a publisher base class. I've never really liked the way I implemented this class. Are there any improvements/simplifications I can make to it. package com.loudsight.eventrade.core.publish; import static akka.dispatch.Futures.future; import java.io.ByteArrayOutputStream; impor...

 
8:28 PM
@rolfl You can make them quite nicely on Github
 
@JeroenVannevel wow... lol
 
8:52 PM
Code: Y U NO WORK?!
 
@skiwi because compiler error?
 
@SimonAndréForsberg Nope, failed unit test
 
@JeroenVannevel I had never seen Carl-Einar Häckner before. I've heard his name I think but didn't know he was a magician.
@skiwi because exception?
 
Just a simple failure
Last time I checked "random" does not satisfy Predicate<String> condition = line -> line.length() == 1;
Oh, I feel stupid
@Override
public boolean nextLineMatches(final Predicate<String> condition) {
    return lineReader.nextLineMatches(readCondition);
}
So that's why it doesn't work
 
Last time I checked, readCondition != condition
 
8:57 PM
return lineReader.nextLineMatches(readCondition.and(condition));
 
9:21 PM
@rolfl Hi Rolfl
 
0
Q: Aligning unordered list elements by their last letter

user63228Is it possible to align multiple distinct unordered lists by the last letter of the text they contain, given they all have the same class? I've tried changing the direction, text-align, text-align-last, but nothing seems to make all the unordered lists line up correctly. That is, the output could...

 
9:44 PM
My mind is broken.
 
0
Q: C++11 lock free collection similar to std::forward_list [retry]

BrentThread safe and lock free collections are very hard to write, so I'd appreciate any feedback, especially regarding bugs. The code below is a self contained cpp including some tests. This question is a new iteration of the closed question C++11 lock free collection similar to std::forward_list a...

 
Spring + Thymeleaf for a webstore, anyone wanna share their thoughts and experiences on that combo?
 
10:00 PM
Never done it.
What does the web say?
 
Well, I was mostly curious to have a conversation here
For all I know, Spring is moving to using thymelaf and java configurations instead of jsp and xml
And I have to use frameworks in my webapp :/
 
-3
Q: Code for printing out the truth

EdeniaOne of the best functions I have built.. void printruth () { while (puts("Microsoft is the main definition for \"Bunch of extremely incapable developers\"" "Developers, developers, developers..\n") != EOF /*|| 1*/); } The function has a task to be written on the most elegant w...

 
@CaptainObvious Liedetector program?
 
10:19 PM
Nice Naruto answer here:
1
A: Safety of contact form

BrythanMost of my comments are unrelated to security. A few down at the bottom. $myemail = "YOUR EMAIL ADDRESS"; Elsewhere you use snake_case names. If you did that here, you'd have $my_email. I'm assuming that you removed the read email address for privacy reasons. if (!preg_match("/([\w\-]+...

 
@CaptainObvious Is it just me, or were they trying to make a point, even if they got closed?
 
@Phrancis It was just a new humidifier .... though I have done a lot more in the past.
@ChristiaanScheermeijer - been in my basement for a few hours, just checking in now, but I have been messing with my furnace, and I was on the way to the shower.... back in .... 20.
 
10:52 PM
1
Q: Order a delicious pie here

Alex LFor a quick summary: I've created this internal web application, and I've hit a point where I can really see the mess I've made. I need some help separating the logic, the view, and the data. More detail: Over the past few months, I've been doing all I can to learn more about JavaScript built we...

 
@Mat'sMug That should be AwsomePost = BadCode + GreatTitle;
Hi, @Mehrad.
Get my comment earlier?
 
@Hosch250, it's all good. Thanks for checking it out though. I'm actively looking for the answer and it seems it's not an easy and straight forward issue at all.
 
Nope, it usually isn't.
 
Morning Btw 😊
 
Get it down to one problem, then post a question on SO - you'll probably solve your problem inside of 10 minutes and be able to answer your own question.
Evening.
Sun is just setting here.
 
10:58 PM
Yes I did. That's what I was thinking you about. ☺
 
That is what I have been doing frequently.
0
A: Unintentional Multi-threading in Windows Runtime

Hosch250OK, with a little bit more searching, I solved the problem: In MainPage.xaml.cs, this: Windows.Storage.ApplicationData.Current.DataChanged += (a, o) => { Data.Theme = (int) Windows.Storage.ApplicationData.Current.RoamingSettings.Values["Theme"]; }; Should become this: Windows.Storage.App...

 
Yep. I broke the problem down and looked around. In this stage with. NET 4.0 there isn't much I can do other than writing some custom controls to fix the issue. However, the liked my CR question since somebody could have a look at it and comment on the big picture.
 
0
Q: Don't understand Classes with Ruby Book Titles Program

nick stobieSo I am very new to Ruby and all the tutorials and courses I've read don't seem to go to deep into Ruby classes and their syntax. I'm working on a test-first-ruby program to properly format the titles of books. I was able to pass all the RSPEC tests but only because I stole part of my code from a...

 
11:25 PM
Monking!
 
shhh I am only half here...
 
Me too actually ;)
 
Smashing bugs.
You know, CR gets quite a lot of questions into the Top Network list.
There are a ton of changes in the last Win8.1 update.
 
11:55 PM
somebody cares to shoot down this zombie (hopefully within the next 5 minutes):
0
Q: Product page filter

imperium2335I am still learning Laravel and I am in the process of creating a small shopping website. On the left hand side there are a series of filters that appear depending on what products have come back from the search, to allow the user to filter their search further. I.e. if none of the products sea...

 
Or maybe some things were changed when I reinstalled windows.
@janos Don't know PHP.
 
too bad
luckily it seems somebody else does ;-)
thanks Santa!
need just one more to cap, in 2 minutes...
phew, that was awfully close
 
How close are you to Legendary?
 
thanks guys
still pretty far :)
 
RELOAD!
 
00:00 - 16:0016:00 - 00:00

« first day (623 days earlier)      last day (3388 days later) »