« first day (1074 days earlier)      last day (2951 days later) » 

10:04 AM
0
Q: Traversing javascript/json based on a dot-separated lookup string

Fx32I have an object of arbitrary depth, and a string (or array) containing the keys which have to be traversed to get to the value. As far as I know, there's no method to get to the value directly: var object = { user: {name: 'bob'}, 'user.name': 'error' }; object['user.name']; // conta...

0
Q: Count rows of a table

DanI am trying to count the rows of two tables generated by SQL connections in Excel VBA. My plan was to use ListObject.DataBodyRange.Rows.Count however, this errors when a table is empty, which one often is. I found it completely impossible to use On Error GoTo ... twice within one sub so I pulled ...

 
Fooled another company using telephone-number verification at sign-up. 10 zeroes. C'mon guys, that's too easy...
 
TIL you can type in some matchers into the search bar on the chrome network tab
status-code:500
only shows requests with a status code of 500
 
@DanPantry How is that useful?
 
@Mast When you're developing a website that has requests occuring all the time (polling) and you want to find a specific group of requests
 
10:15 AM
What happens when you go status-code:404, will it find all pages it can't find?
 
for example I have a few 500s related to a specific issue
it'll filter the network history to responses with that code, yes
it has other options like showing requests larger than a given number of kilobytes
 
yeah same
 
Perhaps I should set aside my dislike for Chrome and try it, so I have any idea what you're talking about.
 
status 500 means I screwed up
2
 
or my dba screwed up
 
10:17 AM
@CaptainObvious One more VTC.
 
huh. I missed a flag
that's rare
 
@Quill Happy bug-hunting :-)
 
it's a bug in me
not my code ;)
 
You've got a bug in me toy story theme tune
 
if you have >10k network wide, you should all install my cool userscript
 
10:29 AM
omg
I've just spent an hour tracking down an error
 
I should order a tshirt with the userscript headers on it
 
because someone forgot to put two zeros after 1
 
lol
var percentage = amount / 1;
 
no - the field in EF was only allowing 1 maximum character
But data in the DB had 100 max characters ( and teh col allowed 100)
so when I tried to update a record it blew up in my face
 
lol
 
10:31 AM
mother of obscure bugs, though
We only noticed it because the Swedish data we imported had actually filled out that column. No one else had.
 
Was the data rejected or pruned to 1 character?
 
Just flat-out rejected
 
At least that saved you some trouble.
Otherwise you'd have found out this bugs months later.
 
Yeah
Well, the thing is
It looks like the stuff I've updated has caused this
So the solution is under al ot of scrutiny right now (which makes me look bad)
Even though a lot of these issues have absolutely nothing to do with the upgrade at all
 
