« first day (684 days earlier)      last day (3630 days later) » 

13:00
0
Q: Best way to refactor/DRY this Javascript code

stack pepeI am trying a few approachs in order to DRY and refactor this JavaScript code, but I am not sure what will be the best option: var rawLanguages, priorityLanguages = [], nonPriorityLanguages = [], sortedLanguages = [], nonPriority = false, i; ...

@CaptainObvious Best way to make a good joke about this title
@rolfl yes, I did get that notification.
I just wrote a 20-liner.
20-line comment...
13:18
0
Q: Beginning of Markdown to HTML Node.js command line utility

janoChenRight now the code only works for paragraphs, bold, italic, headings, and converts straight quotes into smart quotes (a personal addition). #!/usr/bin/env node var fs = require('fs') , filename = process.argv[2] if (process.argv.length < 3) { console.log('Usage: node ' + process.argv[1] + ...

0
Q: Repetitive calls in on ready handler

LarzThis always works when I need to add pieces of functionality to a single page... function doTheThing() { ... } function helper() { ... } function otherThing() { helper(); } function moreHelp() { .... } function extraStuff() { moreHelp(); } $(document).ready(function() { doTheThing...

Wow. Just compared our old TimeClock to time clock rewrite. 36k lines to under 15k lines for new version.
If your code works and you are looking for improvements then you should probably post it on codereview.stackexchange.com instead. — Pshemo 1 min ago
Right. Note that Code reviews are off topic here, but maybe you have a concrete problem? The code is kind of OK but you may have trouble updating thousands of records to the Db at once. Consider batching it, maybe per input file. — Henk Holterman 1 min ago
13:42
0
Q: Qt Custom Scatterplot

VincentI have created a custom scatterplot in Qt and am wondering if there is a more efficient way to do it. Here is a scatch of the problem: The layout of the plotting area consists of a rectangular structure starting at [0,0] in the top left corner and expands by 250 pixels to the bottom right cor...

-1
Q: Java : Need help making my code more efficient

Jay211 Need help with the following task, cannot seem to get my code working and have been trying for a long time now

@rolfl What would you recommend as preparation for job interviews?
Inerviewing where?
Local McDonalds?
But seriously, that's the first thing to do to prepare....
research the company, google the names of the people doing the interview
2
find anything that you have in common with the individuals.
@rolfl That's a really good idea. I never considered that before.
Interviews are all about two things: confirming your resume is mostly accurate - can you do what you say you can do; and will you be nice to work with.
is it a technical interview ?
13:52
even then, it's about the people.
Well, not to you ... but, the same logic applies.
So far, it's not any live interviews. But I will have a phone call on tuesday about "technical questions"
For phone interviews, here's my theory:
Dress up for them.
13:55
Dress the same as you would for a face-to-face interview.
dressing smart puts you in the right mindset
2
I have no webcamera here. Samaritan can't possibly be watching.
okay
Phone interviews are really hard for both sides.
Without the visual cues, you need to have really good presentation in your voice.
you need to think more clearly, and speak more clearly, and check with the interviewer often if you are covering things they know, or can skip to the harder stuff, etc.
I had one call about 1-2 weeks ago that I think went quite well. But the questions I got were really simple...
In an interview you want the person to learn how good you are, which means you want to try to push the interview to the limits of your capabilities, without giving away that you are at your limits..... ;-)
if the questions you got were simple, then you likely should have pushed a bit harder to move on to more complicated stuff.
@rolfl I think the complicated stuff will come on Tuesday and in the future.
14:00
THings you can say are things like: yeah, that's a simple way to check if a number is prime, but it's more efficient, if you have to do it multiple times, to construct a sieve, and reuse it.
Or perhaps "What's the complexity of quicksort?" is a "complicated" question?
Honestly, I tell people that that's what wikipedia is for.
I say: "Quicksort is great, but I know timsort is better because it uses insertion sorts for the small sets."
If I need to know the complexity I can look it up.
But, the edge there, is that I can say "Timsort is better".
I guess asking that question is their kind of fizzbuzz question.
As it happens, I know that Quicksort has different complexities depending on the implementation.
that's the other answer... ;-)
O(n log n) is best case IIRC, with O(n^2) being worst case for some implementaions with pre-sorted data.
IIRC
yup ^^
Congratulations, @rolfl, you passed.
14:04
TimSort happens to trim those edge cases down a bunch, and makes it almost always n log n
Merge-sort also has O(n log n) as worst-case
But O(n) space ;-)
Quicksort is not stable either, wheas insertion and merge can be
I believe there's an unstable merge ... checking...
Heapsort (which I learned quite recently) is also not stable, but is O(n log n) worst-case and O(n) best-case
14:09
merge is always stable... huh.
I have never had reason to implement a heapsort.
me neither
although I have never had reason to implement any sort.
although I probably implemented some bubble-sort maaaaaaaany many years ago
I had to do a sort hack for JDOM....
how much did I actually reimplement... checking...
I've never had to implement any sort... So I'd kind of laugh at being asked about it in an interview.
I have done it, but I've never actually needed to
Basic insertion sort, with a post-sort resequence - github.com/hunterhacker/jdom/blob/master/core/src/java/org/…
@Kavignon: No, I'd expect it to give you 6, as the lambda expression covers 6 lines. If you want to remove empty lines, and possibly remove the final line if the part of the span for that line is just whitespace followed by "}", you could do that... You'd basically need to ask the syntax tree to get each line to check it. To be honest, I don't like the idea of this "rule" anyway - and by the time you start making it more complicated by adding extra rules around which lines are counted, it feels like it's going to get harder and harder to explain to devs... I'd just rely on code review, myself. — Jon Skeet 6 secs ago
14:22
Listen to Jon Skeet: Rely on Code Review!
@nhgrif I hope I never have to.
Simon, about the interview - be confident with what you know, admit what you don't know, but hint that you will know where to find it.
sounds like good advice ^^
0
Q: Join two arrays into a single one

