« first day (499 days earlier)      last day (3521 days later) » 
00:00 - 15:0015:00 - 00:00

3:00 PM
return a > 0 && b > 0 && c > 0  && (a + b) > c && (a + c) > b && (b + c) > a;
 
Tht is what I edited it to 8 minutes before you did ^^^
 
Yeah well you have it in there twice
 
I find it sad that both answerers thought it necessary to "improve" the checks and failed
 
Hmmmm...... it's pretty easy to tell what days I'm actually writing code...
 
3:02 PM
@RubberDuck I think you are always writing code, just sometimes it's at work and sometimes it's on Code Review
wait maybe that's me.....
 
@Pimgd I can sense your disapproval. It irks me the way it comes across.
 
@Malachi You may have a point.
 
It's just that I find the idea of complicating already complex conditionals even more insane
and yet it's right there as a suggestion on a code review site
 
@Pimgd I find it 'insane' that you think it is OK to have a method called isTriangle(int, int, int) that returns true for inputs that do not make a triangle.
 
@RubberDuck Well mine does not reflect if I'm writing code or not! :P
 
3:05 PM
@rolfl =) I didn't say that.
 
@Pimgd You said I should have kept it as two methods.... :
 
Lemme turn my opinion into an answer
 
That'd be the part where you combine the two methods. You're making the code more complicated to understand. — Pimgd 16 mins ago
@Pimgd ^^^ that.
(I assume you mean isTriangle and isSane...)
 
@Pimgd wtf!?
 
0
A: Modeling a Triangle, with a utility method to classify it

Pimgdpublic static Type classify(int a, int b, int c) { if (!isSaneArguments(a, b, c) || !isTriangle(a, b, c)) { return Type.INVALID; } return classifyValidTriangle(a, b, c); } It's a classify function that takes a set of integers and if they're not all positive or they don't mak...

Perhaps I worded it wrongly
The part where you combine the two methods isn't bad...
it's how you combine them.
 
3:11 PM
Didn't I just do exactly what you did, but more efficiently?
(OK, with a copy./paste bug)... fixed.
 
I preserved the original functions for error reporting
 
When are they ever used for error reporting, and now you have isValidTriangle and isTriangle.... weird.
 
additionally, I notice that the english used in the code seems to beg the function isValidTriangle
Actually
I wonder... is it possible to show that it's NOT possible to have a valid triangle with -1 or 0
-3, -4, -5
a < b + c && b < a + c && c < a + b;
-3 < -4 + -5 && -4 < -3 + -5 && -5 < -3 + -4;
Yeah that'd fail
 
@Pimgd - in every single case in the original code, both isSaneArguments (bad name) and isTriangle were called together to do the validation.
 
I think you can just renamed isTriangle to isValidTriangle and be done with it
I have to go now but I'll comment on this later
 
3:15 PM
Fine, your answer strikes me as being a verbose subset of my answer.
No need for two functions, can do both checks at once, and call it a better name.
 
3:27 PM
Updatedmy answer on phone
With mathemathical proof that issanearguments is unnecessary
@rolfl
 
Hmm. A fantasy series where one of the volumes is titled "Scala". Perhaps I need to read that.
2
 
0
Q: Creation temp file on Windows

dretsI try to implement test that reads data from temp file on Windows. I had the same issue that I solved by using http://stackoverflow.com/a/9155528/230717 answer. def test_read(self): """Test read from file""" import tempfile import os try: with tempfile.NamedTemporary...

0
Q: performance problem in Hackerrank challange "Sherlock and Queries"

