« first day (1158 days earlier)      last day (2852 days later) » 

2:00 PM
0
Q: Google Apps Script- tracking Emails

user110592I was wondering if it was possible to track whether someone opened your email and what time they opened your email. I know that certain add-ons to google spreadsheets has this feature, but their functions are limited. So, I was wondering if there was some function in google scripts or win javascr...

 
@JoeWallis Go to Beer, Wine & Spirits and get some.
@Zak Looks like, since graduation, we've spiked pretty hard.
 
Yup.
 
Zak
2:18 PM
@Mat'sMug Sorry, I've been very bust the last couple of weeks, not got a lot of time for reviewing atm. Will let you know if/when I get the time to look at it.
 
6
Q: Finding the cheapest hotel

Mat's MugI thought this question made a good excuse for some basic OOP code, so I whipped up a little bit of code to demonstrate it in VBA; the idea is to have tutorial-grade code, to show how interfaces and default instances can be used to implement immutable types and factory methods to simulate constru...

done
it's the code I published in the latest RD News post, too
gah, fail
how the heck does that onebox in VBA Rubberducking?!?
@Zak I think you're going to like the little trick there
 
Why can Python not find this XML element of mine?
 
XML is like violence. If it doesn't work, you're not using enough of it.
(saw that on Twitter yesterday, thought it was funny)
I like how my VBA code is more OOP than the original Java code.
 
Zak
@Mat'sMug TS
@Mat'sMug That is AWESOME! Just when I think I'm getting halfway-decent at this VBA thing, you keep showing me how barely I've scratched the surface.
 
VBA is...powerful.
My Fitbit is like, "how can you take all these steps, walk all these floors, burn all these calories, and NOT lose weight?"
OH SNAP
 
2:32 PM
I guess my next step is to implement an abstract factory to spit out IPricingRule implementations based on hotel data loaded from a text file
 
I NEED TO DO THE MONOPOLY THING
FUUUUUU
Alright
 
lol
 
When I get back from my haircut, I'm getting started on it.
THE WORLD WILL BOW TO MY MONOPOLY BOARD
Then I shall call McDonalds
And sell it to them.
 
phew. I thought you were going to call McDonalds to get something delivered. You know, that would have answered your earlier fitbit
 
LOL
No, I get takeout from McDonalds.
I mean...I would never eat there.
Pffft.
 
2:39 PM
0
Q: A module to make JSON in Python easier

Luke TaylorI recently wrote the livejson module as a way to make working with JSON in Python easier. The idea of the module is that you initialize a livejson.File, and then you can interact with your JSON file with the same interface as a Python dict, except your changes are reflected in the file in realtim...

0
Q: Find the longest string without repeating a letter

JoeI've written some code to scan large files and search for long strings that you can write without repeating a letter. I'm self-taught in python and I'm wondering what I've missed. import sys letters ={} #letters is a dictionary currentResult="" ideas=[] with open(sys.argv[1]) as f: while Tru...

 
Zak
"How do I find out how many columns does this control have?" - "Oh, it has a `ColumnCount` property, awesome!"
Thank you Microsoft for making my life easy for once.
 
2:53 PM
I'm doing tree.find(.//CdsVars) in my Python script, and it's still not finding my XML element
I must be doing something really really stupid
 
@syb0rg You using docs.python.org/3/library/… ? As that doesn't seem to work recursively
 
@JoeWallis Working on a tree, I thought it was?
It finds all the other elements I search for
 
>>> import xml.etree.ElementTree as ET
>>> root = ET.fromstring('<r><inner><find></find></inner></r>')
>>> root.find('find')
>>> root.find('inner')
<Element 'inner' at 0x0000012390842458>
Doesn't work recursively for me...
 