:(
 
10:32 AM
For example, some columns were wrapping around when they shouldn't be
That's not my problem, the person who wrote it had only occupied 11 out of 12 columns
SO when I upgraded kendo and it wasn't doing stupid stuff, it properly respected the 11 columns and so was wrapping..
It's like a house of cards
 
Flip one, flip all.
 
It's my 1-1 on Thursday, though, so I'll bring it up then..
I imagine the topic will come up anyway
 
 
I'm very tempted to make a house of cards right now
 
> Ymddiheuriadau, ond ni ellir dod o hyd i'r dudalen yr ydych yn chwilio amdani.

Mae Hwb wedi ei adnewyddu, gan gynnig llu o nodweddion newydd a chyffrous. Yn anffodus, golyga hyn y bydd angen diweddaru eich dalen-nodau gan fod yr adnodd neu'r dudalen nawr ar gael ar gyfeiriad gwahanol.
I may have stumbled on a Welsh 404, but I'm not sure...
 
10:37 AM
That's welsh, yes.
 
@DanPantry Yes, I'm pretty sure about that. I just wasn't sure whether it actually said 404.
 
And yes that looks like a 404 to me
 
Turns out it does (thanks Google).
 
dudalen means page
 
I think something similar was written on the inside of the One Ring
4
 
10:38 AM
LOL
 
> This is not the Ring you're looking for.
 
I'm not sure why it is dudalen though
We usually wrote.. and pronounced.. it "tudalen"
Welsh has this weird thing to do with mutations of sounds based on the consonant that precedes it though, so idk
 
> Welsh has this weird thing
Nuff said.
 
s/has/is/
 
"Ymddiheuriadau"
I'm welsh and I don't even know where to begin on pronouncing that.
I suppose spitting in a bucket would be close enough.
 
10:40 AM
A good question at this point would be why @Mast is browsing Welsh sites incorrectly
 
"um-thi-ery-ah-deye" is it phonetically
and, as you can see, how it is pronounced has absolutely nothing to do with how it is written.
I'm convinced Welsh was written by a couple of stoners 300 years ago as kind of practical joke against the English
 
0
Q: Conditional async validation function

Infer-OnWe have the following validation function: var result = scope.CurrentUser.Surname.length > 0; var d = $q.defer(); if (result) { apiService.UniqueEmailCheck(scope.CurrentUser.PersonId, scope.CurrentUser.Email) .success(function (response) { if (res...

 
I tried to memorise the pronunciations of russian characters once
that didn't go so well
 
@CaptainObvious Why does no one ever know about promise chaining
 
interesting language though
 
10:43 AM
and holy 8-space indents
 
8 space indentation burns my eyes
@DanPantry feel free to answer the question
 
const result = scope.CurrentUser.Surname.length > 0
if (result) {
  return apiService.UniqueEmailCheck(scope.CurrentUser.PersonId, scope.CurrentUser.Email)
    .then(function (response) {
      const data = response.data
      if (!response.data) {
        return null
      }

      return apiService.GetSelectetExistent(scope.CurrentUser.FirstName, scope.CurrentUser.Surname, scope.CurrentUser.DOB)
    })
    .then(function (response) {
      $scope.SelectExistent = response
      return $scope.SelectExistent.length > 0
That's a quick rework already..
I might answer it fully in lunch
Rewriting the code is easy, ELI5ing is hard
 
> TELL HIM HE IS A PRETTY CAT
I'm still laughing over that image
 
@Quill Long story.
@DanPantry Isn't that opening the door to all evil?
 
@Mast Promise chaining isn't, I would argue not chaining promises is more evil as it makes things super complicated.
 
10:48 AM
@Quill You could even ask on Science Fiction & Fantasy what the original image is.
 
The following excerpts do the same thing:
 
I don't recognize the setting.
 
@Mast it's star trek
 
@DanPantry Is chaining promises not a maintainability nightmare?
 
no
 
10:48 AM
var d = $q.defer()
service.someAsyncCallThatReturnsAPromise().success(function (result) {
  d.resolve(result)
}).error(function (error) {
  d.reject(error)
})
return d
vs
 
@Mast just the image url
 
service.someAsyncCallThatReturnsAPromise().then(function (response) {
  ....
}).catch(function (error) {
  ....
})
 
The fail is strong with me today...
 
when you chain promises, you use spec compliant behaviour and reduce the creation of new objects (as whenever you add a .then you're creating a new promise handler anyway. .then + defer = two objects + a closure creation
also with defer you lose stack traces
 
10:50 AM
@DanPantry That's bad.
 
using a deferred object shows a fundamental lack of understanding of what promises are
A promise is analogous to a Task, not a callback.
would you create lots of Tasks in C#? Nope, you'd use continuations
 
@DanPantry "dot-location": ["error", "property"]
 
The only time you wanna use a deferred is if you are wrapping existing code that doesn't use a promise
and even then there is new Promise(function (resolve, reject) {}) for that
@Quill wat
 
@DanPantry it's the eslint rule to say you should have the dot property calls on the next line
 
@Quill Ah yeah, you probably should do that I'm just lazy
 
10:52 AM
@DanPantry Right. Now put that all in an answer, earn free internet points and teach the internet it should stop believing in fallacies.
 
eslint defaults to having the dots on the same line, but the property names on the newline o_O
 
@Mast I will at lunch time
 
Awesome.
 
@Quill That probably helps in terms of line endings. It's much more obvious you're doing something stupid if you do foo.;something() instead of foo;\r\n.something()
 
normal people don't care about line endings
 
10:54 AM
well if you're using a mac you wouldn't ;-;
 
line endings and character encoding doesn't matter to joe programmer
 
try using git in both a bash and windows environment
 
@DanPantry Or, you know, receive data over UART on a terminal.
0xDEADBEEF\r\n0xCAFEBABE\r\n results in.
 
These kind of questions are actually appropriate for Code ReviewWhirlwind 54 secs ago
 
0xDEADBEEF, which gets cleared, which gets overwritten as 0xCAFEBABE, which gets cleared.
So you only see one line in your terminal.
Just \n will simply put everything right under each other.
Of-course, now we know what \r does here, we can remove the \n
Line endings are important :-)
 
Kaz
11:05 AM
Just spent 3 hours helping the finance director to produce a regulatory-compliant balance sheet forecast for my company (and the acquisition we're about to do). I've never wanted to punch a computer so hard in my life.
 
@Kaz Why, it didn't work?
 
@Kaz You've never played LoL, I see
 
0
Q: Optimize the CSV Upload function in Ruby On Rails

Dinesh SainiThe code is working fine however, I would like to fix code after unless and can I store thread ID in the database too? Is there a way to improve performance. require 'csv' class CsvDb class << self def convert_save(model_name, csv_data, field_name=nil) target_model = ...

0
Q: Associate an object with a regular expression in Python

SixIs there a way I can link/associate an object (in this particular case a function) with a regular expression pattern? Here's the function I'm working on: def get_command(url): """ Return command for downloading a particular url. >>> get_command('http://randomsite.com/XYZ') ['wg...

 
Kaz
@Mast Well, we took a much larger accounting workbook pile of monstrous spaghetti, deleted most of it, isolated the balance sheet transactions parts, re-organised those, modified it to our time horizon, then started adding line items, renaming accounts, re-sizing lookup ranges and putting figures in it.
Then we spent an hour figuring out why our balance sheet wasn't balancing
But it's fine. It balances. It's all good. Round 2 tomorrow.
 
11:25 AM
> I would like to fix code after unless and can I store thread ID in the database too?
You want to do what?
@Kaz Balancing sheets in balance are good.
 
> Has anyone really been far as decided to use even go want to do look more like?
 
@Kaz So you started with a problem and fixed it within 3 hours. I'd call that a success.
 
I tried to flag the question as off-topic, but there is no option which allows voting to migrate the question to the Code Review site (you can vote to migrate the question to the Super User and few more though, but that is not what you need). So it looks like you can't move it. Read more in this post from Meta site. It looks like that an easier way for you is to ask there directly. — Whirlwind 29 secs ago
 
@Duga we don't give you an option because you always recommend wrongly. LIKE YOU ARE NOW.
4
 
This is only suited for Code Review if the code is working as expected and if the OP wants a review... From the sound of this question he doesn't want a review, he wants an error check of his code... — Dan Pantry 6 secs ago
 
11:38 AM
thanks @Duga
 
Actually I don't really want my code reviewed, but I was trying to post something that would help people with collision/contact issues. Perhaps I should have posted a question stating that I was having issues and then my checkPhysics function as an answer? — Steve Ives 7 secs ago
 
@Duga UWYA
 
yeah it seems half "please error check" half "look what a good job I did"
I'm not sure what he is asking but I'm 100% sure it isn't for a code review
 
It's more like a 'I wrote this, do you like it?'
Some people have no clue the idea behind SE is Q&A.
 
Yeah. definitely off topic for SO but also definitely off topic for CR, too.
 
11:43 AM
Yup.
 
VTCed for UWYA
time for some CSS.. :(
 
11:58 AM
 
Kaz
12:15 PM
Anybody want to help me hit 4k?
1
Q: Count rows of a table

DanI am trying to count the rows of two tables generated by SQL connections in Excel VBA. My plan was to use ListObject.DataBodyRange.Rows.Count however, this errors when a table is empty, which one often is. I found it completely impossible to use On Error GoTo ... twice within one sub so I pulled ...

 
Kaz
12:27 PM
Great. My workload needs triaging again.
 
@Kaz I have no idea what you're doing with that error handling there.
 
@Kaz, have you looked at the other answer?
 
Kaz
@Malachi I have.
@Mast What don't you understand?
 
that answer looks pretty good
there are no stars again
 
Kaz
@Malachi Already upvoted it.
 
12:38 PM
es muy bien
 
I might even say that their code is better than yours because it is shorter and has less cowbell goto in it
 
Kaz
@Malachi Unfortunately, if you want to do proper not-as-terrible Error Handling in VBA, that's about as good as it gets.
 
Monking
This happened at my work lol - "Fixed my dish soap"
user image
3
 
Kaz
And if you want to do Error Handling in a VBA procedure and still maintain Single Point of Exit, then that's the only way to do it.
 
Greetings, Programs.
 
Kaz
12:44 PM
Goto is not inherently evil.
#Controversial
 
You can exit VBA programs? o.O
 
@Kaz You are correct. Goto, like any other programming statement is a tool. It's up to the programmer to use it correctly. Unfortunately, like crack cocaine, it is difficult to use goto correctly.
2
 
thank you for your answer, after trying with this library i realized that it was also not working so after a HUGE code review i found out that i had a typo on the mediaConstraints object which is now working in both extensions! — AbdulHamid 44 secs ago
 
@Kaz yours or theirs?
@Donald.McLean I never tried cocaine because I didn't think it could be used correctly...
 
Kaz
@Malachi Mine, obviously ^^ Theirs isn't bad, but I dislike relying on values having not been changed and it doesn't provide a structure for handling different kinds of errors in different ways.
 
12:58 PM
For the record, SQL doesn't have good error handling either, and sometimes it's better to avoid massive try/catch statements by using GOTO
 
@Malachi I'm sure that there's some obscure and unusual circumstance for which cocaine is the answer. I can't imagine it, myself, but I'm sure it exists.
 
Kaz
So, all I need is 1 upvote and 1 downvote ^^
 
@Donald.McLean I think weapons are good comparison... or machine guns if you need to be more specific
 
@bilbo_pingouin I was in the army, so I have no trouble seeing uses for machine guns.
 
Kaz
^^
 
1:05 PM
Congrats on 4K, @Kaz / @Zak!
4
 
And I read military science fiction, too.
@Kaz Congrats.
 
@Donald.McLean if you need to make some aeration in a metal box and have nothing else available... it might do the job
 
@Kaz It resets to standard. What, the pointer to what should be evaluated next? The error list? Will the program start at line 0 again? What's it doing?
 
Customer just titled a ticket: "SEE ATTACHED LIST- THERE ARE MANY"
 
@Phrancis Reply: One problem per ticket.
@JeroenVannevel Who needs performance if you can double the speed of your CPU...
I'm an embedded engineer. For years our sector has been swearing by performance, doing things in ASM because it was the most efficient way.
Not that the programming itself was anything efficient, but hey.
But now refrigerators have bigger CPU than a computer from 20 years ago had.
Memory leaks, that's a problem. People should learn to throw their crap away if they're done using it.
 
1:13 PM
@Mast heresy :D
 
I have been editing some of my old jQuery answers here is one with a substantial edit --> codereview.stackexchange.com/a/59941/18427
 
Kaz
> VBA only has 3 On Error Statements.
On Error Resume Next (skip over any line that's causing an error).
On Error Goto [Label] (skip over the line and resume execution at [Label]).
On Error Goto 0, reset Error Handling back to standard (what it would be without any On Error modifications).
 
that last one is actually a version of the second one
so it really only has 2 On Error Statements, right?
 
@Kaz And what's the [] doing around it?
[On Error Goto 0]
 
Kaz
Ah, those were just for emphasis.
 
1:20 PM
Oooooooh.
So those don't do jack?
 
Kaz
They wouldn't even compile (I think) It compiles. I've no idea what it compiles to but it does something.
 
lol
 
@Kaz They probably made it that way so you could use spaces and other reserved characters in identifiers (because that's something you should do, right)
 
Have an upvote.
 
(SQL also has that, big surprise)
 
1:24 PM
tripleee, I didn't know about codereview. Thanks for politely letting me know about it. — Brian Jay just now
 
@DanPantry I'm still looking forward to that awesome answer.
 
@BrianJay Code Review will only accept it if it works. Does it work? — Mast 5 secs ago
 
@SirPython are you here? :-)
 
@Malachi Boom! Headshot!
3
 
1:33 PM
Hi all :-)
 
Hi Neal
 
@Neal Monking!
 
@Phrancis Say what?
 
27
A: What's a Zombie? And what are the many other memes of Code Review?

Vogel612Meme: Monking Originator: Morwenn Cultural Height: The 2nd Monitor Background: A morning greeting to the Monkey doing his monkey-business, in other words: monking Examples: A small chat search Variations: Monkernoon, Monkevening, Monknight, ... Important is only that it begins with Monk... ;...

@Phrancis Too slow.
 
lol - fastest meme in the west
 
1:36 PM
Basically I type zom me in my address balk and FireFox will tell me I probably want the most-visited page with that pattern.
 
monking!
 
 
Thanks for your answers, I'm will try codereview. Appreciate the help. — Paul Simpson 54 secs ago
 
That ^^ is Monking
 
TROGDOR LIVES!
 
1:47 PM
lol
Sep 6 '15 at 2:39, by Phrancis
user image
 
How did I miss this? ~ Ubuntu on Windows
I knew Bash was coming, I had no idea they were going much further in the first step already.
 
Thanks for the info @200_success. I'll have to remember that limitation of the code review stack exchange. I also know there is a programmers stack exchange, but I don't know much about it, but it seems to have questions that are somewhat similar to this one, but I don't see it likely that this question will be receiving an answer here on Stack Overflow. I would help out if I knew more about databases, but I don't :(. — Mr. Me 14 secs ago
 
Let it be known that it was in 2016 that the internet had to be reminded that once, long ago, the characters we see now on our computer screens were once drawn, literally, by hand. Those primitive beings named the backslash so because in order to draw one you had to raise your flesh from the paper with the force of 1000 keyups, move your arm BACKwards, and then strike down with the force of a form.submit() — J.J 2 days ago
 
0
Q: Google maps API code

Paul SimpsonI have inherited a site which uses the Google API to create a map on my webpage. I dont know much about Javascript but from the research I've done, i dont think this code is optimal as it is not loading asynchronously. Any help or pointers would be appreciated. function initialize() { var myL...

0
Q: REST API Versioning in C# WebApi

JasonI haven't really found a decent/future-proof way to version methods in my WebAPI. This is what I typically do now, but it can get confusing and hard to trace if it gets a bit large (I'll end up [OBSOLETE]-ing the older ones as time goes on). Has anyone come up with a more elegant or manageable...

 
@Mast haha that's epic!
@CaptainObvious better fit on Programmers?
 
2:06 PM
The CR memes post is hilarious.
5
 
I really dislike when a team/person fixes a problem, but doesn't tell anyone what the problem/solution was. Doubly so for systemic issues.
> The data center servers switched over to IE11
Imagine that
 
@Jess Sidenote about the use of trim() against a password POST array. Read the following codereview.stackexchange.com/a/79681 and that could also apply to the use of strip_tags(). — Fred -ii- 32 secs ago
@LynnCrumbling I haven't been to the tavern in ages. I'm mostly chilling at the 2nd monitor over at Code Review and in the Java room here. University is keeping me busy :) — Vogel612 29 secs ago
 
2:23 PM
I'm being watched :/
 
@Mast welp
too many bugs to fix, too little time
 
0
Q: UI Control that allows user to change "quantity" value of a line item

DennisBelow is a mix of HTML + jQuery code that allows user to double-click the TD cell to bring up an edit box menu (HTML of edit box is returned by the AJAX call). <td style="text-align: right; font-weight: bold;" id="qty_<?=$this->id?>"> <?if (!$this->isAnOrder) { ?> <script> $('#qty_<?=$this-

0
Q: Code structure for complex UI module with strongly bonded components

van_folmertI'm trying to figure out a new approach in organizing my code structure. Let's say I have a single-page module which UI consists of: form with search filters, very interactive table (paginated, multilevel, expandable and focusable rows), chart and all of them are strongly bound to each oth...

 
There's a Java room on CR?
 
Kaz
@WaymanBellIII Java JAVA
(I kid)
 
2:30 PM
@WaymanBellIII nope. But there's one over at SO
 
Kaz
The Java guys are awesome. JAVA gets headshots on sight.
 
That's mostly Pimgd and other non-chat people from what I see
 
Errg. Need rep on SO...
I feel like I'm playing WoW. :(
 
20 repz isn't that hard
 
@WaymanBellIII Ding
 
2:34 PM
Lol
 
No "grats"? not real WoW player confirmed. /s
(welcome to 2nd)
 
@DanPantry It's been years. Thankfully.
@Vogel612 You're right. Not that hard. But I either have to invent some clever question or go hunting for one to answer when all I really want to do is observe the chatroom and occasionally communicate. :P
 
1
A: Time manipulation for notification reminders

nhgrifSo for now, this review will primary address your listed questions rather than actually taking a look at your code. Considering I'm building a small app to test an idea, I think that writing the shortest, highest performing code should not be my focus. However, the code needs to work, s...

 
@WaymanBellIII The cardshifter room has a few of the frequent Java users, but we also discuss the other kind of Java.. and machine learning.. and LITHP
 
2:36 PM
Wait, you discuss more than just coffee?
 
NVM, @Hosch250, @200_success is already looking into him after @Mast pointed out that review earlier
It isn't his first
 
OK.
 
@DanPantry lol @ "the other kind of Java"
 
lol @ the other kind of java and not lithp
I suppose it's kinda beating a dead horse at this point
 
Lol, lithp instead of lisp? :P
 
2:38 PM
yep
 
No, no. That's new to me. I love it.
 
One day, hating on JavaScript won't be fun and trendy.
Just kidding
 
That would be so starrable, if only you made it a single message instead of 2
 
@Hosch250 Informed and acknowledged. I have a feeling that it should be OK going forward. Thanks for the concern.
 
OK, thanks.
 
2:41 PM
Whoa, someone is starring me. O.o
6
 
We are a very star-happy room
We've starred "lol" before.
 
So I read.
 
@Bathsheba The very same problem exists with people abusing floating point numbers because they "need decimals". There are several solutions, none of them involving the const keyword: educate people, do code reviews, or don't hire beginners to write high-integrity software to begin with. — Lundin just now
 
I am, apparently, very ignorant about floating point arithmetic (and off by one errors) @Duga
 
It's easy to get an error deep in the decimals. So 2 can end up being 1.9999999997. And if you're looking for ==2, it may never happen.
 
2:45 PM
Yeah, I get that
 
That's a poor example for several reasons, but ... Okay. :)
 
It's just never really come up in anything I've done (though I work at a considerably higher level than C++)
 
I was going through a Stanford course on Apple University or whatever that went into a deep discussion about how those work. I didn't quite get it.
 
Just don't use floating point. Problem solved.
 
Yeah. In my main question on CR, I could have calculated age in seconds by just using the ratio of 1 year == 365.2425 days, but then I'd have to deal with floating points.
So I wrote a whole lot more code to try to get by with just using integers.
 
2:48 PM
Don't reinvent the wheel when Dates are involved.
7
 
Thou shalt not write thine own date-time functions
 
/\/\
 
3:05 PM
possible answer invalidation by azbshiri on question by azbshiri: codereview.stackexchange.com/posts/125455/revisions
 
@WaymanBellIII Just stick to CR, rep flows more freely here.
@Duga There's a -1 and a -3 answer, those don't count IMO...
 
3:21 PM
What the heck is a System.Data.SqlTypes.SqlXml
Sounds evil
 
@Phrancis XML data?
SQL-esque XML?
 
ew
 
Does something like System.Data.SqlTypes.SqlJson exist as well?
 
> This class contains an instance of an XmlReader-derived type, and adds SQL-specific features such as database-style null semantics by implementing the INullable interface. When you use SqlXml, the XML value that you assign to the SqlXml instance must be consumable by an XmlReader.
Makes sense. XMLs can't contain null.
 
@Phrancis Are you sure?
In RD, we've had nulls after parsing XML.
 
3:32 PM
@Hosch250 Did your source XML have empty nodes?
 
Yup.
The fields in the class after it was parsed were null.
 
0
Q: C++ Function with side-effect used at file scope, accesses singleton

Scott OliverI've written a class with the following static method: MyMap& Manager::GetMap( void ) { static MyMap* factories = new MyMap(); return ( *factories ); } Where "MyMap" is a typedef for: unordered_map<string, function<Base* ( Dependency& d )>> There are also a variety of types derive...

 
@Duga Allowable compilation fix for an issue that was not mentioned in an answer.
@Phrancis That's the Sun Wukong character that was featured in Winter Bash.
180
A: Winter Bash 2015 Secret Hats

The Guy with The Hat007 Why not just call it "7"? Amazing Grace Not the admiral's most important work, but her most famous. Archimedes Solve these riddles and it's yours. (Sound familiar?) Cleanup Crew It's not garbage until it's served its purpose. Edward Edwards Tahiti, 1791. ...

Sun Wukong, also known as the Monkey King, is a mythological figure who features in a body of legends, which can be traced back to the period of the Song dynasty. He appears as a main character in the Chinese classical novel Journey to the West. Sun Wukong is also found in many later stories and adaptations. In the novel, he is a monkey born from a stone who acquires supernatural powers through Taoist practices. After rebelling against heaven and being imprisoned under a mountain by the Buddha, he later accompanies the monk Xuanzang on a journey to retrieve Buddhist sutras from India. Sun Wukong...
 
@200_success Oh wow didn't even put the two together
 
3:56 PM
0
Q: Project Euler #34 Digit factorials

denisI'm having trouble improving the performance of the solution to the Project Euler problem #34 145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find the sum of all numbers which are equal to the sum of the factorial of their digits. Note: as 1! = 1 and 2! = 2 are not su...

 
Do you guys watch SiliconValley?
 
No, I'm waiting for PoI though.
 
Kaz
@Mast Yay for PoI
 
If you have functional code that you are interested in making shorter, try asking on Code Review. — Kevin 10 secs ago
 
Second opinions on what to do with this question, please?
-2
Q: C++ Function with side-effect used at file scope, accesses singleton

Scott OliverI've written a class with the following static method: MyMap& Manager::GetMap( void ) { static MyMap* factories = new MyMap(); return ( *factories ); } Where "MyMap" is a typedef for: unordered_map<string, function<Base* ( Dependency& d )>> There are also a variety of types derive...

 
4:09 PM
@200_success That doesn't look like complete code. It looks like a code snippet. Does that qualify for CR?
He should be pointed to MY question!
I had almost exactly that in my code!
And the answer to mine suggested using a switch instead of an if tree.
So I believe the answer to mine will also answer his.
 
Which question?
 
Oh, whoops. @Duga
Sorry @200_success, I was looking at @Duga 's link
 
OK.
 
@200_success Leave it closed.
 
0
Q: Java Tutorial on ByteStreams - Refactoring overkill?

AdHominemI am currently reading Clean Code and for fun and profit, I intended to refactor some of the Java Tutorials and since I wanted to improve my Exception handling, the Byte Stream one with its lots of IOExceptions seemed nice. This code does work, but is it better now? As far as I can tell it's mor...

 
4:24 PM
> Some programmers, when confronted with a problem, think "I know, I'll use floating point arithmetic." Now they have 1.999999999997 problems.
2
 
Funny thing is, I've never had a floating point issue like that.
 
Famous last words
5
 
Floating point is evil.
 
@Hosch250 From my understanding the problem is actually in the other direction, i.e.: from SQL null to XML, where it would just "skip" null instead if creating empty tags, or sometimes throw an error
Wow
   -- the code below is deprecated (this rights all the data out in one big file)
   -- the new code above writes out the data one at a time
   -- write out the @oxml to the drop path
   --SELECT
   -- ...
If the code is deprecated, don't comment it out, silly. Delete it.
 
> this rights all
 
4:33 PM
If you just want a code review, codereview.stackexchange.com may be more suitable. Otherwise, does your code work for you? Are you sure that you want to consider two elements equal if either of them as an unparsable date? — Jon Skeet 8 secs ago
 
"Hope you are well. Let me know if you can take a call today now?? Or we can set a call for tomorrow I’ve caught up with everyone" No please. Don't tell me if you're going to give me a job. Just keep me nervous, it's all good
 
4:46 PM
0
Q: Measuring the execution time of C++ code

NeilI've written a small C++ utility that is intended for measuring the execution time of blocks of code, and I'd appreciate your feedback on it. I'm an experienced programmer, but a novice C++ programmer. The code is written with performance in mind, and uses a libcuckoo hash table to support multi...

 
You may want to direct this question to codereview.stackexchange.comNWard just now
 
got the job offer. 30.000£/year in London with 3-monthly pay reviews. thoughts?
 
Doing what?
 
banging at a keyboard, hoping code comes out
 
What stack/language/etc?
 
4:55 PM
C# ASP.NET
 
Take it.
(Well, check the cost of living in the area, first.)
 
If I interpret the tax brackets correctly, I'll pay 4000£/y of taxes leaving me with 26.000£/y netto or 2150£/m
 
That's it?
Geez, I should move to Europe.
 
Belgium's lowest tax bracket is 35%
The UK is just very cheap it seems
 
I was literally paying 30% tax, in the U.S..
 
4:59 PM
If I'd make 30.000€ in Belgium I'd already be paying 40 or 45%
 

« first day (1074 days earlier)      last day (2951 days later) »