DobiI translated the solution by the author to his challange from C++ to Python. It seems to be correct, but I get timeouts for the test cases 6, 9 and 12. Here is the full challenge description: And here is my code: import fileinput import collections lines = [[int(x) for x in line.split()] for...

 
@rolfl and then your answer becomes really valid again because they can get merged
 
codereview.stackexchange.com/questions/62956/… -| new tag hackerrank (we should remove it ?)
 
@Marc-Andre Yes.
 
3:42 PM
great
done
 
Awesome.
 
0
Q: Improving Watir::Browser for my needs

NakilonI want to: use Watir::Browser methods without browser. instance prefix expand abilities of Watir::Browser using own methods and overload existing since I don't need more than one browser launched at the same time, using Module seems to have more sense than class Here is my try: require "wati...

 
(silently removes )
 
installing: MSSQLExpress 2014
4
 
^^ eternal star
Hopefully you don't have too much refactoring to do
 
3:55 PM
I can copy+paste pretty much all scripts.. and then refactor to use CTE's :)
the longest part will be recreating the tables
wow, I can't believe I'll finally have actual FK's
2
 
I felt sure that MySQL had FKs... is it not the case?
 
yes, it lets you configure them. but I haven't figured out which engine actually supports them. I'm done with that crap. One server, one engine, supports everything I need.
@Malachi turns out I'm liking clickonce.. any traps I have yet to fall into?
 
@Pimgd Did you miss the part where I combined both isSaneArguments and isTriangle logic in to just isTriangle?
and then removed isSaneArguments?
 
I don't use it much, I only have like 1 or 2 projects, and I configured them once and try not to mess with them again, so I am far from expert on the issue....lol
if I find any I will let you know
 
4:00 PM
clickonce has been pretty simple though. seems perfect for in-house stuff.
like, right-click project in IDE > "Publish" > Next > Next > Next > Done.
and users get a window saying "a newer version is available, would you like to install it now?" and they don't need admin privs
 
0
Q: Rewrite code from Objective-C to conform with Swift power tools and consice style

POBI started a project with Objective-C and rewrote it with Swift. The project contains two UITableViewControllers: MasterViewController and DetailViewController. MasterViewController is linked to DetailViewController with a segue. MasterViewController has two UITableViewCells. The cell with indexP...

 
@CaptainObvious I like the screenshots, I wish people did this more often!
Hmmm, guess my business unit is not the only one laggin behind in technology... from the corporate IT page...
> Training Videos

Get Started in Windows 7
Watch Now

Lync 2010 Course
Watch Now

iOS Training Course
 
4:49 PM
1
Q: Lightweight Tic-Tac-Toe in Python

user3058846This is a completely functional python script of the Tic-Tac-Toe game. I've used python's set container for almost all data structure and operation. The code is small and somewhat readable. I would very much appreciate your opinion and suggestions to improve it in terms of speed, readability and ...

 
5:02 PM
@Mat'sMug I have been wanting to play with that, but most of the apps that I develop are ones that are silent and the user doesn't need to mess with, but I want to see if I can push updates without them having to click the install now. the way they do things with some apps .....
 
5:12 PM
@Yuushi About your answer…
2
A: Generic mean function

YuushiThere are a few subtle issues in your code. The naive way of calculating an arithmetic mean by summing everything and dividing by the total number of values can have problems when dealing with a large number of values; overflow becomes very dangerous. Secondly, you're using an enable_if to restri...

I'm having trouble parsing avg{} — what do the curly braces mean?
Also, I suspect that floating-point errors would accumulate worse than with the naïve algorithm.
I wonder what Kahan really wrote about it.
 
@Mat'sMug - 8 now:
2
Q: VBA Python-like List Class

ptwalesVBA's Collection class is lacking so I created a basic List class using Python's as a template. This could make future derived classes easier to implement. The biggest features are better setting and accessing of values. But one neat-o feature is Python-style indexing. Dim myList As List myLis...

@CaptainObvious - incoming.
 
4
Q: VBA Python-like List Class

ptwalesVBA's Collection class is lacking so I created a basic List class using Python's as a template. This could make future derived classes easier to implement. The biggest features are better setting and accessing of values. But one neat-o feature is Python-style indexing. Dim myList As List myLis...

 
5:39 PM
Nice!
 
Pls review again — Thufir 4 mins ago
Monkerning..
or sth like that ;)
 
8 bottles of beer on the wall.
2
 