Like tree.find(.//ServerDataValues) returns the proper element
@JoeWallis Use the prepended .//
20
A: ElementTree findall() returning empty list

Mark LongairThe problem is that findall only searches the immediate descendants of an element if it is given a tag name. You need to give it an XPath expression that will find track anywhere in the tree beneath it. So the following should work, for example: api_results = ElementTree.parse(response).findal...

 
Monking.
 
3:00 PM
@Legato Hey!
 
Oh that's cool
 
Just finished reading about the zombie rate, I think we should focus on our own questions as well. That means that we should check our older questions if they have the accpeted flag if an answer had been satisfying. IMO the motivation increases if an answer is accepted. Not because of the rep but because of the accepted.
 
@JoeWallis Mmmhmmm, XPath ftw
When they work as intended anyways
 
I'm actually going to try to start this Monopoly business on the weekend...should be fun.
 
@syb0rg I have no clue then, ):
 
3:05 PM
I can find the elements parent just fine
 
@syb0rg Did you check for typos?
 
Looping over that parents children, it excludes the one element I'm looking for
@MathiasEttinger Yep
I should post a little snippet here for you guys to see
One sec
 
@syb0rg Could it be malformed XML that is stripped off at parse time?
 
@MathiasEttinger Hmm, let me look into that real quick
Doesn't look like it
				<ClientDataSets Count="1">
					<Cds>
						<Name>
							Test_Set
						</Name>
						<Transfer_Set_Name>
							Y
						</Transfer_Set_Name>
						<Transfer_Set_Time_Stamp>
							Y
						</Transfer_Set_Time_Stamp>
						<DSConditions_Detected>
							Y
						</DSConditions_Detected>
						<Event_Code_Detected>
							Y
						</Event_Code_Detected>
						<CdsVars Count="15">
							<CdsVar Name="Osiris_Test_Data_0001" Scope="ICC" Type="Dv"/>
							<CdsVar Name="Osiris_Test_Data_0002" Scope="ICC" Type="Dv"/>
Trying to get at the CdsVars element doesn't work
But I can get the Transfer_Set_Name element no problem
 
I just used ET.fromstring(xml).find('.//CdsVars') and got it fine...
 
3:16 PM
using only this snippet, I can parse the file and root.find('.//CdsVars') returns the right tag
 
0
Q: matlab - vectorize a code merging two matrices (and how you get to do it)

A_CI have two matrices a and b that have, on each line, some values (null or not) and then a bunch of zeros at the end. I want to construct a matrix c that for each line has the corresponding line of a from the first element till to the last not-null element, concatenated with the corresponding lin...

 
@CaptainObvious Oh boy...
 
@CaptainObvious I'm not sure you work...
@JoeWallis @MathiasEttinger Hm, odd. Does it work for you guys on the complete file? gist.github.com/syb0rg/97bc690eabb9680307475eb9e7853b66
 
@syb0rg He made a dump of the interactive input.
 
@Mast Yeah, ik but looking at the output I'm not sure it's working as intended
 
3:22 PM
I'm not exactly sure what he's trying to do.
 
@syb0rg Yup
 
@syb0rg It does work
What is the error, anyway?
 
This question is a mess. I don't understand really what you are trying to accomplish based on your description, your code is a dump of Matlab's interactive output and not an actual function, and to me it almost looks like this code/output is broken. — syb0rg 13 secs ago
@JoeWallis @MathiasEttinger Really... odd
It's returning an empty list
TypeError: 'NoneType' object is not iterable
 
