« first day (1083 days earlier)      last day (2947 days later) » 

10:00 AM
giev me a sec and I'll make an example
 
You're not modifying it, dis.call receives value type 5 and returns boxed type Number(5)
 
I know, I'm not saying you are, but I am explaining why it becomes boxed by default
 
> if the method is a function in non-strict mode code, null and undefined will be replaced with the global object and primitive values will be converted to objects.
function dis(){
    "use strict";
    return this;
}
dis.call(5);
> 5
 
Is there a hate-on-Javascript-train coming along?
Monking[btw]
 
okay, so here is why it is by default boxed
 
10:07 AM
@skiwi No, I wrote a blog post to explain one of the hate propaganda posters
 
function modifyValueType(valueType) {
  valueType.foo = 5
}
var valueType = 5
console.log(valueType.foo)
// > undefined

// now this is confusing because you don't want to be doing this every time
// a function is called (because this changes):
function modifyValueType() {
  if (isValueType(this)) {
    // what to do here?
  }
  this.foo = 'bar'
}
var valueType = 5
modifyValueType.call(valueType)
// So what happens is valueType is boxed to reference, so you can use valueType.foo
this is all of course out of strict mode
basically the boxing behaviour stops you from having to check if this is a value type
 
If you go out of strict mode, the train derails?
 
If you go into strict mode and do foo.call(5), I'm at least getting this being undefined
ie it is not boxed
> First, the value passed as this to a function in strict mode is not forced into being an object (a.k.a. "boxed")
so the lesson here is always use strict mode
Yes, non-strict mode sucks
 
I don't understand why it would need to skip the boxed checking
 
boxing is not cheap
 
10:14 AM
it's literally if (!Object.isExtensible(value)) return;
 
also having to check if a value is boxed every single time you use this is just silly
 
merging date range overlap sucks
 
in Tavern on the Meta on Meta Stack Exchange Chat, 22 mins ago, by Bart
I don't know who wrote that @Quill , but they are absol....ah ... great article ... great. Just great.
My cat is snoring beside me. TIL cats snore
 
They make many more weird noises
 
You might want try posting this on codereview.stackexchange.comRich 47 secs ago
 
10:21 AM
0
Q: Iterating over thousands of objects to generate html

MX DCurrently I am working on a profiling unit that does not require stack traces to preserve the call stack, and can return the performance in a html format. All though the logging in itself is fairly fast (negligible overhead on each function), the visualisation of the information is not. With a ...

 
but then again, so do humans, when nearby cats
 
I'm voting to close this question as off-topic because it should be migrated to CodeReview.SE — Rich 30 secs ago
 
@Quill It's purring in it's sleep.
And why do you have a .us domain?
 
because it fills in the status word
apparently it was okay to buy one if "I spent a lot of my time in the US"
I'm going to assume that extends to how US media infects our media enough that we basically live in the US
 
hurray, duplicate codeee
need more generics
I'd use a static interface method, if I could use java 8
 
10:36 AM
wow, sed is powerful
 
@Quill Close enough.
 
Zak
@Pimgd Obligatory XKCD
Yes you are!  And you're sitting there!  Hi, kitty!
2
 
cats are awesome, go away
$ sed -i "s/import \(.*\) = require(\(.*\))/import \1 from \2/mg" ./app/**/*.ts
I think I'm in love with unix tools
That's quite neat
 
10:56 AM
This question would be best suited posted to Code Review. Stack Overflow is more general programming Q and A where as Code Review is for 'Q&A for peer programmer code reviews' — Crazy Dino 5 secs ago
@CrazyDino In general, yes, but one of the key requirements for Code Review is that "The O.P. owns and understands the code they want reviewed". Reviewing the O.P.'s code, in general, for performance improvements would be ok, comparing it to his lecturer's is not. — Zak 54 secs ago
 
41
Q: Can I feed weird things to my cow?

BrysonicJas claims to have fed a crawdad to a cow. According to Wikipedia, a crawdad is just another name for a crayfish. Since you can catch crayfish in the game, I thought that my bovine companions would be delighted to receive one as a treat. However, when I left or right-click the cow while holdin...

they are really good at this clickbait thing
 
11:12 AM
What I'm saying, in essence, is that the first half of the O.P's question, by itself, would be ok for Code Review, but "I have no idea how his code works, can anyone explain it as well? Thx." definitely is not. If a question would be okay elsewhere with editing, I like to make that clear before they cross-post and get edited/downvoted/closed. — Zak 30 secs ago
 