5:57 PM
Is vba like beer because too much of either will kill you?
3
 
That sounds about right...
> Please review the attached exception audit report and correct the product description exception, please.
^^ Actual email from my boss.
 
@Dan it's the countdown to badgeability of the tag :)
 
@Vogel612 does the code work?
 
@Malachi I have no clue actually, but it sounds like it.
 
looks like all he did was delete the stuff that said it didn't work the way he wanted it to.
 
6:11 PM
@RubberDuck there were 26 VBA questions last year:
4
A: Is anything wrong with this question?

svickThere are 26 vba and only 8 vb6 questions on this site (compared with over 1600 for the most popular tag, c#). I think this means there simply aren't many people interested in these languages on this site, which is why you didn't get any answers yet. You might try to be patient, but I wouldn't b...

 
0
Q: Feedback on my programming language

FrancisHere's a link to the code on GitHub: https://github.com/reedoolang/reedoo Hi, I've been working on my own programming language, as a hobby for the past couple of months now. It's called Reedoo, it is implemented pure C++ 11, it uses only the libraries that come with C++, no external ones. I've ...

 
@Mat'sMug that is a Meta from back in the early days of the revival!
 
Seriously, a code review on a Hello world script...
 
Please embed the code you want peer reviewed in your post; if it's way too much code, consider brwaking it down into multiple posts, like one for the parser logic, another one for the compiler logic, ... this question will unfortunately have to be closed if it doesn't contain the reviewable code. — Mat's Mug 25 secs ago
@Malachi IKR!
 
@Mat'sMug is it brawken code? ;-)
 
6:17 PM
@Mat'sMug back when @Jamal only had a few hundred edits
 
Phone. Fixed.
Wow the new vba question is getting me passive votes on my List class implementation :)
 
So... you want us to review this hello world, or your parser+compiler? — Mat's Mug 46 secs ago
Thanks @Santa!
 
I regret having upvoted that question, but it's locked in now '~'
 
the hello world question was edited and now includes lexer logic - I voted to reopen
the guy had created a tag for his programming language.. I don't think we're ready for that tag yet.
 
6:35 PM
Right...
I VTRO as well
 
@Mat. I just deleted my review because it was a complete rewrite.....
I'll try again later.
 
Interesting, random SE question:
7
Q: How can someone, halachically, do teshuva when s/he has offended an anonymous person on the internet?

DanFRamba"m among others, state that Yom Kippur does not atone for sins committed between a person and his neighbor until a person personally asks the other for forgiveness. Mi Yodeya is an example of meeting people anonymously. With, perhaps, a few exceptions, no one personally knows anyone behind ...

 
0
Q: Parallel "wget" in Java

John DoePurpose: write Java program that downloads a list of URLs specified on commandline in parallel (simultaneously), reporting download completion every second. My solution follows below, please point out areas for improvement / things you would redesign. package org.test.mk.pjwget; import java....

 
private Thread pth;
 
0
Q: Diving into PHP's MVC - the application's core

Jon LamerI recently started programming in php using the mvc-pattern, which resulted in one of best choices, I did so far, but I read through many articles showing "easy" examples and some of them were quite advanced (based on my opinion). I started learning the pattern by looking up some code and I ende...

 
6:47 PM
Is this common naming practice in Java, or ?
 
@Phrancis not at all. The convention is camelCase for methods, fields, and local identifiers, without any prefixes or suffixes for types or visibility.
 
So something like private Thread myThread; would be correct better right?
 
@Phrancis That's like almost the worst possible, private Thread _mpth would be worse
 
@RubberDuck take your time!
there's inconcistencies with access modifiers / VB Attributes (some internal classes that are exposed and shouldn't be), the error-handling that's "catching" Assert errors is dead code, ... plenty of things to review!
@RubberDuck seriously? complete rewrite? ...
 
@Mat'sMug The first time, yes.
But I like a lot of what you did, so it didn't merit it.
 
7:00 PM
I find a lot of what I did feels like a hack :)
 