ZlonkiI put together a function to sort out values that I am getting from a curl request for different 'devices', it works as is, I am only wondering if there is an easier way to to this. function convert($deviceName, $namesArray, $devicesArray) { $result = array(); foreach ($devicesArray as...

I have no idea what "technical questions" I will be asked
Where are you interviewing?
14:35
42 mins ago, by Simon André Forsberg
@rolfl
For Java, keywords are: atomics, generics, boxing, lambda's, and streams.
feels like I got that covered quite well
then, for enterprise, the dirty secret is beans, and OSGi.
I hate them both, and avoid them ;-)
that part I don't know as well
Having smarts with git is good, emphasise that. Would be better if you had some idea of CVS and SVN, but that's OK.
Depending on the age of the code base, you may need those.
if the company is < 10 years old, likely on git.
especially if they use linux.
14:38
About CVS and SVN I have only one thing to say:
1 min ago, by rolfl
I hate them both, and avoid them ;-)
version control and issue tracking is the discipline side of programming that separates the "kiddies" from the serious folk.
github issues ftw
Funny.... talking about VCS in the VBA room too.
My experience is that being a programmer is about 40% programming, and 20% administration - bugs, release cycles, meetings, etc. and 40% debugging and inveestigation.
if the debugging and admin are not OK with you, then you will be disappointed ;-)
oh, I am aware about those parts as well
14:42
As you 'advance', you are expected to do more - like mentoring, and presentations, and knowledge sharing, and designing, etc.... that all comes out of the 40% programming part, not the admin and debug part.
@rolfl The debugging I don't mind. The admin work can be a pain.
@RubberDuck - the debugging and investigation is all "maintenance" .... as I call it.
keeping the old crap running.
you seldom get to do the nice&sexy stuff when doing that.
Occasionally you get to rewrite some of it, and that can be nice... but rarely is it great.
@Kavignon: Well I wouldn't personally do even that - I'd give guidelines and then rely on code review. But if you want to count the statements involved, the syntax tree may well be the way forward on that front. I suggest you use the syntax tree visualizer in Visual Studio to explore that idea. — Jon Skeet 41 secs ago
Also, for what it's worth, some career advice:
you tend to end up doing more maintenance as you grow older, because it is natural that you maintain your own code.
as you get on in life, you have more code to maintain.
your goal should be to write low-maintenance code so that a year later you have more time to program, and less need to maintain.
Any advice for getting your foot in the door when you're looking to change technologies?
14:46
^^^ networking
and learn new stuff on your own time.
Been doing both, but everyone I talk to balks when they ask about my C# experience.
@RubberDuck - I am actually a bad example for that... I have done it .... 3 times in my life.
The first time I was new to a job, hired out of university for one set of skills that was not actually needed (the project I was supposed to work on was cancelled).
I learned Sybase mostly, with powerbuilder as the front end.
I think I'd be fine if I could just get past HR to someone who actually knows anything about programming...
the next job was actually a sybase-to-oracle migration project, with VB as the frontend. I was hired for my sybase skills, but took the opportity to learn VB because who wants to be the Sybase guy on a project that's all about throwing away sybase.
Then, I goofed it through europe, mostly on my sybase skills..... until I landed in Canada.
there I was hired for my database skills (by that time it was Sybase, Oracle, DB2, SQLServer, etc.).
but, the product was all about using any of them, and being a specialist made no sense... who wants to know all about the deep details of Oracle if you cannot use them because it's not the same in DB2?
So, I learned the middleware - in Java.
I have used Java for about half my career.... ;-)
Now, in each case, I found a need in the comapany I was working in, where they were using tech I was interested in, and took some time to learn it, and then 'migrate' inside the company to use it.
Once I had the stuff under my belt, then it was time to look for a job using those skills.
Probably a better fit for codereview.stackexchange.comLiam 1 min ago
14:54
It's just discouraging to talk to people about jobs who don't know the difference between the .Net framework, Asp.Net, VB.Net, and C#.
I'm voting to close this question as off-topic because this belongs to code review — Huangism 49 secs ago
And then you get the inevitable question
I'm voting to close this question as off-topic because it should be on codereview.stackexchange.com — Alnitak 40 secs ago
> I see you have C# experience with an open source project, do you have any work experience with it?
Yeah... my resume just went in the trash.
shotgun approach?
14:56
@RubberDuck a recruiter I've been speaking with said she picked me partially because of my open source activity.
@RubberDuck what work experience do you have?
@nhgrif 5 years VB6/VBA & 4 SQL Server/Oracle
Plus a bunch of really specific stuff related to the vendor software.
That should be worth something.
Ah, but .NET?
0
Q: Cancellable progress form using async/await

