« first day (1397 days earlier)      last day (2918 days later) » 

00:00
RELOAD! There are 3500 unanswered questions (91.6843% answered)
00:32
0
Q: My code calculates optimized parameters for a minimum chi-squared, with which a distribution of values can be fitted. How to test?

mikeyI am trying to fit an optimized Gaussian distribution over a histogram of observed values via scipy (scipy.optimize). The data sample is random floats from 0 to 100. The Gaussian is optimized to find the parameters (mu,sigma,normc) that give the minimum chi-square. The chi-square is calculated b...

0
Q: C program for secant method to find roots of polynomial

Lim LSHere is the question: Write a program to find the real roots of the following equation using the secant method (look it up): f(x) = 23x^4 -13x^3 + 3x^2 - 5x +38. Let h = r(i) - r(i-1), where r(i) is the root computed in iteration i of your program. Your program should continue to refine its answ...

0
Q: Producer / consumer pattern with limits on .NET

Vladimir VenegasI'm new here, so i'm sorry if my question it's badly formulated. Ok, for a project that I'm developing, I need to implement the producer/consumer pattern, but the quantity of consumers cannot be higher than some number (say 40). I created a concept project on GitHub to test it, and now I want t...

01:19
0
Q: Strange behavior __init__, __enter__ and __exit__

J.Doeclass Log: def __init__(self,filename): print("__init__ is called!") self.filename=filename self.fp=None def logging(self,text): print("logging is called!") self.fp.write(text+'\n') def reading(self): ...

01:33
0
Q: The Beasley-Springer-Moro Algorithm in C++

WolfyI have this Pseducode for the Beasley-Springer-Moro Algorithm: I wrote up this algorithm in C++, it runs fine but I believe there is something wrong in my C++ code. Here is my C++ code: double *Beasley_Springer_Moro(int n, double u[]){ double y[n]; double r[n]; double *x = new dou...

@CaptainObvious why is this still open??
01:58
@Vogel612 Not many active close voters apparently.
02:20
You would have to provide the code and ask codereview.stackexchange.com — user2176127 27 secs ago
0
Q: Big dataframe iteration

Mayeul sgcI have 2 dataframes. The first one (900 lines) contains correction that have been applied to a deal. The second dataframe (140 000 lines) contains the list of deals with corrected values. What I am trying to do is to put the old value back. To link the corrected deals to the corrections I have t...

Yes it's a Forbes article, but it's somewhat enlightening.
02:39
You should test your code before posting. If it's not working, give all the details so we can help you debug it. If it is working, you can post it on codereview.stackexchange.com for suggestions on how to improve it. — David Grayson 44 secs ago
@EBrown I just added another suggestion in Rev 2:
3
A: Reading a DHT11 to a file

200_successNot bad for a first program. You do formatting work in a couple of places, most notably in getLine(). What does "getLine" even mean? In this context, it only gives you half a line! I recommend deferring formatting until as late as possible, since stringifying data degrades it and makes it less...

@200_success Believe it or not I got it rewritten to use MySQL ~2 hours after writing that question. :)
I wish I could upvote all the answers again. :)
My opinion is that there is no good use case for MySQL. Use SQLite if you just want something better than CSV. Use PostgreSQL for anything serious.
I know MySQL, never used PostgreSQL before in my life.
03:07
It's pretty good. MySQL is simpler to deploy / use, but Postgres can do some really cool stuff that MySQL can't
03:57
0
Q: Possible error(s) in physics simulation

1000GbpsPurely out of curiousity started to rewrite a small 2D physics sim in 3D from my old C code, the idea behind is that it will help me to compare specific aircraft models performance. Think I did enough work so the calculations to be in acceptable errors but still cannot find the issue why bots cra...

04:17
0
Q: scala code enhancement or optimixation

sun_dareI have written a program in scala which actually does the below For every number between the maximum and minimum value of the array calculate the distance for each and every element in the array and find the element with maximum distance. I want to master functional programming in scala. Trying ...

04:32
it should be noted that there would be no reason today to manually shelve changes and email info out. The modern process is to request a code review. — ChiefTwoPencils 36 secs ago
04:55
0
Q: Implementing multiprocessing to compare large number of entries in a python dictionary

Yinzhou ZhuI am a beginner in python programming, and I am trying to implement multiprocessing to the code I use daily for my data treatment. Essentially, the input file has around 10 - 30 millions of reads where each read contains 4 lines of information. There are two elements in the first line of every fo...

0
Q: In Python is there a simpler way to change ints into their respective English words (strings)?