I think it all stems from one bad design choice.
@Mat'sMug Of course it's a hack! This is SPARTA!
2
 
@RubberDuck which part? I like my client API though...
 
The events. Why so many?
 
check this out, really interesting data.stackexchange.com/codereview/query/211467/…
 
I like the client API too. Mostly.... I mentioned what I didn't like in the review.
 
7:03 PM
I guess I could/should have parameterized them..
(and remove two out of three)
 
sort this by estimate destroyed rep and I am #3 data.stackexchange.com/codereview/query/194591/…
 
I have an Estimated Destroyed rep of 972
Jamal's is 4479!
 
#1 for EstimatedAddedRep!
and right behind @RubberDuck for destroyed rep
 
Where am I at?
 
7:09 PM
I'd wager you're in a chair
 
'~'
 
(not listed???)
 
I don't destroy rep, I downvote terrible content. I generate much more than I destroy, thank you very much. =:)-
Hey @Mat. Explain this to me before I suggest something that makes an ass out of me.
Private Sub assertion_AssertInconclusive(ByVal message As String)

    If currentTestFailed Then Exit Sub
    currentTestFailed = True

    Dim result As TestResult
    Set result = TestResult.Create(Inconclusive, message)

    testOutput.WriteResult currentTest, result

End Sub
I don't see where currentTestFailed gets set other than inside these events.
You're just checking to make sure only one event has fired, right?
 
that's the fugly hack part - if a test has multiple assertions, they'll all get reported - so I keep track of the "current test" and whether the "current test failed"
and I just exit from these handlers if the current test has already failed, effectively only reporting the first failed assert
 
@Mat'sMug I come crashing into the conversation... Why don't you use an existing unit testing framework?
 
7:22 PM
an existing testing framework? for VBA? mwahahahaahahahahahaha
4
 
@skiwi I think the point is, that he is using an existing framework.... the one he built!
3
 
@skiwi The best one out there only works in Excel, so it's not an option for me.
And I've seen the source code for most of what's out there, it ain't pretty.
 
Ouch... Well that's what you get for using VBA I guess
 
Okay, I think that will work. I'm not 100% positive.
 
The moment, when something just works in one try without testing!
 
7:38 PM
0
Q: Trying to write a method that will return a letter grade and be called by a test driver that will test different parameters