Wat. Did you change the node you search from?
Also Py2 or 3? (I'm using 3)
 
I'm doing my search on the tree, you guys seem to be doing it just from the root
Python 2.5.2
 
3:26 PM
Python3 here too
python2.7.12 works fine too
maybe we can assume that the file is not at fault here and look at the code too…
 
Well, it's a mess cause I'm not great at Python, but here it is: gist.github.com/syb0rg/59ede2c221b698b0abc1ebeb8af45079
Output I'm getting:
 
0
Q: Excel VBA - Assign values to cell

vbricksHow to assign a value to a cell using vba? Function adjustCell() MsgBox (Range("A1").Value) MsgBox (Range("A1").Value2) Range("A1").Value = "Hi" End Function The value in the requested cell doesn't change upon calling the command "=adjustCell()". Instead, the cell to which the formula is...

1
Q: AVL Tree implementation in C++

MAGLooking for a general review of this AVL tree implementation: #pragma once #include <cmath> #include <algorithm> namespace mds { template< typename T, typename Func = std::less<T> > class avl_tree { struct Node { T key; int h; ...

 
Name
Transfer_Set_Name
Transfer_Set_Time_Stamp
DSConditions_Detected
Event_Code_Detected
[]
 
jrh
just checking, is it okay to post a single class for review?
 
@syb0rg These are the print tree.findall('.//CdsVars') right?
 
3:32 PM
@jrh Size of code doesn't matter, in the on/off -topic reasons.
 
@MathiasEttinger Yes
 
but you removeBranch(tree, 'CdsVars') before…
 
I KNEW I DID SOMETHING DUMB
5
 
@MathiasEttinger Thanks for your help, have some reps ;)
@JoeWallis Thanks for your help as well, also some reps
 
Zak
3:36 PM
@CaptainObvious "Need help like now please!" um, NO!
 
@syb0rg No problem, :)
 
Re-reading your problem description and looking at the output, I'm quite sure that this code is broken. Hence, I am voting to close this as off-topic. — syb0rg 16 secs ago
Code is broken, needs close votes ^
 
wow, someone is watching the new posts closely...lol
 
Zak
Do we allow pure-design reviews for DB schemas on CR?
 
3:53 PM
0
Q: Using Flask-SocketIO in conjunction with Flask-WTF / WTForms to provide realtime form validation feedback

Simon KemperI am working on a user login using Flask and the following extensions: Flask-Login, Flask-WTF, WTForms and Flask-SocketIO Client-Side Rendering of Forms and pre-filling with data is done with Flask-WTF / WTForms just like this: <form class="form-horizontal" role="form" id="username-password-fo...

2
Q: Retrieving value from HTML table

MalachiCurrently all this does is retrieve data from specific columns, the final result will be that I will check the data to make sure that it passes the test cases, but I want to look at this foreach right now and see if I can't make it a little simpler. A lot of what I have coded I have come back ...

 
As this is a coffee review site, please can you explain what you are suggesting and how it improves on the code presented in the question? Code only answers are generally not acceptable. — forsvarir 19 mins ago
I didn't know we reviewed coffee...
 
must be a smartphone auto correct....lol
 
Zak
@Zak @Phrancis ?
 
@Zak no, pure database design questions are off topic here (no code to review) and on DBA as well (primarily opinion based / too broad)
 
@syb0rg Agreed.
 
4:02 PM
@Vogel612 have you noticed that there are some users on there that have zero reputation and have voted almost 600 times?
 
If you write and include the SQL code that creates the database and the stuff that goes in it then it is on-topic here usually
 
@Malachi The minimum is 1.
 
@Mast there are two in the graphic
 
That's rep that year, I guess.
 
close to the 600 mark
 
4:03 PM
Might be deleted users?
 
then there is the number two position, has 4 reputation and 1600 votes
 
@Phrancis Nah.
Those don't have an avatar.
 
Oh, righ
 
@Malachi This is the reputation for this year only
I’m at 6k right now, but the figure is accurate for 2016
 
But yea, this means we got users who get next to nothing as rep and who still vote an electorate badge a year.
Those are the janitors like Vogel.
 
Yup, I'm about tied with votes and rep.
There's a guy with 144 total rep and over 2k votes. Nuts.
 
@JoeWallis I did hack a sede query rogether for users that through voting 'created' more rep than they have
The two top ones I know about have a ratio of more than 100 created : 1 owned
 
@Vogel612 That's insane
 
jrh
4:13 PM
I hope the purpose of the code is clear enough
even for me it's a ton of configuration options to keep straight
 
0
Q: Immutable File Upload Server Configuration Class (FTP or Network Drive)

