« first day (1026 days earlier)      last day (1366 days later) » 

12:00 AM
RELOAD! There are 1884 unanswered questions (94.0656% answered)
at first: Oooh cool, you've got a rubberduck!
Now: PLEASE stop squeaking with that thing.
*squeak* *squeak* *squeak* *squeak* *squeak* *squeak* *squeak*
@CodeCaster Yes, testing solves all software quality issues caused by complex software at reasonable cost levels. — Yakk yesterday
that was weird. I never had to restart the SQL Services on my machine before....I need to set up my new(er) development machine, this old laptop isn't going to cut it much longer
12:42 AM
@Malachi Add connection -> Linq to SQL -> connect to (localdb)\v11.0
or whatever server you're interested in
My doctor's online appointment module has a warning that starting october 2007, all appointments will be made by schedule
I don't think he updates it often
This might be more appropriate for Code Review (codereview.stackexchange.com) — Colin Basnett 56 secs ago
the earlier screenshot was Code Review. That one is Stack Overflow... I need 26 iOS upvotes...
1:08 AM
@Duga So you say that 300 question is about 1 %, and since there are 155 unanswered Python questions, if we answered all unanswered python question that would only raise the answer percentage to 94.6 %... That is kind of sad...
Another, possibly even worse issue, is that I suspect a lot of this small part of unanswered question are made by users who most likely never would see that we actually answered their old question...
@JeroenVannevel my SQL Server Service wasn't running, so it wouldn't connect to it. I fixed it though. thank you
@holroy Maybe @Duga should start looking at only somewhat recent questions?
1:25 AM
Not sure... Been thinking on how to handle it, but I can't even agree with my self on what would be the better option. Sometimes I think it would be nice to flag older answers with some flag to kind of indicate that here is a good, but old, unanswered question. And sometimes I would like to just close/delete them as they most likely will never get an answers due to amount of work, esoteric combinations of modules/libraries, or ...
@JeroenVannevel do you have any useful links for learning linq-to-sql or linq-to-xml or whatever other linq-to's?
I bought a bigass book on LINQ but I have to say that I never even started with it
just use ReSharper and write code as usual
it will suggest to swap your loops for the appropriate LINQ structure
you'll learn that way
in the end LINQ is very easy: most of what you use is Select/First/Single/Where/OrderBy
The icky part starts when you need to insert something like ToList() or FirstOrDefault half way within in order to get the rest to compile, and all the interesting tidbits and side effects which occur in those cases!
Yeah, if you're working with an external datasource then it's good to know what methods will materialize it
But as you state, Resharper will suggest a lot of the more basic transformations, and does give a good start to build upon.
1:30 AM
Just read through this I suppose: msdn.microsoft.com/nl-be/library/bb397933.aspx
I can fly for 5€ (one way) from Brussels to Berlin
@JeroenVannevel that's beyond crazy
Another small grief I've add with Linq is which version to include... The IEnumerate or the other, Linq(?)?
@holroy heh?
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comspender 30 secs ago
@JeroenVannevel HeHe... Some of the Linq structures are defined in multiple hierarchies, with slightly similar definitions, making Resharper unable to decide which to choose when you use them in a new file. If you use the wrong, it'll work for some cases but not all.
1:34 AM
Do you have an example of what you mean? I'm not quite following
Give me a sec, and I'll see... Unfortunetaly I've now moved on to using a Mac, and don't have all of the typical code giving problems... It typical occured when writing the first Linq-statements in a new file missing some of the basic using-clauses
@spender while this looks like a question that might be suited for Code Review, voting to close a question as "belongs on [another site]" is not a "valid" close reason. Please VTC with one of the other canned reasons. For more information please see A Guide to Code Review for Stack Overflow usersVogel612 12 secs ago
@holroy oh like that. Don't you use VS? It adds the System.Linq import by default
1:37 AM
Swift's where keyword is awesome once you get used to it.
@JeroenVannevel We did use VS, but sometimes it suggested the wrong library, or suggested changing loads of using statements...
Here we go:
Q: Ambiguous Invocation IQueryable or IEnumerable