AbbasIntroduction: For a project I'm working on I used a BackGroundWorker to lift some heavy tasks away from the UI thread and report progress. For this I created some sort of modal dialog with a label and progress bar which were updated from the ProgressChanged method of the backgroundworker. I rea...

14:57
And I think a programmer would understand that, but recruiters/HR folks don't see .Net and.. That ^
StackOverflow is mainly for problems with your code. Please see codereview.stackexchange.com for code reviews. — Robin Ellerkmann 1 min ago
21 secs ago, by RubberDuck
And I think a programmer would understand that, but recruiters/HR folks don't see .Net and.. That ^
So, what would it take to add .NET
(not necessarily work experience).
I thought my open source experience would be helpful, but it doesn't seem to be.
Open source is .NET?
@CaptainObvious very nice question.
@nhgrif The project I'm working on is. It's all written in C#.
15:02
And why is it not on your resume?
4 mins ago, by RubberDuck
And I think a programmer would understand that, but recruiters/HR folks don't see .Net and.. That ^
Link to your open source projects in c#, let them judge you based on the work and not the nun years. And if the only care about number of years and not your actual talent, you don't want to work for them.
7 mins ago, by RubberDuck
> I see you have C# experience with an open source project, do you have any work experience with it?
@RubberDuck - there's a problem there.
you appear to have linked your skills to your place of work
your skills are your skills.
15:03
Because if they care about yrs exp over talent, guess what kind of retarded knuckle dragging coworkers you'll have?
your place of work is your place of work.
I agree. Perhaps I need to rethink my resume.
There is no need to directly tie your skills to your place of work
0
Q: Anything wrong with this jquery code which used to fix navbar on scroll

