« first day (1027 days earlier)      last day (2981 days later) » 

11:04 AM
@CaptainObvious Pseudo-code without a language.
 
$scope.init = function () {
 NoteService.getNew().success(function (note) {
    $scope.Note = note;
    setTime($scope.Note);
  });
}
Run when the constructor is created..
so many wtfs
(yes, that goes off to the web server to get a new item)
 
0
Q: Can we do Quicksort more readable?

gsamarasI have a pseudosite, where I actually post small functions, so that I can re-use them*, but some posts have visitors. The top is Quicksort (C++). I feel that beginners visit it, so I do not care in improving (its poor) performance, but only the readability, so that the beginner can catch things m...

0
Q: How can I better declare this array?

Adam CopleyThere is no need for me to use 50 lines of code here, but how can I populate this array in a loop without using date/time methods. var timeoptions = ["00:00", "00:15", "00:30", "00:45", "01:00", "01:15", "01:30", "01:45", "02:00", "02...

 
"Hey, should we mark this column as NULLable?" "Nah, it should be NOT NULL even though most people won't use it." "But what if people don't need it when they INSERT into it?" "Make it a varchar and let them put in an empty string" - My DBA, probably.
2
Okay. I'm done complaining for today. It's just annoying people here and making me procrastinate. AFK
 
1
A: How can I better declare this array?

Pimgdvar arr = ["00", "15", "30", "45"]; var arr2 = []; for(var i = 0; i < 24; i++){ for(var j = 0; j < 4; j++){ arr2.push(i+":"+arr[j]); } } That's the really quick way without thinking. There might be better ways, but this is what I come up with in 2 minutes. After testing, you'll find ou...

disgusting solution but that's what I'd do
I mean, I can't be arsed to use a library for this, it takes me 2 mins to write code like this
 
It's a date-time thing, he should definitely be using a library like momentjs
Because you can guarantee he isn't manipulating those times in a vacuum
Date time is hard
 
11:19 AM
yeah but if you just need to generate strings
tbh I'd go over to code golf and ask those guys
 
Yea, sure, but I am 99% sure he is not just doing that
 
=D they're bound to have something interesting for this
 
They'd probably do something "interesting" involving Date and toString()
 
ehh, I got an accept
woo, internet points
although this was kinda a gimme the codes question =/
fk I get baited everytime
 
Zak
"this answer's awesome, why haven't I upvoted it yet?" "You cannot upvote your own posts" - Me, 3 times today so far.
2
 
11:33 AM
0
Q: Code Revie_w on Python web scraping script?

Andrew DalyWould someone be willing to do a code review on my Python script.? Thanks.

 
@CaptainObvious wat
 
Hmm so even with the request review over a changeset, I won't be able to see the code review when viewing the changeset details, that is not untiutive at all. Anyways, about your comment: but then I can't use the checkin shelveset feature on the build definition, and this is a big bummer for me. Also, won't the massive amount of shelvesets clutter the TFS database down the line? I also don't want all those shelvesets on my name when searching for a specific manually created one. — julealgon 58 secs ago
This is a question more suited to Code Review perhaps? — Lankymart just now
 
1
Q: safely convert dollars to cents

Alexwhen I am doing my project, I need to covert dollar to cents. So I wrote the following function to safely do the conversion. The input dollar is float and the output should be int. def safe_dollar_to_cent(dollar): parts = str(dollar).split('.') msg = 'success' status = 0 if len(...

 
@CaptainObvious Obviously the answer is "yes"
We would be willing to code review it
and that's what the question answer should be
just those 3 characters
 
11:52 AM
I only took a quick glance over the code, but this question might be more suitable to codereview.stackexchange.comFranky 53 secs ago
This belongs on Code Review, not on Stack Overflow. You should consider removing this question and asking it there. — dasdingonesin 19 secs ago
@dasdingonesin, Sorry for the mistake, I now asked on Code Review! — Stephane 39 secs ago
 
0
Q: Code optimization with Matlab

StephaneI am trying to optimise the computation time of one of my code (for the second time after a first optimisation that gives very good results). Currently, this code is very time-consuming depending on the size of the data (i.e. sometimes very big matrices). So if anyone has some ideas to help me to...

0
Q: SQL - potentially complicated query in need of expert assentance

shaneIm looking for some expert advice with my working script below. What im after / how the code works: A merchant creates an advertising campaign with (lets say) a total budget of £100. He then adds products to his advertising campaign with the option to set his own Cost-Per-Click (default £0.01)...

 
@Pimgd j * 15 is interesting enough for ya ?
Also meh, they'd probably do an array repeat and join
which is ugly, and unnecessary generation of arrays
 
12:14 PM
@CaptainObvious I had to pause for a minute there when I saw the code and thought, "that's not SQL", then I saw the tag. Almost reminds me of VB code...
(monking)
 
0
Q: Python script for OSRM Routing

mptevsionThe below script takes two arguments as inputs (a CSV containing the following columns: ID, from_latitude, from_longitude, to_latitude, to_longitude) and a path to a map-file (needed for OSRM routing). Currently on my CPU (4 cores) this averages around 800 requests a second - I was wondering whe...

 
12:37 PM
@Quill "00"
 
Oh yeah, it won't do 00, it'll only do 0
close enough
 
not really
 
that's cool
 
.replace(":0", ":00")
easy enough
 
12:45 PM
yeah, I guess
also screw old minesweeper
for throwing me a 50/50 shot at the end of the game
 
0
Q: Wrapper for complicated Range manipulation

whytheqI'm playing around with a class module to try to wrap up some complicated(ish) Range manipulation in Excel-vba. I might have a situation where I know the red range spans my target (the target is to have it's contents cleared) and all cells below the red range should go. Green areas are cells use...

 
=DDD it bluescreens on shutdown
that's awesome
excerpts from the wiki are pretty dang scary though
> Damn Small Linux (2.4 Kernel): Run with lowram and choose PS2 mouse in xsetup. Takes circa 10 minutes to boot.
10 minutes!
Of course, once you describe it as an in-browser VM then it's rather boring
 
1:36 PM
ooh, Strunk & White silver badge on SO
gained through editing the typos of whatever I find with google searches whenever I have programming problems
 
possible answer invalidation by chris on question by chris: codereview.stackexchange.com/posts/121016/revisions
 
@Duga "and here the code changed to reflect janos answer"
 
monking
 
rolled back + explanation given
 
Good.
 
1:43 PM
OP needs more rep to upvote
one more vote
 
upvoted
Gotta hand out them points — Pimgd 32 secs ago
chris is a cool guy, if we get him another upvote he can come chill in chat
 
2:04 PM
when did they increase the rep needed for chat?
@Pimgd do you know him in the real?
 
they didn't.
 
I thought it used to be 10 for chat
214 new Angular questions on SO since I went to bed last night....lol
 
@Malachi no but his comments
ah I wrote it wrong I think
I meant like "chris seems like a cool guy"
 
gotcha
 
I mean, if your reaction to a horde of edits + "you're doing it wrong, I fixed it for you"
@Pimgd i did not know this, will stick to the rules by now. sorry for that, thanks for editing out the "illegal" edits made by me and pointing this out to me. Also, thanks for the upvote (@Malachi) — chris 16 mins ago
is that
then that's a pretty good reaction
or maybe I have low standards =)
 
