« first day (843 days earlier)      last day (3472 days later) » 

08:10
If you ask about quality of your code, I think you should ask to codereview.stackexchange.comPeerNet 30 secs ago
Greetings
ah I didn't know about codereview.stackexchange.com ,now I got it, Thanks a lot! — user2458645 42 secs ago
@PeerNet Code Review is meant for fully working code The O.P. states he didn't tested it. If the code is broken, the question will be closed as off-topic. Before going ANY further, the O.P. should test it. Then, if it works as expected, he can post on Code Review. — Ismael Miguel 30 secs ago
DMZ is from the security site, right?
08:20
shouldn't that be for the sysadmins??
I don't know
In computer security, a DMZ or demilitarized zone (sometimes referred to as a perimeter network) is a physical or logical subnetwork that contains and exposes an organization's external-facing services to a larger and untrusted network, usually the Internet. The purpose of a DMZ is to add an additional layer of security to an organization's local area network (LAN); an external network node only has direct access to equipment in the DMZ, rather than any other part of the network. The name is derived from the term "demilitarized zone", an area between nation states in which military operation is...
It's from sec.se
I knew it!
> The purpose of a DMZ is to add an additional layer of security to an organization's local area network (LAN);
1
Q: Project Euler #7 using Java streams

André LaszloI haven't written any Java in years and I wanted to catch up a little, especially on newer features. I started looking at streams and aggregate operations and came up with the following solution to Project Euler #7 (find the 10001st prime). package com.example; import java.util.stream.IntStream;...

08:25
repetitive repetition is repetitve and the redundancy department of redundancy approves of this message.
6
Redundant redundancy?
@CaptainObvious somebody give this person a cache, please
The right term is "memoization", I believe
If this code is fully working and you'd just like to improve upon it, you might be better off posting on CodeReview as Praveen suggested. But please make sure to read their How to ask page. — SuperBiasedMan 44 secs ago
08:30
Ugh, I'm like one good post away from bronze, and there's been no good questions lately
I have a zombie
It's my only question without an accepted answer
Nope, just 1
the hex one?
monking
Greetings
08:34
@skiwi you're looking at the remote ref for develop. git checkout origin/develop
nvm you fixed it :P
@DanPantry Hmm okay... that might explain stuff
i'll explain in Cardshifte
r
I couldn't do lot sof stuff though because I had lots of modifications
yeah you aren't allowed to do pulls and whatever if you have a modified working directory
or rather, if files in your working directory are tracked and modified
0
Q: Extend date comparison function in Angular to take different dates as parameters

lharbyI have an angular function which passes in two date objects and compares them returning one of two strings which are then passed as a class name to an html element. The idea being that if the date is older than a specified amount the element can be highlighted using the class name. I now need a...

08:46
Hi @lharby, your question doesn't appear to fit what this site is about; Questions containing broken code or asking for advice about code not yet written are off-topic, as the code is not ready for review. After the question has been edited to contain working code, we will consider reopening it. We don't write code for you, but we will review code if it's working. You're not asking for a review here but rather for someone to help write an extension to your function, which I would say is probably off-topic — Dan Pantry 17 secs ago
09:02
0
Q: Update live table in MySQL

Cees TimmermanAfter populating the stock_tmp table, i'm running this SQL in a single query. I don't think this code needs additional locks to prevent people from seeing incorrect data. Is that correct? DELETE FROM stock WHERE ean NOT IN (SELECT ean FROM stock_tmp); REPLACE INTO stock SELECT * FROM stock_tmp;