John Covington/** * Conditionals. Contains method letterGrade to return a grade A-F * * @author John Covington * @version 9/15/2015 */ public class Conditionals { public double letterGrade() { if (letterGrade.equals("A")) { score = (90 - 100); } else if (letterGrade.equals("...

 
user image
2
Trying to write a title that will get people's attention and not get Jamalized by typing way too many words for it to make sense @CaptainObvious
 
@RubberDuck the error handler is dead code, it was written when I tried raising AssertFailedError errors from the Assert class, but that wouldn't work because all the library sees is a useless "Automation Error", no matter what you do - errors do not propagate outside of a VBProject, completion logic cannot work off error-handling (that would have been nice though, Assert.Fail would halt test code execution immediately!)
 
@Mat'sMug oH..... Well then..... excuse me while I run off to close it as broken... ;)
 
I really think you've nailed it though, this needs a bit of VBE "reflection" to be cool.
lol
 
Okay. I misunderstood. I'll try to rethink it.
 
7:45 PM
hey, dead code isn't broken! :)
 
I think you'll get frustrated fast of writing those registration functions.
@Mat'sMug It's worse than broken.
lol
Did you pick up what I was trying to say about TestResult? I felt like I wasn't real clear about it.
 
yeah, I think I like it
I'm out of votes for another 3 hours and 15 minutes though :/
 
I don't do it for the rep imaginary internet points.
CASE
			WHEN ISNUMERIC(LEFT(RIGHT(AISLE, LEN(AISLE)-CHARINDEX('-', AISLE)),3)) = 1 THEN LEFT(RIGHT(AISLE, LEN(AISLE)-CHARINDEX('-', AISLE)),3)
     		WHEN ISNUMERIC(LEFT(RIGHT(AISLE, LEN(AISLE)-CHARINDEX('-', AISLE)),2)) = 1 THEN RIGHT('000'+CONVERT(VARCHAR,LEFT(RIGHT(AISLE, LEN(AISLE)-CHARINDEX('-', AISLE)),2)),3)
		ELSE '000'
		END AS AISLE_NUM,
Who wrote this crap? Ohhhh, right, that would have been me......
3
 
Left Right Left Right one two three four one two three four
 
7:52 PM
What does that even do? So many operators I can barely tell
 
yay, I have my MySQL linked server on SQL Server 2014!
 
@Phrancis It parses a Fixture Name into an Aisle Number. There's another part of it to extract the Aisle Side.
 
Nice!
 
That sounds like a blast
 
7:55 PM
@RubberDuck I really like your "smart comment" '@TestMethod - I'm going to use that for sure!
 
If the Left 3 of the characters to the right of the hyphen is numeric, then return it. Else, yadda yadda yadda.
@Mat'sMug It was just a lucky coincidence that ProcOfLine will return comments directly before the signature. Whew.
I didn't test it against one with a blank line in betweer, so be careful.
You also might want to hold off on cloning those files. GetProcedures is terribly inefficient. I'm looping through every line like a ---dumbass.---n00b
 
I really wanted to keep VBE as a last-last resort though, so as to have the code run without the priv elevation required to run VBE
 
Is that working code? letterGrade is both a function name and the name for a variable which is used as String (if (letterGrade.equals("A")) and as a double (return letterGrade;). score is not defined anywhere and its value is not used. There are also typos (letterGradede). — Martin R 11 mins ago
I VTC as unclear because it's code only and no context is given
 
@Mat'sMug That's a good point. I hadn't thought about it.
But considering it's a developer's tool, I think it's okay.
 
8:19 PM
Does Access use standard VBA?
 
yes, with the Access object model ;)
 
Uh... wat
The branch history there
 
what about it @skiwi? :)
 
@SimonAndréForsberg WTF went on there? ;)
 
@skiwi I believe the yellow thing is the AI. And there were a lot of changes to many branches, perhaps some API-breaking ones so that was my way of syncing the branches in a way
 
8:26 PM
It looks like we have a new / reviewer.
4
6
A: Rewrite code from Objective-C to conform with Swift power tools and concise style

rob mayoffThe problem here isn't that your Swift looks like Objective-C. The problem is that, because you're developing a toy app, you've used a toy design, and now you don't like the toy design. Probably you followed a tutorial you found on the Internet (or even in Apple's docs), and most of those are f...

 
Wow that's a very thorough answer!
 
I sooo just used my oldest daughter as a rubber duck. She's really good at it.
4
And she asks useful questions, unlike @ducky.....
 
8:42 PM
0
Q: clojure tic tac toe solver

dagda1I am going through the 4clojure problems and I currently just solved the tic tac toe analyzer (fn [board] (let [vr (for [x (range 3)] (get-in board[(+ x 0) (+ x 0)])) vl (for [x (range 3)] (get-in board [(+ x) (- 2 x)])) columns (apply map vec...

 
@RubberDuck Asking useful questions is really important!
@rolfl Been visiting India lately? ^^
 
@SimonAndréForsberg TRUTH
 
@rolfl You don't get it. You don't need the a > 0 checks and so on.
 
Does really require all those brackets??
(check-board checks))))
 
9:03 PM
0
Q: JS Progress Bar Widget

slicedtoadDemo of the widget: http://jsfiddle.net/slicedtoad/Lywvbsf4/ It's a progress bar that shows a list of steps and which one is being completed as well as allowing previous steps to be revisited. It will be used to display the user's form completion progress on a web app that favors a client side ...

 
Looks like my icon is really ashamed of where it is placed.
 
9:21 PM
just found this
oh and this question produced 2 more reversal badges, I am not the only one anymore!
-23
Q: How could I optimize this script?

irywJust wondering if there was someone out there that could offer help in optimizing my script. <?php /** * If you don't understand what this does * you have no hope as a programmer. * */ function usage ( ) { // Ahhh the marvels of echo, such a wonderful tool // yet so advanced that a begin...

 
Can I get a few down votes on this crappy "answer"?
1
A: Getting a row with two select query with different column in MSSQL

JEKThe name table must have a foreign key to the address table. Then the querying becomes easier.

 
@Pimgd Right, I didn't get it, but that's because your answer did not initially include that tid-bit, and further, after you edited it in, you added it as an afterthought. That should be the full answer, that the >0 checks are redundant.
 
@Phrancis one more and we can delete it
@SimonAndréForsberg you are really shooting for a mod spot aren't you? Better get your Edits up if you want to win over me..... LOL
 
I believe I've successfully solved the loop-carried dependency from my assignment code. Small victory, but still satisfying.
 
@Malachi There won't be an election for quite a while, but I am quite sure that when it comes to choosing a moderator, edits is not everything (Except for @Jamal)
2
And I'm not sure really if I would run for moderator or not
It depends on how my life and time availability is when the day comes
 
9:29 PM
True. Flag-handling is another, but my number is unfortunately inflated from all those damn closed-without-comment autoflags.
 
I think you have me beat as far as reputation goes.
 
@Jamal There is an easy solution for that: Comment first, close later.
 
you also have me beat on Meta Participation
@Jamal did they stop doing that? I haven't seen any of those in a long time
 
@SimonAndréForsberg Ugh, too lazy. :-P
 
@Malachi they haven't stopped, they have just removed the flag-handling for non-moderators
 
9:31 PM
@Malachi They only stop them for graduated sites.
 
@Jamal Me too, that's why I use Auto-comments!
@Jamal And you are a moderator because...?
 
TTQW
 
@SimonAndréForsberg I... just watch the security cameras (flags).
 
And edit all the posts ^^
 
let me fix that for you^^^^
 
9:32 PM
@SimonAndréForsberg no more stars left
 
Oh yeah, I let my sock do the edits.
 
@Malachi RSA
 
@Phrancis thanks
see you all tomorrow
 
Good night
 
9:48 PM
@Jamal I have written a CR answer for this but just realized I can't post an answer if the question is on hold. Can you help?
Code is weird but still reviewable IMO. Certainly a style review is in order ;-)
 
Since the OP hasn't made any changes, I'll let the community or the closing mod to decide.
 
OK cool
 
10:06 PM
0
Q: Optimizing gulpfile.js

SkoksGuys! I'm fairly new to javaScript and to Gulp too. I was following this article http://yeoman.io/blog/performance-optimization.html for creating my gulpfile, trying to follow best practices, but it seems to me, that this peace of code can be optimized and written better, than that... Can you pl...

 
10:17 PM
BBL
 
10:34 PM
I don't really understand the delete-votes for this:
0
A: Getting a row with two select query with different column in MSSQL

JEKThe name table must have a foreign key to the address table. Then the querying becomes easier.

It is not a good answer but it is an answer. It should stay.
 
It got flagged low quality .....
 
> This answer has severe formatting or content problems. This answer is unlikely to be salvageable through editing, and might need to be removed.
This answer does not have severe formatting or content problems.
This answer is likely to be salvaged through editing.
I would decline that flag if I were a moderator.
 
I agree, and the post has already survived an auto-flag on the low quality review queue too.
 
and
But then it was flagged again as low quality, which put it in to the review queue again....
 
10:39 PM
I hope my comment stops the flagging
 
10:55 PM
@Simon - still awake?
 
GroupValues... extends hashMap....
 
yeah yeah yeah :)
yes, it should ideally use composition instead of inheritance there
 
It is the bulk of your time.
 
Hmm...
That I didn't expect
 
10:57 PM
probably because of the large number of objects that get created there, and the impact on memory
 
That's a good point
 
For the record, I have explored a few areas of combinatronics as a result of your question(s), it's been interesting.
 
I cannot conceive of a better algorithm for your process, but I believe that smart optimizations to the implementation will probably halve the time.
 
Combinatorics is interesting
Wow. Well, I'd be really happy with halving the time
 
11:01 PM
Frankly, though, I have not fully understood all the reasons it works ;-) but I have satisfied myself that you have a thorough understanding of the problem domain
2
 
I've spend so much time figuring out this algorithm so you wouldn't believe me if I told you :)
 
A HashMap for GroupValues is probably something that should be replaced with a custom class that is not general purpose.
@SimonAndréForsberg Oh, I would believe you.
 
lol, alright then :)
 