2:08 PM
@Pimgd why horde?
 
... how do I review low quality posts which I have already reviewed outside of the queue?
 
@Pimgd skip or do it again
 
oh wait you can select "no comment required" for recommending deletion
 
@Pimgd that should be the expected reaction, FWIW...
 
probably
... I seem to be getting rapid upvotes and whilst I love you all, serial upvoting is a thing
as in, +40 in the past minute split over various answers
 
2:13 PM
that is a good response
anyone have any opinions on gitreal.codeschool.com/?
 
@Malachi make it a link, save us from the ctrl+c
it seems to rely a lot on videos and flashy animations, which might not be the best thing
 
@Pimgd it's more like accepting to fail even if you try to do everything right. this happens, gotta learn from it. it's life i guess, learning never stops and as is see it can't happen without failing
 
especially because searching video is hard so whilst it may be good for introductory material, it's not a good reference guide
@chris That's a pretty good outlook on life, albeit slightly dangerous because it's easy to slip into expecting to fail
 
@pimgd you made a point there. perhaps i should change it to "accept you have failed" or something like "accept you may fail from time to time"
anyways, thanks again and see you again editing my next post ;) (hopefully not)
 
Maybe codereview.stackexchange.com is a better place to ask this question. — TheEspinosa 32 secs ago
 
