« first day (1094 days earlier)      last day (3221 days later) » 

00:00
RELOAD! There are 2205 unanswered questions (93.4701% answered)
00:18
0
Q: Unity3D DirectionalSprite

CAD97I've created a simple utility class for use in my Unity2D project, which allows a Sprite to have separate sprites for when it is facing East, North, West, or South (that's the order that z-axis rotation places them in). There aren't too many Unity-isms in the code, and the part that I'm most conc...

@Vogel612 try with 3D glasses on :)
01:11
If you finish implementing your code and make it work as intended, "making it more efficient" is exactly what Code Review does. — Mat's Mug 37 secs ago
0
Q: Can anyone walk me through the logic of this algo for the task?

Tsvetan DimoffHere is the task itself. Cannot wrap my head around this algorithm. Could there be a more elegant solution for the task? Here is a solution (math) to an almost identical problem. using System; namespace Busses { class SpeedsStartup { static void Main() { int...

01:39
0
Q: Simple Pool Allocator

Jerry CoffinThis is a simple pool allocator, based (to at least some degree) on a previous answer. The basic idea is pretty simple: allow a user to allocate objects of some type quickly (in relatively large contiguous chunks) and only free objects when the allocator itself is freed, then destroy all the obje...

0
Q: We scraping SQL vulnerability

13aalI've wrote a program that scrapes websites for SQL vulnerability, IT DOES NOT EXPLOIT JUST SEARCHES, I would like some critique on what I've done, is there a way I can write the OptParse better, also a way I could write the rescue clauses better, they're extremely long. Thanks ahead of time, I'll...

01:58
This is an open ended question. Generic code reviews to point out what's wrong in your code is off topic. — R Sahu 29 secs ago
02:15
0
Q: Numerical Differentiation Using the y-intercept

Fred VioleI have a routine for determining the derivative of a function using the y-intercept (B) to infer the finite difference step (h). Instead of directly using smaller and smaller h, we can solve for the slope m in y=mx+B with a given B. That B represents a specific h after some substituting and sim...

0
Q: Sorting a file with three-line blocks by the second word of the first line in each block

jbrockI have a text file with the following three line pattern with blank lines in between. My script sorts alphabetically by each person's last name and preserves formatting. I would love to see other options to improve this in Bash. For example, the group command that redirects into final.txt repeats...

Please read about How to Ask questions here. Then, come back, format your code, and make sure you actually ask a question. Right now, it sounds like you're looking for code review (which is off-topic) or simply opinions about which is better (which is not an acceptable question here). — Ed Cottrell ♦ 41 secs ago
02:33
This question may be better suited for the Code Review SE4castle 37 secs ago
02:50
0
Q: Implementing Builder Pattern In Java With A Static Inner And A Concrete Standalone Class

Levent DiviliogluI am studying Gang Of Four design patterns and I want to implement a builder pattern in Java. It seems there are two options to build a builder pattern; Using two different classes: A target class and a builder class Using a nested static inner builder class inside the target class 1) Using B...

03:22
monking
0
Q: I have a problem with materialize slider on angular

uriel curielI'm new using AngularJS and when I want to use the slider materialize shows me a gray box and the slider does not work but when I put it without angular if it works this is my code index.html: <!DOCTYPE html> <html lang="en" ng-app="flova"> <head> <meta charset="UTF-8"> <title></title> <!-...

04:02
0
Q: Stack based esoteric language interpreter in ruby

DJ McMayhemFor a while now, I've wanted to write a stack-based "Turing-tarpit". This is the perfect excuse to learn ruby, which I have never used before. So I wrote Brain-flak. The language only uses these characters, ()[]{}<> in various contexts. Here is the interpreter: class Stack def initialize(name...

04:21
This code is extremely difficult to read, much less help you improve. I suggest posting it to Code Review Stack Exchange, but first take some time to format it in a way that's easier to read. — Jordan 41 secs ago
04:36
0
Q: Android Login system

user3168736I am completely unaware of all the android features and available libraries I just designed a login system to practice it. I have referred few books[not fully] and few tutorials. Layout I am using relative layout. And have two EditText and one button for login and one button to start register ...

04:54
Monking
05:24
Monking
Monking
06:06
God, I hate bank holiday cover..
Monking
06:46
If this code works Stack Overflow is the wrong place to ask this question. Try Code Review but check their guidelines first. — Paulie_D 50 secs ago
07:05
This is off-topic for Stack Overflow, since you don't have a specific question. However, it should be a fine question for Code Review. I suggest that you delete the question on Stack Overflow and repost it there. Also, when you do repost it, you should make a live demo by pressing Ctrl-M in the question editor. — 200_success 46 secs ago
What's very fun that you don't want to occur in production and rhymes with "integer oh-no-verflow"?
alright. I understand. Thanks for the link to Code Review! I'll remove the question — Friso NL 38 secs ago
07:28
0
Q: What makes a question a duplicate?

Programmer 400If I ask twice about the same purpose and with different codes, it that a duplicate that will get closed? Typically I ask a question about some code and get a review, then I make changes and want to ask again about the new and improved code. For S.O. that would be a duplicate asking the same "ho...

0
Q: Recommendations for a JavaScript DnD sortable list? (Bad / Good practice)

Friso NLI made a simple list with drag and drop ordering function using javascript html and css. Although I tried to do this as efficient as possible, I'm sure there are some improvements to be made. Bad / good practice: What would be considered bad practice in my code below and what could be improved ...

07:45
/c/Users/CSUKDNPY/AppData/Roaming/npm/standard: line 14: 16240 Segmentation fault      node "$basedir/node_modules/standard/bin/cmd.js" "$@"
holy crap, I got a segfault
07:59
Shouldn't such questions be posted on codereview.stackexchange.com? — CinCout 14 secs ago
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Shell Sort Comparisons/Exchanges Counter
0
Q: How can I avoid using nextLine to bypass the change of line after nextInt

Fernando Gonzales-VigilCheck this line of code. The simple idea is to print the input in a different order. How can I avoid using nextLine 2 times and just read the string: public static void main(String[] args) { Scanner sc=new Scanner(System.in); int x=sc.nextInt(); double y=sc.nextDouble();...

0
Q: What would be a better refactoring technique for controllers in rails

SaadI have a photo_shouts_controller.rb and text_shouts_controller.rb, they both have almost similar implementations, and I would like to refactor it. I have implemented a refactoring but I am not too sure if that is the best way to do it. current implementation class PhotoShoutsController < Appli...

Yesterday, we got 13 more accepted answers, 15 more questions were answered, 34 more answers were posted, 85 badges were earned, 102 comments were left, 18 more questions were asked, 3 more questions were unanswered, 56 users were created, and 201 votes were created.
Our question answer accept rate went up by 0.007%.
Our question answer rate went down by 0.0054%, and our answer accept rate went up by 0.0019%.
Hi @Duga. I mean, @EBrown
3
@DanPantry <3
08:38
@DanPantry In JS? I've never managed that.
@Mast my webserver running in Node crashed too
I think that's a testament to how awful these laptops are
I've run big things on awful hardware and it usually survives.
0
Q: feedback on error handling

Programmer 400I plan to use this error handling for several projects (my own CLI, my own memory management, my own debugger, my own testsuite). I'm still a beginner at this detailed level of C programming looking for advice from experts how to improve my code. My goal is that my code should compile without war...

09:08
why are there tests in my test project that connect to a real database.
just why
09:22
they're not testing the code: they're testing you
@DanPantry assert("DROP live_tables", true)
0
Q: Parabola calculations revised

betsegAfter applying the suggestions, I wanted to revise the question with the new code because I don't think this is good enough. Previous question #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> /* global loop counters */ int i=0, j, k; /* to find a, b, and c from the ...

09:57
git push -fu feels so good to write.
(It's a private branch, don't worry... rebasing)_
0
Q: Remove whitespace from window selection in js

dimidI'm trying to remove leading or trailing (sometimes both) whitespace from the user selected text. Implemented according to this answer. However, I wonder if there's a more elegant solution. Unfortunately, Selection.modify didn't work for me, and besides it's considered non-standard. So, I'd like ...

0
Q: Searching two different elements in a same list

vtorosyanI have a list of conversion histories, where information about user channels is stored. For example user may have app for iOS and Android installed. Each time user logs in, I store a conversion history, so that there might be multiple rows with shared data (e.g. client is always iOS). I need to ...

I just ran into the recursion limit of Excel.
1475 is too much.
10:25
0
Q: Ymbirtt vs The Gilded Rose Kata

ymbirttThe Gilded Rose Kata is a refactoring challenge, in which some frankly disgusting code is thrown at the developer, and they're told to make a small change to it. For reference, the (truncated) requirements and the original code are given here: All items have a SellIn value which denotes th...

10:35
0
Q: Get part of element ID

dingo_dI am getting the number part of the container ID that the button is in. Now I am wondering if I need to create an array using split and then put this number in a variable, or if there is a more efficient way to get it. .match() also returns an array, so this is almost the same as using split. I...

11:19
0
Q: Is this best way to validate input values in C#?

the1900I begin to study C# 5.0 few days ago. I just wonder I try to avoid duplicated code for validating of input values class transcript { //Use lamda expression and Func for validation logic Func<byte, byte> validate = (grade) => { if (grade > 100) throw new ArgumentOutOfRangeExcepti...

11:32
0
Q: Wascally Wabbits

MastThis question is part of a series solving the Rosalind challenges. For the previous question in this series, see Mendelian inheritance. The repository with all my up-to-date solutions so far can be found here. The next part of the Rosalind challenges is basically asking for a Fibonacci solver,...

12:09
@MartinH Test it, make sure it works, then go to Code Review (Please read their FAQ first!) post it there, and request for feedback. Stack Overflow is not the best place for ended feedback and/or critique. — Madara Uchiha ♦ 55 secs ago
12:22
good morning
0
Q: Bash: output time to file // needs improvement

Lars-Daniel WeberI want to run an application and write (append) its processing time into a file. Also, I want to see the stdout and stderr output on the shell, but don't want to write it in a file. After running the process, I'd like to see time measured. Since I'm on Bash, one solution would be this one, but i...

@Malachi Monking
sed awk and grep are really, really picky
12:48
@Malachi They do exactly what you ask them to do, regardless whether that's what you intended to ask them.
Power to the flags.
lol very true
I should have studied them a little bit more, I was able to get through the lesson but then when I tried to use them in the specified way for the assignment I couldn't get it right the first time around....
0
Q: C++, associativity problems in math expression

SeFWith the following simple C++ exercise #include <iostream> using namespace std; int main() { int euro, cents_v1, cents_v2, do_again; double price; do_again = 1; while(do_again != 0){ cout<<"Insert price in Euro with cents"<<endl; cin>>price; euro = pr...

If the code is working as expected and objective of this question is improvements/optimizations, CodeReviews is the right place. — Rajesh 51 secs ago
@Malachi You can study them all you want and after a year of using them you'll still learn new combinations.
It's a tool suite in disguise, one of the most powerful in existence.
0
Q: Extension method to format properties that are not null and not empty

JeroenI'm trying to work with the following class, which is inside a library I currently cannot change: // This class represents "external" code as far as my review // request is concerned: I cannot change this, currently. public class AddressDto { public string Name { get; set; } public strin...

13:13
@Mast oh I hear that. it looks like a lot of fun. I should have been using them all along to find files.
13:32
1
Q: How to optimize AsyncTask Method?

Parama SudhaEven I know that It is not a good way to write code like this. I need to improve this.So please help me to optimize this code. private class TabNameSync extends AsyncTask<Void, Void, String> { String BASE_URL = Config.DATA_URL; ProgressDialog nDialog; HashMap<String, ...

Why is it "wrong"? If it's work and you just want tips on writing it better, try codereview.stackexchange.com — JETM 14 secs ago
@JETM Code review is only for working code. — NathanOliver 7 secs ago
@Duga No.
13:48
@JETM OP explicitly states it's 'wrong code', so it's not ready for Code Review. Not by a long-shot. — Mast 18 secs ago
14:04
I think my Laptop is ded
14:23
0
Q: Calculate the Hamming difference between two DNA strands

CodeYogi Write a program that can calculate the Hamming difference between two DNA strands. GAGCCTACTAACGGGAT CATCGTAATGACGGCCT ^ ^ ^ ^ ^ ^^ The Hamming distance between these two DNA strands is 7. Code: import java.util.Optional; public class Hamming { public static int compute(Str...

14:43
0
Q: C++ simple event system

kdcodeI posted an earlier version of this code a couple of days ago, so it's the updated version of the code posted here. #include <iostream> #include <functional> #include <conio.h> #include <unordered_map> #include <string> class EventListenerHandle { template <typename U> friend cl...

15:17
0
Q: ZonalStatistics in a For Loop

user104425I am working on a project for my beginners' Python class and have gotten a little stuck. I have three .tif files that I want to do Zonal Statistics for, but I am getting an error. Here is my script: import arcpy import os from arcpy import env from arcpy.sa import * env.workspace = r'C:\Users\a...

15:27
@Vogel612 that doesn't look good
Time to retire that hunk of steel
0
Q: Does this Java implementation of multiple singletons in one class smell bad?

RobinI've implemented a class, which provides access to different static resources, which are used by different frontends. I'm hesitating, because in Java getters and setters are quite wide spread. So my question is, if this code smells bad? public class ResourceManager { public static final Pref...

0
Q: HTML parser to insert marker text after fixed number of characters

dhanrajmvar charCount = 0; var charLimit = 1000; /*Number of characters after which marking is done*/ var MARKER = "-A1B2C3D4E5F6G7-" /* Marker text to be inserted into html text*/ var parseHtml = function(currNode){ var currLen = currNode.textContent.length; var currLimit = charCount +...

@Vogel612 put an old version of linux on it
play toy!
Not sure I understand. Look here for generating a nonce: codereview.stackexchange.com/a/106880MvdD 40 secs ago
15:38
@Malachi that is an old version of linux... or more correctly: was..
oh lol
I daresay the drive went bonkers at long last
so you just need a new hard drive, right? lol
It's basically inane to buy a hd given that everything else in that thing is older than some CR Regulars. Waste of money
15:49
It's more cost-effective to get blazing new hardware
I was messing with you. you can put a Linux OS on a thumbdrive these days.
@Vogel612 Older than our monkey?
@skiwi it's a little hard to carry whole rooms
0
Q: sort a stack in descending order

saneGuyMaintain current element as the top element in the input stack. Pop all the elements on the ordered stack which are greater than the current element and push them in to the input stack and maintain a count of these elements. Now push the current element into the ordered stack and pop the count nu...

@Vogel612 Fair enough
16:04
@CaptainObvious this is Java isn't it?
pinged me even though there was no '@'
thanks malachi :) — saneGuy 2 mins ago
0
Q: Find the largest number in array

aaaI try to find largest number using array and pointer, but program gives erros on "finding step". Where is my mistake? include void find_two_largest(int a[], int n, int *largest) { int i,max=a[0]; for(i=0;i<n;i++) { printf("enter %d. value: ",i+1); scanf("%d",&a[i]);...

16:26
@Vogel612 The BIOS is from 2007 according to the screen.
A whopping 60GB HDD.
I've seen documentaries bigger than that.
16:43
@Mast I remember it was even older ...
but I may misremember
I know the feeling.
17:06
0
Q: What does the Bob say?

CodeYogiDescription: Bob is a lackadaisical teenager. In conversation, his responses are very limited. Bob answers 'Sure.' if you ask him a question. He answers 'Whoa, chill out!' if you yell at him. He says 'Fine. Be that way!' if you address him without actually saying anything. ...

@CaptainObvious AFAIK Bob doesn't speak at all. Only Jay does.
2
That's Bob.
Or Bill, I can never tell them apart.
pimping.. as usual
0
A: Sorting a dictionary and get top 3

BenVlodgiEither of these methods added to your SkiLodge class, will get you what you're looking for. This will grab your top X KeyValuePairs with the Skier being the value. public List<KeyValuePair<string,Skier>> GetTopSkiers(int howMany) { return Skiers.OrderByDescending(kvp => kvp.Value.Score).Tak...

@Mat'sMug lol
lol @BenVlodgi you shoulo stick around :D
4
17:21
like a ghost hiding in the walls
monking
Oi, @BenVlodgi! Long time no see.
I lurk
but most of the time I wurk ;)
jeesh, everyone I know, now has giant piles of rep
Ah, that's the completely opposite of most of the active users in this chat I guess.
@BenVlodgi You mean like.... me?
17:26
@SimonForsberg yeah boi, looks like you won the lottery... of rep lol
Oh, thanks santas! Two upvotes closer to 10K on Stack Overflow!
@BenVlodgi My rep is nothing compared to 200's. Or rolfl's. Or Janos'. Or.... okay, a little bit compared to @Mat'sMug.
:D
@SimonForsberg I've almost got 1k, so... like the same thing
BenVlodgi, Grand Rapids, MI, United States
3.3k 1 10 43
for some values of 1k...
hey wait, I have more rep than @SimonForsberg on Stack Overflow too?! :D
17:28
Oh bloody mug...
5
I'm 185pts short of 10K on SO, wanna race? :)
No thanks.
@BenVlodgi oh, you meant 1k on SO...
BenVlodgi, Grand Rapids, MI, United States
945 5 15
Approaching 10K rep on @StackOverflow feels a bit like counting the days left until your birthday for some reason.
indeed,
Though I do like seeing my wide-eyed face in the chat
@BenVlodgi enlarged the image for you ^^
17:34
it's like looking into a mirror... beautiful
Are you @JeroenVannevel's brother or something?
5
Welcome to the 2nd monitor @betseg
@Mat'sMug I can't find that profile
@Vogel612 thanks
im just looking
lol someone made a VS plug-in to order pizza
6
@BenVlodgi yup.
Nov 6 '15 at 12:28, by Jeroen Vannevel
Initial testing shows I'm awesome
Requesting hardware-recs for my soon to be new laptop / convertible for university
I'd prefer to be able to install a linux in dual-boot and have some space for other stuff, so a 256 GB HDD should be in there.
17:45
@DanLyons is there a download page?
the link I posted
also it shouldn't curl up into a ball when I throw some work at it...
lol, right
I'm running ArchLinux + Windows 10. Works like a charm. I love my laptop. Almost considering buying a second one.
Okay, ArchLinux doesn't work like a charm because I suck configuring at ArchLinux, but besides that...
Wondering if I should wait for the GTX 1080 instead of getting a 980 now.
I've got a 760 right now, and it does okay for most of the VR stuff that I play.
17:49
@BenVlodgi Yes, wait, at least definitely wait if you want VR
That's what I would do at least
I've been waiting, since it's supposed to use a different bus, but it's rough with a long-ish steam queue of games I need to get through once I finally upgrade :|
@SimonForsberg I like how they didn't put a price tag on that
~cough
that's what I was leaning towards
Had my Vive for a couple weeks now, wanting to play some really high end stuff, but I know I cant.
Get jitter sometimes with some "seemingly" low intensity games
@DanLyons pain = real
@BenVlodgi How is the Vive?
18:02
@Vogel612 That's not a lot lately. But any laptop will fill your specs. More requirements?
@Mast small-ish. I want to take it to lectures. Touch-input would be awesome. Battery life in general needs to be high
Go to Codereview — FirstStep 10 secs ago
Even tablets have 256GB now.
max price: 1k€
@Vogel612 Stay off Windows 10. Windows 8/8.1 (if you use Windows) has wayyy better batter life.
18:03
for university stuff I'll be using linux mostly anyways
I used to be able to get about 3-5+ hours out of my laptop on 8/8.1. I get .5-2 on 10.
As recommended by @FirstStep this is the place you wanna go: codereview.stackexchange.com4386427 just now
@Hosch250 batteries do wead down...
Same here. My laptop used to last at least 6 hours. Now it drains in about 1.75 with Win10.
I was actually very surprised at how long 8.1 lasted since I have such a powerful laptop.
18:07
might as well stick with 7 then
Actually, 8.1 has better battery than 7.
They removed the Aero and did a lot of optimization to prep Windows for smaller, less powerful devices.
fantastic!
I have a Oculus DK2 aswell, and have had it for a while.
I know the Vive and Oculus CV1 are nearly identical in the headset specs, but the Vive is worth the extra $200, for the roomscale experience.

I did like playing games sitting at my computer with my oculus, but everything is so much more fun when you're standing and moving around.

sometimes I find myself sitting on the ground building small structures, or fiddling with contraptions in different games, and realize that I'm just sitting in the middle of my living room.
@BenVlodgi That all sounds cool :)
How does mixed reality exactly work? Some days ago I saw a video of a racesim with mixed reality and it looked epic
http://www.commitstrip.com/en/2016/05/02/life-of-a-freelancer/
CommitStrip
Life of a Freelancer
CommitStrip
1462212544
2
@Vogel612 Get a netbook instead of a notebook.
18:15
@CommitStrip bwahaha
Or even an ultrabook.
@Mast those don't have remotely enough power
@Mast and those are too expensive.
Atom cores have next to no computation power, but they have a battery life of 10 hours or so.
also I really need a reasonable screen diagonal
Yea, if you need 15.6" like any decent laptop has, a netbook isn't cutting it.
18:17
also I got huge sausage fingers. I can't type on netbooks or ultrabooks
So, something like an Asus ROG GL552VW-CN108T?
1
Q: Making a Prolog compiler simpler with Java

Marine1I'm actually doing my own Prolog compiler just like SWISH one with Java. Prolog is a logic language that is particularly suited to programs that involve symbolic or non-numeric computation. Prolog consists of a series of rules and facts. A program is run by presenting some query and seeing if thi...

0
Q: Compare function for lists

LoomI need to sort a list of lists. The following is a compare function: def compare(lhs, rhs): # lhs&rhs are lists delta = len(lhs) - len(rhs) if delta > 0: return 1 elif delta < 0: return -1 if lhs < rhs: return 1 elif lhs > rhs: return -1 re...

@Mast It looks expensive
@EthanBierlein have you set all the power settings?
@Malachi I have.
18:25
I have as well.
I have to stay plugged in because the battery on my laptop is trash, but that happened before I upgraded to 10
The trouble with getting a computer in the phase-out stage you can't get replacements for love or money later.
I'm real pleased with my computer, though.
I changed everything to high performance because it is an old laptop with not enough processor for what I want to be doing
Sidenote: cplusplus.com/articles/NhA0RXSz, codereview.stackexchange.com/questions/112156/… etc => does the same but no more raw pointers/arrays/new/delete in your code — stijn 10 secs ago
@Hosch250 what do you have now?
18:38
Same I had before.
The Envy dv6t-7200.
When I swap the port numbers and try to access my-host:9090, I get a connection refused error. Before, at least, I was getting the Gerrit Code Review error page, which led me to believe at least the proxy part was setup correctly. — fiveclubs 30 secs ago
0
Q: Basic UDP listener wrapper

beppe9000I wrote this wrapper around the UdpClient that uses events for new datagrams: Class EventedUDP Implements IDisposable Dim Client As Net.Sockets.UdpClient Dim Endpoint As Net.IPEndPoint Public Event RawDatagram(sender As EventedUDP, datagram As Byte(), ByRef handle...

@CaptainObvious total vertical whitespace: 0
@Mat'sMug "It's less lines in the codebase, therefore it has fewer bugs!"
oh, yes, right, sure.
19:03
console functions will be bound to console: codereview.chromium.org/1859293002adrianton3 24 secs ago
0
Q: While loop condition not working but no error

ShniperWithout the while loop this code works but I only want the code to run when the #about section is on the user's screen, hence the while loop. No errors but the code stopped working when I introduced the while loop. DEMO function parallax(){ var scrolled = $(window).scrollTop(); $('#bio'...

@skiwi That's what you get for forgetting to specify a price range.
@skiwi What isn't there, can't be faulty.
@CaptainObvious Request for nukes.
I'd like to see that

the Vive is all VR
Microsofts MixedReality is a bit different.

The vive does have a hologram feature, but it is just a skybox of the camera input
19:19
@SimonForsberg Did you see this?
32
Q: In a formal paper, should I censor "brainf**k", the name of a programming language?

max I'm working on a formal paper about programming languages. I am going to talk about two intentionally difficult languages, brainfuck and JSFuck. Should I leave the names as they are, or censor the names? (e.g. brainf**k, JSF**k)

0
Q: How to make this pseudo-paralel dfs faster?

user3719857I'm writing a small program, that generates a file containing an adjancency matrix, it then reads from that file, constructs a graph and does something like a parallel dfs on it. How can I make the dfs part faster, because now it seem's to be doing a lot of nothing ( each thread just sets the no...

19:38
@CaptainObvious I'm still not confident the code is actually doing what it should be doing, but I'll leave that to the Java people.
20:00
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: TabLayout inside fragment fetch data from web
20:21
@RoboSanta That's a selfie. Both the question and the answer are odd.
They are littered with spelling mistakes.
Hey, @Quill, weren't you looking for targets to edit? Here you can have 2 for the price of one.
This question looks like it might be a pretty good fit for Code Review.SE, provided that (a) you want every aspect of your code reviewed, not just some, (b) your code is already working, and (c) you're asking for a review of concrete, real code, not abstract design (whether or not it's expressed as code). If you agree with all of those, please read about what's on topic, and, if your question fits that, delete it here and repost it on CR. — Mike McCaughan 5 secs ago
@BenVlodgi I've got to search the video, but there's one guy in a racesim drinking something in his car while racing :D
1
Q: Write to terminal and buffer

mpen/** * Execute an external program, display raw output in real-time, and buffer output pipes (stdout, stderr) for further processing. * * @param string|array $cmd Command to execute (not escaped) * @param string[] $output_buffers Buffers to capture * @return int Exit status code */ function ...

21:16
Heya
@Mat'sMug I need professional help
6
I just found a C code that SIGSEGVs if you change the number of spaces on a printf()
@BernardMeurer starred for out-of-context goldness
21:19
It's true nontheless :v
hmm.. my is about as fluent as my
That's beyond the point, the thing is how on earth would a space in a print string make a code have a segmentation fault?
from what I understand of .... I'm hardly surprised at all :)
It's evil and twisted ;-;
@BernardMeurer Make a minimal example that will reproduce the problem and ask on Stack Overflow.
21:29
@200_success This is my coworkers code, I ain't touching it :p
In fact I want to stay away from that sorcery
1
Q: Program to convert binary to hex

ultraI wrote this program to convert binary to hex, it ignores other characters between the binary digits. I would like to receive any recommendations on how to improve it. #include <stdio.h> #include <stdlib.h> #include <string.h> const char table[] = "0123456789abcdef"; int main(int argc, char* a...

21:51
@BernardMeurer reminds me of my (admittedly short) experience with C++
@Vogel612 C is evil
in the same way that a wrench is
22:14
@Vogel612 A wrench fixing a nuclear powerplant maybe :v
Nothing puts me more at ease than a person maintaining nuclear powerplants talking about segfaults
Oh okay. 17y old student. I can sleep well again
@JeroenVannevel HAHAHAHAHA
Now that's a false alarm
@JeroenVannevel how about a nuklear power plant operator faking the reports on the regular inspections?
unless it's a 17y old maintaining a nuclear power plant
that's worse again
Oh, good reminder, I turned 18 saturday
22:19
@Vogel612 I hope that plant is far away from me
@JeroenVannevel IIRC it was Neckarwestheim... I'd basically be in the blast radius, you'd be in the fallout zone when there's a wind to the north
@BernardMeurer welcome to adulthood! We've got forced responsibilities and pension plans
@JeroenVannevel Thanks! Excited to give my money to taxes :D
@Vogel612 I think The Netherlands will get hit more by a northern wind than Belgium
So I'm okay with it
We'll take one for the team
And hey, I'm entirely capable of controlling a nuclear powerplant all by myself
22:22
@JeroenVannevel oh cool it's Phillipsburg. That's a little further north, which puts me into the extended early fallout zone. just with wind to the south
you're in Stuttgart?
yeap
maybe I could catch a plane to somewhere :D
I would suggest Belgium but the stupid unions are probably striking by the time you land
22:36
lol what did I just miss
(monking!)
Aren't segfaults things you get with really old languages like C and COBOL?
@Phrancis They are doubting my ability as a nuclear powerplant operator!
@Phrancis dan recently had one in node
@Phrancis (g)old languages yes
segfaults are the things you get when your program pokes around somewhere it shouldn't in memory
Segfaults: Molesting for code
22:38
Wow I really need more SO rep... I just got the "Welcome back! Don't forget you can vote" message thing
Hmm so segfaults sound like they are often more systemic issues than code issues? Or #ItDepends as usual?
@Phrancis Segfaults is usually result of goofing on memory operations
allocating, freeing, reallocating
Yuck, manual memory management sounds dreadful
when you make a goof on those (specially when iterating) it creates a goofsterball that will chop your arm off
or it won't and your stuff just randomly breaks sometimes
and sometimes it doesn't
Also that
22:58
TTGTB.. Niters!
Later!
@BernardMeurer I wouldn't call it sorcery. It's more like crap code.
> address = (long*) malloc (sizeof(long));
Why is it doing sizeof(long) but casting to a long*?
For that matter, why is it doing malloc() at all, and in particular, malloc() without a corresponding free()?
Why is it using magic numbers like 97 instead of 'a'?
Why is it using "%lu" as a format for a pointer?
23:15
possible answer invalidation by Jamal on question by CodeYogi: codereview.stackexchange.com/posts/127299/revisions
//address = (long*) malloc (400000*sizeof(long)); // This works
@200_success There's a reason I don't usually try to help people with C code :p
@Phrancis that's his horrific hardcoded solution
Looks pretty horrific alright, but hey, "This works"
Correction: this happens to work.
Does it look like just luck? 400K feels like a strange magic number to me
23:28
The input file has ~360k entries
Ahh. That "explains" it
It's a monstrosity
But I just want to understand the space thing I mentioned earlier
What is num_ptr, and where is it ever defined?
I know that's supposedly a counter for the number of entries processed
No clue on anything else regarding it
Guessing it's a global
0
Q: Confused as to why this sql query is running so slowly

Jeff.ClarkI am going through some of my companies EDI reports to see if I can make them faster/less expensive. There is a query that takes ~55 seconds to complete, and I am not sure that it should. I do not see any common performance culprits based upon Google searches, but I am not an expert. Some backgr...

23:35
I'll post the full monster when I step home
  ,CASE WHEN NULLIF(LTRIM(SPE.TerminationDate), '') IS NOT NULL AND SEE.LifeEventActionID IS NOT NULL THEN CONVERT(VARCHAR(4), SEE.LifeEventActionID)
        WHEN NULLIF(LTRIM(SPE.TerminationDate), '') IS NOT NULL AND SEE.LifeEventActionID IS NULL THEN 'SampleText'
        ELSE ''
   END
dat case statement

« first day (1094 days earlier)      last day (3221 days later) »