AbhiI have written a jquery code, which fixes a navbar header on top of page when a user scrolls down to a certain pixels. But I am not sure whether is this the correct way to do this. Because this is going to be a majorly used function by all users, it would be better if I can improve it in terms o...

Well.... I don't feel like I'm the one doing that.
The very top of my resume is my list of skills.
Work experience after that, followed up with my open source experience.
And that "experience" section is really an overview of my accomplishments, not my skills.
15:06
In my resume I summarize my skills in one place, and my jobs in another. I describe the skills as skills.... and I describe the work places with summary details of the types of activities I did, not giving too much detail on the technologies.
Yeah.. that's what I did.
Or what I thought I did at lesat.
hmmmmm maybe I just need to give it some more work.
Highlight the programming experience better.
In your current job you are: "building GUI frontends using Microsoft frameworks on top of both Microsoft and Oracle databases integrating in to product X in an industry doing Y"
Your skills are VBA/VB6/C#/.NET/powershell/..../.../.../SQLServer/Oracle/....
TS ^ that's a much better way to put it than I did.
0
Q: BOOST graph cc1plus: out of memory allocating

KHALDOUN MohsenI'm using BOOST to work with graph mining problem. So, after reading graphs from a file: t # 0 v 0 5 v 1 9 v 2 8 v 3 7 v 4 2 e 0 1 4 e 1 2 68 e 1 4 12 e 3 2 18 I created and put them in a vector, then I will use this vector for some tests. Here is the full source code : link When I compile it...

Except maybe...
> End to end development of Software using Microsoft frameworks on top of both Microsoft and Oracle databases.
I build the dbs too...
15:14
"full-stack" is the modern term....
Oh. It's full stack now. Last time I was looking for work it was "end to end"
Hey @rolfl. Thanks.
That actually sounds a lot like what I do, only with ancient technology...
@nhgrif LOL. Okay. Okay. Fine. I'll apply, but I can only do it if they allow remote. Can't afford a legal battle with the ex-husband right now.
@RubberDuck I've been preparing and studying for job hunting, and I've read about dealing with HR.
They say the best way to get a job is snoop out the boss and call him directly.
15:29
I'm afraid that would be seen as rude and far too aggressive.
A lot of people actually do it.
They say they almost always get the job.
wow... I can't believe this code can fit on my screen now.
If this is working code that you think could be improved, it might be a better fit for codereview.stackexchange.comjonrsharpe 1 min ago
0
Q: Creating a Python namedtuple class that forces some of its fields to be floats

kuzzoorooI've got a use case for namedtuple that requires some of the fields to be floats. I could require the code that's constructing the namedtuple to supply floats, but I'd like for the namedtuple class to be smart enough to convert strings it gets into floats for me (but only for a specified subset o...

I might be the only one here who calls it "OOP" as opposed to "magic"
2
15:43
0
Q: Smarter Boostrap Affix

ThomasReggiThe normal boostrap affix doesn't take the items natural offset top position into account, you have to manually pass it in as an attribute. This takes care of that, and accounts for the offset top changing on window resize. var $attribute = $('[data-smart-affix]'); $attribute.each(function(){ ...

@RubberDuck if you can only remote, probably wouldn't bother... But I'm still going to paste the link regularly...
I'd love to do it, but I don't know VB.NET or SQL, and I don't know C# enough either :(
@nhgrif - curious: Have you ever been in the Armed Forces? - is answering "yes" a good or bad thing?
Good thing, fairly sure
Hopefully, some extreme pacifists won't hire them.
15:50
Well, the next question is: Are you an active member of the National Guard?
There is a problem with that here.
It indicates respect towards superiors and the hierarchical structure and discipline
@rolfl I think that might be in case you have to be called for riots or something
some companies might compensate for that
Maybe they want you to have the training so you can take out any crooks who try to break in.
I know companies like Walmart keep paying wages when an employee is drafted or something like that
0
Q: two nested each loops with `if` and `break`

pmichna def user_not_authorized(exception) message = t('flash.access_denied') if exception.policy.class.to_s.underscore == 'group_policy' && current_user.students.size != 0 current_user.students.each do |student| student.memberships.each do |membership| if membersh...

