« first day (461 days earlier)      last day (3561 days later) » 

10:01 AM
so I restarted the VM and it gave a cryptic error and now it works
I hope that's not gonna explode like a 5000 liter, two-thirds filled with diesel, barrel with a hole in it
2
 
This thing here just isn't working, and it got a bit horrendous
waitUntil((Callable<List<String>>)(() -> getWindows().stream().map(window -> ((Stage)window).getTitle()).peek(System.out::println).collect(Collectors.toList(‌​))), contains("Lua Exception"));
 
@skiwi wat?
suggestion.. move that overly complicated lambda into a method,.
 
How about "don't java 8 because you can java 8?"
 
Without Java 8 it would even be more horrendous
In theory it is simple.
 
also, why in god's name are you printing to std::out?
 
10:05 AM
It's just something that waits until my list of windows contains a window titled "Lua Exception"
@Vogel612 Was for debug
The thing is that sysout does show the title, but the matcher doesn't detect it
 
contains with a string doesn't sound like a good idea..
also, the title could be a little differnt than just "Lua Exception"
include the sysout trace and we can check..
 
I think the contains wants it to exactly match
checking containsInAnyOrder now, but it still kind of says that all items should be there/
 
@skiwi sure it wants exact match..
after all you're calling Collection.contains and not String.contains
 
I think it's the wrong match
So really great
 
so what's the exact title of the LuaException window?
 
10:09 AM
Collections.contains() checks if an element is contained somewhere... but org.hamcrest.Matchers.contains() checks if all the elements are contained somewhere
@Vogel612 "Lua Exception"
 
@Pimgd That title edit will get a lot of attention
 
I should've been using hasItem
 
@Heslacher that was the point
 
@Mat'sMug can you call something like ` Set Form1 = New CustomForm ? There's a trick I use in access to make it so I only need one form. I'm thinking you could set up an Enum for FormType and a property, so you could do something like this.
 Dim Form1 As New CustomForm
Form1.FormType = Customers
Then you let your custom form class decide how to set itself up.
Sorry for interrupting chat all.
 
Ugh, this is the most reliable way... it's something
waitUntil((Callable<List<String>>)(() -> getWindows().stream().map(window -> ((Stage)window).getTitle()).collect(Collectors.toList())), hasItem("Lua Exception"));
 
10:14 AM
Making hot network questions is a good way to make CR grow
so if you can edit it so it attracts attention, good
Ideally you'd hit questions and you'd see a list of things that make you go "oooh"
 
Haha. Everybody Loves Fibonacci!!
 
Or do they??
 
@All Do you write answers on the webpage or do you use an external editor (maybe with markdown implemented) ?
 
Good titles go a long way to getting eyeballs on.
 
2
Q: Aliens at the train

codelnI solved this problem on spoj: The aliens have arrived to Earth and everything is in harmony, the two races can live together. However, one specific Female Alien does not want to see humans on her way to the university, the alien must use the train as every human does. But she can choose any ...

 
10:16 AM
No @Vogel612. They don't. I'm sick of Fibonacci.
2
I use Notepad++ for the code
 
editted to look even better in a chat link
 
@ckuhn203 Haha, I even used one in Lua yesterday to test things
 
@Pimgd the "(Copied from linked source)" is useless IMO. It's not really helping.
 
I changed it
 
-- Always name this function "applyFunction"

function applyFunction(value)
    return fib(value)
end

function fib(n)
    if n == 0 or n == 1 then return 1
    else return fib(n - 1) + fib(n - 2)
    end
end
 
10:18 AM
We should write a list of questions.
That would regroup , and... did you say ?
 
You know that the code I posted above there gives a stackoverflow in lua on value = 0 and value = 1?
 
@skiwi wat?
@Pimgd I magicked a little and now the intervals are also math-jaxxed ;)
 
Thanks
 
@Vogel612 Then it parses 0 as a string, and hence fib("1") goes into the else part and stack overflows
 
At-i-th
 
10:20 AM
@skiwi that's broken..
 
do you know how to prettify that one
 