James DraperI cobbled together a function from various sources that takes an integer and returns it as it's respective English word formatted as a string. The function is as follows: def int2word(num, separator="-"): """Transforms integers =< 999 into English words Parameters ---------- num...

0
Q: Structures and Linked list

user132277 typedef struct{ int data; Node* link; }Node When i run the code i get this error: unknown type name ‘Node’ Node* link; ^

@CaptainObvious broken
Monknight
05:17
@CaptainObvious Holy Mother of Conditionals...
Monking
Monking
0
Q: expanding url from shortened url obtained from tweet

learner_newI have a twitter data set. I have extracted all the expanded urls from the json and now am trying to resolve the shortened ones. Also, I need to check which urls are still working and only keep those. I am parsing over 5 million urls. The problem is that the code below is slow. Can anyone sugges...

 
1 hour later…
06:55
0
Q: Use auto or dirrected type

user132317Which is better in this case, use auto or TilePosition? for (const auto& meterTilePosition : meterTilePositions) {.....}

07:25
0
Q: Lightweight asynchronous event library in C - Threadpool module

Tob ErnackI have finished writing a C library whose purpose is to provide a simple API for asynchronously executing functions, waiting for events on file descriptors and waiting for timeouts. The whole library is published here https://github.com/ernacktob/asyncio. The entire library is probably too large ...

@CaptainObvious HAMMERTIME!
Also, Monking!
0
Q: Always use multiple lines or not?

EdwardBlackIn my oppinion it looks way better if you write code in multiple lines if there is more than one parameter. e.g. I would prefer: $unit = new Unit( request('name'), request('description') ); over this: $unit = new Unit(request('name'), request('description')); However, I think Bill ...

07:43
@Mast ^^^ Thunderstorming right now, how do you feel about EMI?
I feel pretty good about it lol
Good bit of thunderstorms around here too @EBrown
08:13
0
Q: How to speed up execution of single pass clustering algorithm?