15:55
@nhgrif LOL. Fair.
@rolfl Companies can get tax credits for hiring members (active or retired) of the armed forces here.
ahhh
If you are just learning about web development and you want to produce an actual working application authentication, which is very hard to do correctly, is not a good place to start. Use a framework and if you want to learn study how the good php open source applications do it, but I urge you to not try to implement it for real by yourself. If it is just for learning maybe but even there how are you going to get serious code review from an expert? — Elin 1 min ago
0
Q: The right way to use IPC::Open3 in Perl

OleksiyHere is the function which does exactly what is specified by it's name: sub runCmd_getStdoutStderrAndExitCode(@) { my @cmd = @_; # fork a child my ($child_pid, $child_stdout, $child_stderr); eval { $child_pid = open3(\*STDIN, # is /dev/null when collectl is a daemon ...

What workflow do you currently use for your other developers? How do you code review everyone else? You aren't all just committing to master are you? — Schleis 1 min ago
16:14
0
Q: Reviewing and correcting code style

LeonidI am new to android developement. Created calculator application. Want to improve my code quality. Will be helpfull for any advice to make the code better and more professional (overall structure, splitting onto logical units, accordance to code conventions, methods and variables names, comments ...

@rolfl I wouldn't ask that question, and wouldn't hold any answer against anyone, but I think everything else being equal I would hire the one with military experience.
But I don't think its that significant, and everything else is never going to be truly equal.
0
Q: Avoid memory problems in C++

KHALDOUN MohsenAny suggestion to make this code faster and avoid memory problems please: #include <boost/graph/adjacency_list.hpp> #include <boost/graph/vf2_sub_graph_iso.hpp> #include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/classification.hpp> #include <fstream> #include <iostream>...

"This site is not for reviewing code" So, you think your update is not asking for code review? That surprises me. Either way, that's all beside the point. Yes, of course the update is related because it's about the same code. But the update is a about a different problem. — Felix Kling just now
16:31
@Duga 2 words: "wow" and "lol"
@rolfl Looking for a .net job?
0
Q: Custom Logging Class: Efficiency

Michael WigginsI wrote a logging class for several of my applications, but I have noticed that it is fairly in-efficient. Can anyone suggest improvements? What I am looking for: Pointers on improving efficiency Tips for lowering the code-footprint Suggested functional improvements Please be as nit-picky as...

16:46
in VBA, 9 secs ago, by RubberDuck
It's weird. Even when programmers are speaking English, we're really not.
@200_success locked because of the copyright notice?
0
Q: Android calculator app

LeonidI am new to android developement. Created calculator application. Want to improve my code quality. Will be helpfull for any advice to make the code better and more professional (overall structure, splitting onto logical units, accordance to code conventions, methods and variables names, comments ...

ah, just saw the comment - was about to say "that would need an explanatory comment" ;)
Could that message be related to this bug perhaps? As long as the code works as intended (which is sounds like it does) this should still be on-topic regardless of that message, I think. — Phrancis 32 secs ago
@ anyone weigh in on this? ^^
Haha. @nhgrif
Best slide I've seen about companies that don't do remote as default. They'll all die eventually - not soon enough. http://t.co/gdR781VQML
17:20
Yes, of course I don't think it is. So, following your logic, Stack OverFlow is a site for code reviewing right? Then, knowing that codereview.stackexchange.com is for code reviewing as well, that's a duplicate isn't it? Look at that! You were trying to find why the question is wrong and you found that the site is wrong! Congrats! — stack pepe 1 min ago
Now, when a stack overflows, how does it work?
Is it like integer overflow, where it wraps around to the other side, or is it more like trying to access an item in a List that doesn't exist?
@Hosch250 - a call stack is an interesting beast.
Take a simple recursive function... (these are the ones that normally overflow).
Yep, I've had them :(
They keep adding items to the top of the stack until it can't hold any more.
Each time you call a function, any variables declared in the function have to have space made for them.
+1 for the lulz and mwahahaha ;) — Mat's Mug 38 secs ago
17:23
Unless it is static, and can only have one instance.
as your calls get more and more nested, you keep having to allocate more space.
you have to run out somewhere.
C programs and unix shells, etc. pre-allocate stack space for each program.
it is normally not very big, like 32MB max, or so.
And, they just use it all up.
often as small as 32KB
Some languages use a different space, and manage their own stacks.
some languages can do tail-recursion optimization, and not use a stack at all for recursive calls (or some recursive calls), and they essentially become a loop.
But, regardless of the language, it is normally possible to create some use-case in which the overflow happens.
you only have X amount of memory, no matter how hard you try
Now, are Win32 applications like this, where they only have a limited amount of memory?
1
Q: Batch file command looper