but if you pass a 2, then it goes into the else first, and converts the 2 from string to number, and then treats it from an integer onwards
 
It might be time to start closing those as dupes @Moreeen, but it would definitely take a meta discussion.
Add to the list though...
 
@Pimgd i'd just go for $A_t(i)$
 
I would think minimally we it would have to already have a question about that topic in that language.
 
10:24 AM
If anyone feels like playing with Lua: https://github.com/skiwi2/JavaLuaInteropTest/releases
 
And a canonical implementation. We might have to write community wiki's for the masters.
A question that makes the common mistakes, with a blog like review of what was done wrong, and a proper implementation.
 
@Pimgd you killed the syntax-highlight for the codeblock..
 
-1
Q: PHP - Two pieces of code; let user choose which one he activates

JonakemonI have two pieces of php code to display images. Code 1 shows images in two columns, code 2 shows images in three columns. I want code 1 to always appear on screen. Users can then click a button to switch to code 2. I do not want a new .php file on the server. I want everything in one file. Code...

 
use <!-- language: lang-none --> instead language-all ;)
 
fixt
Thanks
I wouldn't have noticed that
I just copied @Jamal 's formatting for
2
A: Stock Pipe Cutting using Recursion

Pimgd while (true) { int votes = getInteger("Enter required length (-1 to quit): "); if (votes == -1) break; requests.add(votes); } Indentation - properly indent your code. You fixed some of it with an edit already, I assume it's correct in your IDE, then? See if your IDE has automatic format...

that answer
 
10:30 AM
well the language-all is for all the following stuff..
and the language is only for the next.
 
I plead guilty to formatting practices.
 
This appears to be off topic because you're asking for advice on code not yet written. Please either include the code you're using to switch between these methods or reword your question so that we may review your currently existing code. — ckuhn203 31 secs ago
 
Did you notice they're the same?
 
10:50 AM
He fixed it @Pimgd.
 
10
A: Checking if two strings are an anagram

PimgdYou're missing the case where a word has more than one of the same characters. For instance, the strings "aba" and "bab" would be seen as an anagram by your algorithm. You can fix this by removing the found character from the string. Additionally, if you wanted to make your algorithm faster, y...

anyone wanna upvote my answer to give another guy [badge:populist]?
bah how does badge syntax work
 
no badge syntax
curses
alright lunch
 
