« first day (1584 days earlier)      last day (2728 days later) » 

00:00
RELOAD! There are 4314 unanswered questions (90.8306% answered)
00:43
You might want to post your code on (Code Review)[codereview.stackexchange.com/]Aron 7 secs ago
0
Q: Creating website via SQL table and PHP object

BadMoodTaylorI wanted to try keeping the content of a website (mostly) in a SQL table and have made the basic template for the body. Set the $pageName and include this template. class Page { public $content = []; public $heading; } $page = new Page(); $conn = mysqli_connect($dbhost, $dbuser, $dbpass, ...

 
2 hours later…
02:45
0
Q: Python String Split

MokshyamHave a 800k addresses of pattern: 660 1st Ave New York, NY 10016 (with 3 spaces between Ave and New York). Need to parse and store parts as Street, City, State, Zip. Tried to split through regex but was super slow, so went traditional. def splitAddress(address): #address_pattern = r'\w.+\s{3,...

02:58
@Shyju I am trying to make everything consistant. It's ok if this cannot be done. I'll just let my code reviewer know this if its pointed out. — Luke101 9 secs ago
03:33
0
Q: What can I do better in my code on my repo?

Thomas QueenIve posted a repo on a live radio streamer much like shoutcast/icecast without admin panels / user panels or custom mounts. I was wondering if anyone could review it and tell me what I can do better or add to it. repo server PyCasterClient: github.com/tinker1234/PyCaster/blob/master/client/PyC...

 
1 hour later…
04:40
0
Q: Getting prices of crypto coins

BoKKeRI have been working on this Raspberry Pi project for a while. It uses the Poloniex API to get prices of crypto coins and it shows the prices on multiple OLED displays. The displays use different i2c busses, I am switching between them with a multiplexer. I am trying to keep the code as organized ...

Monking
0
Q: Finding large files

toonarmycaptainJust looking for some feedback. I designed a script to find big files that are taking up lots of space. Still a beginner, and appreciative of constructive feedback, with both the function and form/style/formatting. #! /usr/bin/env python3 # -*- coding: utf-8 -*- # findlargefiles.py Searches a f...

05:06
You may have fixed the problem you were running into, but your solution still sounds fishy. You might want to post on codereview.stackexchange.comMichael Burr 26 secs ago
05:56
I've got some code that I'd like reviewing, but my objective for the review is maybe borderline for this site.
Main objective: bring down memory use during compilation, or at least stop it rising too much when the large array at the centre of it, grows. However, program runtime must not get much longer than a few milliseconds. And ideally compile time should not get longer than a few seconds, but I could tolerate it getting to minutes if absolutely needed.
Things that are out of scope: does it look pretty; is it how a computer science purist would like it done; could a stranger maintain it; is it "fortrany" enough.
Advice? Suitable for Code Review? I guess I should include details of my compiler & compilation options, with the code.
06:25
Suitable for Code Review and StackOverflow. It seems like your code works. You can say that a reviewer should focus on a specific part of your code/paradigma/environment, but that's not compulsory.
Therefore you might get nice reviews that don't tackle your underlying problem at all.
However, "How can I bring down memory during compilation?" is a valid question on StackOverflow if you can bring it down to a MCVE. Without a MCVE, the problem might be too broad or non-answerable, though.
0
Q: Auotomation testinh using winium- Need framework

sandhyaI am new to desktop appln automation testing ,and now Im using winium .Anyone here used winium I need their help and i need sample coding using framework .pls provide details to my id.Thanks

You should post this kind of questions to Code Review, not SO. — DYZ 25 secs ago
06:45
@Zeta is there somewhere sensible and well-trafficked to post chat about Code Review where it won't get swamped by bot clutter?
@Zeta Thanks, yeah, I'm just trying to produce an MCVE - but it's going to be large.
I think I'm going to have to write a program that auto-generates part of the code. That's because there's a huge array initialisation, I don't have permission to release the actual data , and using fake numbers will be as useful to my question as using real numbers.
0
Q: Strategy design pattern for extracting days of month and year

Shihe ZhangHere are two functions, which are quite similar. The type of dtIndex is pandas DatetimeIndex and the only difference is the i.dayofyear part. There are days of week, month of year, week of month, week of year I still need to implement. def extract_day_of_year(dtIndex): dayofyear_arr = [] ...

07:39
This Kind of questions is better asked at Code ReviewJens 23 secs ago
Not by asking such questions. Instead: A) do some research (for example by searching for "java api best practices" B) start writing code ... and then put up a question here, or maybe on codereview.stackexchange.com ... and have people review your input. — GhostCat 26 secs ago
08:03
0
Q: What is an idiomatic way to write "If A ... If B... If A or B... Else..."?