@DanPantry It's Arcade. We can learn a lot from them when it comes to titles, should we want to go that route.
It's good for traffic, so SE won't mind.
 
Most of the people viewing this question now are probably at work and "unwinding/on break" — David Grinberg 22 hours ago
 
If programmers could work non stop for 8 hours, SE network would have almost no answers ;) — PTwr 22 hours ago
So true
 
@DanPantry Would be awesome to see how that map has changed over the last 10 years.
 
Zak
I see you guys have also found that question ^^
My own rules:
Make sure stuff gets done faster/better than expectations
Don't do anything *blatantly* Off-Topic at your desk
Know your workplace culture
With the above, do whatever you would feel OK justifying to your boss if asked about it.
 
11:22 AM
as long as I get the work done and I'm not doing something stupid like hearthstone i dont think anyone cares
My friend's work just banned all use of personal phones unless you're a senior member and I would never work at a place like that
 
0
Q: why would you use Array.prototype.push.apply instead of concat?

user254694I just saw the following code var array1 = [2,3,4]; var array2 = [1]; Array.prototype.push.apply(array2, array1); and was wondering why you would do that instead of this var array1 = [2,3,4]; var array2 = [1]; array2 = array2.concat(array1);

 
@DanPantry Neither would I.
 
@CaptainObvious You'd use it when you get the right SE. Also, because push modifies in place.
 
I use my own laptop for company purposes half of the time, allows us to do things fast when we need them fast.
 
We're not able to do that, unfortunately, but it would make life a lot easier.
@CaptainObvious VTCs please, not asking for review
 
11:24 AM
@CaptainObvious SO, programmers, one of those, not sure which.
It's probably a duplicate anyway.
 
I'm pretty sure it's an SO question
 
So, I found out how you do a idiomatic return in Ruby.
You don't.
 
Zak
@DanPantry Pretty much. I spend a good % of my work hours reading the news, reading SE/CR, reading other blogs and stuff. It helps that my job is to "Get stuff done, and we don't really care how".
 
My job started out like that, but they changed sentiment.
 
My previous job was not like that - they didn't trust me to do my work.
My current job is like that - they trust me to.
Guess which job I get more work done in?
 
11:27 AM
Oh, they trust me allright, but they change the specification so often the deadlines make no sense.
 
It's funny, I can spend 2 hours writing reviews or on reddit in work and I'll end up getting more work because I'm not burning out or losing focus.
 
Sometimes it's done a week before the deadline, other times we need 2 additional weeks.
 
We've not gone over deadline just yet
 
Deadlines being deadlines and all, they don't like the latter.
 
@Mawg It looks wrong, but it's not. That's frameworks for you, they all have their quirks. (I know it's been two years, so sorry about that, but you were being very opinionated! I would hope the people doing the code review would know their way around the framework they're using...) — daemonaka 9 secs ago
 
11:29 AM
Every time you change the specification you should re-evaluate the deadline. If you don't do that, they don't work.
 
Hm, I have the interesting scenario of now having to use sed to rewrite a regex over multiple lines.. :S
  constructor(private $rootScope, private $q, private $http, private $compile, private $controller) { }
I want to turn the above into
constructor($rootScope, $q, $http, $compile, $controller) {
  this.$rootScope = $rootScope
   ...
}
that's probably going to be faster to do by hand
 
you can use the line endings, can't you?
 
Yeah, but it may be more complex
like there may be non-private fields mixed in and code already in the constructor
this is probably something that would be easier for an AST walker
 
lol the physics flag
 
Fun with flags
 
0
Q: Lock-Free self organizing list - java

moriczCJI have created a lock-free self organizing list with transpose method using the java.util.concurrent.atomic.AtomicStampedReference. The operations are working as expected and I also compared my result to other implementations with locks. I am looking for suggestions on how i could improve my imp...

0
Q: User registration with Repository pattern php

TanvirI have been developing a simple login registration page with in php using repository pattern. Following is the business rules : During registration Email must be unique. Email must be a valid email address. User table columns: id, name, username, password, created_at, updated_at register.ph...

 
@Quill Unless your department consists of people writing code, of-course.
 