2:25 PM
@Duga "text based RPG"
oooh
 
@Pimgd in german we have a saying (?) which roughly translates to "It's good to see you, but not under these circumstances" i think this fits the situation^^@Duga you possibly are right
 
Registered myself at the employment thing of the government yesterday so I can start living off welfare
today I receive emails of companies proposing jobs. One of which is the startup I worked at two summers ago
Let's see if they have job openings in the US yet
 
@chris duga is a chatbot =)
 
and another fail^^
 
There is no real way to know that one beyond checking their profile
They even have a non-negative user id
so yeahhhh
but anyway, it posts things that contain "code review" from other sites like stack overflow
so we can check and say "no code needs work first"
because stackoverflow likes to migrate bad questions from time to time
especially at first...
 
2:31 PM
Oh, thanks @TheEspinosa, I didn't knew of codereview. I posted it there. — inblank 49 secs ago
 
and then we have another chat bot...
@CaptainObvious
which posts new questions into chat
aaaaany moment now
 
i'm outta here, have a nice day. i feel like we will be meeting again sometime (like my next post^^)
 
2
Q: Skill creation in a python text based RPG

inblankI am in the process of creating a text-based RPG for the purpose of learning more about OOP in Python. Right now things are going well, but I'm facing a problem that I don't exactly can find a good answer: Skill implementation. I also think that I'm going to face similar problem with the Items. ...

0
Q: How can I process this date object more efficiently?

John DoeHere's what I have: require('../../src/utils/date-object-to-yyyymmdd'); var eighteenYearsAgo = new Date(); eighteenYearsAgo.setTime(eighteenYearsAgo.valueOf() - 18 * 365 * 24 * 60 * 60 * 1000); eighteenYearsAgo = eighteenYearsAgo.yyyymmdd(); Basically, I am generate a date, setting it to 18 ye...

 
that trygit link that someone gave me the other day pointed to this when I was finished with it
 
@Pimgd Captain is still a feed...
the only bots in here are RoboSanta and Duga
 
2:41 PM
bleh it's too late to edit now
but it acts like a bot
 
no it doesn't
though Duga mostly works like a sophisticated feed in here, she also is scheduled to get commands
 
ahhh gotcha
 
0
Q: Generate CSV file with input csv file as reference for columns

