« first day (1062 days earlier)      last day (2955 days later) » 
00:00 - 16:0016:00 - 00:00

4:03 PM
@CaptainObvious uh..
 
@Mat'sMug was tempted to UWYA, but left a comment instead
 
Wow, apparently Roslyn re-runs the tests when you leave a comment with "refresh the build" or something.
I don't know the exact trigger, but I left this comment on my PR, and it refreshed the build:
> Please refresh the build on this. It failed because Jenkins was apparently having a problem.
 
0
Q: Make jquery pagination more efficient

Matthew SmartI am trying to create pagination with pure PHP and jquery. I have done this and it works exactly how I want it to work. Essentially I get all products from my database using PHP. I then populate the whole page with the products and hide every row after the first 6 products. Then using jquery I c...

 
@PinCrash I don't jQuery, but I'd be tempted to just pass the string to a function.
Looks very much like the typical case for extract method and parameterize
 
@Mat'sMug and make a big switch statement? Could probably achieve something similar/better with a simple JS object (e.g. a map-like thing)
But, I also don't jQuery
 
4:13 PM
    $(foo).keypress(function () {
        $(foo).focus();
    });
 
    $("#DialFirst").keypress(function () {
        $("#DialSecond").focus();
    });
Have you noticed the values were not the same?
 
facepalm
$(foo).keypress(function () {
    $(bar).focus();
});
there
 
Yeah, that's exactly what they are doing ;0
 
function focusOnKeyPress(keyElem, focusElem) {
    $(keyElem).keypress(function () {
        $(focusElem).focus();
    });
}
 
keypressFocusElems = {
    "#DialFirst" : "#DialSecond",
    "#DialSecond" : "#DialThird",
    // etc.
}
 
4:18 PM
    const ids = ['#dialfirst', '#dialsecond', '#dialthird', '#dialfourth', '#dialfifth']
    $(ids.join(', ')).keypress(e => e.focus())
 
yeah. and then just iterate that and call the function
 
some assembly required
2
 
This might actually be a case where using numbers as keys would be better
 
that is probably about as concise as you will get it
@PinCrash You mean.. like an array? :D
 
$("#NeedMoarContext").edit();
 
4:24 PM
well, no fools by me,
my flu the joke played today
so, Normality it'll be.
i hope i can work,
or else both my ide and flu'll
treat me like a jerk
 
Refrigerator.
@DanPantry jQuery doesn't need Assembly. If you're using Assembly anyway, you should totally drop that and use more jQuery instead.
 
@Quill Hope you get better soon.
 
0
Q: Finding corners from Line arrays

TheLethalCoderI have the following code that takes input of Line arrays and attempts to find the intersections on the end points between them. The value _nConrerTolerance is an int of a value to allow the lines to not need to be exactly on each other. Now obvisouly this code will be quite slow, especially as I...

0
Q: Canvas makes website unresponsive, doesn't draw anything and freezes up