jrhThe application I'm working on needs to occasionally take pictures, and then send them to either an ftp server or a network drive (user configurable). To try to abstract away the differences between a ftp server and a network drive I made this class. The idea is, the code that takes a picture wi...

 
@Vogel612 Does it not include people that have less than 200 rep?
 
alright so
I'm about to leave for the airport
if the plane crashes, any one who badmouths js in the following 2 weeks
I will haunt your ass
 
@Vogel612 Dang, I have a higher ratio than I thought on that list
 
Changed the Topx to 50 and found some with less than 200 rep
 
4:19 PM
Just throwing in an idea I've just got for a CR ad on SE:
 
@JoeWallis it excludes those with 1 and 101 rep IIRC
 
> Want to learn more about your favorite language?
Review some code
11
 
@Vogel612 Seems right.
 
First rule of documentation: document the actual behavior, not the specification.
 
Unlessy ou're documenting the spec before writing the code? ^^
(RFC-style)
 
4:28 PM
I've been re-writing a datasheet because the content is bullshit...
@DanPantry Is that a challenge?
 
@Mast lol
 
Well, the content would've been great, if it was the truth. But it isn't.
 
I never quite realised how many planes there were in the world in the sky atm but this
 
It's how people intended it to work, I guess, but it does all kind of weird things except what's in the documentation.
@DanPantry And this, there's plenty of those sites.
 
@DanPantry Wow, the US has so few flights compared to the rest of the world too.
Compared to Europe anyway.
 
4:33 PM
no need to fly out of america because of ALL OF THE FREEDOM
*bald eagle*
 
@DanPantry SQUAA
 
I have a feeling I'll get invited to Trash by the time I get back.... lol
 
4:47 PM
enjoy the flight! :)
 
Just back, did the stars rain down upon my quote or something?
2
 
 
0
Q: Are there any security vulnerabilities in this implementation of a password generator?

OrtundTo generate a password, I generate a key using RNGCryptoServiceProvider. The key is 9 alphanumeric characters long into which I insert a single non-alphanumeric character for a full length of 10 characters. Having a mix of Uppercase, lowercase, numbers and symbols and being 10 characters long, a...

 
@CaptainObvious Probably. Also: wrong title.
 
methinks the single most underused character in a password is a simple whitespace
 
4:59 PM
While I understand the rule "never use your own auth" Why did you do it anyway? — Mast 9 secs ago
@Mat'sMug It's illegal in a lot of passwords.
 
and that's outright stupid
 
@Mat'sMug Input trimming/sanitation porpoises methinks.
 
Yea, and I never understood why. Databases can handle whitespace just fine.
 
Nevermind...
 
if I want my password to be "'); DROP TABLE Students;--", any decent app should let me
6
@Mast should it be tagged with ?
 
5:09 PM
suddenly, I feel less bad when I find high DPI bugs in my code
 
Lol
 
I know
 
wat
 
4K displays completely wreck RD's UI
well, and the VBE's
 
jrh
I'm not sure how to make a WinForms application work with high dpi, I guess it's easier with WPF?
 
5:13 PM
you have to set AutoScaleMode on the parent form/control to Dpi - the default is Font
and you have to use layout panels everywhere with autosize set to true for everything
it's a PITA
WPF mostly handles that stuff automatically
 
Abby T. Miller on July 5, 2016
Welcome to the Stack Exchange Podcast, recorded Tuesday June 28th at Stack HQ! Today's podcast is brought to you by Eugene McCarthy for President, as well as by IBM. Try the new IBM Cloud Tools for Swift. New this week: one of those two sponsors is a real live sponsor. Bet you can't guess which one! Anyway, your hosts today are joined by Daniel X. Moore and Gareth Wilson from the HyperDev team at Fog Creek Software.
 
jrh
hmm, good to know, thanks Dan!
 
@Mast If databases handle your cleartext password you got bigger problems
 
Maybe silly question, but is there any way to test 4K DPI without having a 4K monitor yourself?
 