gaurusThis is my code for clustering 111272 by 29987 tfidf vector but it is taking long time .How can I speed up the code execution. The tfidf matrix is sparse and works well for 10000 records. /* * To change this license header, choose License Headers in Project Properties. * To change this templat...

0
Q: c++ problem university level

Shereen fathaWrite a C++ program that inputs the number of students in a class and the number of tests and the grades of the tests conducted by each student, then it calculates the average of the student and outputs related information as given below. The Average of a student is calculated considering the gra...

Monking...
0
Q: How to read PDF in python 2.7?

Pankaj JainI am using the code below to read a few pdf files in a folder. import glob import PyPDF2 path = 'acts' acts = glob.glob(path + "/*") for act in acts[0:1]: file = open(act) print(PyPDF2.PdfFileReader(file).getNumPages()) For some reason, it is not working. I am not getting the text in ...

08:28
@CaptainObvious HAMMERTIME
If that's the case, it may be off topic and better suited for the code review exchange site. — piRSquared 25 secs ago
I putted in the code review for the architecture, here i am focused on the possibility to use multithreading for algorithm like mine. is the iteration I am doing compatible with this technique? — Mayeul sgc 6 secs ago
09:00
0
Q: Is there a circular path?

t3chb0tI have a configuration engine that allows the user to specify a dictionary with text templates (read from a JSON file): var constants = new Dictionary<string, object> { { "x", "foo {y} baz" }, { "y", "bar {x} qux" }, }; These are just two sample strings to show how it can look like. Th...

@EBrown Is that 2 graphs of 2 sensors at the same time?
Odd.
@Dex'ter I'll try to edit my answer tomorrow, sorry.
@EBrown EMI is always fun, looking for a filter between your sensor and ADC? Filtering digital signals gets messy very fast, so if your sensor is already producing digital output a software filter is probably the easier approach.
Kaz
Kaz
09:26
Monking @all
#PowerCutCounter 12, and counting, and it's not even 9:30am
Kaz
Kaz
09:39
Just an observation. It looks like the age of startup.io is over. startup.ai is the new default standard.
Aiaiai
@Kaz UPS for the win?
@Kaz That's seriously cool indeed. Seriously impressive as well, some of the things that machine does are awfully complicated.
09:55
0
Q: Simple virtual machine prototype for Lisp-style languages

MinjaeKimI found a post I made here an year ago (Compiler for a minimal LISP dialect to run on the Java Virtual Machine) and got interested on this subject again. This time I decided to implement the instruction level myself instead of relying on the Java virtual machine like last time. An obstacle is tha...

0
Q: NodeJS / RESTful APIs: am I doing it right?

Mr. B.I was reading about PUT vs. PATCH and decided to use PATCH to update my records, but I'm not sure if I'm following the standard (especially regarding 2.). I'd like to use best practises and would like you to check my code. To keep it simple, I removed error handling and validation. // route: d...

0
Q: Exporting HTML table data to excel using c# is time consuming. Can I move logic to DB Stored procedure?

codetoshareI have a JSON data. I did bind this data to table as shown below. Now I would like to export this data to excel. So I have written below code. This below code involves data formatting of excel spreadsheet. private static MemoryStream JsonToStream<T>(string data, string html, string movie...

10:07
0
Q: Ember component with different templates

Ihor KorotenkoI'm writing an ember component which represents sidebar which can appear/disappear on click. The main thing hear is that I have several such sidebars, and each of them has different content but the structure is the same - header, body, two action buttons. So currently I do it in the following way...

Why do so many crappy and/or off-topic questions get upvoted?
Do we want to turn into Stack Overflow?
preferrably not ...
it seems we do have an influx of new users and enthousiastic voters, though...
which is generally speaking a good thing..
10:26
wow ... pattern matching is just OP ...
{-
    Performs a single step of the convergent iterative scheme on a single candidate with: Quota, (Candidate, (Weight, Votes))
    returns a (Candidate, Weight) that can be used to calculate the new excess, quota and votes
-}
convergeScore :: Double -> (Candidate, (CandidateState, Double)) -> (Candidate, CandidateState)
convergeScore _ (Lost, _) = (Lost, Hopeful)
convergeScore _ (c,(Excluded, _)) = (c, Excluded)
convergeScore quota (candidate, (Hopeful, alottedVotes))
    | quota > alottedVotes = (candidate, Hopeful)
hmm .. okay not quite that op ..
that infix match doesn't quite work ...
I don't think this edit is ok
The OP just asked for a module which does the same as his working code
@Dex'ter Looks fine IMO, people shouldn't really be asking for that sort of stuff
And so leaving it in encourages behaviour we don't want to encourage.
But now my answer doesn't address the question anymore
might be better suited for code review. codereview.stackexchange.comTheWhiteAfrican 1 min ago
@Dex'ter Looks like if you remove "Yes," then it'd be fine?
10:39
As long as you can embed the OP's code into something a module was built for, why not do this ?
@Peilonrayz Yea' did that
@Dex'ter I don't quite get that, would you mind rephrasing it?
@Peilonrayz think of numpy or any other module. There are hundred of questions / answers that ask for a better way. And some answers involve: You can use numpy for that...etc.
I am definitely not using .loc item, see my code review post about the improvements I did on my code hereMayeul sgc 15 secs ago
@Dex'ter Answers that say "You can try x module" are fine, heck, all of my answers suggest using one of; itertools, functools, collections. ;P
@Peilonrayz That's my point exactly. And while an answer like that is ok, why isn't a thing like: Does anybody know of a library that has this already worked this out? If not is there any way that I could easily scale this past 999 to the millions\billions\trillions? ok ? The OP didn't just ask for a module, but also for a code review, which in my opinion is ok
10:52
@Dex'ter Looks fine now.
@Dex'ter Technically you were answering an off-topic part of the question. Rephrasing solved the problem though. Keep this in mind for next time.
@Dex'ter Asking for a Code Review and how to fix broken code is off-topic due to the latter, just because OP's asking for a Code Review doesn't mean anything goes. And "Does anybody know of a library that has this already worked this out?" is not a good stand alone CR question
@Peilonrayz Okay
@Mast Okay ^^
11:06
Hello all. Good to see that @Duga is still alive. She will be down a couple of hours on Saturday.
4
Quick survey: The master branch, do you merge to that before or after making a release and putting it to production?
0
Q: summing up 2 numbers which over range of long

Bilal EkremI've just code some lines to sum up 2 numbers. I mean big numbers. like 1238913893838383813813813813838 ... You know its actually out of range. I didnt use java API and I created a LinkedList my own. Anyways here is my code ; LinkedList.java public class LinkedList { private Node header; priv...

@SimonForsberg Assuming your master branch is your release branch?
I'd only release what's on master/release. So if you want to release something new, make sure it's on the appropriate branch first.
Push to dev, test in dev environment, push to master, publish/release.
11:26
@CaptainObvious what? I don't even ... wat?
urk ... inb4 HAMMERTIME
Kaz
Kaz
@Vogel612 What's Off-Topic about it?
inb4 -> in before -> it's yet to be posted by Captain
Kaz
Kaz
@Vogel612 Ah, right. I assumed, in the absense of a link, you were talking about the previous CaptainObvious post.
captain does take his sweet time though...
-2
Q: i have problem with ontextchanges event in update panel textbox leaves the focus

vikas tateI have a ASP.Net webform that has several textboxes. Some of the textboxes have an OnTextChanged event with AutoPostBack set to true and this textboxes in update panel on textchange enent leaves textbox its focus? how can i avoid this please help.

11:40
hmm ... 12 minutes ... there actually was worse, sooo ...
You might want to check out codereview.stackexchange.com rather, though it's not clear how the code would be cleaner without the else. — Sami Kuhmonen 48 secs ago
12:02
@Kaz That question has some issues as well though, but looks on-topic.
Welcome @Bethan
@Mast Thank you
12:21
@Bethan This is the Code Review general chat. Did you have a question about our site? We also have a Code Review Meta. If you're wondering what's going on here, have a look at the chat FAQ.
I'm voting to close this question as off-topic because question is seeking improvements/ optimisations and belongs to CodeReviews — Rajesh 59 secs ago
12:40
@Mast I'm fine but thank you, I've been visiting this chat for a little while now
13:09
1
Q: Optimize a search in 3D

JOJOI asked this first on stackoverflow and someone told me it was more appropriate to ask here, so I've copied it over: I had some trouble trying to decide the best way to phrase this question so I apologize if it's a duplicate and I just missed it. I'm trying to optimize code meant to test if a ...

0
Q: Check enum property value in view

Johan HirschController.ts class Controller { public field: Field; } Field.ts class Field { public type: FieldType; } FieldType.ts enum FieldType { STRING, DATE } The part of the view which is managed by Controller: <input type="text" ng-if="A" /> <my-date-picker ng-if="B"></my-dat...

0
Q: Gra Rzym 11111111111111111111111111111111111111111111111111111111

user132353Czytałem wasz wywiad na Spiers Web... żeby się wybić nie potrzebne wam drugie Angry birds. Raczej coś w rodzaju tibi na smart fona. coś w stylu ubierasz wojownika i nim walczysz ale nie ograniczając się do tego bo to strasznie oklepane żeby się wybić potrzebujecie raczej czegoś z mieszanki tibi w...

Free UWYA ^
Kaz
Kaz
@Dex'ter That's an interesting question. Is there a rule somewhere that SE posts have to be in English?
@Kaz Read this
183
Q: Do posts have to be in English on Stack Exchange?

JimmyOtherwise known as 必需用英语吗?(is English required?) Do I have to use English when posting a question or answer to a Stack Exchange site? Return to FAQ Index

0
Q: Implementing pow(x,n)

thebenmanI solved this leetcode problem. The question is. Implement pow(x, n). This is my solution. class Solution { public: double doPow(double x, unsigned int n) { double result = 1; while(n > 0) { if(n & 1) // if bit is set { ...

13:29
> As long as the question is in salvageable English and makes some modicum of sense, it should be edited and improved like any other post.
Monking! :)
It's not in salvageable English, so nuke it.
@Mast It also doesn't contain any code...so double-nuke it !
> odze staje sie senatorem oczywiscie ważnym aspektem byłby Auction House i ekonomika gry.. dropnji co
I highly doubt an Auction House has anything to do with code either.
So, spam flagged it as well.
Not sure what it promotes, but it probably promotes something.
Kaz
Kaz
@Mast I noticed the words "Auction house" and "Angry Birds". I'm honestly intrigued as to what on earth they were trying to say.
13:32
@Kaz Suspect it's a bot.
Of sorts.
Anyway, it's closed.
Python 3.6 it's so freakin' awesome !
@Dex'ter Why?
@Mast Asynchronous Generators and Asynchronous Comprehensions are so helpful !
something like:
result = [i async for i in aiter() if i % 2]
and
async def ticker(delay, to):
    """Yield numbers from 0 to *to* every *delay* seconds."""
    for i in range(to):
        yield i
        await asyncio.sleep(delay)
0
Q: Exporting to excel file

Pankaj JainThe following code should combine the csv files in the folder and return an xlsx file. But the excel file returned is blank. Please help in correcting the code. import glob import pandas as pd path = 'data/companymaster' files = glob.glob(path + "/*.csv") # files = ['data/company_master_data_up...

^ broken code
13:40
@KNejad There is another site as part of the stackoverflow mansion called codereview.stackexchange.com. I think your question would fit well in there — Iceman 31 secs ago
13:51
Incoming ... needs "Language" tag ;-)
@Dex'ter Wasn't there already a package implementing this?
@rolfl If you mean the French one, it's closed :-)
Heh, it is, now. Duga was horribly slow (and I cast one of the close votes too)
-5
Q: COPY COLLER UNE FEUILLE GOOGLE SHEET AVEC PROTECTION

user132355Bonjour JB j'aurais besoin svp d'aide. voila mon problem : sur google sheet J'ai crée un classeur que j'ai nommée VACATION 2017. a L’intérieur j'ai crée 12 feuilles mensuelles (Janvier 1 feuille, Fevrier etc... ). Dans janvier j'ai mis certaine protection car le classeur est partager avec ...

There we go, closed or not.
You tried, try again.
14:03
Application-wide state on globals is evvilllllll
Kaz
Kaz
@Riccardo990 hi
0
Q: JFrame close operation

AfterMathHow do I make a JFrame change position on the screen when the user presses the red X button in the top right corner? I have read about using WindowListener, but don't know how to use it. I am at beginner level.

14:20
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Linking input/output states and conditions in an input file
14:31
This is really less a question for StackOverflow than it is for, say, Code Review (and there are plenty of tutorials out there about how OOP works, if you need one of those). StackOverflow is mostly about specific uses of a particular technology, questions like "How do I blank when I blank with blank?" When it comes time to implement some OOP code and you don't know why you're getting a syntax error or why some method isn't working, that's what you ask StackOverflow. — Sean Werkema 54 secs ago
Kaz
Kaz
14:57
Flight cancelled over mouse on plane Sounds like they need some pest control. Maybe....... snakes
3
0
Q: Observer pattern

TradingDerivatives.euI have tried to implement the observer pattern. The code should be able to handle a variable number of observables (set compile time) and notify any number of observers/registerables. In a recent review I have learned about smart pointers and the Rule of Three... but using a std::shared_ptr turn...

possible answer invalidation by danjonescidtrix on question by danjonescidtrix: codereview.stackexchange.com/posts/156095/revisions
15:14
0
Q: to many if statment in controller

RomanLately, I'm using domain model pattern, and my controllers methods often looks like (yii2 example, verify user in loyalty system with ajax response) if (LoyaltyDomModel::loyaltyVerification($post_data)) { if (LoyaltyDomModel::setVerify(Yii::$app->user->identity, $post_data)) ...

15:26
@Kaz Python On Air
Greetings, Programs.
How's it @Donald.McLean?
15:44
@Duga Invalid answer, anyone know if it's a good fix? (I don't know SCSS)
-3
Q: Started learning python recently. Trying out a Banner program found on the net

Jackhttp://usingpython.com/dl/animBanner.py - The link to the code. I would like to know what the following line of code does during the execution : for row in range(7): print(" " * offset + printedMessage[row][max(0,offset*-1):WIDTH - offset])

15:59
0
Q: A generic "manual" loop unroller

einpoklumI want to force my compiler (C++ or perhaps CUDA) to unroll certain loops that it would rather not unroll. So, I've written the following: template <size_t N> struct unroller { template <typename ForwardIterator, typename Function> void unroll(const Function& f, ForwardIterator& it) { ...

@SimonForsberg Personally I use my master branch as "this is ready to release at any time" and use tags for tracking actual releases
the tip of master should always be ready to release, and all commits to it must compile
I have to have all my college work done in 61 days.
One minor change to my Checkers game, and it is ready for beta release.
16:35
0
Q: python project inquiry?

97980I have read the how to ask questions section on this site as many suggested that I should since my last question, which I deleted, was closed down and many found it too vague. I hope that my question now fits the correct format. So here is the code which I have a few questions about: SOLUTIONS =...

@RMunroe Uh...
Kaz
Kaz
PSA: I'm going away for a while. I'm spending too much time on SE, and chat particularly, these days. And experience has taught me that anything short of Cold Turkey is unlikely to produce lasting effects. So I'm exiling myself. Hopefully I'll be back at some point in the future.
8
@EBrown @Vogel612 @SimonForsberg @Phrancis @Mat'sMug @Malachi @Jamal, being a Room Owner isn't exactly compatible with not being around. If you want to remove and/or replace me, please do.
Kaz
Kaz
I'll be around, briefly, this evening if you need to contact me before I go.
Otherwise, @All, gniknom
16:47
That's too bad, but I know the feeling; I've had to do it myself before.
@Kaz :(
@Kaz - bye ... see you on the other side.
(This is me, sort-of-back-from-the-other-side.)
2
Monking
(Not that I'm around that often either lately..)
@ThomasWard @Mast New temp sensor came in just now
BTW, that algorithm is horribly, horribly inefficient. I'll post a much faster one on Code Review if I have time (it could probably use some feedback anyway). — Comintern 33 secs ago
I've tried to recreate this codereview.stackexchange.com/questions/59968/… but i'm having trouble recreating everything without indexes and only using "nexts" — Deividas 1 min ago
17:06
@CaptainObvious Not asking for a code review
17:16
@Kaz FWIW you can actually do that yourself ... we'll see how this plays out. I for my part try not to jump the gun here ;)
And in other news, can't even get the tags right:
-1
Q: Java Programming

user67138Missed a week and a half of class and need help with some assignments I missed for a computer science class. Program 1 is Write a program which prints the average of 3 integer values. The 3 integer value should be entered by the user. The average should be expressed as a real number. If someone c...

@rolfl I'd be interested to know where that person will be 5 years down the road
2
Mcdonalds in 1 year?
There does seem to be a basic lack of understanding of
-2
Q: Java Programming

user67138Missed a week and a half of class and need help with some assignments I missed for a computer science class. Program 1 is Write a program which prints the average of 3 integer values. The 3 integer value should be entered by the user. The average should be expressed as a real number. If someone c...

17:21
Mini Rant: I have been interviewing a lot of student interns, and recent-grads in the past couple of years. My observation is that they are team-dependent.... they struggle to function in isolation.
I get the impression that their initiative needs to be group-seeded.... they don't know how to take the first step, otherwise.
I must admit that I sometimes struggle too at work... but that's because there's no documentation and it's all in the heads of my coworkers
Once they get going, they're often better than that first impression, but they want "confirmation" on a direction.... or is it a shared-blame thing?
@rolfl Do those ones know what they are doing?
It's a generalization, but the "self-starters" in these folk were the minority.
I'd surely want some confirmation along the process if I'm new to the company and they're using exotic things
17:23
In an interview?
On the other hand, if you ask me to write a well-specified program in Java, then no problem
@Kaz There's no Service Level Agreement for how much a room owner has to be online. When you come back, there will be a spot waiting for you. If we feel that you have been gone too long, then we will give your room owner privileges a proper burial.
@rolfl In general, also in interview
@skiwi So do I.
I think you're looking for codereview.stackexchange.comtnw 1 min ago
17:26
All I know is that lots of colleague-students were really oblivious and I really have to wonder how they'll ever get a job as a software engineer
But Computer Science is more broad and also creates theoretical people, and I wouldn't be able to stand doing that all day
@rolfl Not that I have been interviewing a lot of people (only 3 so far), but my impression is a bit the same. Some people needs to be pushed in the right direction. Heck, even I might need a push in the right direction sometimes.
@rolfl Not in an interview for me.
@rolfl @SimonForsberg I strongly suspect a "I don't feel competent enough to talk about my ideas" ... At least that's my impression on many students. They are competent, but not confident
There's no need to be competent if you're confident, at least until you pass the interview I guess
@skiwi wrong ... well it's more true for fresh graduates though...
competence can be trained, confidence is much harder to train ...
2
unrelated: is it just me or are off-topic questions recently taking overhand?
it seems to me that the stats indicate we close something around 85% of questions asked. ..
@Peilonrayz thanks for the edit ;P
Monking ! ^_^
17:32
that seems like an unnecessary burden to high-rep users and unwelcoming image to new users :/
both are not really great things ...
What a beautiful day to review code!
2
@Vogel612 I tried to suggest (many moons ago) that we close too aggressively...
that would be the one option ... the other would be that we don't rub the scope into new user's faces aggressively enough...
@EBrown FWIW I think it got worse only recently :/
I am voting to migrate this post over to codereview.stackexchange.com. Because the intention is to improve the code but not to overcome a problem / error or even add new functionality to the code. — Ralph 45 secs ago
@Vogel612 @rolfl Mentioned something about it a few days / week ago.
17:40
Yup... lots of new folk with the wrong impression of what Code Review is.
17:56
0
Q: Arcade game, object orientated java

GeneralJavaNeed help to create a object orientated game. The essential to catch falling objects. You control a box at the bottom of the screen with your mouse, the objects always fall from the top of the screen. Does anyone have a code that is similar to this? Thanks in advance!

0
Q: Pong game in C++ SFML

r1ftThis is my first game, I need to know how I could improve this code: main.cpp #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include <iostream> #include <sstream> #include <math.h> #include "Menu.h" int main() { const int screenX = 600; const int screenY = 400; sf::Vector2f paddleS...

0
Q: C program to read a file containing numbers, and then print ones divisible by 3 to another file

MichaelXThe program reads a file containing a list of numbers, and then writes the ones divisible by 3 to another file, and prints the remaining ones (non-divisible) to a third file. Declaring, opening, and closing the files was alone over 50% of the code, is there anyway to make it more compact? #inc...

0
Q: Further refactor a fx that takes an obj and a query obj that tries to regexp matches its values to be more functional

Nik SoI have the follow matcher method that should do: obj = {eins: 'one', zwei: 'two'} queryA = {eins: 'one'} queryB = {eins: 'one', zwei: 'deux'} matcher(obj, queryA) // true matcher(obj, queryB) // false const matcher = curryRight( (state, query) => flowRight([ every(Boolean), ...

@rolfl Let me know if you get that working as a polyglot.
@Dex'ter No problem, I was thinking I may have been out of line a little bit. ):
OK, I have a wee bit of a question.
Can anyone review this before I merge it and teach everyone the wrong way? github.com/UMNCSeniorProjectSpring2017/FinanCalcWebsite/pull/1
For future reference, that amount of code is too much for SO, for code reviews, yes but for help with an specific issue most people will ask you to reduce the lines — efekctive 2 mins ago
Yes, I know about the floating point errors.
We are going to overlook those temporarily because for the class, the best option doesn't work with the class requirements.
However, if we do it this way, it will be extremely easy to shift it over afterward.
18:15
@Mast @ThomasWard New sensor is hooked up, adding the barometric sensor now. :)
18:41
0
Q: Rails / Activerecord: Trying to decide on if nested IF's & how best to populate multiple parallel (& intersecting) has_many relationships

MirvI'm running in to trouble implementing the population of multiple join tables when seeding my database & I see this possibly being an issue on a general level too...how do I create a country, populating the join tables showing that the country belongs to the campaign & separately the player? Bas...

I'm voting to close this question as off-topic because it's a request for code review and performance analysis. — Rob Kennedy 6 secs ago
Kaz
Kaz
I'm Back!
(briefly)
@SimonForsberg that's, heartening :)
19:03
I'm not sure what "tips to fix the thought pattern of this class" means. If you're asking for a code review of working code, there's a stack exchange for that. If not, then you need to describe an actual issue, e.g., what's happening vs. what's expected, instead of asking broad questions because you don't have the time to deal with a few dozen lines of code. We're busy too. — Dave Newton 13 secs ago
19:21
Consider trying this on Code ReviewJETM 16 secs ago
Monking!
@Mast @ThomasWard ^^
@Kaz That's up to you, as Vogel said, if you wish to you can remove the RO yourself. Personally, I don't have any objections either way
Barometric Pressure, Humidity, Two Temperatures and Altitude are all working now.
All in Python too. :)
@EBrown What are you working on?
19:25
@EthanBierlein A weather station.
Ooh, cool.
19:41
@EthanBierlein Yeah it's pretty neat. :)
Do you plan to use the station for anything serious?
Nah, just gonna put it outside my house.
My dad has always been a huge weather buff, and he got me into it, and this was a project I've wanted to build for a long time.
I guess it'll be pretty neat to have your own weather station.
Yeah, he's working on getting an anemometer for it.
I have the parts to build a rain gauge after I calibrate it.
My dad is really into weather too; except he just listens to the NOAA weather radio.
19:43
I just have to get this IC hooked up.
And then some sort of ticker to clock it.
My version of watching the weather is sticking my head out the window.
Would you be able to calculate the wind chill with an anemometer?
@EthanBierlein To an extent, yes.
In the same way you can calculate heat index with temp and humidity.
Ah, cool
19:55
Is this question more suited for codereview.stackexchange.com ? — Paul 1 min ago
@Paul I don't think so - they aren't asking for a code review, they're asking for a counter-example to their approach for handling sudoku validity. — Thomas Ward 37 secs ago
20:14
I'm voting to close this question as off-topic because working code looking for optimizations belongs on Code Review, not Stack Overflow. — TylerH 21 secs ago
0
Q: Bulls and Cows AI

TeodorDThis is a program with an 'AI' that plays Bulls and cows. Bulls and cows is a code-braking game where you think of 4 digit number and the other layer tries to guess it: https://en.wikipedia.org/wiki/Bulls_and_Cows There are two classes: BandC - where all the logic is. BcCount - which is a pair o...

0
Q: Tax Calculator Java Logic

GabrielI am working on a tax calculator and have run into a problem. It seems that the calculator only works for tax brackets 10%, and 15% and any values that are above those brackets return wrong results. My Code: import java.util.Scanner; public class TaxCalculator { public static void main(Str...

also, @JasonLeach, once you get your code working, pop over to Code Review and post it there for even more help in getting it to run faster. Might not matter with 200 or 2,000 rows, but hit 200,000 and you'll be screaming for mercy! :) — FreeMan 6 secs ago
Such an unnecessary retort. Either answer the question, which is pretty laid out simply with no need of code review, or don't comment at all. — deonp just now
@NickCardoso Such an unnecessary retort. Either answer the question, which is pretty laid out simply with no need of code review, or don't comment at all. — deonp 46 secs ago
20:33
@CaptainObvious broken
20:47
1
Q: Fixing Medical Claim Files

puzzlepiece87With thanks to @Mat'sMug and @Comintern for their encouragement, here is a program I wrote to help my team fix medical claim files. The goal of this program is to make the process of emergency changes to medical claim files as human-proof and rapid as possible, and deliver all the corrected file...

21:00
0
Q: Google Crawler. Searches the 100 first google results for some term

Vinicius DiasI wrote a simple Google Crawler in PHP, and my GoogleProxy interface does not seem to follow the Single Responsibility Principle. Here's the code: https://github.com/CViniciusSDias/google-crawler Should I split the two tasks it performs into 2 separate classes? Several other Proxies will be imp...

21:25
1
Q: Is there a simpler way to get adjusted p-values using Benjamini-Hochberg FDR on a PANDAS DataFrame/Series of p-values?

James DraperBackground I have adapted portions of Christopher Nuagler's Bonferroni Calculator for use in a module that I am developing for analysis of laboratory data. The Comparison class and benjamini_hochberg function in the following code have been ported over without much alteration at all. I wrote th...

21:50
0
Q: Prevent saving for an opened CSV file?

LeifI'm interested in collecting rows from multiple CSV workbooks but a good deal of the data is not useful to me. I've got a roster of some several dozen people but the workbooks house all the data of some several hundred. The method I've used already is that the tool workbook will start by Defin...

 
1 hour later…
22:53
1
Q: Python: How to make this color thresholding function more efficient

AlexI wrote an adaptive color thresholding function in Python (because OpenCV's cv2.adaptiveThreshold didn't fit my needs) and it is way too slow. I've made it as efficient as I can, but it still takes almost 500 ms on a 1280x720 image. I would greatly appreciate any suggestions that will make this ...

23:07
0
Q: Print out all possible sizes of subsequences of string in C

jeremy radcliffFor example, given a string "abcdefghijk", I want my function to print out: a, b, c, d, e, f, g, h, i, j, k. ab, bc, cd, de, ef, fg, gh, hi, ij, jk abc, bcd, cde, def, efg, fgh, ghi, hij, ijk abcd, bcde, etc... I'm sure there's a better way to do this than what I currenctly have. What are so...

23:25
0
Q: Oracle 11g - Selecting multiple records from a table column

AntI was just wondering how you select multiple records from a table column. Please see below the query. SELECT DISTINCT DEPARTMENT_NAME, CITY, COUNTRY_NAME FROM OEHR_DEPARTMENTS NATURAL JOIN OEHR_EMPLOYEES NATURAL JOIN OEHR_LOCATIONS NATURAL JOIN OEHR_COUNTRIES WHERE JOB_ID = 'SA_MAN' AND JOB_ID =...

0
Q: Java Merge Sort: What Am I missing?

user6189I implemented a merge sort in Java. Is there any way to improve it? I suspect that in particular the merging part could be improved. Note: I deliberately removed all the comments. private static void mergeSort(int[] values) { if (values.length < 2) { return; } int middle = value...

I don't quite understand what you mean by "I would rather use message padding". Could you explain what you want the protocol to look like exactly (maybe just update the question)? It should be easy to adapt my code to a slightly different protocol. Also there are a few problems I think with the code you've posted links to, but really if you want a code review you should do that on codereview.stackexchange. Anyway, you asked what the "proper" way was, and I think I've answered that! — daphtdazz 15 secs ago

« first day (1397 days earlier)      last day (2918 days later) »