@CaptainObvious Asking if needs to add a table lock. Has but no PHP there.
Is it possible to migrate this to SO? If that is a better place for it to be asked? Thanks — lharby 30 secs ago
thoughts? I dont know enough to answer that
Probably the DBA website?
Without the PHP stuff
@IsmaelMiguel it's not about @CaptainObvious' queston
Oh
Well
There is a way to migrate to StackOverflow, but there are no mods online
Zak
Zak
09:13
How does one go about becoming a MOd?
@Zak become well known on the site and apply in a moderator election
^ that's about it
Zak
Zak
there are elections?
follow the links around, but don't hesitate to ask :)
Actually there's quite some elections running right now
Anime & Manga has one...
Magento has probably just finished theirs
there's recently been one on The Workplace
@Vogel612 Is Monica still a moderator?
09:18
@IsmaelMiguel you'd need to check, but I figure she'll still be a mod on one of her many sites :)
not sure about the workplace, though.
She is really amazing
I doubt they would let an amazing mod run away
var arr = "5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,8,8,8,8,8,8,8,5,10,8,8,8,8,10‌​,10,8,12,10,10,8,10,10,8,8,8,10,10,10,8,10,10,8,10,5,".split(',');
what
Javascript?
yes....
Unexpected
09:21
javascript? looking bad? that never happens. :^)
@IsmaelMiguel Sometimes they resign.
on a completely unrelated note, my tomcat considers it a good idea to completely reload the context on each request...
it just needs some.. tomcatnip @Vogel612
I'll just restart my pc... maybe that helps..
everything else is out already
@Mast I know. But she's still amazing
09:27
This sounds like it's belong to CodeReviewThomas 16 secs ago
@Duga There's some nasty restrictions in that question, so I'm not sure it does.
@Mast Pseudo-code
@IsmaelMiguel It's MCVE'd, not pseudo-code.
	if(my_data.id == 0){
	  //Consumer 0
	}else if(my_data.id == 1){
	  //Consumer 1
	}
	//Process Data
^ that
09:29
It's pseudo-code
see also:
6
Q: Are SSCCEs off-topic?

BenVlodgiI was recently reviewing a question, which (if I had paid better attention to the question from the beginning, I may have noticed before answering) had a SSCCE as its primary code example. At first glance the question is asking which way is the best way to make their UI scalable in the future. I...

@IsmaelMiguel No.
I've seen questions with more real code being closed as pseudo-code
Not as pseudo-code, but as stub code.
You're right
09:31
Code missing detail is unacceptable at CR, at SO it's the norm.
They want MCVE there.
With good reason.
Yes, but it is missing code
@IsmaelMiguel That wasn't in question.
Alright then
I'm giving my opinion
Definitions don't need opinions.
I was giving my opinion about the reason why that code is off-topic
Zak
Zak
09:53
Can someone explain the difference between code / pseudo code / stub code?
I don't know the difference between pseudo-code and stub code
But pseudo-code is like this:
@Zak Read the s on meta.
24
Q: Why is hypothetical example code off-topic for Code Review?

200_successAs stated in the Help Center, one of the criteria for a question to be on topic is: Is it actual code from a project rather than pseudo-code or example code? What is the rationale for that rule?

19
Q: Do one-liners and other narrowed-down code qualify for a code review?

Mat's MugEvery once in a blue moon, a question gets posted (often as a new user's first post) where the OP is asking a quite specific question about very minimalistic code, for example: if (strstr($url, "?")) { $url = strstr($url, "?", true); } There is something to say about this code, of course....

14
Q: The gray areas of Code Review: Hypothetical / Example code

Simon André ForsbergThis is related to Why is hypothetical example code off-topic for Code Review? Which is related to On-Topic question #3: Is it actual code from a project rather than pseudo-code or example code? It seems that we're not quite consistent in our treatment of "example code", which is what this...

Yeah, that
Sorry, my boss interrupted me
Zak
Zak
10:24
okay. So pseudo-code would be something like a function where elements have been replaced with "'/ Does Stuff" instead of the full code?
That's stub code
Pseudo-code would be this:
if( isEmpty(foo) )
{
    print( "Foo cannot be empty" )
}
The real code, in that example, could be this Java code:
if( foo.isNullOrEmpty() )
{
    System.out.println( "Foo cannot be empty" );
}
Or this PHP example:
if( !$foo )
{
    echo 'Foo cannot be empty';
}
Zak
Zak
okay. would it be right to say, then, that if you tried to cactually run pseudo-code as written, it wouldn't?
I'm not saying that
I'm saying that pseudo-code isn't real code
It's just fake code to describe the desired functionality
It isn't an implementation in a language
That pseudo-code could be also written like this:
Zak
Zak
oh, right
if foo == empty then
    writeln("Foo cannot be empty")