I have already voted your answer up ;-(
 
> I am currently working with a company who specialize in becoming the greatest IT provider in the world by being fanatic about maximizing customer value.
What a smart specialization
If only more people thought of it
 
11:14 AM
0
Q: Content filtering of webpage, can i code it cleaner

ChetanThis is code for filtering the data of webpage, in python, for the web crawler i made for my project. I know python scripts can lag than other languages, but this takes a lot of time while processing even a single page. Now I don't want to use any other external libraries for filtering content....

0
Q: Java MVC Implementation

swshaunI am trying to write an MVC based application from scratch using Java 8 and Swing... I am having some difficulties with this. I want to know if I am going the correct way about this... My controller code is: public class Controllerv2 { private final Map<String, View> views = new HashMap<>(); p...

 
@Mat'sMug here's what I'm thinking.
Option Explicit

Public Enum UserFormType
    NotSet
    Type1
    Type2
    Type3
End Enum

Public Enum UserFormError
    TypeNotSetError = vbObjectError + 1
    TypeReadOnlyError
End Enum

Private myType As UserFormType

Public Property Get FormType() As UserFormType
    FormType = myType
End Property

Public Property Let FormType(ByVal value As UserFormType)
    If myType = NotSet Then
        myType = value
    Else
        RaiseTypeReadOnlyError
    End If
End Property

Private Sub UserForm_Activate()
 
You think a lot
 
We were talking about a problem last night. I think I worked it out in my sleep.
 
New Bounty - 50
4
Q: My first domain service class: SessionService

Kid DiamondI've made a SessionService class that's supposed to handle everything session related within my application domain. Since I'm still in the learning phase, I would like to have my class reviewed: Is my domain service class fully compliant with Domain Driven Design its principles? Have I named ev...

 
11:40 AM
I think I should keep putting a bounty on this question as soon as it's eligible:
6
Q: SQLConnect - A library for connecting Objective-C/Swift applications to Microsoft SQL Server

nhgrifThe complete SQLConnect library can be found here. The file from which the following method belongs can be found here. At some point I may or may not open questions for reviewing other aspects of this library, but I intend to keep the questions relatively small. This is the largest method in t...

 
0
Q: Fibonnacci numbers closed form accuracy issues

firephilThe closed form for calculating the fibonnacci sequence is the following Fib(n) = (phi^n - psi'^n) / sqrt(5) phi = (1 + sqrt(5) / 2) psi = (1 - sqrt(5) / 2) When i try to calculate the fn where n=6 i get to accuracy issues the square root is calculated accurately but when i divide with 2 i ge...

 
@Heslacher I write my answers purely on the webpage. I probably should use Xcode since it likes to line up colons and that's a pain on the webpage.
 
@Pimgd proposing as syononym of
 
No-one can
unless question score counts too
 
when noone can, then IIRC everyone can. and mods can always..
community consensus.
 
11:54 AM
Computer says no
 
12:08 PM
0
A: Down Voting Discussion

ckuhn203Here is a simple query for Upvotes & Downvotes on Questions & Answers. I filtered it down to August 1st, 2013 to August 1st, 2014. We're definitely voting more and, generally speaking, upvotes dwarf downvotes. We downvote questions more often than answers. I'm not sure if that's good or bad...

 
I don't like downvoting answers
 
I don't either, but sometimes I feel like bad answers deserve it.
 
Particular the rep game is affected weirdly
when you cap for the day and get downvoted it does... nothing
but voting down yourself is untied from rep caps
 
snooky?
wat/
 
12:19 PM
Really funny chick flick.
 
-2
Q: How does this code work?

codelnI came across this code for fast i/o in c++. Please explain how it works #include <cstdio> #include <iostream> using std::string; static struct IO { char tmp[1 << 10]; // fast input routines char cur; //#define nextChar() (cur = getc_unlocked(stdin)) //#define peekChar() (cur) ...

 
@CaptainObvious That was fast.
 
0
Q: HDM Coding Pattern

Hassan AlthafI'm here with an idea of a brand new Architectural/Design/Coding Pattern. It's called "HDM". What is HDM? [H]andler -> Handles the user interactions. It's basically a controller. It's more like a Manager. It tells it's workers what to do. [D]ata -> Here is where necessary data is stored to r...

 
ouch
@HassanAlthaf the entire premise of that question already has me shaking my head subconsiously
 
What
i alraedy got a downvote.
wtf
i blame @Jimbo for it!!!
In PHP room
He asked me to share it
Could I share something like that in codereview?
 
12:23 PM
You're trying to market an idea.
Why?
 
Dude, you would need to write up a paper explaining how it would actually work.
And what is to be expected, then ask for their opinion over there.
 
... I'm trying to see how it differs from model view controller
Data is model...
then the Handler is the view
and the Mapper is the controller
 
Really? I never could grasp MVC.
 
okay the difference between this
and MVC
is that the view element of MVC is to display.
And you've got "handling of user interactions"
that'd be input rather than output
 
its lik ethe Contrl Unit
It handles both input and output.
;)
 
12:27 PM
Most MVC ends up as a Data/User Interface/Logic thing anyway
 
@HassanAlthaf Then it does two things and breaks SRP.
 
I looked at the HDM thing and it doesn't seem like it would make code any more readable or better organized, thats my opinion though. And any time you start needing things called Manager then you may want to reevaluate the whole structure
2
 
Single responsibility principle.
 
single responsibltiy principle
fk I have tyhpos
 
12:28 PM
The responsibility of the Handler class is to guide.
 
Hassan here's how you could ask your question on code review:
Build a small application in some common language using your new idea
Make sure it works, and ideally does something less trivial than storing and retrieving a value
A good idea would be...
hmm...
A guess-the-number game, I guess.
 
I already have an application
with that concept
l0l
 
With ability to display results of previous games.
(that way you need your Data section)
 
No 1337 in the 2nd monitor please. lol
 
7
Q: Update of Classes for user registration and authentication

Hassan AlthafOld Post: Classes for user registration and authentication This post is an update of the old post of mine. This is the code after suggestions were implemented in the review. Do you think I could make this even better? Please criticize as thoroughly as possible for the smallest thing possible as...

 
12:30 PM
It breaks my brain.
 
Then you post the code on code review and you'll get some proper reviewing your way
 
That one has that concept.
Well, I'm coding something big, once it is done,
I'll put it on review
 
hmmh
holy batman look at that duplication
oh it's only the first section
 
duplication?
 
my bad
public function checkLogin($username, $password) {
    $query = $this->db->prepare("SELECT username, password FROM users WHERE username=? AND password=? LIMIT 1");
    $password = $this->hash($password);
    $query->bind_param('ss', $username, $password);
    $query->execute();
    $query->bind_result($username, $password);
    $query->store_result();
    $query->num_rows == 1 ? true : false;
    $query->free_result();
    $query->close();
}
public function fetch($username) {
    $query = $this->db->prepare("SELECT id, username, password, rank, name FROM users WHERE username=? LIMIT 1");
    $query->bind_param('s', $username);
    $query->execute();
    $query->bind_result($id, $username, $password, $rank, $name);
    $query->store_result();
    while($query->fetch()) {
        $user = new User($id, $username, $password, $rank, $name);
    }
    $query->free_result();
    $query->close();
}
some of that is looking alike
 
1:01 PM
Greetings, Programs.
 
Greetings
 
Greetings user.
 
1:20 PM
Good morning everyone!
 
Morning
 
evening
 
Good whatever is applicable at your current location!
2
 
this feels like a problem that should be automated
if only we had someone who knew how...
 
Well, it's not for lack of programmers.....
 
1:30 PM
hmm..
Text to different stuff already exists.
now you just need to change the different stuff
and maybe the text too
and you're doneee
 
too busy...this scotch isn't going to drink itself
7
 
I;m so tired! I'm laughing at all your jokes! and it's only 9h30, the day will be loooong!
 
I bet you could whip up some javascript that runs on receiving a message and replaces "greetings" with some string from an array based on the current time
but then everyone would have to install it
also it's too much effort
The problem is not a lack of programmers
it's that we have too much programmers
... because everyone knows programmers are lazy
3
 
posted on August 08, 2014 by Jonakemon

Script: <script> $(document).ready(function() { var $divA = $('#1-column'), $divB = $('#2-columns'), $divC = $('#3-columns'), $link = $('#link'); $diplaytext = $('#display_text'); // Initialize everything $link.prop( 'value', 'Switch to 3 columns' ); $divA.hide(); $divC.hide(); $link.click(function(){ if( $divA.is( ':visible' ) ){ $link.prop( 'value', 'Sw

 
what?
why is it posting stuff like that now?
 
1:42 PM
isn't that the same guy as with his strange php columns?
additionally, don't mess with timezones, we all been there.
 
▲▲that
 
What the fuck.
 
sweet, the aliens question hit hot network questions
 
2:10 PM
Lol
I looked through the tag on SO and saw a post by a classmate of mine
Same task. Looks like we'll be feeding that tag the next few weeks
 
2:23 PM
Community bot has edited my answer ???
 
Advances in AI, man. Hard to keep up with
 
Or did @Jamal change his name ;-)
 
Anonymous had 1 edit suggestions
 
Perhaps an anonymous user proposed an edit
 
Ah, ok
 
2:24 PM
Anonymous edit are attributed to community
 
Monking
 
Monking @Phrancis
 
Monking @Phrancis.
 
2:40 PM
hey @Morwenn
 
hey @Yuushi :)
 
By my count, Code Review is one tag short of being able to award Generalist badges.
 
@Morwenn Nice answer for Edward's question. I think I need to read some of your metaprogramming answers more closely
 
what are the requirements for generalist then
cause I don't get it
 
@Pimgd First requirement is that the site has to have 40 tags with more than 200 questions.
 
2:43 PM
also, Mazohyst of Decadence is such a cheery song...
 
... they're already awarded
 
@Yuushi Metaprogramming is really fun, but generally not useful to code applications. I should spend more time learning about parallelism and concurrency :/
I don't remember sharing Mazohyst of Decadence here.
 
you didn't...I just remember you mentioned that Gauze was one of your favourite albums
 
@Pimgd Interesting. I must have seen something out of date.
 
Oh, right.
 
2:46 PM
Monking! Wow people, the Aliens at the train question has one hell of a revision history! From off-topic to hot network question! Good job!
 
It still doesn't have any classy solution to improve the algorithm though :/
 
trying to read that code is painful
 
The std::deque could be replace by an std::queue here but that still does not improve the algorithm.
And some line also screams for std::min.
 
I've...honestly had too much to drink to think about this :/
I need a "put codereview into read only mode" button
 
lol
3
 
2:49 PM
@Donald.McLean I think a meta tag was burned and that's the cause
 
maxsum=maxsum<sum?maxsum:sum; could be replaced by maxsum = std::min(maxsum, sum); which seems to totally contradict the name maxsum.
 
@Pimgd That makes sense.
Apparently though, there won't be any more Generalist badges awarded until we get another tag over 200 questions.
 
any sede query for showing progress towards generalist?
 
10 flags until deputiy!
 
2:59 PM
daaaang
that's gonna take a while
 
@Pimgd Seriously.
 
3:13 PM
Thanks for the accepts @Mat'sMug. Did you see my message earlier. Not sure if something like that would help you or not.
 
hey no problem, thanks for the answers! ;)
 
Alright... how does a dealer enter 56 10 year contracts before they realize they are supposed to be 3 year contracts? Now we need to cancel all of them, credit them, and manually re-enter them all. SIGH
 
@ckuhn203 not sure either... I think I'll just keep it as it is, ..should I post it up for review or that would be beating a dead horse?
@Phrancis could have been worse, is it only one dealer that messed up? ;)
 