@Mast Are you saying it's not mentally taxing work if your department consists of people writing code, or that it doesn't have a big impact on the business if your department consists of people writing code?
 
@Pimgd it's mentally even more taxing
and more important
 
12:07 PM
@Quill semi interesting read if you haven't heard of the other crap, but near the end it starts repeating itself a bit much
feels padded
 
yeah, I guess
 
12:23 PM
 
> work that most people don't know how to do
 
@Malachi will probably be closed on So given the wording it has
 
@DanPantry maybe if they break it up into multiple questions and better pinpoint the issues?
 
possible answer invalidation by mdfst13 on question by mazid: codereview.stackexchange.com/posts/126301/revisions
 
or maybe just break it into multiple questions, fix one, test, move to the next one
 
12:30 PM
@Duga looks fine
for it to be applicable on SO it needs to basically be a yes/no answer with a MCVE
he might be able to ask about the first issue
But he would have to pin point what he has tried
3rd issue is gimme the codes / borderline CR material
I'd advise OP to fix the first and second issues, on his own or via SO, then repost here
or update his code
 
0
Q: Modularise Project and Deduplicate Code By Loading External Modules On Startup

ChrisStarting point I kind-of inherited a VBA project at work that consists of a bunch of Word document templates that provide users with the tools they need to create documents according to company guidelines and to help them give all documents the same appearance. We use different templates for the ...

 
@Mast that doesn't work, if you work in a department where people write code, it doesn't stop most people from not knowing how to code. It does change "most people in your department"...
 
remember kids, Pantry is only two letters from Pedantry
3
 
Zak
@CaptainObvious @Mat'sMug @RubberDuck A new CR VBA user who already has Rubberduck :D
3
 
@DanPantry It's also two letters distance from Party
 
12:45 PM
s/two/one
 
Thanks a lot, guys! So much food for thought. Though I 'll keep in mind that I have to post these kind of questions in "Code review" section next time. — Alex 43 secs ago
 
ah, you mean as in moving them around, too
 
Zak
@DanPantry Depends if you count letters or operations ^^
 
look, we're removing letters here, not playing tetris with them
 
that's why I said distance, levenstein distance accounts for swapping
 
12:51 PM
@DanPantry It's the one-boxed kind of animated GIF that's really irritating
 
Killer Visual Studio feature request: "Copy project, help me reduce to short but complete demo for Stack Overflow post." Would rock. Hard.
3
Turns out adding disqus and addthis share links to my blog was easy as pie :D
 
gah, flowtype's optional syntax is just ever so slightly different from typescripts it is annoying
instead of:
function funcName(optional?: number) {}
It's
 
@Phrancis I'm very tempted to link a oneboxed gif in response
 
function funcName(optional: ?number) {}
 
because C# prefers the question mark on the other side
 
12:57 PM
C# is wrong
Nah, I joke. Both make sense. Flowtype's make sense because it focuses more on types than symbols.
C# says that optional is optional. Flowtype says that optional is mandatory, but it could be null/undefined.
 
Everything is wrong except the one that's right
 
Zak
@CaptainObvious Can we give that guy one more upvote so he has chat privs.
 
0
Q: Why do people make mistakes writing simple comparison functions?

Andrey CppI regularly write articles about programming and speak at conferences. That's why I review large amounts of code and see various errors. Once, during the preparation of an article, I noticed an interesting error pattern that I called "Last Line Effect" . Now I have a déjà vu - I have detected one...

 
Sarcasm, wit, pedantry and good looks: By my powers combined, I am Captain planet @JeroenVannevel/@DanPantry
@CaptainObvious He used big words in his title, so I want to upvote. At least it isn't "Can I make this XYZ"
 
@CaptainObvious uhh ... no
 
1:01 PM
@CaptainObvious Why do people make mistakes writing off-topic questions?
I feel bad because it is a fairly comprehensive question
I have a horrible feeling after I fix these syntax errors that flowtype is going to blow up and complain that all the types in the app are wrong
Because we've had type detection turned off for so long
I'm wrong. The optional parameter type in flowtype is the same as TS. It's just you have to have type annotations for all parameters when you are declaring its type via flow
woops
 
@CaptainObvious wow... that's waaayyy too many of those :/
someone should write an inspection for that cc @JeroenVannevel @Mat'sMug
 