nemoThose are the symptoms. Init() is called from onload="init()" in the <body>. the image is a 40 x 40 image of a grid, that I want to tile across the canvas. canvas { min-width: 100%; min-height: 100%; } And here is the JS. function init() { canvas = document.getElementById("can...

 
5:05 PM
0
Q: Data structure for expression evaluation

TeodorProgram behaviour Hi! New haskeller here. I've made a data structure for mathematical expressions. I want to parse mathematical expressions like x = 3 y = 4 z = x + y : into an evaluated document like x = 3 y = 4 z = x + y : 7 where = is assignment and : evaluation. The data structure mu...

 
0
Q: Better way to add DOM element. JavaScript

Jackson JacobI have the following code which inserts a new element of the same type over and over again to the parent element. I am new to JavaScript so was wondering if there was a better way of doing this. I apologise for the variable names, I'll get around to changing those later, just allows me to see the...

 
5:24 PM
@CaptainObvious that's ugly
 
0
Q: Breadth-first search: traditional and bidirectional in Python - follow-up

coderoddeI have refactored the version of the previous (and initial) iteration according to the answer by alexwlchan. As a reminder, this snippet compares breadth-first search against its bidirectional variant. See what I have: #! /usr/bin/env python3.4 import time import random from collections import ...

0
Q: 2 player chess game in C++

Adnan ZahidI have written a 2 player chess game in C++. Things I have accomplished so far: Legal moves validation Bit board generation Things I look forward to (would appreciate advice on them): Move generation Move ordering (based on move values for each square) Pruning Reading data from opening boo...

0
Q: C++ time types and format conversions

NykakinI wrote a small header-only C++11 header for converting between various C++ time formats. Here's the code in question: // time_utils/time_cast.hpp #ifndef TIME_CAST_HPP #define TIME_CAST_HPP #include <chrono> #include <ctime> #include <sstream> #include <iomanip> #include <string> namespace ti...

 
5:40 PM
Try a loop. They are great and do all things. — Easterly Irk 1 min ago
 
lol
 
0
Q: How can i change my python script?

Reda BoukentarPynewb here, Forgive me in advance for raising what is probably an incredibly simple problem. I made a python script that work with my zabbix server : import yaml import commands import os from os import chdir import argparse import sys #it work with arguments and a dictionnary parser = argp...

 
MacBook-Air:~ Quill$ pip install pynewb
Collecting pynewb
  Could not find a version that satisfies the requirement pynewb (from versions: )
No matching distribution found for pynewb
 
5:59 PM
@CaptainObvious code not written / how-do-I-do-this-other-thing
 
0
Q: C++ Address Book (2nd follow up)

chris360This will be my third post of this program, I have received a lot of great feedback and have learned a lot from the community. I have edited this program a lot, and am here for another review to see if I got it correctly. I had a hard time implementing one minor fix with output stream delimiter w...

 
6:12 PM
posted on March 31, 2016 by CommitStrip

Inspired by the following article and comments.

8
 
6:27 PM
user image
3
 
Unikong is up.
 
good evening
 
@Hosch250 What is "unikong"?
 
SE's April Fools game.
 
@iksemyonov Greetings
 
6:35 PM
ah, I see it now
 
does it make sense to ask here before posting up a review request? especially if i'm not sure it's worth a request
 
@iksemyonov Yes, go ahead
 
my idea was to make up a draft of the question and pastebin it, then link to it
 
That's fine, if you want
 
and upon approval here (or maybe it's enough to discuss it right here), post it as a quesiton
 
6:36 PM
What is it that you are unsure about?
 
because outside of the actual SO website, i've had question s rejected many times
 
0
Q: Depth First Search Algorithm - counting connected components - pseudocode

Buzz BlackHi guys I have question and need help. I've written this using pseudocode, and I am stuck.I should examine if number of Vertices in one conected component is even. My idea is to implement DFS and to put one counter and then to check whether counter%2==0 is or not. My problem is I don't know where...

 
@PinCrash uhm, i have a few options of how i could do a small helper class,
so i need to list them first and then post here
need time
 
Basically a comparative review?
 
i guess yes, though it's the first time i come across the term "comp. review"
 
@iksemyonov A "comparative review" is "I have version A and B, which is better?"
 
@iksemyonov Comp reviews, or "A vs. B" questions, are not off-topic per se on Code Review, but they are generally not the most well-received
 
Eh, it is boring.
The Stack Egg was funnier.
 
ok, then that's it, except that i have 3 or maybe 4 versions, though the class is small
@PinCrash then i'm gong to first post a link to it here and we'll see if it fits or what we can do about it
ok, gone writing
 
Sounds good
 
6:42 PM
TTGTW
 
45
Q: How to get the best value out of Code Review - Asking Questions

rolfl I have a project I am working on, and I would like some, or all of it reviewed, how can I ask for this review on Code Review in a way that produces the best possible value? This is not about a question being on-topic, or off topic. Rather, this is about making on-topic questions great qu...

 
@Quill oh. my.
 
is much epic pls play
 
@Hosch250 except stack eggs killed the network haha
 
Right:
 
6:48 PM
I missed stack egg. Q_Q
 
in The Renderfarm, 14 secs ago, by Hosch250
Thing is, Stack Egg was so fun, they got DDOS'ed. They decided to prevent that this year.
 
@Quill Who is the guy that's the main character?
 
the credits thank skeet
so one can assume it's jon
unicorn's true jockey
 
this april fools game is fun
 
@Quill It says Jon.
@AlienHerbNite Consensus says it is boring.
How many levels have you done?
 
6:55 PM
in Tavern on the Meta on Meta Stack Exchange Chat, 30 secs ago, by Quill
storing score globally
not a good idea... prone to
a madman's (javascript dev's) wrath
 
lol
 
@Hosch250 about 15
 
@Quill You broke it.
Everybody blame @Quill.
6
The hitboxes on that game are seriously broken.
I shot right through an enemy, twice.
 
YAGTSHTTCR
4
(Yet Another Game They Should Have Taken To Code Review)
it's all client-side JavaScript right?
I wonder if we could convince whoever wrote it to put it up on CR
 
7:12 PM
Doubt it.
 
@Mat'sMug I'd wager it's worth a try
Didn't they put up the StackEgg code on github last year or something like that?
 
It's probably somewhere.
 
0
Q: collection of objects in C++

NemoI need to define some map from int to mutex. At the moment, I have something that looks like this. std::map<int, pthread_mutex_t> locks; ... int lid = ... ... pthread_mutex_t mutex; if (locks.find(lid) == locks.end()) { mutex = PTHREAD_MUTEX_INITIALIZER; locks[lid] = mutex; } else { ...

 
We could make it a community challenge to write a better implementation.
 
well, i encourage others to have a look as well
 
how many people may be aorund this late?
 
A time zone is a region that observes a uniform standard time for legal, commercial, and social purposes. Time zones tend to follow the boundaries of countries and their subdivisions because it is convenient for areas in close commercial or other communication to keep the same time. Most of the time zones on land are offset from Coordinated Universal Time (UTC) by a whole number of hours (UTC−12 to UTC+14), but a few are offset by 30 or 45 minutes (for example Newfoundland Standard Time is UTC−03:30, Nepal Standard Time is UTC+05:45, and Indian Standard Time is UTC+05:30). Some higher latitude...
 
@iksemyonov A lot of us are in the Americas and it is only mid-afternoon here so we will be around for quite a while
 
@PinCrash great news
ok, the text is there, feel free to comment
 
is 12:23 in CA.
 
7:26 PM
@iksemyonov I think it looks pretty good, you have some explanations on each of the versions as to the pros and cons... maybe a little bit more context at the beginning as to what goal you are trying to accomplish, IMHO
 
the goal is to have a pair of variables of identical unsigned integer types that stay in a certain range, and this check is built into the type for convenience and encapsulation
i tried to make it clear in the beginning, or is more context required?
 
Could very well be just me not knowing much about your particular application/use-case so perhaps others can say something. Either way though, you may as well post it and if more clarification is needed then they will leave comments
 
it's a resolution class for a simple raytracer project
in case you;re familiar with rust, i think i'm trying to achieve what they take as granted - restricted types built out of the morecommon types
 
Sounds reasonable
@Mat'sMug ^ @EBrown ^
 
8K character description huh
 
7:37 PM
.__.
 
create procedure dbo.InsertTweet @tweet nvarchar(8000)
2
 
@iksemyonov btw:
23
Q: Welcome to The 2nd Monitor!

Pin CrashSo, you have found your way to the Code Review main chat room, The 2nd Monitor, perhaps for one of these reasons: You were invited or "pinged" by a site moderator or other user to discuss a post on the main Code Review site; You visited Code Review for the 1st or Nth time, and noticed the chat ...

 
where do you suggest me to ask question like this? SO? — Buzz Black 54 mins ago
Anyone have anything to say^??
 
7:48 PM
0
Q: A class to encapsulate a pair of ints with range-checking

iksemyonovThe goal is to have a helper class to wrap the concept of a resolution safely, encapsulating the range check into the class, since otherwise it can get lost by a client not so cautious. I think this is all the context that's required, but an additional bit of info that may be helpful is that thi...

 
I honestly don't know if this would be off-topic on SO either - maybe Programmers?
 
@PinCrash I'd tell him to put it back in his IDE and finish developing a MVCE :D
 
^^
 
@DanPantry that's not the complete version of it
 
for it to be on topic on SO it needs to be am MVCE, for it to be on topic here it needs to be complete
i'm not about to say what it needs to be on topic to be a good fit for programmers because not even regulars of programmers know what is on topic for programmers
 
7:51 PM
@PinCrash why isn't that an NVARCHAR? could be bigger too
 
lol
 
@PinCrash Why do users always pretend there's a place for them to drop their crap?
 
@Mast There always is a place to drop your crap. Many times it's not Stack Exchange though.
 
generally its the bin
 
8:01 PM
Or the dump.
 
or reddit
 
recycle bin, though
save the planet
 
The only way to save this planet is mass extinction...
 
that went from 7 billion to 0 real quick
ah FFS
everyone knew this was coming
 
Complot!
FBI told everyone iPhone couldn't be cracked. Now everybody bought an iPhone. Now they say they can actually crack it.
FBI + Apple = Illuminati
 
8:11 PM
> In other news, a new clean source of power has been discovered!
After realizing that George Orwells corpse is now spinning at an ever increasing rate, students have decided to attach large magnets to him and placed him inside a copper tubing. The new, clean energy being provided by Orwell is now being used to power the NSA headquarters, where the irony has been found to further increase the rate of acceleration with which the deceased author spins.
 
wow that's dumb
how do you attach large magnets to a spinning corpse?
 
Carefully
 
0
Q: Function to prevent sign-in form from being spammed

mp252I have written a function that I want to protect from spam bots. I have used two techniques the first being filter after submit. After reading around I obtained the foreach loop from here and I have also written a piece of code that uses the spam honeypot protection technique. However what I ne...

 
@Mat'sMug Easy, by spinning just as fast in phase around him.
Just like the moon never loses a grip on the Earth.
Doing it exactly right.
Sattelites.
There are stationary satellites up there who keep their exact position. By moving real fast.
Perspective and all.
killed the fun
 
uh-huh
 
8:35 PM
1
Q: Make a summery from a larger text-file

Nilzone-This code makes summaries from a larger texts. I have searched around for an algorithm and found the following: 1) Associate words with their grammatical counterparts. (e.g. "city" and "cities") 2) Calculate the occurrence of each word in the text. 3) Assign each word with point...

 
summery huh
 
