« first day (1223 days earlier)      last day (2799 days later) » 
00:00 - 22:0022:00 - 00:00

12:00 AM
RELOAD! There are 2683 unanswered questions (92.8131% answered)
 
12:16 AM
0
Q: Sending email using libcurl (3)

UfxThis question is continuation of Sending email using libcurl (2) Does this code have any problems? Can I improve it? #include <string> #include <iostream> #include <ctime> #include <algorithm> #include <random> #include <curl/curl.h> class EmailAddress { public: EmailAddress(const char *em...

 
12:31 AM
monking
 
12:43 AM
monking
 
1:18 AM
0
Q: Check if one string is a permutation of another (Python)

newToProgrammingThe code below is an attempt at a solution to an exercise from the book "Cracking the Coding Interview." I believe that the worst case time complexity of the code below is O(n), where n is the length of each string (they should be the same length since I am checking if there lengths are equal) a...

 
2:02 AM
-1
Q: Python design an application

Murtadhadesign an application that receives integer input from the user and then the application determinens the sum of all the digits in the integer using Python

 
@CaptainObvious @Mat'sMug trigger-happy? ;)
 
monking
 
o/
 
@Phrancis why, I did leave a nice comment :)
 
Pretty crap question... easy challenge too, very easy
 
2:08 AM
lol, I hadn't even bothered reading it
 
Well, I guess for someone just starting out, might not be super easy, but still
 
I mean I stopped at "design an application"
 
Sum the digits of a number?
 
return value.ToString().Aggregate((sum, value) => sum += Convert.ToInt32(value));
something like that
oh right, in
 
sum(int(x) for x in str(num))
 
2:14 AM
14
A: Fastest way to sum digits in a number

Jon SkeetWell, another option is: int sum = 0; while (value != 0) { int remainder; value = Math.DivRem(value, 10, out remainder); sum += remainder; } BigInteger has a DivRem method as well, so you could use the same approach. Note that I've seen DivRem not be as fast as doing the same arit...

 
That doesn't meet the requirements. Golfed solution: sum(map(int,input()))
 
so at present its working good? might be better at codereview.stackexchange.com/ — Ghost 7 secs ago
 
@Duga Looks like a decent question, if it's working (which it sounds like it is)
 
2:29 AM
0
Q: Python genetic algorithm

Colton AllenI haven't done any research into how you actually write a genetic algorithm, so this is my best guess. What I'm really curious to know is two-fold: Have I created a genetic algorithm? If I have, how can I continue to explore the subject more? I hope this code and docstrings are enough explana...

 
@200_success which part(s) of the discrete math textbook interested you the most?
 
I know you this isn't SO, but do any of you guys know the answer to this?
0
Q: Is it safe to cast to a class that has the same data member layout, but a different implementation?

user2296177The first class will be used for private inheritance in order to ensure the exact same layout. This should make casting safe. #include <iostream> #include <string> struct data_base { data_base( int i, std::string&& s ) noexcept : i_{ i } , s_{ std::move( s ) } {} in...

 
2:51 AM
<comments>
  <row Id="1" PostId="1" Score="4" Text="Did I just place the first upvote?  Congrats on getting this site off the ground!" CreationDate="2016-01-12T18:47:12.573" UserId="23" />
Cute
 
possible answer invalidation by Jamal on question by Ufx: codereview.stackexchange.com/posts/140409/revisions
 
@Phrancis Honestly, I don't remember much. =) Number Theory is interesting, and the results tend to be non-obvious. Graph Theory is pretty fun too.
 
3:07 AM
I'm still in chapter 1, almost done with it (seems like that chapter covers a lot of ground!), just got through sets and starting functions
 
@Phrancis You need PawSense. Or, better yet, a better filesystem that doesn't need defragging.
 
@200_success That PawSense is a joke... right?
Huh. Actually looks legit. GENIUS! Might actually be worth the 19.99 cost =D
 
0
Q: Hangman in Stateless Javascript