chazjnJust a fun batch file I have made. I wanted an easy way to loop any arbitrary command several times: loopme.bat @echo off SETLOCAL echo LoopMe v1.0 IF "%~1"=="/?" (GOTO HELP) IF "%~1"=="" (GOTO HELP) IF "%2"=="" (SET TIMEOUT=1) ELSE (SET TIMEOUT=%2) SET COMMAND=%~1 SET COUNTER=0 :RUN SET /A CO...

17:29
@RubberDuck yeah, its not my decision.
I'm sure it's not buddy. I just say that and thought of you.
I actually don't really like the BYOD/work-from-home movement.
@Mat'sMug People running windows have already been hacked ;-)
I would love to be able to do it, but it isn't nearly as secure as the other way.
@Hosch250 People think it's much better than it really is.
17:30
The good news (or is it bad?) is, it makes more work for IT workers.
If they hired more IT people, it would probably be good, but I bet they usually don't.
@RubberDuck I can believe that.
@RubberDuck actually, the hard part for us, it's really difficult to get a grip on what you're actually development until you go next door and see it in use.
I believe that @nhgrif. I wouldn't be as good at my job if I hadn't spent years doing the actual business work of the people I develop software for.
@rolfl I know heap overflow exists, but I was struggling to figure how to make it happen to prove a point to someone.
@nhgrif - just malloc space till it fails.
How about a List of SomeMemoryIntensiveType.
17:34
The list normally holds only pointers.
Then, while (true) { List.Add(new SomeMemoryIntensiveType()); }
you need to actually allocate many of the SomeMemoryIntensiveType ... yeah.
I had to use the List because otherwise, wouldn't the variables go out of scope and be removed?
In Obj-C, they probably would, C# uses GC, which might not run quick enough (but it probably is set to run partially based on how much memory is available).
In a GC'd language then yes, you have to keep it in scope somehow.
in Obj-C, I expect malloc will require a matching free, and if you don't free, you'll run out.
No. Modern objective-c uses ARC magic.
17:38
In Obj-C, it has automatic memory management, so variables are removed as soon as they go out of scope, or is that Swift?
In at work so I cant give the full lesson. Without a strong reference, the memory will be dealloc-ed faster than a GC'ed language.
You've discussed it with me before, I just couldn't remember if it was Obj-C, Swift, or both.
0
Q: Php regex to replace multiple spaces/linebreaks