but it's spring...
shouldn't it be a springey then?
 
or springful
 
as long as it doesn't use the Java Framework, I'm good
 
"springing text" might cause confusion concussion though
 
8:38 PM
does that qualify as a dad joke?
 
> "Dad joke in action"
 
@Mat'sMug Are you in the picture?
 
9:10 PM
@Mat'sMug You got a diff with that?
 
nope
wait
 
9:27 PM
0
Q: Match two dictionary keys efficiently in Python

anonI have two dictionaries that I need the keys to match and if they match i will get the value of the first dictionary and then get the value of 2nd dictionary and build a new dictionary out of those. dic1 = {u'ShutterHours': 732, u'ShieldHours': 732, u'MaskHours': 28, u'TargetHours': 790, u'GndR...

 
@Mat'sMug :-)
 
0
Q: How to Make This Private Folder Batch Code Better?

MuthiullahIt's moved from neighbor site, thanks to some comentator's. Wish I do right thing now. I just wrote a simple script cmd to hide private folders, anyone can give me a suggestion for improvement ? I got it by combining several script from internet. This batch file using a password hidden by powersh...

0
Q: Filter option for PFQueryTableViewController in Swift

Nick89I have a PFQueryTableViewController, and have create a separate TableViewController that allows me to select a filter option. When the user selects an option to filter by, I pass the index value back, and then append that Int value to an array. The variable is declared at the top like: var index...

 
10:05 PM
3
A: UNIKONG goes off the edge of my screen so that I can't see its bottom

Nick CraverObviously you didn't read the minimum requirements... of browsing the internet in 2016.

lol
 
3
A: Can we kill the unicorn?

HaneyGive this a read and see if it helps.

62
A: What's with the Stack Overflow UNIKONG game?

Jon EricsonWe bought a game studio to diversify our income stream. Keep playing. For the love of all that is good, KEEP PLAYING!

@Quill remember: real developers play games by pressing ctrl+shift+j; all listed inputs are for "users". — Marc Gravell ♦ 43 secs ago
 
10:28 PM
0
Q: MVC and Subject-Observer pattern in C++ & QT

SmashI am trying to implement the MVC pattern in C++ & QT, similar to the question here: Other MVC Questions The program has 2 line edits: mHexLineEdit mDecLineEdit 3 buttons mConvertToHexButton mConvertoDecButton mClearButton and just modifies strings. The difference with the other quest...

 
11:09 PM
1
Q: View programming pattern in C++ without raw pointers

matt_fabinaI'm trying to achieve, for lack of a better term, a "view" pattern in C++. It's probably most comparable to "views" in the Database world, where one can make a query, and then perhaps aggregate the data, or turn otherwise interact with it without actually duplicating the data. I've tried to redu...

-1
Q: Quiz in Java (Swing)

GlacialManI was make this small quiz with 10 question and 40 JRadioButtons. One question and 4 JRadionButtons for each panels. So i was need to create array with JRadioButtons and JPanels, and for all I need to setText. I had a problem with JRadioButtons. When someone select any of JRadioButtons and click ...

 
I wonder if this Ubuntu Windows thing will mean people stop bashing Windows and instead start bashing in Windows.
2
 
11:32 PM
@CodeQuicksand Ain't that the truth. Learned the web wrong on w3schools, then had to learn it again on MDN lol.
 
\o
 
Adding more flair to the @StackOverflow NYHQ! Look how pretty they are @jzy. More to come soon... https://t.co/vwC52kXwJ2
 
SWEET we're on there :D
 
It's actually an ad for Careers. You'll need to use Careers if your current boss catches you playing it — Machavity 5 hours ago
15
A: Unikong environment halts when pressing left alt key

HaneyDon't press the left alt key, and you have no problem.

 
11:56 PM
@Mat'sMug April Fool's Day already?
 
yup!
 
Man, time flies.
 
00:00 - 16:0016:00 - 00:00

« first day (1062 days earlier)      last day (2955 days later) »