Kevin ChenI have a recursive function two base cases, and both involve returning True, but each have to do a different step beforehand. Is there a better way to write this? def recurse(head, length, node): if length == 1: # odd number of nodes node[0] = head.next if length == 0: # even n...

09:01
If you want a code review you should post on CodeReviewNick A 44 secs ago
0
Q: Checks for TCP-32764 exploit

Ricky WilsonI refactored this proof of concept for the TCP-32764 exploit. I'm writing a scanner based on this POC. The code works fine but It was really hard to read. Here is the original code #!/usr/bin/env python import socket import struct import sys import argparse import re parser = argparse.ArgumentP...

09:22
Your question is better suited for codereview.stackexchange.comFlown 35 secs ago
0
Q: Gathering statistics on a list of dicts

ThanassisImagine a large collection of Python dictionaries (a list of dicts just to make it simple). Each element of this list has hundreds of keys (aka attributes). More importantly not all elements share the same attributes. There is considerable overlap though. So this is a collection of semi-structure...

I'm voting to close this question as off-topic because questions asking to review working code should go to codereview.stackexchange.com — GhostCat 24 secs ago
@EnergyNumbers It's this room usually, but it has been surprisingly quiet the last few days.
@EnergyNumbers That sounds like you need memory not only during compilation, but also during linking.
@Zeta Maybe. The array is a parameter in the fortran code. I'm now experimenting with reading in the data at runtime as unformatted data, to see what the hit on runtime actually is.
09:39
Monking
@EnergyNumbers We did have a conversation about this quite a while back ...
@EnergyNumbers Saying that review points are out of scope is not allowed here. "Do I want feedback about any or all facets of the code?". That means you get what you get, asking for a "bring down memory use during compilation" should be ok, but I'm unsure about the idea of "ideally compile time should not get longer than a few seconds", as we all know that the two things are a trade off. Would you downvote someone that went over your limit?
If so I'd recommend not asking on Code Review.
@Peilonrayz No, I'd just ignore it: I'm just trying to save people the effort of writing stuff that would be ignored.
@EnergyNumbers I don't think Code Review is the appropriate place for you then.
@EnergyNumbers you sure can mention that, but you should be prepared for people scolding you for that if you ask here
@Vogel612 No, that's ok. I'll leave it. I don't want to bounce people into making tools of themselves. That's what reddit is for.
09:51
I'm sure you misunderrstood then ...
if you tell people you won't read their feedback on [..], that's fine to ask
0
Q: Find the next Fibonacci number

mnemonicjThis code calculates, from a list of integers, the closest fibonacci number for each integer. It does this for the first 60 numbers in the sequence. Any pointers on improving computing time, code readability, etc. is what I'm looking for. Thanks. def getFib(limit): a = 1 b = 1 res = ...

it's also fine for people to then proceed to give you feedback on [..} anyways
and it's fine for you to then downvote them, if you deem it necessary
@Vogel612 But it's not fine to spur them into scolding people. That would be irresponsible of me. If they're that way inclined, they just need a bit of help and guidance.
if you don't want to bounce people into making tools of themselves, just use the tools and mention that
"scold" is most probably the wrong word here ... not an English native..
@Vogel612 Haha, no, given it's got quite an overlap with stackoverflow, I think scold is probably the right word. Or "bitch" or "whine".
09:55
if those are synonymous, then it's definitely the wrong word...
maybe "call you out" fits better
@Vogel612 then no, I don't understand. It seems only fair to warn folk that I need an answer to X, so it's no use to me or them if they answer Y. And I tried to express that, to which @Peilonrayz satid that Code Review therefore wasn't the appropriate place.
And as they're a high-rep user, I take their word for it.
10:10
let's put it like that: it depends on how exactly you formulate the restriction ...
0
Q: selection sort with reduced comparison count: demonstration code