Zak
Zak
10:34
would it be right to say then that pseudo-codeis much closer to hypothetical code?
I would say yes, but I don't know the difference
Hypothetical code can be like code that isn't even pseudo-code
Like, proposing an hypotheses to see if the code runs or not
Like:
class f{  }

var x = new f();
(If I'm wrong, correct me!)
Zak
Zak
I'm defintely not the one to know :) I'm just trying to assign concepts to terms I see used somewhat frequently
Question for the mods, who/what determines how many mods a site gets?
The difference between hypothetical code, pseudo code and example code is not important. The only important difference is between real code and not real code.
@Zak Stack Exchange.
The pro-tem mods asked for 5 but we got 4.
@DanPantry If you think a question deserves to be migrated, feel free to flag it with a custom flag.
Zak
Zak
the pro-tem were mods before the kinda-sorta-graduation?
yes, and they were chosen by Stack Exchange, not elected by the community.
10:48
@SimonAndréForsberg Who came in fifth place?
Jamal, 200_success, and rolfl were pro-tem mods.
@Quill In the election, @janos.
ah, that's right
rolfl stepped down, simon and the mug closed the gap
hmm... this is strange.... when I run the election data, @Mat'sMug was the third one to be elected and I was the fourth. If I change the election to only require three candidates, it says that I would have been the third and then @Mat'sMug wouldn't have been elected. Is there a bug in my code?
maybe
stv is strange
try running it in another stv program
10:57
I have no other STV program
download one, then
I tried the mac version of StackSTV after the election, but it wouldn't compile
I think this question belongs to codereview.stackexchange.comNaman Gala 8 secs ago
@SimonAndréForsberg you two were only different by a minuscle amount of votes..
I figure the limits are set differenly, thus the redistributed votes change
@Vogel612 yes, I am aware of that. but I find it strange that the number of places available affects who would be the third.
0
Q: How this code can be simplified?

David MatriguetI have code that converts each character of String to int and returns the difference between odd and even numbers. Can this code be simplified ? I want to know how to make my code more simple. int compareSumOfDigits(String N) { int e=0,o=0; for (int i =0;i<N.length();i++){ int t = Character....

11:05
@SimonAndréForsberg Is it based in dates?
'Rounds'?
it works with rounds, yes.
it is an iterative process
Maybe the program thinks that it needs less rounds to determinate the "winner"?
Or some rounding issue?
I rolled this back
11:12
good job on that
but work on the comment a little :)
0
Q: Is it a good idea to use hashCode as JAXB @XmlID?

philonousI have a class Fighter in a software for planning boxing events. I implemented its hashCode() and equals() since I collect them in various data structures in many places. Now I want to persist specific planned boxing events which themselves contain the same Fighters in different lists. I am u...

@Vogel612 Sure, :P
edit was approved by OP, btw.
I saw, that just means I don't have to come in here waving an axe saying 'Who approved that?*
2
How's this for a title?
0
Q: What's the difference between odd and even numbers?

David MatriguetI have code that converts each character of a String to an int and returns the difference between odd and even numbers. Can this code be simplified? I want to know how to make my code more simple. int compareSumOfDigits(String N) { int e=0,o=0; for (int i =0;i<N.length();i++){ int t = Charac...

11:15
much better
found another ages-old revision
this user
... seems to be a good user..
just needs a little push in the right direction
so no ganging up, aight?
what do you guys think of the revisions here?
@Vogel612 That makes it looks like we are wolves waiting for the next pray for us to tear it apart.
Jamal approved it...
11:21
@Quill I'm more talking about the newer revisions..
Revert it
also the edit was suggested by Jamal...
shows how old that post is
The same edit?
@Vogel612 this one?
nvm...
wat?
11:22
Oh, it's 2013
I was talking about this one
You folks haven't missed this migration, have you?
11
Q: How can I improve the performance of a recursive algorithm in Haskell?

raxacoricofallapatoriusI'm new to Haskell and am confused by why my code seems to preform so poorly, and wonder if there's something I've not grasped about the coding philosophy behind the language, or the best way to take advantage of its features. For example, I have started, as an exercise (yet another) simple Enig...

@SimonAndréForsberg seems like a mismigration to me...
I just noticed 6 out of the 15 highest rated answers on the 'Stories 10m doesn't convey' are CR regulars. It's at 128 atm
OP is not interested in a code review, but has a specific problem with the code
11:28
@Vogel612 SO mods says that it was a very broad 'improve performance of my code coz it is slow' question. it would likely have been closed as "too broad" on SO.
the question and answers have a significant amount of upvotes though.
then again I can understand where they come from.
I don't want to say it's a bad quesion for CR
it's just that I don't think it's off-topic for SO.
I don't find it a bad question for CR at all
I don't think it is a question for CR
It's not off-topic for SO, it's too broad
The O.P. iself says he doesn't want a code review
11:30
well maybe it draws some more haskell / functional people here
I hope it will.
According to the help section, that's off-topic
18
Q: What IS a Code Review?

Simon André ForsbergSo, this site is called "Code Review"... What we do here is... ask for and write Code Reviews, naturally. However, I feel that there are a whole bunch of different thoughts floating around about what a Code Review really is. On Code Review, what is a Code Review? (And what is it not?) This q...

I believe the OP's version of "Code Review" does not match what our version of "Code Review" means.
I'm confused! What questions are on-topic for this site?
[...]
- Do I want feedback about any or all facets of the code?
I'm sorry, but I don't think that question is a good fit here
By the help section, it is off-topic
16
Q: Can we ask reviewers to *not* focus on something?

Simon André ForsbergOur Help Center says: Do I want feedback about any or all facets of the code? However, sometimes we might have some code that we are aware has flaws in it, or we would just for one reason or another want reviewers to not comment about something. When asking a question on Code Review, can w...

11:39
From what I read, he doesn't want feedback on anything but help on fixing speed issues and to verify if his "cache" system is working
Looks like I was upvote spree'd
Probably, but it wasn't by me
I'll wait till StackMonday and run SEDE over it
I don't really mind, but, meh
@Quill well if you're "unlucky" it'll be gone by tomorrow
11:50
github down?
nvm
yeah i can't seem to gitclone from github wtf
check your ssh key?
it was a HTTP error, as if I was having trouble actually connecting to GH
Dan@DAN-OFFICE ~
$ git clone github.com/lambdaexpression/cv
Cloning into 'cv'...
fatal: unable to access 'https://github.com/lambdaexpression/cv.git/': Unknown SSL protocol error in connection to github.com:443
definitely not an issue with my ssh keys because clone doesn't require authentication
i wasn't able to connect to the website either, so
hmm... site is a little very slow for me...
but it loads
0
Q: Implementing versioning system with MySQL

VictorI know this has been asked here and here, but I have the same idea with a different possible implementation and I need some help. Initially I had my blogstories table with this structure: CREATE TABLE IF NOT EXISTS `blogstories` ( `uid` varchar(15) COLLATE utf8_unicode_ci NOT NULL, `title` ...

On an unrelated note: Anyone knows how job references work? When/Where/How should they be shared with a potential employer?
12:03
Workplace would be good for that, if you like
It's kinda broad
@CaptainObvious off-topic.. asking about "code not yet written" at best and for a design-review at worst..
former co-workers, bosses, etc. who can vouch for you in certain areas: skill, politeness, adaptability, etc
some companies won't give anything more than "they worked here", though, due to legal issues
as for where in the CV, it depends
(my company is one of those)
12:05
@Quill but it should go in the CV at least?
In Germany companies are mandated by law to give you an "Arbeitszeugnis"
@SimonAndréForsberg Yeah
okay, I've already sent them my CV and already got a scheduled job interview so
as such you usually attach the Zeugnisse of the last few years..
Zeugnisse? Oh you Germans sure know how to name things...
12:06
You can translate that to swedish well, huh?
I think a few of the CR regulars use each other as references
I don't even understand the whole concept of "reference"....
@Vogel612 nisse at least, but not sure about Zeug
no no...
the word is "Zeugnis"
basically... testimony?
1 min ago, by Vogel612
as such you usually attach the Zeugnisse of the last few years..
okay, sorry, my mistake
12:08
4 mins ago, by Quill
It's kinda broad
@SimonAndréForsberg I'm interested in what you thought the translation was :)
I'm not even sure myself, it sounded funny, that's all.
I am in the process of wasting lots of paper currently, not ready to implement :) — Victor 3 mins ago
^ sounds like it could even go to programmers then..
@Vogel612 whiteboards and markers are good too...
which is the type of question programmers is .. good at?
I don't know.. really..
confused again and again at what is okay there and what isn't...
12:12
theoretical = programmers -> bugged implementation = SO -> working implementation = CR
or something like that
but in this case it's about designing a database schema...
as such Database Administrators seems appropriate, too
^ Yeah, DB design is good there too
migrated to DBA and approved by a DBA mod
sweet
Zak
Zak
On the job references thing. The advice I've been given (from experienced corporate people) is that references shouldn't be in your application unless they're asked for.

For a lot of companies, screening people by their references only happens several screening steps into the process, and many only check references once they've decided they'd like to hire you.

tl;dr if/when a company wants your references, they'll ask for them. until then, leave them out.

N.B. this is general corporate and anglo-centric. standard practice may be different elsewhere.
12:28
I think references up front are mostly advisable for jobs that hire quickly and don't get as many applicants so there's no weeding to do
I've voting to close this question as unclear. There are no details provided on how to get from A to B. Is the difference that we want the characters in the middle? Do we want to just eliminate any emoji no matter where it is? Do we want to simply trim the first character of each end no matter what it is? Do we want to trim characters off the ends but only if there are emojis? There's no clear description of what is actually trying to be accomplished. If the question is literally 'How do I return "hello World"?', then the answer is simple: return "hello World". — nhgrif 1 min ago
How did that user get 10 famous question badges??ß
Even his answer states:
>
> There's more than one way to do it.
Suggested edit ready for rejection on meta: meta.codereview.stackexchange.com/review/suggested-edits/96
> Member for 4 years, 7 months
Old questions back when the rules were less strict that gather views because they're so basic
12:33
Then... he describes two solutions that do different things... not two solutions that do the same thing.
ta
Pimping rolfl's excellent answer:
1
A: Multithreading readied Median Filtering

rolflYou claim that your "code is a generic approach at providing code that can be trivially multithreaded to run these calculations on a Comparable[]". I see a number of problems with this statement.... most obviously, you are not using generics at all, even when they are needed, as Comparable is a g...

I hate when IE pulls my leg
> "Internet Explorer is not your default browser. Make Internet Explorer your default browser?"
12:44
Sadly, it is
For hardware reasons
Now, one issue is gone:
Chrome uses less CPU than IE to play HTML5 videos
@Vogel612 You can use the MathJax formatting \frac{numerator}{denominator} or numerator \over denominator for fractions. I'd prefer the former, btw.
TIL :) not using much mathjax and not getting to using it more..
I really only remember most of it from editing it into CR posts
@nhgrif But it's almost a verbatim duplicate: stackoverflow.com/questions/5676106/…
Or am I missing something?
Well, that question should be closed too... but it's unlikely to happen at this point.
Also, that question is Objective-C and asking about NSString.
12:52
And why is that solution unacceptable?
Should we close a C++ question as a duplicate of a PHP question asking the same thing?
No, but aren't Swift and Objective-C very closely related?
Somewhat, sure, but not that closely that every Swift question is a duplicate of an Objective-C question.
The Objective-C question is asking about the NSString class. This Swift question is asking about Swift's String struct.
Ah, my mistake then.
I'm voting to close this question as unclear what your asking. There's no indication at all of exactly what is wanted here. Do you want to just return "hello World"? return @"hello World". Do you want to return just what's between colons? Do you want to strip everything left of the left-most colon and everything right of the right-most colon? There is no clearly defined input-output criteria for this question (as we see with the resulting list of questions that all solve the problem with a wild array of approaches). — nhgrif 8 secs ago
12:56
I guess I was assuming that this was true:
> String in Swift 1.2 is bridged to NSString properly
What that means is that if you use an Objective-C library that returns an NSString, Swift will receive it as its String struct, rather than receiving it as an NSString class.
Ah.
So Swift can cast NSString to String, but they aren't the same?
You can't cast in Swift. But there is an NSString constructor which takes a String. And a String constructor which takes an NSString.
And bridging and casting are different things.
But... you can't use NSString methods on a String. And you can't use String methods on an NSString.
Although there is some overlap between them in methods and properties.
Nifty.
I need to get more SO rep...
Greetings, Programs.
13:01
Hey Donald.
Greetings, user
SO user Hot Licks has suggested that Swift and Objective-C are too complicated to use as a learning ground for OOP fundamentals and recommended Java as simple enough...
Isn't that the function of PHP?
@nhgrif They don't seem to share much with typical OOP languages IMO, which is why I wouldn't recommend them.
13:11
Team education and code reviews, basically. — David 12 secs ago
Thanks, Santa!
13:28
monking
@IntensifierDescriptorMan huh? What OOP languages do you know?
And what is it that other OOP languages have that Swift/ObjC don't? And what is it that Swift/ObjC have that other OOP languages don't?
C++, C#, Java. Though any issues I'd have would be lack of swift/objc knowledge.
It's just wierd. Like the +/- stuff.
That's a) only Objective-C and b) purely syntax.
I don't really know the languages that well, I will admit
In Objective-C, the + is the same as static in Java.
And the - is the same as not having static.
So it's not a new concept. It's just syntax.
Zak
Zak
13:31
Is my current understanding of the graduation progress correct: We have all the functionality of a graduated site but we don't have our own design yet?
@nhgrif I thought there was some small difference, but I'm likely mistaken. Also, if I recall there is no public/private. I don't think they're that far off, but the syntax alone is different enough IMO. Though the functional stuff in Swift is pretty nifty
The syntax though, should only be a problem when it comes to learning Objective-C after you already know another language. I don't see how it's a problem with learning it as your first OOP language...
@Zak No. All we have so far is elected mods.
Oh cool, I hit 4k
4
I know for sure we're missing the rep limit change and migration paths, but I'm not sure what else comes with graduation.
@Quill Congrats!
13:41
Thanks :-D
@Donald.McLean community ads,
@nhgrif Yeah. I was just never impressed with it, but I'm pretty sure that's my anti-apple bias showing. :( And it's quite verbose, however, I think whatever works works. I'd just prefer to teach one that is a bit more canonical.
I think, from what I've seen, Swift would be a good language to start learning, especially with that playground or whatever they have, and that you can get a bit of functional concepts in there. ObjC I'd stray away from just because it sounds like Apple's hoping to get rid of it, and the whole NS, and [self doStuff: x and: y] is a bit annoying. Then again, what do I know?
@Quill Yeah, congrats.
Can this get more love?
2
A: array traversing: parallel performance is slower than non parallel

EBrownIt's all in the variables. Take, for instance, your p object. You pass the same p object to both threads. Now, I'm not sure if Parallel.Invoke is capable of detecting this, and as such is executing them in serial (albeit with significant overhead) or not, but I do know that if it is not detectin...

Zak
Zak
Is it socially acceptable to be pimping questions, especially on other sites, in chat? Just curious :)
@Zak different sites/rooms have different cultures, so ask the ROs there
13:48
Also, this answer needs some love, maybe?
0
A: Performance Byte[] to Generic

Nikita BrizhakI did not do any actual benchmarking (I leave it up to you), but my guess is, that the fastest solution for value types would probably involve using unsafe code. You can start by using default PtrToStructure method, and see if its fast enough in your context: public unsafe static T ConvertTo<T>(...

@Zak It largely depends on who you ask as well....
Can somebody reply to this message, please? (I'm doing chat.se websockets related tests)
@Quill No
Zak
Zak
cool. My default assumption anywhere is "no" but I like to have it as an option :)
@rolfl thanks
13:52
@Zak We don't often do it, but every now-and-then when you find a gem it's acceptable.
@Quill You're welcome ;-)
@rolfl he tricked you!
:P
0
Q: NextResult() using ADO.NET and MVC

George PhillipsonI'm playing around with some code I have and i'm trying to return more than one select statement from a database and have the following code. public IEnumerable<MemberProfile> ProfileForMember(string id) { // string sanitziseId = Data.SanitizeInput(id); const stri...


« first day (843 days earlier)      last day (3472 days later) »