though obviously from that installer image, WPF doesn't prevent you from doing it wrong :P
 
5:14 PM
How would yo do that @skiwi ?
 
@DanLyons the funny part is that what you're seeing in this messed-up screenshot is a WPF UserControl
I like how the 16x16 icons look like they're being viewed from the surface of the moon
 
@Vogel612 I don't know :D
 
@Mat'sMug hmm been a little while since we did a high DPI testing pass - I wonder if there's icons that do the same thing here :o
 
0
Q: Find the largest area polygon built from a given list of vertices

TheguyThis is a code that gets a list of polygon vertices, non ordered, and finds the order in which they should be arranged in order to create the polygon with the largest area. There are two key elements in the approach: Testing the area of the polygon is done by monte-carlo calculation. Random po...

 
@Mat'sMug Do you have an idea if Rubberduck would work on a Japanese PC with a 4K 800x600 screen? :o
Never mind me, I'm an idiot
 
5:21 PM
a 4K 800x600 screen huh
Resolution 101
 
back in my day, my monitor had 4k pixels
 
I remember when 640x480 was all the hype
 
hercules monochrome
 
5:36 PM
0
Q: Switch statement to build context menu (with many redundant lines of code)

Michael Brandon MorrisI have switch statement that is switching on an enum to build a ContextMenu depending on what the selected enum value is. While the various enum values require different operations in their cases of the switch, some of them require some of the same operations. All of the MenuItems are declared a...

0
Q: Linked list C code not terribly elegant

bob.sacamentoI asked a question over at StackOverflow. Was told it might be more appropriate here. This is a toy version of the code I really want to write: #include <stdio.h> #include <stdlib.h> typedef struct node_s { char val; struct node_s *next; } node; int n; char obtain_next_char(){ if (n<...

 
@DavidHammen: it's a known thing with stackexchange sites. Usually, the best strategy is to write a quick answer, post it, and then improve it through successive edits. A quick "to not contaminate them with earth organisms" would have sufficed. That also lets other answerers know you're working on an answer and what route you're taking, so you're not both spending 2 hours typing up and answer to then find out they are 95% identical. — Konerak 2 hours ago
#NotOnCR
 
#gamingthesystem
 
possible answer invalidation by Peter Mortensen on question by Yannick: codereview.stackexchange.com/posts/133924/revisions
 
0
Q: Image Stenography using LSB technique

MajiickThe program can be used to hide an image within another image and later extract the hidden image. This is done by concealing the secret image within the lowest bits of the apparent image. Example of a cat hidden within a tree. I split it into 2 programs to make commandline args parsing easier, C...

0
Q: ConsoleWorker update console timer with how long application has been open

Liam Hardyearlier I coded a quick console worker that runs a timer every 1 second and updates the consoles timer with how long the app has been open, how can I improve this? using Faze.Other.App; using log4net; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; us...

 
> any hitchhiking organisms and biological molecules on Juno will be not only merely dead, but really most sincerely dead.
 
5:48 PM
@Hosch250 Double dead is better than single dead?
 
Apparently.
 
6:01 PM
0
Q: SVG photo mosaic creator

CodeYogiI got this as part of some interview assignment. After some head scratching I think I have done quite well as the result can be seen here: After transformation(10x10 tile): More crisp picture with smaller tile size: So, the requirement were: Not to use any external library. Only front ...

 
http://www.commitstrip.com/en/2016/07/05/bot-bot/
CommitStrip
Bot + Bot =
CommitStrip
1467741296
8
 
6:19 PM
@CommitStrip LOL! is it me or that one has @JeroenVannevel all over it? haha!
 
@CommitStrip Looks like I need to upgrade @rob0t
 
lol
 
0
Q: Python Random forest and machine learning - improvements

JamesHi was told this was the best place to post working code to get suggestions for improvement, I hope this is OK. I am quite new to using python for machine learning. I come from a background of programming in Fortran, so as you may imagine, python is quite a leap. I work in chemistry and have be...

 
6:39 PM
I love when my company uses code implementing an XML library not following the specs
 