greybeardThis is an attempt to show how to use less comparisons in selection sorting a sequence of n items than the (n²-n)/2 naïve selection sort uses. This is a Python re-iteration of a Java effort. ''' selection sort implementations to show how to reduce the number of comparisons (and input traversals)...

as you said - this is a toy example. I am not sure if it is possible to vectorize my real example but will add this sort of question to the code review section of stack exchange — sudonym 14 secs ago
10:28
Perhaps better suited to codereview.stackexchange.com. — lhf 8 secs ago
10:41
@EnergyNumbers Code Review is suitable if you'll accept comments about any and all aspects of your code. You can ask for help on specific topics like memory footprint, performance or readability, but an answer pointing out anything you didn't want to hear can still be a valid answer.
11:10
I'm voting to close this question as off-topic because such questions (without clear problem statement, aka "find what is wrong in my code") should be asked on another site. — Sinatr 19 secs ago
11:35
0
Q: Using Maven Profiles to divide functionality

SamWe have a Spring Boot Parser application, that supports a bunch of formats. We need to divide this Parser application into several types. Each such type is simply defined by the set of formats supported. A Provider sends a Message in its own format, which is described in an XML Schema. Examlple...

11:52
0
Q: Insert array items into jQuery / JavaScript variable

egmfrsThis code exists in my view; it makes use of a model passed through from the controller. $("#email").emailautocomplete({ domains: [@foreach (var organisation in Model.Organisations) { @Html.Raw("\"") @organisation.EmailDomain @Html.Raw("\", \r\n") ...

 
1 hour later…
12:56
0
Q: "Pinch" an image in canvas

akinuriI've been trying to create the "pinch" effect in canvas. I've asked a question about it on stackoverflow almost two years ago... I've created the effect [JSFiddle] using Particles (JS object), and now, I'm trying to create it using pixels (pixel manipulation). I've managed to create the effect, ...

0
Q: Send an inbound Enquiry to a Users registered Twitter Account to notify them of its arrival

Luke This follows on from an earlier CR Question. - The reasoning behind which suggestions were taken on / which were not taken on board are no longer relevant as this is supposed to be, from my understanding, a distinct question that is capable of standing alone should anyone come across it. Bac...

13:41
1
Q: Metaprogramming implementation of bezier curves

dgratI thought it would be nice to generate bezier functions mostly at compile time. However, I noticed while moving from simple curves towards bezier areas, created rather repetitive meta programming code. Does someone have an idea whether/how I can generalize these functions to process any kind of...

I seem to have forgotten how to test effectively
4
14:07
I'm voting to close this question as off-topic because this question belongs on Code reviewG5W 37 secs ago
This sounds like you want a review, maybe go here: codereview.stackexchange.comEpicKip 9 secs ago
14:36
0
Q: Condense repetitive jQuery .click function

stevebasfordI'm looking for a better way of writing this repetitive jQuery function: (function($) { var mobileAmount = 300; $('#_100').click(function() { $('*').removeClass('-amount-active'); $('#_100').addClass('-amount-active'); mobileAmount = 100; }); $('#_200').click(function() { ...

15:13
If your code is working, but you want a code review, there's codereview.stackexchange.com. — deceze ♦ 13 secs ago
15:27
if you wrote a code that works and you wonder how to improve it codereview is the place for you — Fureeish just now
15:39
0
Q: Vectorize/speed-up exponentially weighted covariance calculation in R

MaceI have the following 2-column data.frame: Data <- data.frame(matrix(rnorm(100),ncol = 2)) I would like to calculate variance-covariance matrix as the expentially weighted average of the past squared/cross observations (on an expanding window): Where delta is set to be 61/60. Thus, at t=4, t...

0
Q: Sigma calculator

stackptrHow could I improve this sigma calculator library, so it is easier to use? For example, the polynomial class is clumsy because I am not able to pass just a list of terms to the constructor, I must use the addTerm function instead. Also when passing values to the term constructor it's unclear whic...

15:54
1
Q: Convert seconds to hours/minutes/seconds and pretty print

Joshua KiddI'm self taught in python 3, and I frequently keep track of how long my scripts have been running using the time library. import time startTime = time.time() #The main body of script... print('The script finished in {0} seconds'.format(time.time() - startTime) However this can be unhelpful i...

16:10
1
Q: Simple Blackjack game in console

RickThis is one of my first finished projects and I like to be sure that I am doing things right. Especially the part of modelling the classes and who has to do what. Also, I am not so sure about model/view/controller separation. Right now I have the Person class handling some of the view (the printC...

16:24
0
Q: Should I have 2 lists in this C# program or just 1?

Hernán CasillasI have this code and it's about a Roller Coaster, the game has a capacity of 5 people and its duration is about 10 seconds... Every 3 seconds the Park class creates people and add it to a List which is like a queue for the game but what I need it to do is for the people to enter the game as soon ...

16:46
Since the code is working, this is a question for codereview.stackexchange.comestus 1 min ago
16:57
0
Q: Java Swing MVC Implementation for Login Process

Anirudha MahadikI'm new to MVC. I have made small implementation in Java Swing using MVC pattern. I want little help from you to check if the code is appropriate to MVC pattern. Please follow this link for my code: https://github.com/anirudhamahadik1/test Thanks.

17:13
-1
Q: Refactoring a service the Angular way

MosheI have written a service which can generate prices from inputs. However, I feel that this can be "refactored" because it is not flexible enough. The code "works" however I feel if I could make this more "observable based." Any pointer will be greatly appreciated. According to the Angular Style G...

If your code works, you may want to post to Code Review. — Thomas Matthews 23 secs ago
17:59
0
Q: Tiny python program, solution to challenge

theonlygustiI wrote this program as a solution to the 2015 British Informatics Olympiad question on "block" palindromes. Brief overview of the task: A palindrome is a word that shows the same sequence of letters when reversed. If a word can have its letters grouped together in two or more blocks (e...

 
2 hours later…
19:37
1
Q: Implementation of Adaptive Rejection Sampling in cython

DalekI am trying to re-write a fortran code in cython which is the implementation of the adaptive rejection sampling method. I'd like to use my cython version eventually in some python codes. I am wondering whether I correctly converted the code or not? Is there a more efficient way to implement this ...

 
2 hours later…
21:23
Great effort! OP. Once you've gotten past the compiler error, I strongly suggest you send this code to codereview.stackexchange.com because there's a ton of things in your code that could be done better. — WhiZTiM 44 secs ago
If this code works fine, then this question is off topic on Stack Overflow, but may be good for our sister site Code Review. — Joe C 7 secs ago
21:45
0
Q: File path normalizer

Passer ByI recently wrote a file path normalizing function, and there is a few things that stood out to me as inelegant #include<algorithm> #include<string> #include<stdexcept> std::string normalize(const std::string& path, char delimiter = '/') { static constexpr char delims[] = "/\\"; static c...

 
1 hour later…
23:01
0
Q: Finding connected components in Python

DopappI wrote an algorithm for finding the connected components in a 2d-matrix in Python 2.x. I am looking for comments on the quality of my code, organization, formatting/following conventions, etc. For example, do the two static functions nodify and denodify follow the rules? I had a couple of proble...

23:44
0
Q: Given two words and a dictionary's word list, find all shortest transformation sequence

Stack crashedThis is a leetcode problem (https://leetcode.com/problems/word-ladder-ii/description/) Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such that: Only one letter can be changed at a time Each transfor...


« first day (1584 days earlier)      last day (2728 days later) »