« first day (1107 days earlier)      last day (2901 days later) » 

12:00 AM
RELOAD! There are 2301 unanswered questions (93.2629% answered)
 
12:50 AM
0
Q: Parameter estimation of Poisson model using optim and nlminb

fsbmatI made the following code to try to estimate beta0 and beta1, but the values that meeting to beta1 with optim () and nlminb () are far from the true value. Already checked the likelihood and the gradient formula, I doubt if the programming of the gradient in the code is correct. I doubt also havi...

 
Evening
 
1:27 AM
0
Q: XmlDeserialization issue on construction assignment

ssashok100 down vote favorite I have a complex XML data and i am deserializing it into the object named "Customer" by using XmlSerializer. public partial class StringType { private string valueField; private string priorValueField; [System.Xml.Serialization.XmlAttributeAttribute()] public string...

 
1:38 AM
1. Post your program directly in your question as text instead of providing links to program. 2. They say working code should go to Code Review Stack Exchange. — MikeCAT 53 secs ago
I'm voting to close this question as off-topic because stackoverflow.com is note a code review service for code hosted on some other web site. — Sam Varshavchik 25 secs ago
 
1:52 AM
I'm voting to close this question as off-topic because it is about improving or optimizing working code. It is more suitable for Code Review. — Ken White 20 secs ago
 
2:15 AM
@KenWhite: that's fair. The way this one is worded is very much code-review style. What I should have said is that it could have been on-topic here if it had been asked differently. There are lots of questions like "how can I do XYZ with SSE intrinsics, like this naive scalar code but faster". There's a lot of x86 performance / asm optimization stuff on SO already, but maybe it would be good to have some on codereview.SE, too. — Peter Cordes 43 secs ago
 
0
Q: WebAPI Authentication

coderSource can be found here: https://github.com/jeremyspatrick/AngularWebApiEFExample WebAPI is rest based. The user logs in by calling the Authentication Controller and expects a 401 if unauthenticated or a 200 with a session token in the header. Session session = null; try { session = Model...

 
Yesterday, we got 12 more accepted answers, 6 more questions were answered, 25 more answers were posted, 72 badges were earned, 84 comments were left, 8 more questions were asked, 2 more questions were unanswered, 11 users were created, and 188 votes were created.
Our question answer accept rate went up by 0.0213%.
Our question answer rate went down by 0.0043%, and our answer accept rate went up by 0.0056%.
 
3:01 AM
0
Q: Remove overlapping n-grams

minerguy31I'm trying to write a compression algorithm that works by splitting the input into n-grams, and it's working, but I've start to run into a problem. This piece of code is supposed to remove 'overlapping' ngrams - i.e "hello ther" & "ello there" are overlapping and it removes the one with a lower s...

 
@KenWhite: Agreed; it's the same deal with Unix shell script questions scattered across unix.SE, SO, SuperUser, and AskUbuntu.SE. I'm somewhat sympathetic to this question, though, because a good answer will throw away almost all of the OP's code. Also, it turns out it had at least two bugs. (And unless I'm mistaken about the ret 12, breaking the caller's stack pointer should have been detected with testing by any caller that returned instead of calling exit(). Still, I guess codereview is still the right place to ask if you think your code is right, even if your test missed bugs.) — Peter Cordes 57 secs ago
 
3:49 AM
ugh
nullreferenceexceptions are really obnoxious
 
4:15 AM
possible answer invalidation by Jamal on question by LoneXcoder: codereview.stackexchange.com/posts/16159/revisions
 
5:10 AM
0
Q: Deck of cards design

thalaivvaCan someone please review this design I created for deck of cards in Java? package prep.design; import java.lang.reflect.Array; import java.util.*; /** * Created by rohandalvi on 5/14/16. */ public class CardDeck { private ArrayList<Card> cards; CardDeck(){ cards = new Arra...

 
 
1 hour later…
6:15 AM
-1
Q: minion game from HackerRank

Rohit Malgaonkarhttps://www.hackerrank.com/challenges/the-minion-game a link on this site related to the game "The Minion Game" challenge I am getting the same answers for banana (stuart =12) and (kevin=98) for guavaisanotherfruit for the following python code. It fails on the hackerrank site. Thanks! # Ente...

 
 
1 hour later…
7:29 AM
0
Q: Livelock simulation

icemanI want to understand how Livelocks happen and also how to translate my thought in to working code. I have written the following snippet to simulate a livelock between two persons passing each other in a narrow gallery: import java.text.SimpleDateFormat; import java.util.Date; import java.util.co...

 
8:00 AM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Angular UI Bootstrap Modal scope
 
8:20 AM
You should provide practical examples because it's unclear what precisely you mean. And if you're soliciting code review feedback, the codereview.stackexchange.com site might be a better forum. Anyway, if you're looking for discussion of use of protocols in Swift, see WWDC 2015 video Protocol-Oriented Programming in Swift. — Rob 53 secs ago
 
8:55 AM
possible answer invalidation by Alex Janzik on question by Alex Janzik: codereview.stackexchange.com/posts/128362/revisions
 
 
2 hours later…
10:26 AM
in The Nineteenth Byte, 30 mins ago, by Mars Ultor
> I'm about to commit a crucial bug - Quill 2016
 
0
Q: Candie distribution algorithm

BlackMI am studying algorithms and I solved this problem under Dynamic Programming section: Alice is a kindergarden teacher. She wants to give some candies to the children in her class. All the children sit in a line ( their positions are fixed), and each of them has a rating score according ...

 
11:06 AM
@FalAlexandr but now you have access to computer (or online IDE) so you can test it. Anyway questions like "is it good from point of view .." are most likely primarily opinion-based which makes them off-topic on Stack Overflow. But you could ask "how can I improve this code which purpose is to [description of task]". If you are sure that your code works then you can even post it on codereview.stackexchange.com, if there is some problem with code then Stack Overflow is OK. Also two separate tasks should be split in two separate questions. — Pshemo 24 secs ago
 
11:34 AM
in SO Close Vote Reviewers on Stack Overflow Chat, 1 min ago, by Quill
There's a sister site named Code Review, but there's a few requirements for Code Review:
I just made a "feel free to join us on CR" comment in a SO chatroom, btw
 
Monking
I am curious...
14
Q: Java_home in Maven

One Two ThreeWhen I ran mvn -version, I noticed the java_home points to ...jdk\jre (as shown below). Is that wrong? Isn't it supposed to point to ...\jdk.x.y.z (without the \jre)? If so, how do I reset it? (In global %java_home% points to the jdk directory) C:\Users\Owner>mvn -version Apache Maven 2.2.1 (r80...

I just received the announcer badge on this ^^
 
where did you post the link?
 
Share a link that is visited by 25 unique users
@Quill I have no memory of this
 
Maybe someone copied their userlink and screwed up the ID in the string
it goes like site.com/questionId/userId
 
0
Q: First attempt at TDD

Anthony StiversThis is the business layer for an MVVM application. It's my first attempt at TDD. Uses xUnit, NSubstitute, and SQLite.Net-PCL library (https://github.com/praeclarum/sqlite-net). Any tips are appreciated. https://gist.github.com/tstivers1990/0433aa8903b23dc65a00579ed271ed9f

0
Q: Redesigning schedule value hierarchy

dabadabaRight now I have a class hierarchy to represent schedule values that I don't really like. A schedule value holds the representation of a slot in a two dimensional schedule. My first class is ScheduleValue and it is made for schedules where the first dimension is the players and the second one t...

 
11:55 AM
Do someone here have Windows docker java and gradle to test something with me ?
and hey everyone btw
 
0
Q: an amature java problem with wumpus game

Chase LiuI'm a newbie to Java, having problems with some code, please HELP ME!!! I have a super class GameItem public abstract class GameItem { private int x,y; char[][] board = new char[4][4]; private char C; public GameItem(char C) { } public void display() { Random random = new Random(); in...

 
12:15 PM
0
Q: What API improvements do you see for that component

JNSI am developing a WPF component that can be used to create interactive tours for WPF applications. To further improve the API in terms of usability and intuitiveness, the input of other developers is needed. The following feedback would be helpful: Do you see potential to improve naming? Do yo...

 
12:35 PM
0
Q: Find shortest paths using Dijkstras in a matrix

aurelThe problem is as follow: I have a matrix with impassable fields those are marked by the input. There is also a castle which reaches up the right side of the matrix. I have to find how many paths can there be in such a matrix, starting on the right above the castle and terminating on the right be...

 
1:30 PM
0
Q: Grammar for loops and equality

Programmer 400I used lemon parser to write rules for while and == . The == rule looks like: expr(A) ::= expr(B) EQEQ expr(C). {if(B==C) {A=1;} else A=0;} I call the rule from my program: if (strlen(c) > 2 && !strcmp("==", c)) { Parse(pParser, EQEQ, NULL); } Like that I can evaluate expressions...

 
1:46 PM
So, I just found that this old meta is a possible duplicate, but it may be better to handle it some other way. Maybe point the old question to the newer one instead? Idk. Will let the mods figure it out.
12
Q: Questions about interfaces, protocols, and APIs

nhgrifAre questions about interfaces/protocols and APIs on-topic for Code Review? And when I say "protocol", I mean this in the Objective-C/Swift (and potentially other languages) version of the word, which is basically the same as a Java interface. There is this meta discussion: “Code not yet writ...

Cc @Mat'sMug @Jamal @200_success
 
I was the one who made the "referral" to CR:
2 hours ago, by Quill
in SO Close Vote Reviewers on Stack Overflow Chat, 1 min ago, by Quill
There's a sister site named Code Review, but there's a few requirements for Code Review:
However the user was hesitant about posting
 
2:07 PM
@RubberDuck You do know it references back to the post you found?
 
2:22 PM
lol
wat
wall of functional text
looks so sexy though
 
@Vogel612 Same topic is all. Wasn't sure which should be the dupe.
@JeroenVannevel That's funny. I've been itching to get back into F#.
 
looking at this code makes me want to learn it as well
it honestly looks like chinese to me, as someone with OO/Proc experience
like.. | MethodName "GroupBy" [|_; _|] -> true
wat
 
Yeah. Me too. It takes a minute to change your thought process.
 
I assume it's about matching a condition where the method name is "Group By"
but still
syntax is entirely foreign
 
I've got some very math heavy code at work I'd like to convert over.
@JeroenVannevel this won't help with the syntax, but it will help with the thought process.
 
2:28 PM
really shows the power of .NET though. That's a library written in F# that can convert C# and F# LINQ queries to a procedural representation
@RubberDuck thanks, I'll put it on the TODO list
 
He's the guy who runs FSharpForFunAndProfit. (Great site btw)
@JeroenVannevel Well... That's kind of the thing. Linq is very much a functional approach already.
foobars.ForEach(Print)
foobars |> Print
 
@JeroenVannevel sounds about right. Doesn't use the standard Predicate idea, but pattern matching
 
@Vogel612 Coming to C# soon.
 
pattern matching is largely scrapped
 
One could probably shorten it to an actual Predicate, instead of a case
 
2:31 PM
only a few barebone aspects of it are left
 
They aren't bringing it to C# after all?
 
(fun methodInfo ->
       match methodInfo with
       | MethodName "GroupBy" [|_; _|] -> true
       | _ -> false) // TODO: reflection type checks
^^ that's Pattern matching at it's finest
a Predicate would be:
 
@Hosch250 they are, but a very minimal version
 
Can't say I really understand pattern matching yet.
 
(fun methodInfo -> (eq methodInfo.MethodName "GroupBy"))
 
@JeroenVannevel I just want Tuples to get first class support.
 
You mean hiding the ugly abstraction under the rug?
 
Oh, not permanently scratched, just too much to get done for C# 7.
 
@Vogel612 Yeah. Actually. Why should I need to define a struct for every pair of values?
 
@RubberDuck I'd prefer to see tuples gone to be honest
It introduces a form of weak typing in the language
I don't like it
 
2:36 PM
@RubberDuck You don't... use Tuple.Create(val1, val2)
 
Item1 & Item2 don't tell me anything
I want nice, lovely names for my properties
 
@JeroenVannevel Tuples are strongly typed and since Generics are almost useful in C#, it's not like it's a problem IMO
 
var name, var id = GetMeMyTuple()
 
@Vogel612 sure they're strongly typed. I suppose "weakly named" is a better phrasing?
2
 
@RubberDuck that's two assignments at once. also why do you need the variables?
 
2:37 PM
@Vogel612 that's the new native tuple feature in C# 7
same way as in Go
return type becomes public (int, string) MyMethod()
 
I think methods returning two things at once are an anti-pattern
2
because then your method is getting very close to doing two things at once
there's some exceptions, but not enough to be relevant for the majority of development in what I'd expect C# to be used for
 
It could be useful for adding items to a dictionary (returning key/value), but I don't see myself using it for anything else.
 
@Vogel612 eh, I wouldn't view it that way
it's as if you take an object, take out its properties and just return those barenaked
returning an object is perfectly acceptable
but now people want to just return the values that make up the object
 
I don't know if I'd use it for this, but it could reduce calculation effort in VSD.
 
@JeroenVannevel which is probably a stupid idea, because people will start grouping unrelated things together
 
2:42 PM
@Vogel612 I don't disagree with that, but I prefer it to out args.
 
not that they don't in objects
 
@Vogel612 yeah, I don't like it much either. Maybe I'm just being too conservative and very interesting use cases might pop up
like @RubberDuck's out for example
I could see it there
 
But why solve the "same problem" again?
 
The solution of out introduced a readability problem
maybe this fixes it
 
Maybe. Maybe not, but it will make code more succinct.
Less code generally equates to less room for things to go wrong.
One place I would really love to use Tuples more is for db layers that call stored procedures. Often they return a code and a message. Sure, I can create a little struct to return, but it's a fairly useless object.
I do it though, because it's better than the existing tuple.Item1 tuple.Item2 junk.
 
2:52 PM
I could imagine some sort of dynamic object that gets translated to a type at compile time
then that could take the place of Tuple
perhaps with a few restrictions like no subtyping and all that fancy jazz
like a crossover between an anonymous type and a tuple
unnamed type + named properties vs named type + unnamed properties
 
@SimonForsberg Duga seems to be down. Is that correct?
 
3:12 PM
Something like that @JeroenVannevel.
 
0
Q: Best way to Implement Android Splash Screen?

VIRAGI have implemented the Splash Screen using below code, there are many options available in Android to hold/pause the screen for few seconds and then launch the next screen. I am very enthusiastic to know the other possible ways to write the Splash Screen code which is more fundamental. Can anyon...

 
3:28 PM
@RubberDuck nhgrif's question actually cites the older question. So, it's asking if the closure of NikitaB's question had new precedent.
 
Zak
It's working! :D
My VBA is talking to my server and passing over half a million records and not crashing!
2
(yet)
Downside: It's only going at about 1M records/hour. I've got ~24M that need doing. Maybe, now that I know it's working, I'll just dump everything into a CSV file and let the import wizard figure out how to do it faster ^^.
 
So, nhgrif's question is not a duplicate of the old one. The old question might be a duplicate of nhgrif's.
 
3:57 PM
@Zak that sounds like a reasonable plan
1M per hour seems horrendously slow though
 
Zak
@Vogel612 Well, it is executing a new INSERT INTO statement for every single line...
 
yea that sounds slow
it's better than opening a new connection, but it's gotta be slow as hell
You should go the extra mile for the csv import.
it should take you less time to figure out the import, export and import the files than having that code run straight for the next 24 hours
 
Zak
Yeah, I wasn't particularly concerned with optimising it at this point, just wanted to confirm that everything I thought I knew how to do did, in fact, work.
Plus, it's only 24M for getting all the data into it. Going forward, I shouldn't need even a fraction of a fraction of that at any given time.
 
4:20 PM
@200_success That sounds reasonable to me. Nhgrif's question is the newest community consensus. Well, closest thing to consensus we ever reached on the topic at least.
 
Zak
4:54 PM
@Vogel612 Yep. Just a straight manual import from Excel is 15x faster. Did try CSV/text but it kept hitting character exceptions.
> On a related note, who on earth names their company
> ! LTD
 
5:22 PM
@Zak That shouldn't be that many problems
 
5:43 PM
0
Q: Java: rotate image 90 degrees

danielI'm trying to write a method to turn an image 90 degrees to the right. I already checked other posts about this topic and none of them seem to help me resolve my issue. My code seems to work on paper but I don't know why the j-unit test won't go through. Why isn't my j-unit test going through? m...

0
Q: Embedded Database or XML files

Emmanuel IstaceI'm developing an application with the following requirements in terms of data storage: A set of read only data, around 50Mb in json. A set of read-write data, mainly references to the read-only set, shouldn't be higher than few MB of text data in the biggest scenarios. So I hesitate between ...

 
6:01 PM
0
Q: Largest common subsequence algorithm in C++

sjsawyerI'm relatively new to C++ and am trying to learn good programming practices and habits from the beginning. The code I wrote finds the largest common subsequence between to strings (and output the resulting subsequence, not the length of the subsequence). I was wondering if there were any improve...

0
Q: Simple database design

user3744187I have these tables in my DB (SQL Server) : Question - ID (PK) - Label Answer - Id (PK) - QuestionId - Label UserAnswers - ID (PK) - AnswerId - UserId Basically, a question has answersand a user can give an answer to a question. Does this schema look correct? I'd like to query this DB to ...

 
Zak
6:13 PM
Found this in a comment about the Oracle vs Google thing. Pretty much highlights the absurdity of what they're trying to argue:
> Long, long ago a programmer somewhere created the API for printf(). This API has been copied over and over again for the last fifty years.

Copyright is automatic, does not need to be applied for, and it lasts about 150 years. If Oracle wins [then] the company this programmer worked for is going to own a copyright on printf() with the legal right to go around and demand royalties from everyone who has cloned it. The resulting chaos and litigation will destroy the software industry.
 
Zombies are increasing.
 
6:39 PM
0
Q: Project Euler #9 through #12 in Haskell

arkI'm new to Haskell and practising with some Project Euler. These solutions all return the correct result in a reasonable time, but I'm looking for advice on making my code more readable, cleaner, and overall better style. I'm also wondering if there are some libraries that I should have used to m...

 
cat
7:12 PM
@200_success A) recursion is a form of iteration, and factorial with a for loop is just boring. (anyways, the question's more about array processing and pointers than for loops, regardless of the assigned stuff.) B) Did you... comment... on my deleted question after I deleted it? I deleted it because I found a segfault and forgot my unit tests.
 
@EBrown That graph should be flipped (as in increasing line) for a more dramatic effect
 
lol
I just made a TODO that says "make list"
2
I'm feeling way too lazy
 
7:33 PM
0
Q: WPF/MVVM with Entity Framework, Repository and Unit of Work pattern

MarshallI'm building WPF/MVVM application and I'm struggling implementing Unit of work pattern. The part, about which I'm not sure is UnitOfWork class. Here is my thought: It's coupled with my repositories and MyDatabaseContext. At first impression - it doesn't sound good. But, I think, UnitOfWork shou...

 
Zak
New favourite reason I love my job: They *pay* me overtime to come in outside of work hours (by far my favourite time, and entirely flexible) and teach myself new programming stuff.
I've been at databses and SQL for only 13 hours so far, and I'm already feeling pretty good about building stuff with it. (CR probably helps with that).
 
8:00 PM
Naruto answer; accepted non-selfie answer with 0 score: Checkboxes array to delete images
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Converting UK drams to ounces and pounds in PHP
 
@JeroenVannevel If you got a project called 'list', that would make a valid command.
@Zak Sounds good indeed, nice perks :-)
 
8:42 PM
1
Q: Random playlists program

user_000This is the first program I've created without help from a tutorial. Written in Python 3.4, it gathers a specified number of media files and opens them in the default player (I use VLC on Windows 8.1). Python is my first language I have been learning mostly through trial and error. I am posting ...

 
8:52 PM
0
Q: Little Sudoku Solver

cannibalbobI always have enormous difficulty working out 2d grid addresses (not sure why, I also can't tell left from right :-)) so for me it is easier to work with the List functions. Thanks for any feedback. Tests: import org.scalatest.{FlatSpec, Matchers} class TestSolver extends FlatSpec with Matcher...

 
@CaptainObvious Request for verification that actually works, since I'm not sure. On the other hand, I don't Scala.
 
9:26 PM
@jpaugh PHP (by all accounts not the best designed language there is, personal favorite) is pretty much the only thing that's guaranteed to run on your average shared hosting provider. With the advent of the cloud and the ability to run a much wider variety of environments this will become less and less of an issue, but it probably still is today. Also many of its design choices were made to make it easy for non-programmers to create something - that's also an appealing feature. — Voo 2 days ago
many of its design choices were made to make it easy for non-programmers to create something so... PHP is the VBA of web development then
 
@Mat'sMug No wonder it is universally cursed.
 
@Mat'sMug Just host it yourself.
 
@Hosch250 I feel there's some unhandled grudges there :D
 
LOL.
 
In fairness, if we put the evilness relative to each other, PHP scores worse than VBA. I'd write professional VBA way sooner than professional PHP.
There's no such thing as professional PHP.
It's just a big mess.
 
9:33 PM
My U begs to disagree.
And it is a big mess.
And so is VBA.
I personally think the entire VBA language is one big bug standardized.
 
VBA is less mess than PHP I'd say, but I guess you'd need to be an expert in both to be sure.
shudders
2
 
from my limited experience in both languages I'd tend to agree with @Mast
 
What the heck? I can't install any Nuget packages since some are missing, and can't uninstall any because some are missing.
Unfortunately, when I tell it to install the missing one, I get another error because more than one is missing.
 
There's no flag to install every missing dependency?
As in, recursively?
That's what real package managers do.
 
That is what it usually does.
 
9:36 PM
normally you just build the project and it fetches whatever is missing
 
I think I broke my nuget package manager completely.
 
That would explain it.
 
I wonder if some of these were removed from nuget.
 
NPM fiasco 2.0?
 
9:56 PM
Apparently, I wasn't up-to-date with my NPM. I updated it, and it works now.
I don't know if it thought I was on a version of VS that couldn't handle it, if it was just broken, but the install fixed it, or what.
 
10:13 PM
0
Q: hackerrank challenge:sherlock-and-the-beast

Rohit MalgaonkarCode is working and giving correct solution but not passing all test cases. Thanks! https://www.hackerrank.com/challenges/sherlock-and-the-beast Explanation For , there is no decent number having digit (so we print ). For , is the only possible number. The number appears three times in this ...

 
10:23 PM
0
Q: SEO Keyword Counter

user1822824I wrote a simple JavaScript SEO keyword counter. The user enters their SEO keyword in one field then enters their webpage text in a textarea field. It then calculates (in realtime, as the user types) how many times the keyword appears in the web page text. It also calculates the keyword density. ...

 
user image
5
 
lol
 
10:49 PM
0
Q: how to avoid WET in this situation?

Bamboomymy first question here; I have those three methods: Node mirrorDiagonally() { Node result = new Node(); for (Connection connection : connectionz) { NodeCoordinate mirrored = connection.getTarget(this).mirrorDiagonally(); <<< connection.addCouple(result, mirrored); ...

 
> Write Everything Twice
 
Curious how WET and DRY mean the same thing
 

« first day (1107 days earlier)      last day (2901 days later) »