« first day (831 days earlier)      last day (3484 days later) » 

00:00
RELOAD!
There are 1441 unanswered questions (94.4819% answered)
@JeroenVannevel getting it to work with other people's code I guess?
@Mat'sMug What's the regex program you like?
00:18
@Mat'sMug Implementing the code fix
the analyzer is like saying "shit's wrong"
the code fix is actually telling how to solve it
is entity framework easy to understand and/or learn?
This would have been a good Code Review question: code review.stackexchange.com — Greg Burghardt 40 secs ago
It has a learning curve
certainly when you map the data
but it's really interesting and powerful
have I been close to using it on any of my code I have posted here?
euh
Like.. accidentally using EF?
I'm not sure how that would even happen
00:25
@Hosch250 Expresso
@JeroenVannevel I can definitely relate to that :-)
@Mat'sMug I knew it was some kind of coffee.
not Java
0
Q: Army strength based on level and modifiers

Habeeb BaigRight so I was doing a quick project, and sought a quick way to finish one section of my Python code. I handed it in, but I'm well aware that it's bad code, but I was wondering if there was a good way to condense this code into fewer lines. def nGen_army(level, strength, weakness): if weakn...

0
Q: Summing sub arrays (maximal subarray)

Alexandra MirtchevaI have this piece of code, and I want to make if the way I'm calculating the time complexity is valid: void traverse() { int currSum = 0; for(int i = 0; i < original.length; i++) { currSum = original[i]; for(int j = i + 1; j < original.length; j++) { if(max <=...

1
Q: Modified TextBox for Forms Generating SQL Statements in VB.NET

CodeMonkeyAn overview of what I've done: I've Inherited System.Windows.Forms.TextBox and added a few properties to help me out in creating forms that generate SQL statements. I use to create a large function that would check for changes in the TextBox compared to a string. Then it would take text and co...

0
Q: Class for interpretation of capturing groups inside regex

m.cekieraI wrote a class, which intends to work with regular expression (as a String or Pattern object) to get capturing groups of given regex, but it operate on regex. I wrote it to implement in my regex app and it is working quite well. I wanted to make it simple to implement, reusable, and as much as p...

1
Q: Slideshow scrolling photos horizontally using jQuery

wrgrsI've written my own jQuery code to make a little slideshow. Functionally it does what I want but I find that the jQuery animations are fairly jerky and because I'm a beginner in JS and web development I don't really know where to go to improve it. You can see it at http://willrogers.github.io/l...

0
Q: Commission calculation

Andreas HøyerI am trying to improve the performance of the current solution for calculating commission in a betting platform. The following is the code currently used to solve the problem. The primary problem here is the CalculateCommission method, which is ugly and seems to do the same thing multiple times....

0
Q: Netty multi-connection packet handling

user3123545On my free time, I was working on a system that could help some little private companies, like game servers, etc. The last few days I have been working in such small companies, and I noticed that some of them give direct access to their developers to update game servers, restart them etc which i...

0
Q: Quickly passing and parsing variable length float arrays