PeteJust want some feedback to improve readability and structure for this implementation of Hangman. Goal was to write it in a purely functional way. However, coming from an imperative background, I found it difficult to organize functional code. function Hangman(word, revealed = word.replace(/\...

 
3:31 AM
The FAQ says:
> We do want people to know it's not just a joke: it's a real software utility designed to improve the reliability of computers that are operated under certain adverse conditions.
 
Saw that... I just sent them a message asking if it's compatible/functional with Windows 10
GAH!!!
 
i think you must post this in codereview.stackexchange.comAsterisk Ninja 20 secs ago
 
@EBrown ^^ Well this is really going to make things tricky :(
 
3:57 AM
Might need to do it one site at a time, or one data type at a time
 
4:12 AM
1
Q: Chat Channel Definition and Registry

Kaz WolfeThis is an excerpt of a part of a (very large) program that I'm writing. This particular section handles the creation and management of chat channels. However, I think that this code is rather complicated and not as clean/easy as it should be. package com.lolfakename.chat; import com.lolfakena...

0
Q: Should a view keep a copy of state information that is stored implicitly in its subview?

user1224598Here's an example of what I mean (that is, an example of a View not explicitly holding state information, where I'm wondering if it should): public class GameView extends LinearLayout { TextView levelIndicatorView = new TextView(); TextView levelCompletedView = new TextView(); pub...

 
4:55 AM
I'm not sure how I feel about the new iPhones
on the one hand, the water resistance is nice, but removing backwards compatibility with every newer headset is a little bit much
 
+1
 
5:11 AM
"I have a program without using dictionary" You should post that code and ask how to optimize it using a dictionary. But because you do have working code; you should probably ask the question on Code ReviewThomas Inzina 53 secs ago
 
5:23 AM
0
Q: Comparing two lists under 6 columns with 32000 rows in excel vba using dictionary

Manick9I do not know how to implement the dictionary fn properly. Can someone please help me how to create a VBA Program to Compare across 6 Columns in Excel and store the output to a txt file. I have searched it in multiple websites but i couldn't find it. I have my data from column A to F. I have a ...

0
Q: Getting Fairness from Biased Sources .python

Geraldo Braho'''Loop for 10 times .Flip the biased coin twice. If the result is {Heads, Tails}, return Heads. If the result is {Tails, Heads}, return Tails. If the result is something else, start over. This is what I've done so far ''' def biasedCoin(): while flip <2 : #flip the coin twice hea...

 
Monking
 
5:57 AM
0
Q: C implementation of a singly linked list

Oleg NykolynI've done plenty of corrections in the previous code located at Implementation of a singly linked list data structure in C. Dangling pointers seem a fixed problem (correct me If I'm mistaken). The swap/reverse functions are going to be changed soon due to high time complexity. Any suggestions and...

 
@Heslacher monking
 
pretty sure my mind, at this point, still thinks I'm in bed
monking @Phrancis
 
Monking / TTGTB
 
lol, night :P
 
6:17 AM
You really perform a malloc and free length times rather than passing a buffer to base2dec???? Further, I would remind you that C is not a subset of C++, it's a separate language that has evolved along its own track since it birthed C++ over 30 years ago. And that catches people out. Honestly, what you've written is not C, it's dumbed down bad C++. I would encourage you to use codereview.stackexchange.com to get proper conversion assistance if the quality of the code matters to you. — kfsone 47 secs ago
 
0
Q: User registration and authentication in PHP and PDO

David NoriegaI share all the full code, hopefully someone will serve you or help me improve. Please criticize as thoroughly as possible for the smallest thing possible as it will be very useful for me. I'm trying to create a safe and easy system to change for future projects, I am aware that it takes many m...

 
7:01 AM
0
Q: Keep track of the tennis score. How to code like a professionnal?

Philippe BalleydierI'm trying to get hired by some company and they gave me a simple remote test to take at home so they can judge my coding skills. Well, to be honest, it's a really simple problem. It's based on the website hackerrank. It's a mini game were you have to keep track of the score of a tennis game (0-...

 
7:13 AM
0
Q: Getting name from user, and handling any errors in C

chris360The primary purpose of this program is to practice catching if the user enters data that does not correspond to expected input. Note if the user enters there name as "123", this is valid as it can be used as an identity, however if the user enters only spaces (i.e. " ") or just a newline char ...

 
Zak
7:25 AM
@DanPantry You've truly outdone yourself on that one.
Also, Monking @all
 
Morning
 
Zak
English is weird.
3
user image
5
 
7:53 AM
0
Q: General Retry Strategy #4 with TryResult & TryState

t3chb0tHere's yet another version of the retry strategy helper. This time I added a TryState to it. I think it shouldn't just try to brute force execute something but it's also good to know if it's always failing and if it succeeds then after which timeout/repetition. There maybe a situation when it s...

 
This method only waits for a single byte and not for the whole sequence. IMHO is does not answer your question. If you want a code review you should ask on codereview.stackexchange.comSir Rufo just now
 
0
Q: Dissecting a Y-shaped list

vnpProblem statement: Two singly linked lists join at a common node, making a Y shape. It is guaranteed that the common tail does not loop back. Find the junction node. Linear time, constant space. It is an exercise for my students; nothing competitive. This is what's provided: list.h #if...

 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Using Rails concerns for validation in models
 
9:04 AM
Apologies, missed my while loop off. Ah, didn't know about codereview, thanks for the tip. Have a good one. — George Kerwood 14 secs ago
 
9:19 AM
-1
Q: How to send image by ajax to mvc controller?

JohnDoeHere is my code: <form id="my_form" enctype="multipart/form-data"> <input type="file" name="myimage" id="myimage" accept="image/*"> <input type="text" name="mytext" id="myfile"> </form> <button id="submit">OK</button> @section Scripts { <script type="text/javascript"> $(document...

 
@CaptainObvious Off topic
 
10:06 AM
well, that felt weird
just saw my boss for the last time
I finish work next week, but he will be in Japan for the next week and is flying out today
so I won't see him again :P
 
10:42 AM
0
Q: ActiveAdmin: Hide a hole panel in a smart way

BesiIn order to only show relevant information to my users I want to disable the whole panel when all fields inside that panel are empty. Currently I do this hacky method to get to this result: if resource.phone.present? and resource.fax.present? and resource.email.present? and resour...

 
Monking.
@Zak Is that a serious list?
 
Wow, Firefox is so fast
BTW.Monking
Only using 818 MB RAM even
 
Zak
@Mast I had no idea that it existed. But it is unquestionably and absolutely true.
I've been playing around with examples in my head, and if you try to say things in a different order, they just feel wrong.
 
10:57 AM
Good to know.
Indeed, most of it you do by instinct. By feel.
And it fits that list.
But I'm sure there must be exceptions.
 
Zak
@Mast It's english, of course there are exceptions.
 
The dragon example they list is invalid though.
 
@Zak I'd argue against "green great dragons can't exist", mostly as I read 'great dragon' as a noun... RPGs have ruined me, ;P
 
Exactly.
 
11:00 AM
> rectangular old little French green silver whittling lovely knife
 
@CaptainObvious Whole panel, not hole panel.
 
@Mast OP's trying to shoot somebody
 
Must have missed and hit the panel instead.
 
Zak
@skiwi That hurts my brain. I'm trying to red it as "[adjectives] knife", but it just reads as 9 random words somebody strung together.
 
this adjective-order rule seems to be universal for at least german and polish too (that I happen to speak) and I cannot imagine to say green great dragon in neither language
 
Zak
11:13 AM
@t3chb0t I can parse "Great Dragon" as a noun thanks to RPGs, but something like "green sad dragon" definitely feels weird.
 
11:29 AM
0
Q: CRUD operation in controller for different objects

SivaRajiniI am working on Angular JS project. Our project contains lot of controllers and each controller having more functions. I want controllers should be clean and simple. what are the ways to modify the structure of angular js application to make good and simple. Below controller and service contains...

 
11:50 AM
In Dutch you'd get a heck of a lot of separators, making it unreadable anyway.
 
Monking!
 
0
Q: Finding maximum length of continuous string which has same characters

No OneI'm solving this problem from codeforces. I've a solution which has complexity of O(n^2). But time limit exceeds on some of the test cases. The problem statement is: High school student Vasya got a string of length n as a birthday present. This string consists of letters 'a' and 'b' only. Vas...

 
keypress handlers should be easy to write
but then this happens
> 190 . >
so... aside from 46 being ., I also have to listen for 190 and then somehow keep track of shift
 
@Pimgd event.shiftKey?
 
Wow, I coded something quickly and it worked first try
 
12:06 PM
@skiwi Then that need to be reviewed :P
 
//javascripter.net/faq/keycodes.htm Says 190 is the [.>] keycode
//and 110 is [. DEL] with numlock on
//46 is just the actual keycode if you go look at an ascii table
if (keyCodePressed == 190 || keyCodePressed == 110 || keyCodePressed == 46)
 
It's a bloody-mess of copy-pasta code though
 
@skiwi last time I coded something working quickly... it was a powershell script deleting all windows services on a production machine. long live backups :]
or rather working
 
12:33 PM
0
Q: Implementation of Set + Queue + a get method backed by a Map

AldianThe other day I stumbled upon this question on Stackoverflow about the lack of a get method on the Set and loved the suggestion of using a Map to back the Set. I decided to try this out. Since this is quite a generic object that could serve a lot of purpose, I would like to know if there is somet...

 
1:00 PM
what on earth
$ cd ~; ls -A
shows .vimrc
$ cat ./.vimrc
no file found
I can see the file, but i can't interact with it.
oh my god I'm an idiot
vimrc was symlinked and I rm'd the place it pointed to
 
lol
 
done.. lol
 
monking
 
@EBrown No, read the answer in the comments. If you read "But please don't create a tag for your project" as an absolute, instead think of it as a don't for now, 'questions first, tag later'.
 
Zak
14
A: Making a tag for a Code Review community project

Simon ForsbergTags for specific community-owned projects are nice, and rubberduck has been a good tag. However, this does not mean that anyone and everyone can/should say "I'm gonna post all my code for project XYZ so I'm gonna tag my first question that I will post right now with the XYZ-tag". It is preferr...

 
1:11 PM
The Code Review Stack Exchange site has a "performance" tag. You might get better results there. — Tophandour 34 secs ago
 
anyone a Star Trek Fan in here? --> scifi.stackexchange.com/a/139961/25784
 
1:29 PM
1
Q: Python Word definition practice

DartmouthI've written this script to practice (not necessarily memorize, but familiarize myself with) the definitions of a lot of words. import csv import random WORDS = 5 # Number of words CHOICES = ["A", "B", "C", "D", "E"] # Number and labelling of choices with open("wordlist.csv") as csvfile:...

 
1:49 PM
@JaromandaX: Ha ha that happens with detailed code reviewer ... — Parag Bhayani 29 secs ago
 
1
Q: Automated backup of remote git repos

movieglassThis is the first python script I've written. It's used to create a local backup of git repos from BitBucket. It works, but I'd like to make it more pythonic if possible. """ Script to check BitBucket for all repos accessible by the supplied user and clone, tar and gzip each one (skipping unmo...

 
2:13 PM
Hint: for working code, codereview.stackexchange.com might be a better place. — GhostCat 28 secs ago
 
0
Q: feedback r script hospital best in state

Ellenfor the assignment you need to write a script that gives the best hospital of that state. This is my code: ranked <- function(state,outcome){ dat<-read.csv("outcome-of-care-measures.csv") if (!state%in%dat$State){ stop("invalid state is given") } if (!outcome%in%c("heart atttack","...

 
in The Nineteenth Byte, 1 min ago, by mbomb007
Writing less code simplifies maintenance and tends to create fewer opportunities for introducing bugs - Code Review SE
9
in The Nineteenth Byte, 1 min ago, by mbomb007
Welcome to PPCG! :D
 
2:33 PM
@juharr yeah, I know it will be messy. It was a theoretical conversation that arose out of a code review at work. We were just curious if it can be done in Linq (regardless of how ugly). — Tee 1 min ago
Greetings, can you also review this CodeReview question: codereview.stackexchange.com/q/140812/14625tomdemuyt 11 secs ago
Probably a better fit for codereview.stackexchange.comLiam 25 secs ago
 
@Mat'sMug - seems like once you get beyond "working" then "perfect" is often a matter of opinion ;-) — Tim Williams 3 mins ago
been on CR too long to be satisfied with just "working"
2
@TimWilliams not even in a fluffy, pink-coated, marshmallow-smelling, unicorn-populated world where all the code is perfect? — Mat's Mug 3 hours ago
 
3:15 PM
0
Q: Printing infinite loop using pthread

Vishnu N KI'm trying to implement a c program using pthreads which prints "1 2 3 4 5" in an infinite loop. I have used conditional variables and mutex to synchronize the pthreads. I'm able to print "1 2 3 4 5" without race condition using conditional variables and mutexes. But the problem occurs when I try...

0
Q: Surface Density Profile

SketosI am trying to compute the surface density profile, given the spherical density profile in 3D for different parameters in order to interpolate and have it as a function of them to use later on for some gravitational lensing modelling. However, looping through all parameters and evaluating the int...

 
@bartonjs: thank you. all very good points. if it weren't "how do I fix this error", this would be an excellent candidate for codereview.stackexchange — hometoast 35 secs ago
 
Zak
#NamingAdvice: I need a way to express "Folder Contains Filename Containing Substring" Where "contains" also includes all files in all sub-folders.
 
throw "recursive" somewhere in there
 
@Zak why not simply TargetParent?
context can help a lot...
Monking btw
 
Zak
Monking
 
3:24 PM
monking!
 
Zak
So, my current sub is RecurseFolderForMatch
I'd like to refactor out the "find target file" part of it.
Which means also splitting out the "determine if match was found" part.
 
0
Q: LINQ sorting using custom IComparer is very slow

George TaskosJoining a project with some crazy LINQ sorting statements and after refactoring by the team using a custom comparer we found out that it is so slow for some data that you actually think it is an infinite loop. How to fix this performance issue but still maintaining the sorting requirements? pri...

 
Zak
And I can't think of a good way to name it.
 
why not return Nothing if you didn't find anything?
 
Zak
On second thought, I think I'll put the whole thing in a CR question
 
3:32 PM
This is too broad and off topic for SO. Do read our what topics are allowed and how to ask a good question guides. If you would like to get feedback on the code you have written, you can check out the codereview community. — dubes 50 secs ago
@Matix StackOverflow is not the right place for such. You may post this at Code Review. — Zabuza 49 secs ago
 
0
Q: Fast dynamic cast

tobsprThis is a faster version of dynamic cast for MSVC I wrote for a piece of software, which caches the offset and the vtable pointer to cache the conversion and skip the expensive dynamic cast. Does anybody see any obvious errors in my implementation? Please not this just targets a special compile...

 
4:00 PM
"Payment portal integration doesn't work"
No I am not using SSL for that. that may be the issue thank you Jonathan Prates — Mukund Bhut 2 hours ago
oh. my. goodness
 
Zak
4:11 PM
@Vogel612 Some things shouldn't be easy. This is a great example of why.
@Mat'sMug Here, a gift to extend your lead: codereview.stackexchange.com/questions/140861/…
 
=)
 
Zak
On a completely unrelated note, I'm horrified by some of the folders I've found in our records.
Anything done in the last, say, 5 years is pretty well organised, but some of these are pre-millenium.
 
Surprise, surprise. Apparently a disproportionate amount of the people in our military come from poor families. What will "scientific studies" find next?
That made it to my U's home page...
 
One week before I leave the country and I lose my house keys for the first time in a deacde.
decade.
 
Well, you could live on the street for a week, or you could call the landlord, or you could call a locksmith.
 
4:18 PM
I wouldn't be talking here if I wasn't in my house now
the landlord had to go to his agent to get a spare key
unfortunately the issue is tht i haev a metal container that has my birth cert in etc
so I'll need to, uh, forcibly open it
 
@DanPantry You should have that at a bank in a safe box.
 
Zak
@DanPantry #BackupsSaveLives
 
@Zak is there a Folder type somewhere?
 
@Zak English is indeed weird. There are 25 words that are their own opposites
 
> Stone is another verb to use with caution. You can stone some peaches, but please don’t stone your neighbor (even if he says he likes to get stoned).
@SimonForsberg haha that link is gold
 
4:25 PM
@Mat'sMug IKR :)
 
1
Q: Recursive Directory Searching For Filenames

ZakPurpose: Given a target folder, and a list of target sub-strings, determine if the folder (or any of its' sub-folders) has a filename which contains any of the target substrings. N.B. This class uses Early-Binding and requires a reference to Microsoft Scripting Runtime Properties: Ro...

0
Q: A* Algorithm speed improvement

PearsonArtPhotoCurrently I have a very general purpose A* algorithm, which I've submitted as open sourced at https://github.com/kd7uiy/AStar . I've been trying to speed it up for the last month or so, and while I'm making steady progress, I'm struggling to see anything major that I can do to speed things up at ...

 
Zak
@Mat'sMug Microsoft Scripting Runtime Library.
 
aye, figured. I never really explored that one further than Dictionary.
 
Zak
@Mat'sMug I just include it by default these days. Chances are always good I'll need *something* from it.
 
RD contextual status bar would have answered it for me
 
Zak
4:38 PM
@Mat'sMug It's weird seeing the VBE in light-theme
 
aka vanilla/default ;-)
the VBE's color customizations aren't extensive enough to make a "themse" that's anywhere near decent IMO
 
Zak
@Mat'sMug They could definitely do with more options, but it works well enough.
 
@Zak holy crap
i didn't think VBA could make my eyes bleed any more, but, there it is
2
 
^^ IMO pitch-black background is awful
 
Zak
@Mat'sMug Eh, each to his own ^^
 
4:44 PM
I don't mind pitch black
it's the courier new and no aliasing that's the problem
at least use Consolas
which is about the only decent font on Windows
 
the worst part is that you can't "theme" the docked toolwindows, so you have this pitch-black code pane surrounded with bright-white project explorer, properties box, watches, locals, immediate pane, and everything else the VBE can dock.
@DanPantry Consolas doesn't look good in the VBE
 
neither does Courier New
x)
 
hmm not half bad actually
 
Zak
Gona stick to that opinion?
 
4:45 PM
That looks a lot better.
 
Zak
Funny, feels weird to me. Kinda, spidery.
 
The aliasing is still bad, though I think that's just because I've been spoiled by Mac
most monospaced fonts (imo) look bad on windows anyway, though
 
@Zak try Comic Sans
3
 
Zak
I did not realise I could change the font size
(Or I forgot)
 
real coders use wingdings
4
 
4:47 PM
@EBrown Well, both and exists. The problem with them? Well... you can see. Is there any guarantee that they will get more questions?
 
Zak
@DanPantry Real coders use Ook!
2
 
Ook! written in wingdings.
 
Zak
@Hosch250 I think that might actually be easier to read.
 
Whitespace written in wingdings.
4
Wait. That sounded more obtuse in my head.
 
Zak
Let's not give PPCG any more ideas.
 
4:48 PM
@DanPantry Wingdings spaces and tabs looks just the same.
 
@Hosch250 and yet somehow even in wingdings, spaces > tabs.
2
 
time to play with Swift, ttyl
 
Your solution requires the same decision to be made twice (two conditional bindings for europe). You should refactor so that the decision needs to be done once only. Without seeing the specific code in play it is hard to give specific refactoring advice. I suspect that building up the entire object tree in one go might be the ideal solution. I'm not sure, but it might be that given the question with complete code this might be a better fit for the Code Review site. — BatteryBackupUnit 30 secs ago
 
4:54 PM
@Zak ouch
 
Zak
@DanPantry Regrettably, the VBE does not include Wingdings.
 
for some values of "regrettably"
7
 
Zak
Actually, Consolas is growing on me pretty rapidly.
I think I'll keep it.
 
@DanPantry I could actually envision a BF variant that uses wingdings
2
 
5:14 PM
somebody seen syb0rg recently?
 
@Zak it's the font VS uses ;-)
 
@Mat'sMug s/VS/almost every IDE/
 
You can change that, right?
 
you can
doesn't mean you should though.
 
5:22 PM
Options > Environment > Fonts and Colors
 
C# in Wingdings #FUN
3
 
sometimes, code I work on can only appropriately be coded in comic sans
4
 
oh, I need to try that - might cheer me up when I'm dealing with that crap
 
lol
 
If this isn't a specific "Why isn't this working?" question, it belongs on CodeReview. codereview.stackexchange.comMichael Blackburn 21 secs ago
 
5:35 PM
possible answer invalidation by George Taskos on question by George Taskos: codereview.stackexchange.com/posts/140858/revisions
 
0
Q: Mix of Repository and UOW For Business Library with Entity Per Table Architecture

KrishnaI am trying to use Entity framework along with UOW in business class where I want to use this layer across multiple types of applications like web, webapi and Windows Services. So I cooked something from the online resources. Can some one figure out any potential performance or fallback? Main re...

 
5:47 PM
0
Q: Django test function ugly ending line

deltaskeltaI have a django view that ends with this... return render(request, 'define/see_all.html', context) I have mocked the render function and @patch('define.views_func.render') def test_get_define_see_all_complete(self, mock_render): """Testing that the queryset returned properly""" thing...

 
You want us to do a code review of your 600 line code-dump? That is very off-topic for Stack Overflow. — CoryKramer 53 secs ago
Hi Alex. Can you please include the relevant code here? Also, can you elaborate on why exactly you think your code is too verbose? Finally, you may find better help at another stack exchange site like Code Review. StackOverflowers are usually looking to help fix code rather than improve working code. — AndyG 26 secs ago
possible answer invalidation by George Taskos on question by George Taskos: codereview.stackexchange.com/posts/140858/revisions
 
6:05 PM
old, but gold:
user image
6
 
that last one is the best one :)
 
6:26 PM
BTW.Monking^2
 
@CaptainObvious this is so wrong. so. wrong.
 
0
Q: Change the background color with JavaScript in Chrome Console

Sandra Vucopy this piece of code from a textbook to run in Chrome console, but the console returns "Uncaught syntax error". Test this in the Code Snippet and it works. Any ideas? <html> <body bgcolor="WHITE"> <p> Paragraph 1 </p> <script type="text/javascript"> document.bgColor="RED"; </script> </body>

 
You might have better luck asking this question on Code Reivew. — buczek 7 secs ago
 
6:58 PM
Learning about JSX. Because I can.
Now I'll be able to write even uglier things.
 
7:17 PM
I'm voting to close this question as off-topic because this is off-topic on SO. It should go to Code Review instead. — Rakete1111 10 secs ago
I am wondering how can it be improved - please have a look at codereview.stackexchange.com - your question might be better suited for our partner site. Please have a look at CodeReview's how to ask first to make sure it's well received there. — cel 42 secs ago
 
@DanPantry pro tip: :wq or shift+zz
 
7:42 PM
@Duga Partner site... I like that =)
 
7:52 PM
0
Q: Find group of strings that are anagrams

WajahatThis question refers to this problem on lintcode. I have a working solution, but it takes too long for the huge testcase. I am wondering how can it be improved? Maybe I can decrease the number of comparisons I make in the outer loop. class Solution: # @param strs: A list of strings # @r...

 
@PaulF because I found this question intruiging, I thought to try it out a bit more (sadly enough the dictionary I found has quite some "bad/mispelled" words, it does find something). I'm tempted to put this on code review and link the questions, but in the end I came up with an extra grouping that potentially skips quite some words, see here: jsfiddle.net/Icepickle/mp9vaeLyIcepickle 48 secs ago
 
Well, I'm guessing I failed the interview. Oracle hasn't contacted me since then.
 
@Hosch250 at least you know what to say next time you're asked what you do other than programming ;-)
I'm sure you'll find something else
 
Huh?
Oh, biking/walking?
 
yeah :)
 
Yeah.
Nah, I'll just tell them I don't have a life.
More seriously, does anyone have any ideas on what questions are appropriate to be asked for system admin positions?
I guess you could say that I'm an extremely inexperienced interviewer :(
 
8:20 PM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Unit test with Moq callback anonymous function
 
*interviewee
 
Yeah.
 
IDK, I wouldn't want to be sysadmin for twice my paycheck
 
I'm sure part of the problem is that it is really easy for people to over-talk me.
 
8:34 PM
If it's more like code review, post it on codereview. — Zereges 40 secs ago
 
@Hosch250 basic networking questions.. how does IPv4 subnetting work? what's a DMZ?
what does a router do? What's NTP? What does DNS run on?
 
@Vogel612 Demilitarizing zone?
A router routes packets.
 
@Hosch250 Demilitarized, yes. Usually that's the part of your internal network that you want to route external traffic to
 
Yeah.
 
@Hosch250 and how does he do that?
 
8:37 PM
I need to study networking some more.
@Vogel612 He checks the address and routes it to the next router closest to the destination. This check is usually implemented in the hardware to make it faster.
 
it's a tad more complicated. He checks the address and sends it to the next router that advertises the subnet the destination belongs to
routing tables is the keyword you want to look at
 
Yeah, I read about them a while back, but didn't really do anything with the information.
 
from there on you can go for things like Spanning Tree network algos and all the other fun(n/k)y stuff that's involved
 
OK.
I meant what kinds of questions should I ask them, though.
Like, what information should I get other than what they have on the listing and what I can find on the web?
 
check standard working times, how they deal with outages, standby payments
 
8:42 PM
@PaulF I added an implementation on code-review in case you would like to comment there :) codereview.stackexchange.com/questions/140886/…Icepickle 42 secs ago
 
When should I ask that, first interview?
 
I didn't go through more than one interview per company yet
 
That's not how it typically goes.
 
then again oracle red tape ...
 
Dan had like 3+ for Riot that I know of.
 
8:43 PM
depends on what you define as "typically". I think it's rather common in Germany to only have one, at most two interviews
 
I had two at BAE, and I probably would have had one more before I got the job, if I had passed the second.
I'm pretty sure I didn't get that one because I didn't have my driver's license, though.
 
yea it's not all companies that you can have the CTO, CEO and a Dev in an interview at once
 
They looked at each other kind of funny at that point and said I would need it for the job.
 
0
Q: Making sure a sentence exists of words in a dictionary

IcepickleToday on Stack Overflow the following question came http://stackoverflow.com/questions/39393112/find-out-if-string-contains-english-words-only The question itself has following prerequisites: A system dictionary that contains all the words of the English language With the following requireme...

 
Maybe I should see if I can take an internship with them next summer, and go from there. They were going to pay around $18/hour, IIRC, which is pretty good.
 
8:46 PM
I'm voting to close this question as off-topic because code review should be submitted to codereview.stackexchange.comecatmur 33 secs ago
 
Probably better than most other positions I could get...
 
quite possibly, yes
 
This doesn't really fit with StackOverflow's mission. Consider posting this on codegolf.stackexchange.com or codereview.stackexchange.comStriplingWarrior 40 secs ago
 
@Hosch250 ~$32-35K, sounds reasonable for an entry-level position I guess
 
There is a Code Review site for this kind of question. Even so, you're going to have to be more specific. What kinds of improvements are you looking for? I will tell you this: does it work? Do you understand it? Then don't worry about it. You're learning, and the best way to learn is to move on to the next project instead of trying to make this one perfect. Anything you write will look like garbage to you in 6 months anyway, and that's just the nature of programming. That being said: put this in a function and parameterize with better variable names. — Kevin Workman 1 min ago
 
8:55 PM
@Mat'sMug It's a 12 week internship, so I'd probably get a pay increase if I was hired on afterward.
Anyway, time to take a test or two.
 
guess where @Hosch250's RD internship ended
 
Yeah, I need to get back to it.
I have been working on Roslyn a fair bit though.
 
crazy what 40hrs/day does to a GitHub repo
 
I've had 4 PR's merged, 1 open, and I've had them contact me with offers to handle other issues.
I'm also learning F# and functional programming.
 
You're a busy man.
 
9:08 PM
Maybe try codereview.stackexchange. — Charles McKelvey 52 secs ago
 
@Hosch250 For an internship? That's pretty good indeed.
 
Yeah, but they are a big defense company. They can afford it.
 
@TimothyTai It's not a bad question, it's just not a very good fit for Stack Overflow. Try the Code Review site or the Processing forum instead. — Kevin Workman 27 secs ago
 
It almost sounded like they were open to negotiation on it too, because they asked if it was enough.
 
9:25 PM
-2
Q: Create a topic on codereview for a question put on hold

IcepickleToday following question got put on hold. However, the question intrigued me and I thought the question through a bit longer, and then prototyped an answer in a different language, just for the sake of testing the algorithm. As I thought, the original author might benefit from this sample, and b...

 
0
Q: How to design the state tree using redux?

Stav AlfiIn the last days I have searched for a documenation on how and when is it best to use redux and how to design the state tree. My research ended in the conclution that there is no one currect answer. But then I came across this answer in github on that manner by petehunt (The answer is intended ...

 
9:37 PM
0
Q: Creating a text file from cfsavecontent

anatp_123I have a simple code that using a query it's creating txt file downloading to the browser. My query its about 20k records and it creates the txt file fast and good. Is there a better way to create a txt file using a query? The way im doing it seems old school,since I got it from article from 20...

0
Q: taking a Struct Var and making a array off it

KennySo I thought I had a decent way of making this work but I am getting a seg fault after the first array cars[0], when I try to print the cars[1] it faults. I feel like I didn't reference the other parts of the array maybe? any advice or tips would be cool! Car* import_cars(char* filename, int nu...

 
@CaptainObvious Decent way [...] work, seg fault, pick one
 
@PeeHaa I provided a solution. I imagine if the OP wants his code reviewed the Code Review SE might produce better results for him. — Ron Royston 26 secs ago
 
9:55 PM
1
Q: Circular Doubly Linked List in Javascript

Still QuestioningI've been studying data structures and have taken a stab at implementing a doubly LL in JavaScript. Please review and advise on any additional improvements and optimizations. I'm more interested in feedbacks particularly around the implementations of removeAt(), contains() and getItem() methods a...

 
@Mast JSX isn't that bad
@arda ya know I use vim right
also :x === :wq
 
00:00 - 22:0022:00 - 00:00

« first day (1223 days earlier)      last day (2799 days later) »