7:10 PM
Building tritium on Windows is going surprisingly well, 1 small modification and I've built 75% and we're still going
 
haven't you been building tritium on Windows for like two weeks? and that qualifies as "surprisingly well"??
 
@Mat'sMug No, I've been working on the other dependencies
I just started building tritium a few minutes ago
@Mat'sMug This is the real thing holding me up right now for a complete Windows build: github.com/erikd/libsndfile/issues/136
Wooo! Tritium built completely!
 
What is Tritium?
 
Also a necessary dependency for Khronos
 
0
Q: Determine if Two Trees are Identical.Can i write a more optimized recursive code

Mrityunjay Vashisth/* A binary tree node struct node { int data; struct Node* left, * right; }; */ /* Should return true if trees with roots as r1 and r2 are identical */ bool isIdentical(Node *r1, Node *r2) { if(r1==NULL && r2==NULL) return 1; else if(r1->data!=r2->data) return 0; else{ ...

 
7:15 PM
Oh right, I think I remember seeing this on Github a while back.
 
7:30 PM
@Mat'sMug how should this be handled?
why didn't you take this user's advice about the String.Format and/or Interpolation? --> codereview.stackexchange.com/a/109061/18427Malachi 16 secs ago
 
Eh, it's gone now. I considered it junk and deleted it
 
@Malachi why should it be handled in any way? RubberDuck's answer did say "only if you're using C# 6" - does the OP use C# 6?
 
@Mat'sMug his answer also talked about String.Format, which the user doesn't use in the new post either
 
then there's a free answer element!
 
@syb0rg Do you know of any good places to learn how to use CMake?
 
7:35 PM
@SirPython Are you starting from scratch or converting from Autotools?
 
Starting from scratch, but I've never heard of Autotools (if that's a better alternative)
 
@SirPython NONONONO
It's not better at all, and is half the reason building Khronos has been a PITA
 
Cool, thanks!
 
Any suggestions on best way to convert PHP to .Net?
 
7:38 PM
Find a unicorn and ask him ;)
 
I've got the horn right here, just need to do surgery to give it to someone
 
@throck95 @Phrancis may be able to help? Idk
 
@Mat'sMug I once made a bot for some sites that opened a browser window, visited 20 girls their profile on separate tabs, closed the browser window and started all over again
 
HA! I KNEW IT!
 
Since profile visits get shown, they would see me in their recent visitors list
End result: I had hundreds-thousands of profile visits back from them and plenty of messages
and I wasn't even at home
 
7:42 PM
That's pretty clever.
 
how does the bot know the girl is cute though?
 
It doesn't. That's why he stopped using it
 
@throck95 best way would probably be to extract docs and specs out of the PHP code, and then implement it from scratch in ASP.NET MVC
and lol
 
It doesn't. But that didn't matter -- I could just ignore it when they messages me and I wasn't interested
 
7:59 PM
You really shouldn't use your own salts on password hashes and you really should use PHP's built-in functions to handle password security. Make sure you don't escape passwords or use any other cleansing mechanism on them before hashing. Doing so changes the password and causes unnecessary additional coding. — Jay Blanchard 34 secs ago
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: minimax of input iterator range
 
8:25 PM
0
Q: Fluid HTML email template

districtdaveI created this as a template for our email marketing team to use when creating emails. For fluid/responsive behavior, I am using max-width and conditionals for clients that do not support it (mso). If anyone could give some suggestions for improvement, that would be AWESOME! <!doctype html> <html>

1
Q: Console Worker Follow-Up

Liam HardyA few hours ago I posted a similar question but this is a follow-up, I have revised the code and added and removed certain lines of code and hopefully improoved it a bit, I just brought it here for a final cleaning, can anyone notice anything than can be improoved even more? Some of the code has ...

0
Q: Fibonacci sequence methods