Seanny123I have this code for parsing for parsing a list of floats of variable length. on_message = function(event_data) { var data = event_data.split(" ").map(parseFloat) var size = data.shift() + 1; while (data.length >= size) { // put the data in a buffer // could be replac...

1
Q: Optimizing bilinear interpolation

DawudI have spent countless hours trying to speed up my bilinear interpolation up. I even tried implementing an SSE version (a double version and a float version), but that was even slower than this version. Does anyone have any ideas? I wrote this under VS2010 and it is intended to be called from M...

0
Q: PyQt4 Tabbed interface

madnozI'm trying to create a simple tabbed notepad type tool, I've got tab creation/destruction going fine, the issue I'm having is that I'd like to be able to parse all of the fields in 1 tab into my clipboard with the ability to do this for both new or old tabs, for reasons unknown to myself I can on...

0
Q: GRE Tunnel Script

Kaveen KI've made this script above for GRE Tunnels and I'd like to know how I can improve it. Also, at the bottom, you'll see "Do you want to forward more ports." I want an easier method of asking this and inputting the info. The method I have right now is lone and not neat. I want to be able to input...

2
Q: Store and manage a fixed amount of things generally

EmzI have an enum let's say with four values. Let's call them A, B, C, D. public enum Categories { A, B, C, D } I then have a Thing which stores something and has one of the values from my enum. public class Thing { public final Categories category; public int var; p...

Wow. That's a lot of posts at once.
00:42
@CaptainObvious 4 hours ago?? WTF @Captain!?
He must've forgoten his coffee.
Choked on a Java bean
is Entity Framework like using models in MVC?
converting tables to objects and then navigating through them...
yeah, sort of
do you have a pluralsight subscription?
I've heard good things about Julie Lerman's courses
01:01
At least the first time you use its conventions
@Malachi EF is like querying any IEnumerable, except the thing hits the db
but in a deferred manner with a couple of cache layers
It's really awesome to use
And powerful
Can get tricky though to setup all your mappings. Likewise, you'll inevitably encounter problems because you don't know the inner workings of the object cache
If only it was just as fast as a straight sqlreader
Whatever you do, do it code-first
@JeroenVannevel I don't think so
you might be able to get a free trial
@Mat'sMug what do you mean? don't attach it to the database before you write the code for it?
01:12
Thanks @dave for the CodeReview suggestion. — Jeff Walden 50 secs ago
375
Q: Code-first vs Model/Database-first

Jakub KoneckiWhat are the pros & cons of using Entity Framework 4.1 Code-first over Model/Database-first with EDMX diagram? I'm trying to fully understand all the approaches to building data access layer using EF 4.1. I'm using Repository pattern and IoC. I know I can use code-first approach: define my enti...

Code first - database first - model first
write the code, generate the db - create the db, generate the code - design the model, generate the code and the db
I like the idea of Code First, but I also like building objects before I need them, so I have a general idea how they look first
geezes, the Tianjin blast is massive
Da watt?
01:25
1
Q: Volunteer Signup Report

AdmiralAdamaI was creating a Volunteer Signup Report report in Microsoft Excel yesterday for my job and I had a moment of inspiration. What if I turned it into a website and made it dynamic? The volunteers sign up, the data is logged in a MySQL database, and then the report is automatically updated for the m...

-1
Q: Can somebody provide a Feedback about this C# code

Edson AlcaláHello, can somebody give me some feedback please. using System; using System.Collections.Generic; using NUnit.Framework; namespace RPGEngine.Tests { [TestFixture] public class RPGEngineTest { [Test] public void GivenAPaladin_WithEspada_Return() { //Arrange var paladi...

@JeroenVannevel woah
right?
my wife just informed me that they had hurricanes and stuff too. is this part of the aftermath
I haven't seen any mention of hurricanes yet
@CaptainObvious well for one thing... private IPersonaje _Personaje; makes my eyes bleed
Some people are saying ISIS, some people are saying it might be a nuclear blast.
01:36
lol
A petroleum storage exploded
ISIS..
ah, apparently the explosion was at an industrial area nearby the port but the actual port continues as before uk.reuters.com/article/2015/08/13/…
I've edited your question to provide a minimum of context. Feel free to further edit and describe each class; see How to get the best value of Code Review on meta. — Mat's Mug ♦ 35 secs ago
@Hosch250 some people are saying 9/11 never happened, that Man never walked on the moon and that Elvis was still alive just a few years ago, too...
@Mat'sMug I didn't say I believed it.
But, often when you hear about major explosions and stuff, it is loonies like ISIS.
02:05
Ugh, this is horrid.
This is definitely going up for review.
This is impossible.
@JeroenVannevel How in the world am I supposed to evaluate (1 << (1 << 3))?
Or values like that.
Is there a way to just evaluate the statement?
consider the ScriptEngine class or something like that. Though I'm not sure if we actually want to go this route
This is the point of complexity where we can just say we don't support it
it's also a really uncommon scenario in the first place
Yeah, but we might as well get it right.
I'd stick to the scenarios we looked at earlier
We can always (try to) go deeper if there's demand for it
02:13
OK.
But, I'm still having a bit of trouble.
Like, (1 << 3) is a binary expression.
So, I have to evaluate that.
And there are the >>, +, -, etc operators as well.
ah right, that involves it as well
Did you look at the scriptengine thing?
Yeah, we need to include a couple more references. I think I need to get them from NuGet - I can't find them in the list.
those might be outdated
I recall something about a scripting engine for Roslyn they were working on though
Hmm.
I have to do the dishes now.
See you later.
-1
Q: How to use anaconda for python web program

saikat123I have static html page, want to create web page using anaconda. Is it possible ? If yes, how to do it ? I am trying to keep it within scripts folder and run it using localhost. Both are not working. Please anyone suggest how to use it .Thanks for your suggestion.

02:34
Monkevening
0
Q: BadNeighbors - Topcoder puzzle

James FargotsonI'm learning DP, following the topcoder guide. I just solved the BadNeighbors puzzle. It passes all the test cases, but I don't have much experience so I don't know if I did it well. Each of the town's residents is willing to donate a certain amount, as specified in the int[] donations, whi...

So, how do I actually Run this?
@Phrancis F5
except the window will immediately close
add Console.ReadLine(); in Main
F5 does nothing :o
window will close when you hit ENTER
...you're building what project type exactly?
02:49
@Mat'sMug I think you can do something like SHIFT-F5 or CTRL-F5.
I think it's called a generic "solution" - Basically an empty solution, whatever that's supposed to mean
a solution is just a container for projects
right click the project in the solution explorer, go to its properties
in the [Application] tab, there's a dropdown that says "Output type:"
select "Console Application" and save
that "Attach..." button should say "Start"
I don't see any of those things under properties :o
02:54
lol, there's no project in your solution
Guess it's more a problem than a solution, isn't it X)
File > Add > New Project (or right-click the solution and Add > New Project...)
select "console application"
^^ a solution is just a container for projects
0
Q: Seq[Either[A, B]] => Either[A, Seq[B]] Function

Kevin MeredithI wrote a function of type Seq[Either[String,Int]] => Either[String, Seq[Int]] scala> xs res11: List[Either[String,Int]] = List(Right(1), Right(55)) scala> acc res12: Either[String,Seq[Int]] = Right(List()) scala> xs.foldLeft(acc){ (acc, elem) => { | acc.right.flatMap(list => elem.rig...

welcome to .net BTW!
@Mat'sMug I HAVE NO IDEA WHAT I'M DOING™
03:03
class Hello has no name member
remove this.name = name;
wait
lol
public Hello(String name)
that's a constructor
it won't return anything
Oh. Right... :\
it's really not all that different from Java
Yeah, I suck pretty much that bad at Java too. Except with C#, the braces are messing with me in addition to everything else lol
03:05
you'll want to assign a private field from the constructor parameter (this.name was fine, only thing is the field was missing)
and then you'll want some public string Greet() method that returns "Hello + this.name + "!";
that will give you a Hello class.
now, a class is not an object - it's a blueprint for one. to get an actual object you need to create an instance of the class - in Main you'll do Hello myInstance = new Hello("Phrancis"); to get that
and then Console.Write(myInstance.Greet()); will do what?
Ah ok, let me tinker around and try that
This "might" work, except I can't tell because the console doesn't show long enough for me to see it -.-
0
Q: Converting ASCII to an image

QPaysTaxesSo after I finished my fractal generator, I decided that text is ugly, at least compared to pictures. So I made a text-to-picture converter: require 'chunky_png' require 'etc' require 'pathname' class Array def chunk(chunk_size) self.each_with_index.with_object(Array.new(size / chunk_size...

@Phrancis add Console.ReadKey() or Console.ReadLine() at the end of Main
03:20
Sweet! Now I can break things in a whole new language!
I have to say, Visual Studio is a pretty sweet looking IDE
2
@Phrancis and you ain't seen nothin' yet
2
0
Q: Generating an array of unique values of a specific property in an object array

David GrinbergGiven a table represented as a javascript array of objects, I would like create a list of unique values for a specific property. var table = [ { a:1, b:2 }, { a:2, b:3 }, { a:1, b:4 } ]; var groups = _.groupBy(table, "a"); var array = []; _.forOwn(groups,...

@Mat'sMug Thanks for reminding me of that song ;p
Now it's gonna be stuck in my head for hours
here's something.. here's something you're never gonna fffffffffff..fff..fffffforget
:p
I did get to do some Sql today, finally, after two days spent mostly in training and meetings
03:27
Back To Original eh
BTO
yeah was bad
shh
backs away slowly...
03:32
so how's the new job?
Love it.
Best part is free unlimited Keurig coffee I finally get to write SQL for a living, among other things
free coffee is always a good sign
and I take "among other things" as "no more frakkin' borked-to-death VB6 crap-app blowing up for every possible reason out there"
SNAP
^that
Oh, and not having to talk to customers is nice too.
03:38
@Mat'sMug Hey, use C# 6!
public Paladin(string name, Item item)
{
    Name = name;
    Item = item;
}

public string Name { get; }
didn't occur to me - thanks!
You can do public string Name { get; } = "Me"; too, or something along that line.
TBH that's rather ugly
but yeah I saw that before
I like it.
I get it, but I go "wtf" every time
maybe I'm just not used to 6.0
03:47
@Phrancis are you.... remoting to work.... now?
Not now no, but on my work laptop; just saw I still had that thing open
they gave you a decent one?
(mind you, the entirety of what you see was completely absent when I got this thing handed to me earlier today)
Table aliases P, M, D, etc. no variables at all, magic numbers everywhere, not a sliver of documentation :)
oh wow
keep it up!
03:51
#JobSecurity
#JobSecurity #JobSecurityDoneRight
2
@Mat'sMug brand new Dell Intel CORE i7
With a dock station to expand to 2 nice monitors with it, pretty sweet
Now, I just gotta figure out how to sp_addlinkedserver so I can automate this processing error updating that so far for the last year or two has been done by hand (one record at a time... 15K back log)
Gotta join to a view on another server, never had to do that before :o
it's easier from the server explorer
server objects folder IIRC
there's one called "linked servers"
right click, add
if the linked server is also a SQL Server instance, it's child's play
I set one up against a MySQL instance at my current job.. had to install and set up the provider
03:57
0
Q: load text file into an array in Swift

SuragchI'm drowning in Swift optionals and error handling syntax. I'm just converting a text file into an array of Strings. One would think that this could be a simple two or three liner but by the time I got it to work, I ended up with the following mess: enum ImportError: ErrorType { case FileNot...

@Mat'sMug That sounds dreadful
nah, the dreadful part is that the MySQL db is my data source for an SSIS ETL project I'm creating, and the tables get regenerated every night, with potentially different data types and column lengths (depending on the actual length of the data)
I had the SSIS staging package blowing up with metadata errors daily for the longest time
looks stable now
Yikes! Glad you got it stable now
I'm working on the documentation of that system I've built. almost 100 pages so far
@Mat'sMug From there on is it just a matter of fully referencing Server.Catalog.Schema.Table.Column?
04:02
and when I'm done I'll start sending my resume to some of the IT recruiters that have been stalking my LinkedIn profile. I need to write C# for a living.
@Phrancis exactly
I couldn't find a code documentation standard for SQL Server (or any SQL), guess JavaDoc-style is good enough (and certainly better than no documentation)
in VBA Rubberducking, 24 hours ago, by Phrancis
in TCG Creation, 3 mins ago, by Duga
[Cardshifter/Cardshifter] Phrancis pushed commit 63b47bc8 to mods: Documentation is like sex; when it is good, it is very, very good; and when it is bad, it is better than nothing. (attempt at documenting Orde of Things)
lol right
I think we have a lurker.
ello
there's always a lurker
2
oi
04:09
I used get-setters for the first time today :-)
Nice, make your life better?
Yeah, they did
I decided to reboot an old project, but this time with config files and abstraction instead of a hard coded mess
What language(s)/platform(s)?
PHP/idk how to answer that
/apache
04:14
^ ah, thanks
You can post it hereGuruprasad Rao 46 secs ago
This question is really better suited for Code Review Stack Exchange. — augurar 30 secs ago
PHP??
Hmm, I've got to pass in an array as a query string, should I base64_encode(json_encode or just base64_encode?
@GuruprasadRao that link is pointing to the meta site... and "how get better this code" on Code Review is akin to "how to fix this problem" on Stack Overflow - it's an awfully vague title that's technically applicable to just about any on-topic question out there. Please see A guide to Code Review for Stack Overflow users on CR meta. I doubt this question would be well-received on CR, it's really boiled-down and stripped from its context. CR likes to review code "in its natural habitat", in its full glory ;-) — Mat's Mug 17 secs ago
@Duga For some values of glory... ;)
04:22
as glorious as php gets :)
That looks almost like jQuery; not sure if that's a compliment to jQuery or not
@Phrancis it is jQuery
well you should totally drop that and.. oh, wait
@Quill Hm. How come they tagged it PHP also... weird
> I used this code to load a page .php with some variable (like a search result)
04:27
Ah. Right.
They're loading a PHP page with a query string, if I'm correct
Well, better get to bed, gotta be up in 6hrs
'night!
BTW.Bed
'night
@Phrancis later
04:28
♪ you ain't seen no-no-no-nothin' yet ♪
I'm glad I don't know these ditties.
Yes, you are.
@Mat'sMug I don't watch those...
04:32
Monking
well then, bing it yourself! it's a good song :)
I couldn't if I wanted to anyway - I'm in my bedroom with people in bed.
monking!
ah well
Monking, @Heslacher.
Just installed VS 2015. Since what version is it possible to develop Phyton in VS ?
04:36
I think I can with VS2013
but they call it Python though
;-)
@Cyphase codereview.stackexchange.com/questions/100777/…: I've created this one a little more tidier and also more accurate of what is required (for now) — CFNZ_Techie 38 secs ago
yup, 2013 works
04:38
0
Q: Python file deletion takes a long time to delete files

CFNZ_TechieRequirement I have a script I need to "duplicate" and modify to allow it to delete certain images based on properties I give this app/script. Currently the script just moves/sorts the images into folders based on numbers (e.g. each folder has 5000 images before a new folder is created and more i...

@Duga oh wow, what a messy SO question!
So you're just gonna start over from where you were before? — Cyphase 1 min ago
interesting
 
1 hour later…
05:44
0
Q: Templated Singly-Linked List

AmagicalFishyI bet you guys get a million linked lists. :( I'm real new to C++ (very surprised at the leap from Python and others to C++!). The code compiles and works well (unless I use it with 0, but I don't plan this). This took all day to get to work, and I've the tendency to move on after I get [what I...

06:06
@Hosch250 Do you have a uploaded project for your question codereview.stackexchange.com/questions/100601/… ?
 
1 hour later…
07:06
Monking
Monking @Vogel612
It's waaaaayy too warm again
And I was at the police station this morning...
filing a charge against unknown..
bike was stolen on monday...
too bad
did it happen at day or at night ?
07:15
at day...
when I was at work
somewhere between 8 am and 7:30 pm.
do you have a Hausrat Versicherung where it is included ?
I don't, but my father does. Since I'm living in it should work
I hope so
Basically stealing bikes had increased in the last years.
07:42
0
Q: Radix sorts in Java

coderoddeI was curious, how in-place radix sort compares to the variant which uses an auxiliary array in order to speed up the sorting. I implemented both and tested it against java.util.Arrays.sort(int[]). Seed: 1439451337582 Radixsort.InPlace.sort in 12074 milliseconds. Radixsort.sort in 6937 millise...

0
Q: 2D Tile Engine game

Kieren PearsonOk so the game basicly has a player (PlayerCharacter class) that can move around the world. It has a 2d world made of tiles managed by TileEngine class. The player can shoot projectiles and can colide with the boundary of the map and any solid tiles. Entity.h: #ifndef ENTITY_H #define ENTITY_H ...

07:56
@Vogel612 That sucks.
08:18
@MortenMertner I don't know where you've ever worked, but learning about policies that are followed anywhere you go is something you usually do before posting/speaking. Asking code review questions has been off-topic on SO for at least few years. Please refer to links provided by StriplingWarrior in the comment above. — BartoszKP 18 secs ago
Greetings
StackOverflow really is an easter egg.
The one that makes you laugh and facepalm yourself and everybody around you
@Heslacher That's due to the increased easy to steal one and also the price of it as sold in pieces (wheels, seat, chain) and then you can sell the frame to a junkyard. Or they sell the whole bike to someone else.
08:47
@Duga Some SO good guys.
Perhaps it isn't doomed yet.
0
Q: count specific array values

PrakashI want to count specific strings from array values $array = array("report=D","report=D","report=D","report=I","report=I"); I am going to count No of "D","U" and "I" D = Delivered U = Un Delivered I = Invalid I am expecting output is D = 3 U = 0 I = 2 First I replace "report=" using str...

@IsmaelMiguel You introduced a typo.
@Mast Blame google
Edit over it
+2 reputation won't harm you
@IsmaelMiguel Jon Skeet did
08:53
Oh
@IsmaelMiguel Google is to blame for a lot of things, but not for introducing typos while editing.
It corrected "parenthesys" to "parenthesis"
@IsmaelMiguel parenthesis is singular, the context needed plural: 'parentheses'
That explains the difference
Sorry about the typo. I tryed Google (google.pt/…) to fix my spelling. I guess it failed. — Ismael Miguel 2 mins ago
Not sure if typo intended or not
08:57
@Quill It will be deleted anyway
What typo?
tried is usually written without y
Thanks
:/
You could've just done a winky face as a response and it would've been fine ;-)
I hate those
09:11
0
Q: Maximum matching in graph

user3664730Hi Im currently working on https://open.kattis.com/problems/paintball for own practice. Its a paintboll problem where i should determine if everyone can get a unique target. The problem is as follows I get a number of pair like: 1 2 3 4 3 2 4 1 If I get 1 2 it means that 1 can see 2 and there...

0
Q: Optimization with a lower value constraint for positive solutions

PerLet \$D\$ be a \$N\times N\$ positive definite matrix. I am minimizing a quadratic funtion $$ f(w)=w^T D\ w$$ with respect to the weight vector \$ w=(w_1, w_2, ..., w_N)\$, subject to the following constraints: \$\displaystyle\sum_n w_n =1\$ \$w_n\geq 0\$ \$w_n \geq \theta \$ or \$ w_n = 0...

@CaptainObvious Example code?
@IsmaelMiguel Seems so
The O.P. says "Toy example", but I'm not 200% sure
I'm voting to close this question as off-topic because this question belongs to codereview.stackexchange.comNarendra Pathai 22 secs ago
Thanks for quick responses! It is not broken, I just wanted to know if there are any downsides in the design of my code. Yep, it's should be in codereview, my bad! — lkallas 17 secs ago
Before posting on Code Review, check the help section on how to ask a good question. Specially pay attention to the title and the context. — Ismael Miguel 1 min ago
09:44
0
Q: Abstraction, multithreading, reflection, inheritance and polymorphism all together in Java

lkallasI'm in a situation where I need to use everything mentioned above in my Java project. I wanted to know if i'm doing it correctly and are there any downsides in my implementations. This is my (very) simplified code, that seems to be working. So the simplified design is as follows: Main.java p...


« first day (831 days earlier)      last day (3484 days later) »