It got cross-posted on Programmers, also closed there, FYI
in The Whiteboard, 3 mins ago, by Ixrec
yep, this is one of those "nowhere on the network" questions
I think it would be on-topic on reddit :)
 
1:20 PM
> on the network
 
1:35 PM
Greetings, Programs.
 
hey there
 
1:46 PM
Some customer puts in a bug ticket saying feature X is not working. So, I look into it, and I realize, the problem is they have not bought feature X.
7
 
Zak
@Phrancis You should shorten that so it all fits on the starwall ^^
2
 
How's that one?
 
0
Q: Trying to understand Jasmine testing

adamscottLet's say in my application I have a script that triggers a click event on an html id. I want to then test that event in Jasmine. Below is the test I have in place for this scenario. I have a few questions about it though for anyone familiar with Jasmine. Below is my test and then some questions....

 
@Phrancis I cannot access reddit on my network. :(
One of the reasons I turned to stack overflow. I realized I could actually access this site.
 
@Phrancis "The costumer is always correct"?
 
1:55 PM
LOL
 
@skiwi yup. as soon as they've paid the bill ;-)
2
 
^^
 
So, my fresh, brand new understanding of #define, #ifdef, #ifndef, and other such bits of code is that they are preprocessor directives that tell the compiler to specifically ignore or include segments of source code? But if those definitions take place within the source code, how does it ever have any sort of differentiable effect?
For instance, I encountered several when setting up my 3D printer's arduino software. I specifically had to go in and tell it certain values. So why are they preprocessor directives? Why aren't they just a normal part of the source code?
 
@WaymanBellIII consider:
#If Win64 Then
Function DoSomething() As LongLong
#Else
Function DoSomething() As Long
#EndIf
    ' do something
End Function
(yes, this is legal)
 
So, the compiler must be able to auto-detect which OS it is running on, yes?
 
2:06 PM
there's usually a number of predefined constants, depending on the language and platform
 
But we don't normally distribute source code to clients to compile themselves, right? Or is that actually whats happening when an "installer" run? Is it compiling and organizing source?
 
eh, bad example.. VBA is interpreted lol
(sort of)
nah, an installer merely copies the executable into its "install folder", ensures all the dependencies are there, and registers any COM components with Windows... Assuming Windows and COM components are involved.
 
@Mat'sMug So you're saying the compiler itself, on the computer on which it is installed, has predefined constants to know what OS or whatever it is installed on? But that still raises the question to me of how it knows when it is installing a software to Windows XP, 7, 8, 8.1, 10, 3.1...
(that last one was a joke...)
Maybe I'm being dense about this, and if so I apologize.
 
in the case of VBA's Win64, I'm guessing the interpreter sees it and accesses some environment variable to evaluate which code to exclude
 
Compile constants don't necessarily relate to the OS they run on
 
2:10 PM
^
 
consider the word size. it's generally independent of OS
 
#Const DEBUG_ = True
you can even define them in code, and tweak the value before you recompile
 
@CaptainObvious RBA
 
.net usually defines DEBUG and TRACE precompiler constants in a debug configuration, and only a TRACE constant in a release configuration; that's how Debug.Assert and Debug.WriteLine calls are trimmed from a release build AFAIK
 
There's so much wrong with this code beside the index overrun that the only viable answer would be 'read at least a few of the hundreds of topics about PRIME1 here and at Code Review'. — DarthGizka 57 secs ago
 
2:13 PM
I'm afraid I just don't see the value unless you're distributing source code for someone to customize themselves. Then whether I define a value or not in the source code makes a difference in the compiled code, but I have to do the customizing myself. So it becomes a mudulated, cookiecutter kind of source.
I should do more research on this myself. I appreciate your input, guys and gals.
 
No gals here today.
 
@WaymanBellIII When working on embedded platforms, where you want your program size to be small, it helps to be able to change a constant which enables or disables features via not including them.
 
That I can understand. It allows the source code to be customizable.
 
Specifically I've had cameras which could move and cameras which couldn't, and rather than maintaining two projects, I had one project and a flag CAMERA_MOVEMENT
 
2:31 PM
nope, won't be accepted during code review stage — Peter 8 secs ago
possible answer invalidation by Null Spark on question by Null Spark: codereview.stackexchange.com/posts/126287/revisions
 
Code review question in regards to Javascript. I made a pastebin: http://pastebin.com/Rg67Egpc

My goal was to make several different Objects like Truck, that all inherit (prototype-chain) Vehicle. However I am not sure if I am doing this correctly in JS.

I am looking for general thoughts on if it looks like I know what I am doing, or if it looks like I am just taking a stab in the dark. If that makes sense?
(sorry if this is wrong chat)
 
@Austin Does it work as intended?
 
Zak
@Austin It's not necessarily the wrong chat, but drive-by "here's my code, please review" requests are not behaviour that would be generally well received. Much better to come in, say hi, ask if it's okay to get an informal review and/or if there's a specific room/people you should take it to.
 
0
Q: Implementing a Repository and Service in ASP.NET MVC

pgruberI'm trying to wrap my head around repository and service layers. What I have can be simplified to an example like this: Model: public partial class Employee { public int ContractorId { get; set; } public string Name { get; set; } public string JobTitle { get; set; } } Repository: ...

 
2:50 PM
@Mast Yes, I am just not sure if I am doing proper inheritance with prototyping.
@Zak My bad! I am used to SO's chat room and wrongly assumed similar behavior could be used here :/
 
Zak
@Austin It's mostly because, relative to SO, we're a pretty tiny site with a pretty small group of people who populate chat, so there's a certain, I dunno, coziness to the 2nd Monitor.
 
lol
@Austin welcome to the 2nd monitor btw :)
 