For the record, comments including links in your code are normally very useful.
 
@rolfl good suggestion
 
11:02 PM
I have had to search for stuff, and match algorithms in places like wikipedia with code implementations you have.
You should make that stuff easier to do.
 
@SimonAndréForsberg I did decline a moderator flag on that answer.
 
feel free to make it a github issue, I'd get on it at the same time I fix that other issue. I'll probably work on it tomorrow or on wednesday, I hope.
@200_success Good, keep up the good work :)
I don't know exactly how much time I've spent on the algorithm, but well... in the first version about 6 years ago I did all the noobish mistakes, then I created a slightly better one 4 years ago, and then created this... about two years ago perhaps?
It was really the concept of FieldGroups that improved it a lot. Things suddenly got so much 'simpler'.
 
Ah, home sweet home.
 
Simpler to solve for the computer, but perhaps more complex to understand for the reader....
 
So, I have encountered situations like yours 'in real life', and the optimization will require profiling and tuning and benchmarking.
 
11:09 PM
OK
 
The GroupValues is a good place to start, it's probably creating a lot of 'eden space' churn.
If you want to learn about the Java memory model, that would be a good place to start.
Let me do a memory profile....
 
Feels like there might be some follow-up questions to this in the future...
The GroupValues uses the non-primitive Integer, I see that can be a clear optimization...
 