LeonDecided to get a little JDK 8 practice in today, so I built two methods to print out the golden ratio, one uses the Stream API the other does not. Wanted to request general feedback on how well I implemented these methods (mainly the stream generator,) considering the given task and if there is a...

 
8:36 PM
0
Q: Splicing enumerables together

Sam PearsonBasically, what I mean by splice is to take an array of Enumerables, take the 1st element from the first one, then the 1st element from the second one, and so forth, until we come back to the 1st enumerable, and we then take the next element from it and each of the others. Sort of like this: [A ...

 
8:52 PM
This question is better suited for codereview.SE. Stackoverflow focuses more on fixing bugs rather than general goodness reviews. — ssube 58 secs ago
This would be one for Code ReviewJorn Vernee 35 secs ago
 
Tritium (/ˈtrɪtiəm/ or /ˈtrɪʃiəm/; symbol T or 3H, also known as hydrogen-3) is a radioactive isotope of hydrogen. The nucleus of tritium (sometimes called a triton) contains one proton and two neutrons, whereas the nucleus of protium (by far the most abundant hydrogen isotope) contains one proton and no neutrons. Naturally occurring tritium is extremely rare on Earth, where trace amounts are formed by the interaction of the atmosphere with cosmic rays. The name of this isotope is formed from the Greek word τρίτος (trítos) meaning "third". == Decay == While tritium has several different e...
 
9:08 PM
-1
Q: Good code JavaScript

Ievgen Maksymenkofunction getLeftPosition(selected, parent) { return Math.round($(selected).offset().left - $(parent).offset().left); } function getTopPosition(selected, parent) { return Math.round($(selected).offset().top - $(parent).offset().top); } $.fn.lavalamp = function(method) { var selector = $(th...

 
@CaptainObvious UWYA, no context.
@Malachi Nomnomnom.
@Mat'sMug Perhaps, if it's implementing a known system from scratch. I'm not too sure whether it's a good fit, since he does things his own way.
 
9:24 PM
 
Yup.
I was going to write an answer, but I'm quite sure he isn't going to like it. So I won't.
I could've written something like this, but it doesn't feel useful for the OP.
 
possible answer invalidation by Malachi on question by Liam Hardy: codereview.stackexchange.com/posts/133976/revisions
Answering your own question is also a way to get around the requirement that questions with working code are not suitable for SO (and should be moved to Code Review). :-) — Cary Swoveland just now
 
@Duga huh, well that's a new one
 
10:08 PM
0
Q: Optionally Lazy Parameters

Kyle StrandInspired by Swift's @autoclosure feature, I tried writing a brief C++-14 header that permits "optionally" lazy (i.e. @autoclosure-like) parameters. In other words, I provide a macro, LAZY_PARAM, that can be applied to parameters in function declarations; when calling these functions, arguments mu...

0
Q: Python Takuzu solver

tots_o_taterIf you are unfamiliar with the logic puzzle game Takuzu, I learned how to play it and was inspired to make the project from this challenge posted on reddit. The short version of the game is it's a logic puzzle that uses 0s and 1s on an nxn grid that does not allow three repeating numbers in a row...

0
Q: AngularJS how to refactor the following code to handling multiple widgets show or hide?

catlovespurpleI have 7 variables controlling 7 widgets showing or hiding from the frontend. I want to put them together and control all of them using one function. Here is what I have. However, I feel like even though this way works, the code is really ugly and should have space for improvements. Thanks in adv...

 
> If you immediately know the candlelight is fire, then the meal was cooked a long time ago.
 
that's a bit too profound for my brain at this time lol
TTQW
 
wat
 
that's CRitterspeak for "Time To Quit Work" ;-)
 
23
A: What's a Zombie? And what are the many other memes of Code Review?

Mat's MugMeme: [TTQW | TTGH] | TTGTB Originator: [attributed to] Simon André Forsberg (first TTQW here) Cultural Height: The 2nd Monitor Background: leaving the chatroom and/or going AFK isn't something we do often. These funky acronyms efficiently communicate that it's either time to quit work (or tim...

 
10:18 PM
ha, thanks for fetching that. was going to do it but stumbled on a flag on meta!
aaaaand I'm out
 
-1
Q: Optimize this JavaScript Code Possible?

LuckyAli***Here is the code, function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createEleme...

 
Out of flags?
 
of here
lol
 
lol
 
I mean, this office
 
10:18 PM
Have fun
 
yeah, going to try not to scratch my car against a pillar coming out of my new underground parking spot :)
 
10:32 PM
New comment on an old blogpost of mine
> A truly invaluable resource when it comes to advanced unit-testing. This is truly a goldmine of valuable information. Thank you for sharing!
What can I say
 
@JeroenVannevel 'Thank you' would be a good start.
@Mat'sMug If it scratches your car, you aren't driving fast enough.
Those pillars are like anti-speedbumps.
 
Cool people don't say thank you
 
0
Q: TLE on SPOJ for Prime Generator (PRIME1)

Gaurav SofatSummary Of The Problem The objective is to find all primes between two given numbers, it is specified that the two numbers are <=1 billion and the difference between the two numbers is ~100,000 ; We are to repeat the whole process for a t number of times where t is given <=10. Detail Problem on...

 
10:47 PM
Welcome a new user.
 
What should I say?
 
0
Q: Pretty print a 2D matrix in C (numpy style)

ShivaWorks for any 2D matrix represented by a 1D array. Comments and criticism welcome. Also wondering whether the code can be made shorter. It's really messy right now. #include <stdio.h> typedef float fpoint_t; void print(fpoint_t* m, int row_size, int col_size) { int i, j; printf("...

 
@Majiick Just give him an upvote.
 
good idea
 
0
Q: A class for solving a system of linear equations using Gaussian Elimination

Tharwenclass LinearEquationSolver { List<LinearEquation> rows = new List<LinearEquation>(); decimal[] solution; public void AddLinearEquation(decimal result, params decimal[] coefficients) { rows.Add(new LinearEquation(result, coefficients)); } public IList<decimal> Sol...

 
11:03 PM
baking them a pie is also encouraged
don't be afraid to get your hands dirty
 
the one time i tried baking was when I made crepes. it went well except I put salt instead of sugar
 
so you got pancakes instead... nothing to complain about there
 
You put salt in your pancakes?
Only a very tiny bit.
I hope.
 
11:18 PM
'course
 
Extremely verbose is an understatement... — Chris Cirefice 5 hours ago
 
0
Q: Approaching a C++ library with templates

InversePalindromeI previously posted a thread asking for a general review of one of my first projects related to programming (C++ Prime Number Library) and received very good help and new perspectives. After this, I decided to incorporate my newly acquired knowledge of templates into the same project. I want to k...

0
Q: Java concurrency code improvement ideas

CSBobI've recently given a coding interview on a Java concurrency task and unfortunately didn't get the job. The worst part is I've given my best but now I'm not even sure where went wrong. Can anyone help give me some ideas about things I can improve on below code? Thanks The question is pretty v...

 
jrh
11:35 PM
@JeroenVannevel Do you have a link to that blog? That unit test article sounds like something I'd like to read
 
jrh
thanks Mast
 
Perhaps Jeroen has a link to the exact post.
 
jrh
I think I might have found it vannevel.net/2015/03/31/…
not quite what I was looking for, oh well. I'm still looking for something that gives real world examples, e.g., something you'd see on CodeReview but with unit tests
that idea just hit me now, I should read through the unit testing tag
 
led = Led.LED(1)
My Python is starting to look like C# with a verbosity like that...
 
11:51 PM
careful lest it becometh Java
 
jrh
could be worse: BobCo.BobsLEDFramework.LED.LEDValue led = BobCo.BobsLEDFramework.LED.GetLEDValue(Led.LED.GetState(1));
 

« first day (1158 days earlier)      last day (2852 days later) »