Zak
Not site business, but TIL that playstation demolished xbox with the latest console generation. 35M PS4s vs only 10M XB1s
 
3:18 PM
0
Q: non recursive make script

NickI am trying to make easy to use non recursive make script. It works with several directories, here is an minimal example. Everything is packed here: https://github.com/nmmmnu/make_test Directory structure / - root /bin - where executable(s) will be made /obj - where .o...

0
Q: unique child objects from array

Tsari'm using typescript, however this example is in plain javascript. i have a class rank with a child-class master. what i need is an ordered collection of unique masters. here's what i have but it seems a little "kak": function getMasters() { var gms = []; _.each(this.ranks, (r) => { ...

 
@Austin And also, this is an actual Code Review site, so ... actual questions. But either way, welcome.
 
3:34 PM
        ///Check if input string is null or empty
        if (!String.IsNullOrEmpty(ixml))
3
Not... even... joking
 
possible answer invalidation by Mateusz on question by Mateusz: codereview.stackexchange.com/posts/126242/revisions
 
@Duga Rolled back.
 
@Phrancis oh come on! ...everybody knows there should only be 2 slashes....
 
lol, watch this one
                    catch (Exception e)
                    {
                        errorCode = e.ToString();
                    }
 
@Austin Read the tour and the on-topic help centre. If you can formulate a question complying with those, feel free to do so. For bonus points, ask the how-to-ask meta.
 
3:47 PM
16 month old accept, finally! I've waited so long for this!
2
A: Reflection of an object in a 3D world

Simon ForsbergFrom what I understand, you want to make sure that new objects are not created when they are identical to what has been created before. This is relatively easy, and would include either having a static map or a map inside another object, such as a ReflectionFactory. I'd personally go with Reflec...

I have no memory whatsoever of having written that
3
 
sometimes, when looking through unanswered questions with answers, I found questions that had my own answers with 0 votes on them
but I was like hmmmh that's ... true, but not really answering the question
 
I have the top pin in the Game Dev room.
 
But this was not OP asked for. That should go to code review. — Zereges 41 secs ago
 
You heard it
OP didn't ask for you to have top pin in Game Dev, it should be on code review
 
Zak
@Duga Thought that was an inappropriate migration-suggestion for a minute.
 
3:55 PM
@Duga What a useless question with useless comments.
 
@Zak Instead it was a totally appropriate suggestion for an answerer to post answers on Code Review.
 
in Game Development, Apr 16 at 21:14, by Hosch250
People shouldn't be dicks in SE chatrooms. They are intended to be a professional off-shoot of the main site.
@SimonForsberg Can't you superping him to lure him in?
He'll be awesome here and stop wasting his time on Stack Overflow. I see no downsides.
2
 
Zak
"the FCA have advised that they will review whether a full review of the TVAS requirements is required."
a review to decide if they need a review. bureaucracy at its' finest.
 
how meta
 
@Mast Maybe I could, but I won't. Not what superpings are for.
 
4:02 PM
details, details
 
@Zak Today in Sweden, a court made a decision that they wouldn't make a decision, in a case.
At least that's what I think they said, kinda hard to understand their language.
 
@SimonForsberg What, Swedish?
 
@pquest: Refer to this for details on why to singleton the HttpClient. — Greenknight 57 secs ago
 
@Mast For some values of Swedish.
"Arbetsdomstolen har avslagit arbetstagarförbundens yrkanden om interimistiska beslut."
Something like "The Labour Court rejected the worker unions claims for interim decision."
 
0
Q: MSTest Data Driven Test Inline Data

NkosiBackground: Didn't what to have to reference bulky 3rd party lib for inline data driven tests and wanted to use standard MS testing framework. Created helper InlineDataDrivenTest to provide a workaround for this limitation. Usage [TestClass] public class DataDrivenTests : MiscUnitTests { ...

 
4:09 PM
@SimonForsberg Sounds like a ruling of inadmissability.
Courts do that all the time.
 
@Phrancis You should tweet that.
 
Zak
My favourite: Recently, there was a Supreme Court ruling in the UK. It was supposed to last 2 days of hearings and then the justices would make a decision over the next 2-6 months.
2
Instead, at the end of day 1 they basically went "yep, this is blatantly illegal" and ruled there and then.
 
wow, is that..... ..... common sense?!
 
Zak
IIRC, first time they've ever done that.
 
first time I hear of common sense being of any use in court stuff. usually they're pretty good at tying their own hands and feet
 
4:22 PM
I'm using so many headers in my question I start thinking I'm doing it wrong.
 
-1
Q: Script that will run a backup every 6 hours. My current script isn't working. Any advice?

rhal22I'm attempting to create a script that will run a backup every 6 hours. My current script isn't working. Any advice? # vi /backup.sh #!/bin/bash TIME=date +%b-%d-%y FILENAME=backup-$TIME.tar.gz SRCDIR=/imp-data DESDIR=/mybackupfolder tar -cpzf $DESDIR/$FILENAME $SRCDI...

 
@CaptainObvious Yea, find a different site.
 
@Vogel612 did I just dismiss that flag? sorry! I meant to click "helpful" :/
 
Hmm... first time a recruiter actually CALLS as their first contact. "bla bla bla we've seen your profile and we jobhunt for you blah blah"
The funny part is that I asked where he called from and he said Sweden, and still he spoke English with me. How much of my profile had he really seen?
 
One would assume you stop getting that message after this many badges.
 
4:32 PM
how long has your "new question" tab been opened for?
 
Also, I may have over-engineered my latest question.
@Mat'sMug Oh, a day or so. Would that be it?
 
@Mat'sMug or how short
C/P also triggers
understandably
 
@Mast I'd think so
 
TIL.
 
0
Q: Mendelian inheritance

MastI started out with the Rosalind problems a while back. Turns out it's a great way to learn a new language. I'm still trying to learn Ruby, and while I haven't managed to use regular expressions as much as I wanted to (learning those being one of the reasons I started learning Ruby in the first pl...

 
4:36 PM
@Mast The question, or the code?
 
@SimonForsberg The question. There's a lot of text, a lot of context and not much code.
@CaptainObvious That one.
 
An over-engineered question is much better than an under-engineered one.
4
 
Yea, that's what I thought. So it's worth every minute I put into it.
Got to compensate for the amount of crap we got lately.
Setting the bar and all.
 
Zak
@ThunderFrame Just going to point out bounty expires sometime tomorrow.
 
If Ruby keeps up with features like this, it's going to replace Python as favourite language.
So easy to write.
And when you put it on rails, it becomes even better.
@DavidPhD: I... am... speechless. Thank you for the link. I'll edit and re-open. — Oddthinking ♦ yesterday
A speechless moderator? Odd indeed.
 
4:53 PM
in Cardshifter TCG, 38 secs ago, by Duga
[Zomis/test] DugaBot pushed commit 93d402a6 to master: Automatic update
Beware, humanity!
 
@SimonForsberg Duga is updating herself?! runs in terror
5
 
@Mast Not herself yet, but she will really soon be able to make commits :)
Turns out that when using the right library, it was tremendously easy.
 
Is this part of the whole 'Use machine learning to find lousy questions' activity?
 
@Mast You will see.
 
0
Q: Pong game implemented in java using JavaFX

Jedi18My first pong game in java. I tried using swing but later on decided to try JavaFX instead. Both the paddles are controlled by the user, one by WASD and the other by the arrow keys. I have a few issues with this though:- 1) If I hit the ball while going up(I mean if the ball is about to bounce...

0
Q: Userscript to add Prettify extensions on SE

muruI wrote a userscript (to be run with Greasemonkey/Tampermonkey on Stack Exchange sites) to include a Prettify extension and enable syntax highlighting for a language which isn't supported by default. I have only occasionally dabbled in JavaScript, and I have never written a user-script before. (...

 
5:03 PM
@CaptainObvious didn't we already have that one??
 
@Vogel612 Sounds familiar, just as broken as the previous one.
 
yeap
 
9 hours ago, by Captain Obvious
0
Q: Pong game implemented in java using JavaFX

Jedi18I'v almost finished my first pong game in java. I tried using swing but later on decided to try JavaFX instead. Both the paddles are controlled by the user, one by WASD and the other by the arrow keys. I have a few issues with this though :- 1) If I hit the ball while going up(I mean if the ba...

Almost a dupe.
Close enough.
 
@Mast what is different?
 
@Mast I wonder why this doesn't show up in the 10k tools
 
5:09 PM
Thanks for the edits @Vogel612, I was hoping someone would notice the distinct lack of MathJax and help out :-)
@Malachi First line.
 
@Mast ain't seen complicated mathjax you have
I wonder whether one can use tikzpictures and other packages for mathjax on here....
 
@Vogel612 user deleted it
 
10k tools has "Recently deleted"
but it ain't there
 
Do RBA go in that list as well?
 
seems they don't...
which makes this a royal pain and something like useless..
 
@Mast What is RBA?
 
you can't mark it as a duplicate of a deleted post
 
@Malachi unsurprisingly
dups were never intended to point at deleted posts
 
@SirPython Removed by author
Luckily we're so well trained at detecting crap we didn't get fooled.
 
I suggest you place this on code review. Your code works but you want to better optimize its run time. — rayryeng 14 secs ago
 
5:16 PM
even on the deleted page, the deleted by author posts don't show up either
 
Zak
Just fyi: Prince is dead
Skynet is here, and its name is @Duga
 
her name...
 
Guys...I have a really weird idea.
 
Zak
@Vogel612 Should we really limit our understanding and acceptance of machine entities by forcing them to conform to our own cultural constructs.
 
5:42 PM
On TensorFlow side, it was ported to Android and iOS (mostly) and Raspberry Pi. On NaCL side, someone ported Python/SciPy to run inside Chrome (codereview.chromium.org/165473002). So I bet it's possible. But unless you are a hacker genius, I think it may take a >1 month of work though....maybe start a discussion on github to drum up some support? — Yaroslav Bulatov 38 secs ago
 
Did you know C# changes values of double literals slightly, and the difference goes to @gafter's bank account? https://github.com/dotnet/roslyn/issues/4221
 
You'd consider posting this question on Code Review. — vaultah 9 secs ago
 
0
Q: Inpainting algorithm using conjugate gradient for colored images using Matlab

LucDupontI am currently working on an inpainting algorithm : the input is a picture, I apply a Mask (random disposition of dark pixels) and then the algorithm tries to recover the original picture using the "conjugate gradient" method. I implemented for gray pictures, it works fine. I am now trying to si...

 
@EBrown Just the one?
 
So far...
 
5:50 PM
possible answer invalidation by Mateusz on question by Mateusz: codereview.stackexchange.com/posts/126242/revisions
 
6:01 PM
@GameAlchemist That's the pizza test. If my code doesn't stop running in the time it takes me to make a pizza I start to suspect something is wrong. Sure it's no cure for Alan Turing's halting problem but at least I get a pizza outta the deal. — CandiedOrange Apr 17 at 9:52
 
0
Q: Code displaying membership information from a database

choiseunghwanI was just wondering what other options I could do to improve/change the code that I'm currently working with, eg// the displayed format of my list. Please feel free to alter my code to make it even better! The code is about displaying membership information of all clients from database def op...

 
Have you ever considered that Simon might be my bot?
11
 
@Duga Woah, calm down there
 
Seriously, someone should pin that just for the heck of it.
@Duga Which one of you is more advanced?
 
6:16 PM
@Mast just nuke the answer into a comment
mod work
 
@Vogel612 I simply re-stated his question as a commented, problem solved.
 
I think it's better to ask this question here codereview.stackexchange.comSybren 58 secs ago
 
also the other two answers could use a post notice
 
Yup.
1 gone, 2 to go.
The good thing about getting upvotes on questions is you can spend that rep on downvoting lousy answers.
 
0
Q: Is my implementation of String in C++ good?

MateuszI wrote my string class. The code works, but could anyone tell if I am doing anything wrong? It is an exercise from the "Accelerated c++" book: Implement the Str class, but choose an implementation strategy that requires that the class manage the storage itself. For example, you might store an ...

 
6:22 PM
@CaptainObvious wasn't that posted like, yesterday?
nope, follow-up
> +operator doesn't work and I do not know what I've done wrong. I have a segfault when I do "Str+Str" like "cout<<s+t;"
broken follow-up
 
> //cout<<s+t<<endl; //THIS DOESNT WORK
So don't post it...
Segfaults indicate you're doing something wrong. Code Review deals in working code, yours is broken. — Mast 13 secs ago
Stacktraces and segfaults, the easiest indication code is broken.
 
It appears your code isn't quite ready for a peer review yet - if you can narrow down on the issue you want to fix, you could ask about it on Stack Overflow. As it stands this question is off-topic. It will be put on hold to give you a chance to edit your working code in without invalidating any answers. — Mat's Mug ♦ 25 secs ago
 
6:37 PM
Beware, SkyNet @Duga is taking over!
 
6:51 PM
0
Q: Lets develop a session timeout!

Richard_GrantImportant definitions: session.gc_maxlifetime - (default 1440 seconds) defines how long an unused PHP session will be kept alive. For example: A user logs in, browses through your application or web site, for hours, for days. No problem. As long as the time between his clicks never exce...

 
Code Review and Stack Overflow have very different standards for what constitutes a well-formatted question; please read Minimal, Complete, and Verifiable example and How to Ask. — Mat's Mug 43 secs ago
 
0
Q: Project Euler Problem 10

JamerackProject Euler problem 10 is to find the sum of all primes less than 2 million. I have written a program that does this, and it works, but it takes an excruciatingly long amount of time. What I'm asking is if there is anyway I could optimize this to make it run much faster. Here is my code: def c...

 
1
Q: Creating Mysql interaction/connection using OOP in PHP

Dannyw24I'm very new to OOP and but am aware of the concepts after educating myself with some good resources despite this I want to get expert knowledge on the direction I'm taking for this project I've set myself. I've decided to make a forum as It allows me to implement the class/inheritance system qu...

-1
Q: How does this portion of code work?

willredington315def add_info_extractor(self, ie): """Add an InfoExtractor object to the end of the list.""" self._ies.append(ie) if not isinstance(ie, type): self._ies_instances[ie.ie_key()] = ie ie.set_downloader(self) def get_info_extractor(self, ie_key): """ Get an instanc...

 
@Mat'sMug I saw that, but have no idea what that number means o.O
 
...random trash...
 
0
Q: LeetCode Rotate Array

Dhrubojyoti BhattacharjeeI have started learning Java and was trying to solve some easy problems from different websites like HackerRank and leetcode.I am relatively new to programming so please don't mind if this is too naive. I found a problem in LeetCode to rotate array.The problem can be found here I have implement...

 
7:44 PM
This might belong better on codereview.stackexchange.com. — jtbandes 32 secs ago
@jtbandes please read this and suggest this to the asker. Simon: your problem can be on topic on codereview, but you have to reformulate it according to the standards of that site. — Andras Deak 45 secs ago
 
@Duga THANK YOU
2
 
@AndrasDeak: Please correct me if I'm wrong, but I believe this question is actually a good candidate for CR.SE. Simon, you should see a small link to delete this question if you like, and you can simply post a new one (with the same content) there. Make sure to check out what's considered on topic for CodeReview. — jtbandes 58 secs ago
 
0
Q: Hearthstone deck list

OwenMy code will display a Hearthstone deck list. I'm still learning HTML and I'd like help with a few things: • How readable is my code? How can I improve readability? • Have I used any bad practices? What should I do instead? • Is there any redundancy in my code? <!DOCTYPE html> <html> <head>...

 

« first day (1083 days earlier)      last day (2947 days later) »