pthalackerI instantiate a context and want to write a simple query var result = db.Set.Where(x => x.Id = num).Select(whatever); and I can't get rid of the red squiggly under "Where" complaining about an ambiguous invocation between System.Collections.Generic.IEnumerable and System.Linq.IQueryable. Syst...

I'm not asking for a code review. I am asking a programming question about a better alternative solution to a problem. — Jscix 21 secs ago
var someOptionalInt: Int?

if let someInt = someOptionalInt where someInt > 4 {
    print("\(someInt) is greater than 4")
This one I really don't like, and made the wrong choice more than once!
oh yeah I suppose
1:41 AM
@nhgrif Looks nice... But it took some time to get used to the if let ... statement...
let vegetable = "red pepper"
switch vegetable {
case "celery":
    let vegetableComment = "Add some raisins and make ants on a log."
case "cucumber", "watercress":
    let vegetableComment = "That would make a good tea sandwich."
case let x where x.hasSuffix("pepper"):
    let vegetableComment = "Is it a spicy \(x)?"
    let vegetableComment = "Everything tastes good in soup."
I think I'm going to use this sometime soonish: srprs.me
notice the 3rd case.
if let a = someOptional1, b = someOptional2 where a < b {
    print("both values are non optional and a is less than b")
effectively, it always eliminates a layer of nesting (at least)
It's both neat and a little icky... It kind of doesn't make sense to state case let, as case indicates that we're looking for a specific case, whilst let indicates we are going to set a specific case.
But it does indeed remove a layer of nesting...
In the switch, it's optional binding, and I don't think there's a way to use where clauses without optional binding.
so the point there is, you can't hit a switch case for something like "hasSuffix" without the optional binding (that always binds)
it's best to look at case let independent of the where clause though if you want to explore that syntax..
1:51 AM
I do understand it, but it is kind of confusing as it both does the optional binding and the where clause and then in addition this is used as case... So I'm not entirely sure if I'm enthusiastic about how it's written...
The alternative is a long if/else chain full of == operators.
Just for thoughts... Consider if assuming a = someOptional1 or case assuming x where x.hasSuffix("pepper"), would read a little better
let vegetable = "red pepper"
if vegetable == "celery" {
    let vegetableComment = "Add some raisins and make ants on a log."
else if vegetable == "cucumber" || vegetable == "watercress" {
    let vegetableComment = "That would make a good tea sandwich."
else if vegetable.hasSuffix("pepper") {
    let vegetableComment = "Is it a spicy \(vegetable)?"
else {
    let vegetableComment = "Everything tastes good in soup."
Q: localStorage data transfer to new computer or new directory

puzzlesolverlocalStorage question: How do you transfer saved data in localStorage to a new computer (or to a different directory or folder, etc. on computer it was originally saved on)? I have searched much for the answer but have found nothing to address this specific issue. I have tried copying the sqlite ...

Q: Editing out ruby tag from ruby on rails question

Marc-AndreSomeone suggested an edit to remove the ruby tag with the reason ruby != RoR, here is the suggested edit. I was tempted to reject the edit, since ruby is a valid tag in my opinion for ruby-on-rails. The user is a good contributor in the ruby tag on SO so I was doubtful what would be the best opt...

1:56 AM
@holroy It's probably important to note that let is also how you declare constants and you can replace it with var.
let someOptionalInt: Int? = 5

if var someInt = someOptionalInt {
    someInt = someInt * 10
all you did was replace let with assuming and that becomes weird because you've introduced a whole new keyword...
The point I'm trying to make, is that I think the word let doesn't sufficiently propagate the optional part of its usage. I.e. in the if let a = someOptional1, I don't think it reads naturally that if the someOptional1 isn't set, then the if statements would go to the else block.
Maybe assuming isn't perfect, but it conveys the optional part a little better, but I'm still not entirely satisfied with that either.
@holroy The way the optional binding works, at least in the if statements, is identical to Objective-C, C, C++, and probably some other languages.
You're missing my point... It's just the syntax, not the concept I'm finding confusing.
SomeClass *someVariable;
if ((someVariable = someFunctionThatReturnsPointerOrNil())) {
@holroy the syntax though is simply matching every other way you declare a new variable, using either let or var.
let is how you declare a constant.
var is how you declare a mutable.
You want something like this?
assuming someOptionalInt: Int? = 5

if assuming someInt = someOptionalInt {
    someInt = someInt * 10
notice the first line where I declared the optional
Why is it a given that you need the same in both? In C there is a difference between = and ==, since it has different meaning, and some of the same applies to a "standalone" declaration versus the "if" declaration.
2:05 AM
okay, but then how do you propose distinguishing between if let and if var
the variable declaration can be combined with three keywords (besides standalone)
So I don't mind the let and var syntax when it is a standalone statement. It's more when used in the if and case I'm thinking the syntax is slighly flawed
guard let, if let, and case let (and in all cases, you can use a var in place of the let)
One option could be to do something like assuming mutable x = someOptional, but still not perfect...
Q: Dictionary Algorithm, Computing all Case options

R.HullSo I am building this algorithm as part of a larger project for a Network security class... the jist of this part is that i have been given a dictionary, and I need to find every possible option for a word in both upper and lowercase.. example.... to tO To TO My first thought was this it look...

that's 16 characters in place of 3... and isn't any more clear what's going on
I'm not saying that if let is perfectly naturally... but I think assuming is far worse...
2:08 AM
And that is most likely the reason Apple has chosen to keep on to the shorter usage of let and var...
Although, I think what might be neat...
Vogel612 has made a change to the feeds posted into this room
if let foo = bar {


assuming foo = bar {

If those two did the exact same thing...
this new feed is posting questions migrated onto CR in here
but then the problem is, we lack a good way to make it mutable
2:11 AM
@Vogel612 Will those come from CapnObvious or StackExchange or another feed?
it should work the same way as this search
@Phrancis Right now that's Stack Exchange
That kind of looks nice... Although it might confuse old-timers only used to if, and hard when combing optional bindings into other stuff like: if myVar = 5 and let some = someOptional...
a RO doesn't have the privilege to change feed names, IIRC
@Vogel612 Sounds cool, but what is the feed name?
1 min ago, by Vogel612
@Phrancis Right now that's Stack Exchange
2:12 AM
Oh... It's stack exchange which is the name?
@Vogel612 Ah ok. Maybe a mod could change it, although it should be pretty easy to differentiate it from the Meta.CR feed
@StackExchange Similar to this one?
more like the Captain O feed, but yea
17 mins ago, by StackExchange
Q: Editing out ruby tag from ruby on rails question

Marc-AndreSomeone suggested an edit to remove the ruby tag with the reason ruby != RoR, here is the suggested edit. I was tempted to reject the edit, since ruby is a valid tag in my opinion for ruby-on-rails. The user is a good contributor in the ruby tag on SO so I was doubtful what would be the best opt...

there might be huge delay on that feed, since stack2rss seems completely overrun and sometimes returns http 500
or alternatively http 0... which doesn't even exist...
2:14 AM
I was just thinking about the name... I totally misread your response to Phrancis as the actual answer to his question... :-)
lol http 0
Q: Partitioning comments by date

Public Display NameI have a list of Comment objects comments. Each Comment has several properties, one of which is the date the comment was posted. I've sorted this list by date and there is at least 1 comment per date in a range. I would like to loop over comments and for every date, create a new list of comments...

Q: Implementing a memory scanner in python

LiorI'm trying to implement a memory scanner in python. The problem is, it's too slow. What it does it gets a number from the command line and compares it to every address, then writes it to an output file. How can I improve my algorithm? import ctypes as c from ctypes import wintypes as w from stru...

Q: Deeply extract all used symbols from a hash of nested symbols in an array

ProGMI have a nested hash of symbols like this: { a: { b: :c, d: { e: :f } }, g: :h } I want to build an array that contains all symbols used in the hash, both keys and values, in any order. For the example above: [:a, :b, :c, :d, :e, :f, :g, :h] Is there any simple, fast...

Q: How do I condense my JavaScript into something smaller?

aussiedanI have got my JavaScript working as seen here: https://jsfiddle.net/yLg1qs04/3/ But how do I condense/shorten it so that it's not repeating itself so often and taking up so many lines? $( '#mcnumber' ).keyup(function(){ //when a user types in input box var mcnum = this.value; if ( mcnum...

Q: Implementation of MVC in Java

samcp20I've followed several guides on how to implement MVC in Java, and so far I've come up with the classes shown below. From my understanding, MVC follows these guidelines. The Model should be independent and unaware of the View and Controller. The View should wait for interaction from the user and...

Are all those migrated just now?
@holroy no that's just the feed catching up
2:16 AM
Would it be an idea and/or difficult to detect crossposts automatically?
that's a huge thing...
especially since cross-posts aren't necessarily verbatim
and they don't have any defined timeframes to check
but you could try and write an extension for Duga
And not necessarily the same OP name
^^ let alone the same associated network profile
I guess it has at least two sides: 1) Would it be interesting to have the cross-posts posted? and 2) How to detect them somewhat precisely?
ad 1) ... it would definitely help to make the mods aware and reduce administrative cost
ad 2) ... hard.. like really hard
2:19 AM
I do believe it would be hard to detect precisely...
especially since SE API doesn't support full-text body search for literal matches
I think @Phrancis has written a cross-site query that could find some cross-posts
I did some time back but it was pretty spotty
Regarding 2) it could possibly be interesting/helpful to connect logic from Duga into the mix, as I suspect a lot of the cross-posts comes as a result of CR being mentioned on the post...
Actually it's not too bad, for educated guesswork
@holroy oh it definitely could be very interesting yes. feel free to hack away at it.
IIRC Simon has Duga packed into a Docker container now
2:23 AM
@holroy See the SEDE query, I have a column which looks for the presence of a Duga comment
Just scroll to the right for some interesting stats
@Phrancis HeHe... Great minds think alike... :-)
But it does make a few assumptions, namely that the cross-site users have the same parent account on SE, that they were cross-posted within a certain amount of time (120m), and that the character counts of the body are no more than a certain amount of difference (1000)
@Phrancis you are checking rev0, right?
Should I? How would that change the assumptions?
that would get you closest to the original author's intent, I'd say. Consider removed salutations that the author just adds back again, code-edits and similar ...
Then again the query is probably too simple to get to the real meat of Cross-Posts. It catches some easy ones, but misses the creepy hard ones x-posted after days and with a few cleanup edits
2:33 AM
(also, the fact that it's last-Sunday old is not too useful)
Q: Calculating distance with Euclidean, Manhattan, and Chebyshev in C#

Jesse GloverI am by no means proficient at being able to take mathematical concepts and converting them to code. I was wondering if you guys could look at it and make suggestions on how I could fix it or if my thinking is correct on these. I used a combination of the wikipedia pages for each of these as well...

@Silver: Please show us the exact code you're using for sqs-consumer, and we may be able to help you improve it. You should ask a new question for that, possible at Code Review. — Bergi 19 secs ago
Cross-posted on Code Reviewholroy 1 min ago
2:48 AM
@Duga Added cross-posting comment on both ends...
Apparently my swag is supposed to arrive today
3:01 AM
so my text-based browser-based MMORPG is consuming 50% of all the RAM chrome's using right now. Was not expecting that.
@Zak That sounds interesting.
Monking BTW
Q: Python errors are worthless but too valuable to throw away

NodakI just fixed some problems in a project GPS3, a python 2.7-3.5 interface to GPSD. There are two functions that iterate the gpsd socket response and unpack the JSON object into the python dictionaries with names and values of that object. The problem is occasionally there are artefacts in the U...

Q: Reduce loops in this code

Crazy NinjaI have wrote this below code according my requirement. But after finishing the code, it looks there are too many loops. I have reduced as much as I can. Can you find any improvements that I can made to this method? private TheatrePlanResourceData[] buildTheatrePlanResourceData(Map<Long, List<T...

This question is not a good fit for this site. You have working code that you feel is "sloppy", and you're asking for nebulous ways of making it "better". These are ambiguous terms at best, and not really the kind of question Stack Overflow is suited for. The users suggesting code review are completely correct to do so. Instead of resorting to profanity and insults, why not try their advice. — meagar ♦ 13 secs ago
3:24 AM
@CaptainObvious That is truly an odd one... have no idea what to think of it
@Phrancis What, no VBA?
@Zak Did I leave that tag out?
Hm I sure did :|
@Zak Hey look what I found: CR - SO
1 hour later…
4:47 AM
The code you've provided doesn't show how values are assigned to the player's inventory. More generally: I'd strongly recommend that you run your code past the Code Review Stack Exchange. There are some rather serious issues with your current design which will make further development very difficult. — duskwuff 30 secs ago
Q: C++ - If statements not working! SIMPLE

Sketchings#include <iostream> using namespace std; int main() { const int player1 = 1; const int player2 = 2; char value_1, value_2; cout << "Player 1 enter R, P, or S: " << endl; cin >> value_1; cout << endl; cout << "Player 2 enter R, P, or S: " << endl; cin >> value_2; ...

5:08 AM
This is the guy who took my picture at the job fair: linkedin.com/in/ryanpedersonphotography
Q: Duplicate Line Finder

ShadowI recently wrote a program that reads a plain text file, and compares every line and alerts you if any are similar, based on a float value that you pass in to a function. import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.*; public class Dupli...

I'm trying to find my picture here: ryanpedersonphotos.com
Deep navy sweater, white shirt, and red tie.
5:35 AM
OK, I found myself.
Q: X86-64 Assembly Problem With Comparison and Jump If Instructions

FhibliThis is homework so no direct answers please. (I know this isn't very efficient). I have to convert a signed integer to its ASCII encodings using x86-64 assembly. I've been given a subset of instructions to use as well. What my main question is why my jump if instructions are not working as I ex...

Q: BootStrapper/Initialization engine for a WCF hosted application

AgaloThis question is regarding Recommendation for Improving Performance and Manageability of a WCF hosted application by creating a BootStrapper/Initialization engine. I am working on an Application, which acts as a Façade and internally communicates with a couple of Remote WCF Services, Java web se...

6:25 AM
It's possible that this code dump would be better suited as a [performance] question at Code Review - Excel. Read their What topics can I ask about here? and consider migrating the question over if you feel it is a good fit. — Jeeped 23 secs ago
Hi Jeeped. Thaks for your suggestion. I was wondering how can I move to Code Review - Excel as I'm new to here. — klpw 5 secs ago
This question is more appropriate for code reviewGuy 40 secs ago
6:56 AM
If you click edit you can copy this question's source to Notepad in prep to creating another queston on Code Review. This question can then be deleted. When you post on Code Review, add some narrative about what this code actually accomplishes. Adding a link to some sample data would be appreciated; it's tiresome to have to reproduce data that may not even be accurate for testing purposes. — Jeeped 12 secs ago
Afraid SO isn't really a great place for "what is the best approach" style questions. You might also have a peek at the Code Review community, though they have their own set of rules about posts too, so be sure to check with their FAQ / meta / chatrooms before posting there. — Jeroen 40 secs ago
7:19 AM
Q: splitting multiple joined words, port from perl to PHP

ManiThough i have never worked on perl, not even once. I have ported the perl code into PHP and it seems like giving a correct result. But as I am going to use it on production server. I want this code to get it reviewed, please let me know if there is any problem in the porting from perl to PHP. ...

Q: C++ default_random_engine

Ritchie ShatterMy program is to produce random two digit numbers. The issue I am having is that when I call multiple instances I get the same number sequence. However, each instance must be unique. How do I accomplish this? #include "rowarray.h" #include <iostream> #include <random> RowArray::RowArray(const ...

7:36 AM
My swag arrived :)
Thanks @StackCodeReview! Makes all those reviews of shoddy PHP worth it. https://t.co/vjPwpxFebq
7:55 AM
Thanks @JNat for handling our swag :)
You're welcome! Thanks for being awesome!
8:06 AM
I went with the even easier solution, but you are right, I will implement the proper solution soon during a code review. — SoundShock 16 secs ago
monking @all
@Quill gratz
8:22 AM
Monking @all
Monking @mast
Monking @Mast
Monking @DanPantry
@DanPantry see ya later ;)
8:38 AM
No, I meant, it's a monking train :)
Q: Creating Front-end for Django app

Amandeep SinghCurious to know about best project structure to server front end HTML for Django app Current known methods: Use the method classic way as in Django docs where each app has static and template folder having all pages associated with the app and views created for rendering all pages. Here all re...

monking @Dan
Monking @all
8:55 AM
This question should be posted on Code ReviewZwoRmi 29 secs ago
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: HTML Pagination Generator
Another reason to hate TFS
Labels (TFS' versions of tags from git) are shared across the entire collection of projects, rather than just limited to the individual repository
IOW, we now have to prefix our labels with the project name (Project-1.0.0) because TFS is dumb, because otherwise version 1.0.0 of project A will overwrite the label of version 1.0.0 of project B.. even though they are versioned completely separately
9:20 AM
Q: GPSD socket connection and decoding JSON into Python dictionaries

NodakGPS3 is a python 2.7-3.5 interface to GPSD. I've stripped back everything to two classes. #!/usr/bin/env python3 # coding=utf-8 """ GPS3 (gps3.py) is a Python 2.7-3.5 GPSD interface (http://www.catb.org/gpsd) Defaults host='', port=2947, gpsd_protocol='json' GPS3 has two classes. 1) '...

10:09 AM
Q: Better way to loop through current and next element

Johnny000Let's assume I want to iterate over a list and want to check the current item against the next item. The way I do it for now is like this: ListIterator<String> iterator = myStrings.listIterator(); while (iterator.hasNext()) { String currentString = iterato...

hello @DJanssens
Hi @DanPantry, how's it going? :)
Pretty good, just wrote out a roadmap for the upgrade path for our internal app. You?
Just woke up :)
I am jealous
lol, there's a line of code in this library..
scope.$watch(attrs.kDataSource, function(mew, old){
The authors couldn't use new as a function parameter name, so they used mew instead
10:21 AM
hey @skiwi
10:49 AM
Q: Optmize this piece of code to get nested property

advapiI've the following scenario, I've got some viewmodel that need to persist their state on disk. I've defined a custom attribute as [AttributeUsage(AttributeTargets.Property)] public class FilterPesistableAttribute : Attribute { public string NestedProperty { get; set; } } This attribute i...

@DanPantry Staryu
11:06 AM
Starmie :D
Q: Observer pattern implementation in JavaScript

Muhammad ArefI'm working on redeveloping a running project, and the main goal is to enhance the JS code as much as possible. I'm using the observer pattern to watch the window events like scroll, and resize The following is my implementation: module.exports = { // Watch window scrolling/resizing, then...

@CaptainObvious cringe
why implement your own instead of using the million imlpementations on npm
Sep 4 '15 at 12:05, by Mast
Oh help, here come the pokemon jokes.
I'm voting to close this question as off-topic because it is asking for an improvement to working code. ask on codereview.stackexchange.com — Daniel A. White 14 secs ago
11:29 AM
Q: Verobosity vs simplicity in controlle <->r handler relationships

Mark KaplunI have an need to handle events when they happen. the design so far is to have a controller which will be notified about the event. When the controller receive the even it invokes the relevant function of handlers which were registered to it. The complex requirement is to have a dependency betwe...

12:19 PM
Find 10 differences questions should be asked at code review I think. — Sinatr 43 secs ago
@Duga wat?
Q: Retrieves Data From Various Excel Sheets Online, sorts, edits, and Analyzes said Data

StormsEdgeThanks in advance! I'm fairly new to Excel VBA so I welcome all criticism and advice! This is a routine I wrote to streamline analysis I need to do that originally took 1.5 hours and now takes about 4 minutes total run time. I'm fairly certain this part of stack is for code review, but if this...

Q: C# tail recursive call vs iteration (loop)

denisI'm developing a poker app i almost have it done and im looking for improvements and 1 of the things i wonder about is should i change my main looping method method ? Currently it's looping by using tail recursive call. However friend of mine suggested me to switch it to a iteration since it's us...

@CaptainObvious Lots of stuff going on there. And god, all the abbreviated names.
12:55 PM
What all comes in the swag pack, by the way?

« first day (1026 days earlier)      last day (1366 days later) »