@Phrancis maybe someone got a bonus for setting up each contract, then disappeared
 
Yeah, I guess it could, somehow
 
3:19 PM
Yet another answer for Aliens at the train. I don't help improving the algorithm either.
 
@DaggNabbit that actually sounds credible
 
@ckuhn203 you need a +3 somehow ;)
@Morwenn +1 for readability leading to maintainability leading to easier-to-improve code.
 
@Mat'sMug That's how I justify performance-unrelated answers on performance-related questions.
 
And avoid comments like..
Thanks, I will definitely consider your advise, but the problem here is not with the naming that slows down the function, but the call to add does. It would be a huge help if you have any hints on how to improve that as well. — Byzantine Failure 10 hours ago
 
We could do a blog post about that.
Oh wait, we still don't have blogs.
 
3:26 PM
lol yeah
 
We have meta post about it no ?
 
@Marc-Andre Meta is good for questions, a little bit less good for affirmations.
 
hungry. bbl.
 
@Mat'sMug I'm not even sure how to make that happen.
 
What I meant is : OP can't complain since we've already define that it's ok to do that. Edited my post to reflect a bit more what I wanted to say
@ckuhn203 downvote 7 answer and I'll upvote one of your post
 
3:29 PM
Or simply downvote 2 answers and somebody will upvote one of your questions.
 