My process has hung ... ;-) and I have to leave the Dojo and go home....
 
Using better data-structures seems to be a key.
 
You should explore using JVisualVM when you have a chance.
It's installed in $JDK_HOME/bin/
 
11:19 PM
I wanted to test the code in this question to see if it did anything more than appeared. So I changed it to work in Postgres...
SET SEARCH_PATH = test;
DROP TABLE nameTable;
DROP TABLE addressTable;
    CREATE TEMP TABLE nameTable (
        name VARCHAR(50)
    );
    INSERT INTO nameTable (name)
    VALUES ('nikhil');

    CREATE TEMP TABLE addressTable (
        address VARCHAR(50)
    );
    INSERT INTO addressTable (address)
    VALUES ('Thrissur');

    SELECT * FROM nameTable;
    SELECT * FROM addressTable;

    SELECT
        name,
        (SELECT Address FROM addressTable) AS Address
    FROM nameTable;

    SELECT
(forgive the nonsensical indentation)
In case I was missing something.
query result with 1 row discarded.

query result with 1 row discarded.

query result with 1 row discarded.


Total query runtime: 18 ms.
1 row retrieved.
It's not broken, it just does nothing apparently useful.
2
 
@rolfl I have that installed already, I've been using it with some other projects (it helped me detect a memory leak in my Minesweeper multiplayer server 1.5 years ago or so). It is a very useful tool indeed (although a bit hard to understand everything sometimes)
@rolfl FYI: I have added two issues: github.com/Zomis/Minesweeper-Analyze/issues .
 
11:45 PM
1
Q: Implementing a genetic algorithm to solve knapsack

Code_LOVERI am trying to develop a genetic algorithm to solve knapsack problem(0-1). I am new to algorithm and programming as well. Here is my code and it works but I would like to know your suggestions of how to improve it. Knapsack.h #ifndef HEADER_H #define HEADER_H #include <vector> #include <random>...

 
11:59 PM
Canada eh...
 
00:00 - 15:0015:00 - 00:00

« first day (499 days earlier)      last day (3521 days later) »