vibhutiDI am creating a csv file with random values taking an inout csv as a reference for columns. I would like to know the good way to code this to make this efficient. Thanks in advance csv_metainfo = [ { "timestamp" : { "current" : "xxx", "previous" : "yyy" }, "itemCount"...

 
2:58 PM
0
Q: Replace many Outlook email rules with a script

PhrancisI as well as several of my colleagues have had an ongoing problem where we get bombarded with hundreds if not thousands of emails each day with come from automated services, such as SQL DBmail and other similar mechanisms. Many of these notifications are not really important to look at, and they ...

 
possible answer invalidation by Karthikeyan Palaniswamy on question by Karthikeyan Palaniswamy: codereview.stackexchange.com/posts/121003/revisions
 
Zak
A month's hard work, but now I can just write a line like this:

filteredData = aggregatedSubsheetDataReport.GetFilteredReport(aggregatedSubsheetDataReport, ADVISER_HEADER, EqualTo, adviserString, Keep).reportData

And get every piece of business that adviser's done for the past 2 years
 
I'm voting to close this question as off-topic because questions about reviewing/improving working code belong on Code Review. — Ansgar Wiechers just now
 
@Zak That's amazing!
 
Zak
@Phrancis makes me feel like a proper developer for once ^^
 
3:05 PM
and then next week you refactor that one line away
and then the evil influence of Mr. Adviser is gone forever!
 
Hey duckman @Pimgd
 
*angry quack*
 
X)
 
7 hours ago, by Pimgd
For safety reasons I left my duck home today
 
Zak
@Pimgd And just writing it, I realise that whole class should be replacing a bunch of arguments with Me
 
3:09 PM
@Zak filteredData = aggregatedSubsheetDataReport.GetFilteredReport(Zak, ZAK_HEADER, Zak, zakString, Zak).reportData?
 
@Zak why do you need to pass the aggregatedSubsheetDataReport to a method on itself?
 
Zak
@Vogel612 I don't. I just went and replaced all such functions with references to Me
> filteredData = aggregatedSubsheetDataReport.GetFilteredReport(ADVISER_HEADER, EqualTo, adviserString, Keep).reportData
'tis awesome :D
 
so it now uses Zak internally
 
wait... this is VBA right??
 
Zak
@Vogel612 This is
 
3:11 PM
you can actually pass functions as arguments? Or what is that EqualTo?
 
Zak
It's an Enum I built.
> Public Enum ComparisonOperator
NotEqualTo = 0
LessThan = 1
LessThanOrEqualTo = 2
EqualTo = 3
GreaterThanOrEqualTo = 4
GreaterThan = 5
End Enum
 
ah.... that explains
 
... like some sort of check(1, EqualTo, 2) function that internally...
 
yea with functional programming that could've been easier
 
if(arg2 == EqualTo){ return arg1 == arg3 }
... which sounds suspiciously like a lot of flag arguments rolled into one
 
Zak
3:13 PM
@Pimgd Pretty much.
> Public Function ComparisonIsTrue(ByVal sourceValue As Variant, ByVal operator As ComparisonOperator, ByVal comparisonValue As Variant) As Boolean

Dim isTrue As Boolean

Select Case operator

Case NotEqualTo
isTrue = (sourceValue <> comparisonValue)

Case LessThan
isTrue = (sourceValue < comparisonValue)

Case LessThanOrEqualTo
isTrue = (sourceValue <= comparisonValue)

Case EqualTo
isTrue = (sourceValue = comparisonValue)

Case GreaterThanOrEqualTo
isTrue = (sourceValue >= comparisonValue)
 
some of the code doesn't read well but that's because vba
Comparison is true is is true
 
@Pimgd that's a return statement
 
I know, but if you read code with a mental voice to check for semantics (if that makes sense?), it's a tripping block
 
@Zak I think you're better off naming the method Compare
 
0
Q: Random positioning and movement of a rabbit on a table

jdrdInspired by http://math.stackexchange.com/questions/1666792/what-is-the-chance-that-a-rabbit-wont-fall-of-a-table-if-you-put-it-somewhere-a , I decided to develop a program to manually test this scenario. My code will run as many tests as you want with (hopefully) more tests resulting in a correc...

 
Zak
3:17 PM
@Vogel612 For the time being, I prefer being a bit overly-verbose.
 
@CaptainObvious noooooo
now the title is awesome
but the contents suck
 
@Zak ew
Why don't you use a Dictionary<Enum, Func<int, int, bool>> and call bool result = map[operator](sourceValue, comparisonValue)
 
@JeroenVannevel vba...
no such thing as dictionaries of first-order functions
 
You can fill the map with stuff like map[LessThan] = (o, n) => return o < n
oh
I thought it was maybe vb.net
Nevermind you're screwed.
5
 
You should implement something like a message queue consumer and producer in VBA
then you can setup something like RabbitMQ or ActiveMQ and what not
and have a real programming language solve your problems
*murdered*
less stupidly, are there any other languages you can easily use together with VBA?
 
3:21 PM
@Pimgd vba is a real programming language...
also that's more of a hassle than it's probably worth
 
in C for unix systems I tended to rely on shell scripts sometimes if the C library was being too much of a pain
like, you know, grepping things
@CaptainObvious edited by asker and code was included, VTReopen?
 
Zak
@Pimgd Honestly, If I want to learn a more, powerful, language I'll go teach myself C#
 
@Pimgd Shell, PowerShell
I think C# and VBA can play nice too, though I've never tried (because I don't C#)
 
like, C# has linq, right
 
yep
 
Zak
3:25 PM
But, VBA is only a means to an end. That end being "Automate complicated stuff in MS Office". Which is precisely what VBA was designed to do.
 
so I'd be silly enough to pass a large collection off to C# if I could
and then use LINQ to filter it down
 
1
Q: Custom compression tool

AdnanI have made my own compression tool for a stack-based language that uses a dictionary compression method. The code for the decompression is the following: elif current_command == "\u201d": temp_string = "" temp_string_2 = "" temp_index = "" temp_position = pointer_position wh...

0
Q: More efficient way instead of loop for filtering a list

vildhjartaI have a simple list and want to filter it by a specific key. But I guess my for loop solution is not an efficient way. I'm searching an other way or one best practice. types = [ { 'name':'John', 'surname':'Doe', 'age':36, 'type':'customer' }, { ...

 
but that's because for some projects I'm more interested in stringing tools I know together to make things work
 
If you're not working/developing tools/tasks in Office, you would be wasting your time and making your life harder by using VBA
 
Maybe what I'm doing is the programmer version of this:
You see, I've got a really good system: If I want to download a video, I go through telnet to connect with my vm, and there I use a shell script to make ffmpeg record the video via ...
okay maybe not that crazy =D
 
3:28 PM
ok this is too cool. all I'm missing is actual entity state management, but I can live with this - this code inserts a Sage300 PO header with its details and optional fields:
context.PurchaseOrderHeaders.Insert(header);
(yup, that's all!)
ok, there's this:
header.Details.Add(detail);
header.OptionalFields.Add(revDate);
header.OptionalFields.Add(cancelDate);
I wonder how I could get rid of the need for this EntityState property now
            var detail = new PurchaseOrderDetail
            {
                LineNumber = 1,
                ItemCode = "TEST",
                ItemName = "API test",
                State = EntityState.Added
            };
crap, the next step is to turn this reflection-based API into a rewrite of Entity Framework ffs
 
@Pimgd LOL
 
dropdowns with 1 item, why
... the thank you page for the webshop of the public transit 404's for all css
best UX ever
but it's okay, it responded with OK
Failed to load resource: the server responded with a status of 404 (OK)
3
Maybe that's my browser telling me "It's okay, you didn't really wanna see their version of styling anyway, the page looks better without it"
wow that's an old bug
but they say it's fixed...?
 
3:46 PM
@Mat'sMug hrnghhhhhh darnit — Vogel612 25 secs ago
> yeah, VBA's like that
 
VBA: Computer says no.
 
-2
Q: Do - while loop does not move on after user inputs correct or incorrect parameters

DanielI need to allow the user to input what they want into the program but restricted to the three options of, R, T and Q. I have tried to do this several times and ended up going back on myself several times. I came up with this solution but now when I run the code it simply loops round no matter wha...

 
4:05 PM
possible answer invalidation by 200_success on question by aussiedan: codereview.stackexchange.com/posts/120868/revisions
 
@Pimgd eh, I'd be silly enough to implement the linq methods in vba instead ;-)
2
 
@Mat'sMug ...
I only really have one reply to that and that's yeah, you would =D
 
(I already did it!)
 
It's snowing!
but none of it stays =/
 
in VBA Rubberducking, 13 mins ago, by Mat's Mug
@TweetingDuck woot, got a "like" from Michael Feathers!
@marick @mfeathers the process is known as "refuctoring"
 
Zak
4:25 PM
@RubberDuck I found you on a random blog comment ^^ smurfonspreadsheets.wordpress.com/2008/02/19/…
 
> Simon Says:
sit down
> Excel devs are not creating stand alone apps.
HahahahhHAHHAHAHAHAHA
A large portion of our business is built on a program that runs through Excel.
 
lol
 
Now, I'm not about to pretend it's a good program
 
6 years later he tells that guy, poor guy running around that whole time with bad information about VBA....
 
That'll teach him
 
4:32 PM
remembered what I wanted to get done, just now....SQL for Class so I can play with the data with LinqPad and get the hang of some basic Linq
I better do that before I get distracted again
 
*distractions*
 
that same Red ball keeps coming back to me
then my sister messages me on Facebook about my birthday coming up...
 
how dare she. O:
 
Greetings, Programs.
 
she thinks I am like 40 or something.... ugh!
 
4:37 PM
@Malachi is secretly 50
 
and then she doesn't even respond when I message her, what a PITA
I will be 31 tomorrow. (forever 16)
 
next year it will be your sixteenth sixteenth sixteenth birthday
 
my second 16th birthday, @Pimgd 16 * 3 = 48
 
hang on
 
and I haven't even opened SSMS yet....
 
first you turn 16, then it's your first 16th birthday
then on 17 is 2nd 16th
... +14 = 31 is 16th 16th
 
so it would be 16th 16th birthday tomorrow?
 
it's your second 16th 16th birthday tomorrow
... for as much that makes sense
 
lol
should have just said forever young
 
This is Java code, but this is a JavaScript question. — Dan Pantry 59 secs ago
I don't think I've seen anything like that before
 
4:49 PM
2
A: Creating an array with quarter hour times

st88One could change the first suggested algorithm in the following way: var quarterHours = ["00", "15", "30", "45"]; var times = []; for(var i = 0; i < 24; i++){ for(var j = 0; j < 4; j++){ // Using slice() with negative index => You get always (the last) two digit numbers. times.push( (...

I like this one
 
I don't.
Clever code is not necessarily good code :P
 
yes but it has a comment to explain it
2
 
If you need a comment to explain what your code is doing then you're doing it wrong. You wouldn't need a comment if you didn't try to golf code in production haha
 
it's just string manipulation
from the basic string ... library
 
You can write plenty of weird code with the in-built libraries :) IMO it's not clear (or it's obtuse)
 
4:54 PM
You could get rid of the comment by making it a local store: var twoDigitHour = ('0' + i).slice(-2)Pimgd 10 secs ago
time to go homeee
also probably repcap today due to that javascript question
 
@Otix Are you saying your current algorithm works, but you just want a more elegant solution? If so, your question would be better suited for codereview.stackexchange.comjuharr 28 secs ago
It's a little bit confusing since you use 'digit' where you should use 'number'. Also, since your regex is currently functional, I believe this belongs to CodeReview rather than StackOverflow. — Aaron 13 secs ago
 
0
Q: Round Robin Tournament

Nathan MerrillRoundRobin is an implementation of the Round-robin style tournament: public class RoundRobin implements Tournament { private final Game game; private final List<Player> allPlayers; private final List<Player> remainingPlayers; public RoundRobin(Game game){ this.game = gam...

 
5:29 PM
Hello.
 
hi!
 
I opened my swag box, and I accidentally cut my T-shirt :(
Only a small nick, but it still makes me sad.
 
That's too bad.
Did you use a box cutter? We always use scissors to open our boxes.
They don't cut as deep.
 
I used scissors.
 
OK. I'm sorry it happened.
 
5:33 PM
It's ok.
 
0
Q: A command line general sudoku solver in Java

coderoddeI have this command line program that asks the user to (partially) input the source sudoku with some missing values, and after that validates the input and solves it. See what I have: SudokuSolver.java: package net.coderodde.sudoku; import java.awt.Point; import java.util.Objects; /** * Thi...

 
5:50 PM
You're not supposed to ram a knife in the box
You just have to snip through the scotch tape
use a small kitchen knife with which you cut onions or something
 
possible answer invalidation by Alex on question by Alex: codereview.stackexchange.com/posts/121074/revisions
 
@Duga all good
 
6:11 PM
Also, having answered this, I just realized that it really belongs on Code Review Stack Exchange not here since you have code that runs but doesn't work as expected — Kevin Wells 21 secs ago
@Sparky - You're right. Silly me, not thinking before I do. Could this be a Code Review question? Where the user Andrew posts his code and asks if he should have used a library? — UndoingTech 8 secs ago
 
What a day, written exception messages a large part of it.
Even threw in some tests for them.
 
@UndoingTech, it's also not allowed on Code Review: codereview.stackexchange.com/help/dont-askSparky 27 secs ago
 
Zak
I actually have a sword for opening letters and parcels and such.
So much more fun ^^
 
6:37 PM
@KevinWells Code that does not work as expected is off-topic at Code Review. Please see A guide to Code Review for Stack Overflow usersPhrancis 58 secs ago
 
0
Q: Determining if a file or URL is a git repo or archive

Josh BeauregardI'm getting these 3 offenses: libraries/helpers.rb:4:1: C: Method has too many lines. [11/10] def get_files(url, file, destination) ^^^ libraries/helpers.rb:18:1: C: Assignment Branch Condition size for unpack_archive is too high. [16.52/15] def unpack_archive(url, file, destination) ^^^ librar...

 
http://www.commitstrip.com/en/2016/02/25/you-cant-write-code-without-knowing-how-to-log/
CommitStrip
You can’t write code without knowing how to log
CommitStrip
1456425408
6
 
@CommitStrip LMFAO - Story of my life
3
 
6:55 PM
does it count if I set up NLog to ..send me an email whenever there's an error?
 
If it's important enough to warrant sending you an email (and it also gets logged) then all good :)
 
@Phrancis My mistake, thanks for correcting me on that, I don't spend as much time on Code Review as I do here, so I had an incomplete idea of what they want there. — Kevin Wells 48 secs ago
 
I swear gremlins get into the code and remove the log information I really need when troubleshooting things
 
Is there a way to hook into intellitrace for logging?
All the things are already there, littering the code with logging is so ugly
 
Environment.StackTrace
 
7:03 PM
^^ good-bye performance
unwinding the stack continuously for... logging, would be like constantly handling exceptions
 
7:29 PM
0
Q: How to vectorize this simple matlab user-function?

OjiryxI need to vectorize this simple snippet of code : [~,~,numS] = size(ASY); isTP = false(numS,1); for slice = 1 : numS temp = ASY(:,:,slice) > pT_MRPM_isTumorPresent * max(ASY(:)) ; isTP(slice) = logical( any(temp(:)) ) ; end please, any help on improving this is a welcome ?

 
any of you fiddled around with the Northwinds Database from Microsoft?
 
7:44 PM
@JeroenVannevel are you around?
 
No I'm arectangle
too funny
But I just got called away for food so leave a message and I will get back to you when my belly is filled
 
@Malachi I have a little bit
Been a long time but I seem to recall it was pretty basic, compared to AdventureWorks
 
I am trying to figure out LinqPad
and then practice some linq with it
how do I get the linq statements to return information like I would with an SQL statement?
 
possible answer invalidation by japaley on question by japaley: codereview.stackexchange.com/posts/119050/revisions
 
so far I have written
var employees =
	from employee in Employees
	select employee;

foreach (var emp in employees) {

}
I figure once I figure out how to get output out of this thing, I should be able to figure things out or find some challenges
 
7:52 PM
why don't you just do foreach (var employee in Employees) ?
 
I am trying to figure out like a console.writeline, to show results.
you know what I mean?
 
sure. but your var employees is identical to Employees and thus redundant
 
right.
oh, hey, samples
 
0
Q: Python Script to query OSRM (drive-times)

mptevsionThe below script takes two arguments 1) - Path to the OSRM Map, and 2) Path to a CSV containing the columns [query_id, from_lat, from_lon, to_lat, to_lon]. It then does a few robustness checks before initialising an OSRM server (I have found that spawning more than one doesn't improve performanc...

1
Q: Last dot Standing Puzzle Game

topherThe game is a puzzle game made up of a grid of cells represented by html divs. Gameplay is as follows: On starting a new game, the number of rows and columns is selected from a form. The grid is created with all but one of the cells being initially filled. A filled cell is selected by clickin...

 
@CaptainObvious looks cool.. too bad the 'Go' button doesn't do anything
does it work in another browser? I'm using Chrome..
 
8:02 PM
@Malachi you can just call Console.WriteLine lol
I don't see what the problem is
 
i wasn't sure that would work. I am still trying to figure out linq itself...lol I did figure out .Dump() using some of the samples in LinqPad
 
0
Q: Slider control constructor

Sebastian OlsenI've made myself a JavaScript slider constructor. You can create new sliders and tell it what elements it should refer to. var SliderControl = function (container, area, fill, action, actionWhenActive, actionWhenSet) { 'use strict'; var self = this; this.action = action; this.con...

 
possible answer invalidation by leancz on question by leancz: codereview.stackexchange.com/posts/120625/revisions
indeed if Map is defined as this it should work, anyway that's why we need more information from the OP and he would benefit from a good code review! — Marc-Andre 11 secs ago
Sounds like a question for codereview.stackexchange.com. — chris85 35 secs ago
 
8:19 PM
Yeah, .Dump() is the shorthand which you'll grow to use anyway
Try writing a collection to the output
literally employees.Dump() or Console.WriteLine(employees)
The output is formatted as a tree structure that you can browse -- it's perfect
 
8:37 PM
Thanks Matt, smart idea and vote up! I recently re-write radix sort part of code to make it simple to remove dependencies of globalPtr and pointTo, I post my code here, and your advice is highly appreciated (codereview.stackexchange.com/questions/121026/…). — Lin Ma 19 secs ago
 
@Duga seems like it could use a rollback...
it didn't touch the original code, but I'd say it's warranted...
 
now I have the AdventureWorks database as well.
now I just have to figure out what I am doing with Linq
 
0
Q: C++/SDL2 Space invaders

Ryan SwannI have made my first OOP/SDL2 game and am greatly seeking some feedback on what I've done. My biggest issue in this project was the structure of the code and using the necessary data structures. I organized it to the best of my ability but I am sure there much more room improvement and I would ...

 
codereview.stackexchange.com would be more appropriate for this question. — bwegs 53 secs ago
 
8:55 PM
0
Q: Difference in speed between two python data structures

The NightmanI can explain more about what I am trying to do with my code and give input data examples if it is necessary and helpful, but for starters I have two original methods that I wrote and two new methods that do the same thing, but for some reason that I don't see, the new methods take substantially ...

 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Changing a div that contains a view link
 
9:10 PM
@RoboSanta Looks pretty decent I'd say
@Vogel612 Done and commented
 
9:31 PM
0
Q: In Swift, what is the most readable way to split up your code base

AlexThis is my first time posting on code review, so I'm sorry if the content of this post is irrelevant, please point me in the right direction if that is the case. I'm new to the Swift world, recently I read up on extensions and have noticed that some people abstract portions of their classes to a...

0
Q: Dependency problem in C#, through polymorphism, and appropriate design pattern

Rémi AHi fellow programmers ! I'm currently working on a project which involves EntityFramework with a (very) rich model (lots of inheritance). I'm currently facing a problem, quite intersting in my opinion. My model is described in the Domain namespace. It involves 2 classes that inherit from 1 abst...

0
Q: Nested Groups in LINQ Query With Entityframework

Zaid MirzaScenario is, I have query below, which groups students result data by class,group,enrollment as shown in code public List<PassingRatioDTO> GetStudentPassingRatio() { using(SMSEntities em=new SMSEntities()) { try { List<

 
9:48 PM
@JeroenVannevel Oh wow, I didn't know about that!
That sounds cool.
 
monking
 
@Quill Monking.
 
monking
 

« first day (1027 days earlier)      last day (2981 days later) »