=P
 
Or that !
 
@Malachi Thanks I'll take a look when I'll be home (and sorry for not pining you last night. Last minute plan)
 
those are the two that I am most Active on. let KOTP know that you want to join my Guild, he can invite you I think. on Lyrania
I am going to be gone over the weekend so I won't be logged on there
@Marc-Andre I just got my nudge this morning from the bot...lol
wouldn't have mattered....lol
later
 
3:43 PM
The silence says it all... Back to the drawing board! — swshaun 46 mins ago
 
TTGPBG
Time to go play board games.
NSTIGE - Not sure this is good English.
 
what exactly??
 
Probably Ascension and maybe Magic.
See you later :)
 
@Vogel612 aw, time-to-answer still needs to improve :/
 
@Mat'sMug always ;)
 
4:00 PM
0
Q: Remove Friends problem time efficiency too slow

CyberneticTwerkGuruOrcI'm doing this problem: After getting her PhD, Christie has become a celebrity at her university, and her facebook profile is full of friend requests. Being the nice girl she is, Christie has accepted all the requests. Now Kuldeep is jealous of all the attention she is getting from o...

 
hi @swshaun! Welcome to The 2nd Monitor!
needs another +1 here to get to 20 and talk in chat:
3
Q: Java MVC Implementation

swshaunI am trying to write an MVC based application from scratch using Java 8 and Swing... I am having some difficulties with this. I want to know if I am going the correct way about this... My controller code is: public class Controllerv2 { private final Map<String, View> views = new HashMap<>(); p...

 
@Mat'sMug I'm translating a document from bad English to proper French, I may need your help in a bit @Mat'sMug ;)
 
sure
 
@Mat'sMug upvoted
 
great!
@swshaun no worries about "flipping the lid", we've seen worse lid-flippers ;)
I thought MVC was a web thing
 
4:13 PM
@Mat'sMug It's one of the design patterns from the GoF book
 
I need to finish reading that book!
 
it isn't exactly riveting reading
 
lol indeed
I like the irony:
// Self explanatory functions
 
...heh
 
self.♥-force = 0.001
 
4:20 PM
0
Q: Regex vs pure scala

Govind Singh Nagarkotiwhich is better to use, may be it is over optimization,but i think lots of validation can effect performance def parse6Digit(code:String):Boolean={ val phoneRx = """^\d{6}$""" code.matches(phoneRx) } def parse6Digit(code:String):Boolean={ code.forall(_.isDigit)&&code.length==6...

 
4 hours for the SSCCE and it's just a single property...
 
@CaptainObvious not sure I like that one, holding off on close votes for now - would it need a tag?
 
Hi Mat's mug
 
hi!
I hope you're not too disappointed with our , have you browsed the site a bit to see what kind of answers to expect?
 
Hi @swshaun
 
4:24 PM
No no... I am new to all of this and had a bit of a paddy earlier as have been searching and searching with no conclusive answers on whatr I want to do
Hi Vogel
I've been staring at it most of the afternoon (and morning) hehe
Yeah I have had a browse... They look pretty good quality answers. I hope to be as helpful one day!
 
@swshaun don't worry too much.
whenever you have questions concerning your posts, you can come here and conspire with the veterans ;)
 
Hi @swshaun!
 
Tee hee... Conspire. Love it. I am going to toodle off for a bit... Will get square eyes otherwise hehe. Hello @cku
Hello @ckuhn203
 
well that aside ima get my sorry ass back home now..
 
hi
 
4:33 PM
Hola.
 
2
Happy Gang Fight, everyone.
 
It's that day again indeed...
 
@200_success -____-
 
I brought this chicken ducky for us to no eat.
 
It would have been rubbery anyway.
 
4:38 PM
Well what do you know. Subliminal messages by the meat industry.
Or Chick-Fil-A
 
Recommend closing as "Primarily opinion-based", or maybe "Unclear what you are asking":
0
Q: Regex vs pure Scala

Govind Singh NagarkotiWhich is better to use and why? Maybe it is over optimization, but I think lots of validation can affect performance. def parse6Digit(code:String):Boolean={ val codeRx = """^\d{6}$""" code.matches(codeRx) } def parse6Digit(code:String):Boolean={ code.forall(_.isDigit)&&code.length==6 } ...

 
Either one may work, but based on your comment, I may go for unclear. I also have a feeling it'll attract code-only answers.
 
Interesting check that will guarantee a Stack Overflow.
 
4:56 PM
0
Q: Credit Card Validator Algorithm

RyanI'm writing an algorithm to read from a file a list of numbers, and for each, determine if it is valid. If it is, then display which card type it is. Here is my code so far (using Luhn's algorithm): public class CreditCardValidator { /** * @param args the command line arguments * ...

 

« first day (461 days earlier)      last day (3561 days later) »