mowgliWhich of these two methods is best to strip multiple spaces and linebreaks? Or is there a better/smarter way? They seem to output identical result. But the latter has "negative lookahead" (?). I assume that is "best", but I can't see why (the input text is never huge) $str = preg_replace('/ {2...

Both
17:56
There are processes around code reviews/checkins that have very specific design to accomplish specific outcomes in the development process. If you understand these processes you understand the effect that one process or another will have in very concrete terms. Anyone who approaches the subject with only opinionated answers simply doesn't have the knowledge/experience to model the process in a concrete way, and in such a case that answer should be downvoted. That doesn't mean there aren't some really good answers to the question that are not opinions and have concrete outcomes.. — AaronLS 25 secs ago
18:23
0
Q: Find the highest number satisfying a condition in an infinite range

Aseem BansalI wrote the below function for doing a variation of bisection search that I came up with. This can be useful when the higher bound is not known. It assumes that as number increases the result of the condition is also increasing. For example - find the largest classroom size where the probability...

Impossible?
We are currently mitigating a DDOS hitting our network. We will let you know when this has been resolved.
DDOS? as in denial of service?
Yeah... Wtf?
Are we sure it's not just the legions of help vampires finally come to a critical mass?
2
18:40
as long as chat servers aren't being targeted...
2
@Mat'sMug as in distributed denial of service.
gee thanks!
(what's the difference anyway?)
DDOS involves a botnet.
Distributed Disk Operating System
@nhgrif that's gotta take a truckload of floppies!
18:55
The DDOS attack on our network has been resolved. Let us know if you see any further issues.
What, there was a problem?
So, yesterday, I swapped 3 physical partitions, one of which had 2 logical volumes, from one disk, to another smaller disk, and it "just worked".
Today, do you think I can just do: "do-release-upgrade" on my ubuntu server?
Currently: Ubuntu 12.04.5 LTS
Target: Ubuntu 14.04.1 LTS
md3 : active raid1 sdb1[1] sdc1[0]
      2930263876 blocks super 1.0 [2/2] [UU]

md126 : active raid1 sdf1[0] sdg1[1]
      3906882368 blocks super 1.2 [2/2] [UU]

md127 : active raid1 sde1[1] sdd1[0]
      1953382208 blocks super 1.2 [2/2] [UU]
@rolfl the guy doesn't quite get enums, and you're suggesting logging on a separate thread? lol
4
3 RAID arrays..... on those arrays, are.... 18 TB of storage.
+1'd anyway
great answer as always
why, thanks ;-)
 15:05:03 up 181 days, 16:19,  6 users,  load average: 0.11, 0.17, 0.23
running without a reboot for.... 6 months.
19:05
@rolfl the start of a DDOS attack?
6 users!
Nah, when I last rebooted my file-server downstairs.
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
rolf     pts/0    solarium:          13:52    2.00s  0.14s  0.03s sshd: rolf [priv]
rolf     pts/3    folio:S.0        19Jan15 58days 23:50  23:50  irssi
rolf     pts/4    folio:S.1        19Jan15 28days  0.20s  0.02s -bin/tcsh
rolf     pts/8    folio:S.2        19Jan15 29:32m  0.92s  0.92s -bin/tcsh
rolf     pts/9    folio:S.3        19Jan15  6:18m  1.42s  0.84s -bin/tcsh
rolf     pts/11   folio:S.4        18Feb15  4days  0.03s  0.03s -bin/tcsh
@SimonAndréForsberg 6 users of what? CardShifter?
I use "screen", and have open sessions permanently.
@Mat'sMug just @rolfl DDOSing himself
2
0
Q: Code to extract text fields from a mongodb collection and append it to a list in python using pymongo

philmckendryI have created an if statement to cycle through a mongodb collection of json objects and extract the text field from each and append it to a list. Here is the code below. appleSentimentText = [] for record in db.Apple.find(): if record.get('text'): appleSentimentText.append(record...

19:10
@Captain no shit, it's code?
2
also, missing "array" somewhere in the title to get a 50 point bonus for using all tags in the title...
19:26
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com — Joe 26 secs ago
@Duga it's hopeless
19:42
I started a paper, and words are flowing onto the page like I'm a trained orator :)
I guess I'm a person of extremes (if you didn't see my deleted message, it was that I was having trouble with school because I was burned out).
20:18
hello friends
hello friends and @Mat'sMug
;-) just kidding <3
how is everyone?
Hola.
I killed a bug today.
3
Quick, someone pin that ^
20:20
@Donald.McLean but did you kill a zombie today?
@Hosch250 I would, except I try not to step on the toes of the local moderators.
not that kind of killing ;)
@Mat'sMug No, I was busy working, killing a bug.
20:41
fair enough!
@Mat'sMug A tube-full?
"A series of tubes" is a phrase coined originally as an analogy by then-United States Senator Ted Stevens (R-Alaska) to describe the Internet in the context of opposing network neutrality. On June 28, 2006, he used this metaphor to criticize a proposed amendment to a committee bill. The amendment would have prohibited Internet Access providers such as AT&T, Comcast, Time Warner Cable, and Verizon Communications from charging fees to give some companies' data a higher priority in relation to other traffic. This metaphor has been widely ridiculed, despite the fact that he was in charge of regulating...
Please use PreparedStatement with parametrized queries as they are intended to be used instead of concatenating values into your query string. Your current code is vulnerable to SQL injection. I am on the fence for closing this as too broad or off topic (eg: better suited for codereview). As I see it there are too many possible reasons, for example Accounts having a large number of records and no index on the Username column, or connecting taking too long (and on the UI thread by the looks of it, but I don't know JavaFX, so I am not sure), and probably more if I look more closely. — Mark Rotteveel 15 secs ago
20:56
0
Q: Alternative to using nested if statements

ryekayoI am stuck on a piece of code that I have written. I have made a whole heap of nested ifs and I want to find a way to convert to a switch-case (problem being I have no way of declaring an int that can distinguish between cases). Is there an alternative to making this code snippet appear less ugly...

Are there tuples in C?
@nhgrif A struct is much like a tuple.
Yes, but different.
This guy is saying he's using a C-library which takes as parameters constant-sized arrays.
And in order to use it from Swift, he has to pass tuples... which makes no sense to me.
0
Q: Array to Tuple in Swift

MazyodI am burdened with the requirement of interacting with a C based library, which has a bunch of constant sized arrays (e.g. char[17]). When trying to assign or read those properties from swift, they are represented as a Tuple type of that size.. As far as I know, you can't access tuples with su...

0
A: Array to Tuple in Swift

nhgrifWhy bother with all this mess? We can pass the array around as a Swift array every where we go, and keep it in this format until the very last moment. A C-array is nothing more than a contiguous block of memory, whose size in bytes is equivalent to the size of the array type multiplied by numbe...

21:23
Am I going to rep-cap off of this today?
13
A: My Rational struct, version 2

nhgrif namespace NotSystemAndOthersThingsThatIHaveNoPracticalUseFor I couldn't possibly imagine a worse namespace. Why not use something both simpler and more descriptive? namespace RationalMath

@nhgrif why delete your answer?
Because I can't make sense of what he's actually trying to do.
@nhgrif capped yet?
No.
I just cast a delete answer vote.
-3
A: My Rational struct, version 2

MargusQ : Why would you use Rational numbers? A : Main reasons to use them Rationals have no round off error Rationals do not experience Catastrophic Cancellation Rationals act as though the machine epsilon were zero Furthermore you do not want to use big integer or decimal classes. Q : What ar...

seconded
21:32
@SimonAndréForsberg +69 mugs today, how many simons'?
nevermind
well done ;)
TTQW
@bazola Do you have Xcode 6.3 Beta?
Is there a reason there's not a ? We have .
@nhgrif no just 6.1 i believe
Wow. You should update to 6.2
6.2 is out of beta now.
Also, RE: why I deleted my answer.
@nhgrif I already added it, thought it was obvious — Mazyod 16 mins ago
> thought it was obvious
Maybe I'm taking that the wrong way, but meh. I kind of care less about helping him.
21:50
Yay!, I got my 1 downvote rep back!
0
Q: Finding the common prefix in a list of strings

T. RexGiven a list of strings, my task is to find the common prefix. Sample input: ["madam", "mad", "mast"] Sample output: "ma" Sample input: ["question", "method"] Sample output: "" Below is my solution, I'd be happy for help improving the algorithm (I'm open to totally different approaches) or gen...

Any Twitter pros?
What are some good programming hashtags?
-1
Q: How should I serve static dependencies in ExpressJS?

acbabisNormally, I copy libraries like jQuery into the js/lib folder of a web project so that they can be used by the client. I was thinking that if I'm already using npm for package management, I could just skip this step. I did this instead: npm install jquery --save and then in my server code: ap...

0
Q: Learning c#. "Game of Life" troubles

Jhonny LiI´m trying to learn c# and as a beginner project I chose to try and recreate John Conways Game of life. I'm trying to accomplish this by doing the calculations in a 2D int[,] array and then transfering the data to a datagridview so I get a visual representation of the results. I have a problem ...


« first day (684 days earlier)      last day (3630 days later) »