« first day (2257 days earlier)      last day (1761 days later) » 

12:00 AM
RELOAD! There are 6223 unanswered questions (89.7476% answered)
 
@Duga it's going back up!
 
12:25 AM
0
Q: Geektrust : Solve War problem in a OO way in python

thebenmanI solved this programming challenge whose objective is to come up with a OO solution to the problem. The problem statement is quite verbose and the tl;dr; version would be Given an enemy army(Falicornia) made up of Horses, Elephants, Armoured Tanks and Sling Guns and our own similar army(Leng...

 
1:25 AM
0
Q: Printing out an array

Jeromequick question: Regarding line 5, is a foreach the best method for outputting a console log? Also, val type is any, are there tighter bounds I can put on that variable? const hardconfInfo = [ { "system": 'System1', "key": 'FREQUENCY', value: '8' }, { "system": 'System1', "key": 'SPEED...

 
 
3 hours later…
4:49 AM
@FreezePhoenix thanks
@SᴀᴍOnᴇᴌᴀ she wants a physical book
@Peilonrayz look good
Monking
 
@JoakimDanielson well, you suggested to place this on Code Review so I wanted to tell you that it would be off-topic there. — Heslacher 46 secs ago
 
5:07 AM
@Heslacher ah I see
 
5:29 AM
0
Q: Beautifulsoup, extract content between <span> tags

rkp100 I need the following output: Filing Date: 01/02/2018 Case Type: Unlawful Detainer/Residential (not drugs or wrongful eviction) (Limited Jurisdiction) Status: Default Judgment By Clerk The following code doesn't work: for child in soup.children: if child.name == "span": print(chil...

 
 
1 hour later…
6:42 AM
Monkin'
 
0
Q: SQL Bulk status update

avazulaContext I'm a duck retailer. I rent ducks to farmers, and when they don't need them anymore, I get them back. In order to track which ducks I rented to whom, I have a PostGreSQL database that I keep updated with my operations. When I record a rent operation I need to manipulate two tables: Duck...

 
7:10 AM
1
Q: Min Heap implementation [C++]

somerandomdudeI've never had my C++ code reviewed before so I'd appreciate any feedback. Although my main focus was not on the implementation of the algorithm itself, any suggestions regarding improving it would be welcome. I'm mostly looking for C++ related feedback though. #include <iostream> #include <vector>

 
Monking
@SᴀᴍOnᴇᴌᴀ My memory tells me it was about a comment on an answer.
But it's been a while and my memory got fried over the weekend.
2
 
@Mast what happened?
 
Moved houses.
 
ooch
Hope you're not too tired
 
As in, entered the new home. Which was a crapload of work.
Frustrating at times too, planning got crushed so it was all hurried.
@avazula I'll live ^^
Now I get to figure out some arcane problem that would take 3 lines in Python but got to do it in VBA.
Fun, for some values of fun.
But good work to do when not at 100% capacity.
 
7:23 AM
@Mast ugh. Doesn't sound like fun :/
 
0
Q: LinQ join columns from several DataTables into same column from another DataTable

GohanPI have no big experience with C# and it is my first query in LinQ which I have to write. But in my opinion what I wrote is not clear to read and it is ugly. I will be grateful for any help to make it prettier. Description of my problem: I have 4 DataTables which I have to join into one. There ...

 
8:06 AM
I think this question would be better suited at codereview.stackexchange.comLLJ97 just now
 
Monking
 
8:44 AM
I just crashed Excel. Knowing my luck, I'll be pulling a Zak today.
 
0
Q: BST min - booleans operators vs. conditionals?

mwalI've been studying the BST code in Paul Graham's ANSI Common Lisp. He provides (my comments): (defun bst-min (bst) (and bst ; [3] (or (bst-min (node-l bst)) bst))) ; [4] (defun bst-max (bst) (and bst ; [5] (or (bst-m...

 
9:10 AM
0
Q: How to convert this python code to java code

Thuriya ThwinI am testing N-Queen solver written in python.But,I am novice in python and does not understand very much logic behind this code.How is this code similar be in java. import sys import numpy as np from collections import Counter import time # override default recursion limit sys.setrecursionlim...

 
9:28 AM
@avazula Turns out it's quite doable, now I just have to make it more generic, put it behind a button and upload it to CR to get squashed.
 
0
Q: Streaming live audio from server to microphone/speakers in android app

cantona_7I have a streaming service running with help of RTP Stream class. I could able to stream audio from a remote IP. I have used wireshark to check the connection and it is receiving packets from the server. Now I would like to play the received audio in android speakers or headphones. I have setup t...

 
9:51 AM
0
Q: Nested list performance tuning

András NagyI need to make a function like these two, but at least an order of magnitude faster in python. Any tips or tricks? import numpy as np request_parameters = [1, 2, 3, 4, 5, [10, 11, 12, 13, 14]] def transform_nested_list(request_parameters: list) -> np.ndarray: """ Generate np.ndarray ...

 
Assuming that both versions of your code be already working, you might instead want to post this question on our sister site Code Review Stack Exchange. — Tim Biegeleisen 1 min ago
 
10:11 AM
0
Q: Emulation of SE's text input control for tags

ChrisWI used React to write a component, which is meant to be a faithful emulation of the input for "Tags" which you see at the top of every question/topic on SE. "It's an emulation of the tag editor" defines the the functional spec -- or see also the "Appearance and behaviour" section at the top of t...

 
10:51 AM
0
Q: One try with multiple catch blocks vs nested try

GenjikI am creating program which will parse .csv file and I am using FileReader and Scanner classes from java API. FileReader throws FileNotFoundException, IOException. Scanner's method hasNextLine() and nextLine() throw IllegalStateException and NoSuchElementException. Should I use 1 try and 4 mul...

0
Q: Are function calls to scan an entire string for validation better than looping through them in the main?

mishsxI had me a code challenge and I was thinking: is there a way to make this more efficient and short? The challenge requires me to scan a string and .. In the first line, print True if has any alphanumeric characters. Otherwise, print False. In the second line, print True if has any alphabetic...

 
 
1 hour later…
11:51 AM
-1
Q: How do I create a branch in SourceTree?

m.albanI did add ssh url for remote repository but when I create a new branch in Sourcetree, I am getting following error. git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks branch fatal: Not a valid object name: 'master'. Can someone help me? Thank you.

 
12:05 PM
possible answer invalidation by Joachim Rohde on question by Genjik: codereview.stackexchange.com/posts/223797/revisions
 
12:29 PM
 
0
Q: ReactJS Calling an API and rendering results

Altair312I am currently learning JS Frameworks, right now exploring React and wanted to make sure I keep everything in order, as in: the logic of working with React, code quality, any shortcomings, good/bad practices etc? The code renders a simple Search panel that will allow to call an API, get the resu...

 
 
1 hour later…
1:33 PM
0
Q: ERP-system with UserForm that transfers data to next available row in an archive spreadsheet

SanderJensenI made this huge code (Edit: huge for such a simple task) for transferring data and adding an ID number to every new row of data. The only functionality flaw I see is that it creates new ID numbers if you transfer blank cells. I was wondering if anyone can help me improve this code? I'm very bad ...

 
@rolfl Enjoy, Enjoy, Enjoy! Been there, done that, just keep shoveling.
 
1:53 PM
0
Q: Check multiple subdirectories and delete if file exists

AuXDubzLong story short, I have over 180K files that I need to delete. I have all of the file names that need to be deleted in a TXT file, however the files that need deleting are scattered in over 400 folders within this one directory. I'm attempting to design a script that reads a .TXT file, checks ...

 
2:13 PM
0
Q: Compare more than 2 (dynamically decide how many list) lists in Java and retrieve all possible combinations of values

jackItem private String cd; private String desc; private List<String> price; List<Item> items = Arrays.asList( new Item("mbr", "member", new ArrayList<>(Arrays.asList("A", "B","C","R"))), new Item("spc", "spouse", new ArrayList<>(Arrays.asList("A", "E","C"))), ...

 
@justme I think this is a good question, but is not well-suited for stack overflow since it's basically asking for code review / design suggestions. It would do better here: codereview.stackexchange.comp e p 25 secs ago
 
@Heslacher NP
@Mast Hope you figure it. Be safe.
 
2:34 PM
0
Q: Volatility drift-independent (Yang & Zhang)

smartquantI am not sure if the following code for implementing Yang & Zhang volatility model works correctly - for the AMZN stock I get an output btw 0.0 and 4.0: def get_volaind(series, window=30, period=252, clean=True): log_ho = (df['High'] / df['Open']).apply(np.log) log_lo = (df['Low'] / df[...

 
Greetings, Programs.
 
Like super said, you can't stop people from shooting themselves in the foot. One thing you can do though is have a good code review process and require the usage of make_unique and make_shared when creating pointers. — NathanOliver 14 secs ago
 
Greetings.
I thought FreezePheonix is Mast 😂
 
possible answer invalidation by LotPings on question by AuXDubz: codereview.stackexchange.com/posts/223807/revisions
 
3:13 PM
@Mast it was this answer where I left a comment with the intent on being diplomatic
 
2
Q: String manipulation with std::adjacent_find

Dessus For the given strings (not containing numbers), print their shortened versions, where each adjacent sequence of the same characters longer than 2, change to an expression consisting of a sign and a number of repetitions. Sample input: 4 AAA ABCDEF CCCCCCDDDDDDD ZZAACCCDDDDEEEEEE Sa...

 
Welcome to Code Review! Pardon my naïvety with pointer casting, but to be clear, this suggestion is an improvement because it can make the code simpler, right? If not, please see Why are alternative solutions not welcome?.- From reviewSᴀᴍ Onᴇᴌᴀ Jul 3 at 23:13
@CaptainObvious ლ(`ー´ლ) Thanks a lot for butting-in
@Duga Its fine - LotPings has lone answer, and modified sample input text format
 
3:45 PM
I'm voting to close this question as off-topic because it belongs on codereview, although you're unlikely to get it answered there. Have you considered testing? — user207421 36 secs ago
 
4:03 PM
Monking
 
Monking!
 
This only works for code reviews, that are based on a shelveset. It does not work for code reviews, that are based on a changeset. — riQQ 57 secs ago
 
4:50 PM
Please check Which site? for general issues. Since you don't have a demonstrable problem with function or performance, this probably belongs in Code Review. — Prune 33 secs ago
 
0
Q: Optimising iteration and substitution over large dataset

WilliamI have the following code: import pandas as pd import numpy as np import itertools from pprint import pprint # Importing the data df=pd.read_csv('./GPr.csv', sep=',',header=None) data=df.values res = np.array([[i for i in row if i == i] for row in data.tolist()], dtype=object) # This functio...

-1
Q: Using @staticmethod in python to bundle similar functions together

LukeI'm curious as to whether using python's @staticmethod as a way of bundling together similar utility functions is good design. Originally these were functions (there are 7 or 8 total) just hanging out at the global level of a module. This module only calls each of these functions once or twice....

 
For Improvements and review in your code, you should rather ask this question on Code Review0xPrateek 59 secs ago
Thank you! Apologies, I am new to the forum. I will delete and repost in Code Review — Clade 14 secs ago
 
5:35 PM
-1
Q: Find The One Element In An Array That is Different From The Others

HappyHands31https://www.codewars.com/kata/find-the-stray-number/train/javascript I solved this challenge by sorting from least to greatest, and checking if the first element in the array matched the second element in the array. If the first element does not match, then the different element is the first e...

 
5:53 PM
The site is broken. I just got Announcer on a question I don't remember, let alone linking it. It doesn't have tags I follow and it doesn't even look that interesting.
 
Oct 4 '18 at 18:16, by Mast
Everything can be broken.
@Mast did you report it to SE folks?
 
@SᴀᴍOnᴇᴌᴀ No, because I can't be 100% sure without seeing mod-and-higher data.
Not sure mods can even see that.
 
6:20 PM
yeah I tried looking at the 10k tools but nothing jumps out at me... nor any of the tables queryable on data.SE...
 
6:30 PM
@Duga its okay - the only answer was by Joachim and the edit appears to fix a copy-paste error
 
0
Q: Making a model building class robust and scalable using best-practices

CladeI am attempting to design a class that will allow me to build, test and save various models that use different weighting schemes to to assign a numerical score to securities. A greatly simplified version of my code is listed below. While it serves my current needs, I am hoping to apply best pra...

 
6:51 PM
This may be a better question for CodeReview (codereview.stackexchange.com/help/on-topic) or Software Engineering (softwareengineering.stackexchange.com/help/on-topic) — David 52 secs ago
@David CR requires code to be implemented and working to the best of the OPs knowledge in order for it to be on-topic. See "Which Site?" and "Code Review or not?"Sᴀᴍ Onᴇᴌᴀ 54 secs ago
 
7:16 PM
-2
Q: Validating an order based off conditions

aliI have a scenario where I need to determine if for each order has a weight greater than 50 and less than 50 pounds. If they do have different weights then I place the order on hold. 

The code I have is the following: var isLessThan50Lbs = false; var isGreaterThan50Lbs = false; for each (var ol ...

 
 
1 hour later…
8:43 PM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com — Eyeslandic just now
 
9:16 PM
0
Q: Tetris game for Windows improved version

Ovidiu FirescuI made a tetris game for windows 1 month ago and @Sandro4912 pointed out really good improvements, suggestions and mistakes I made and how I can improve the code. The link to the previous post is: Previous tetris game. Now after I improved the code I want to hear again an opinion about the implem...

 
"Is there a simpler way" would belong under the algorithm tag (if that's your worry), or into theCode Review group. — Prune 50 secs ago
 
9:36 PM
0
Q: How to reduce the complexity of this O(n^3) code

LogicHere is the piece of code that's bothering me. It does the task but I want to optimize it if possible. I have list of Entities Config for each Entity based on ID. From Config has Tips for each Entity From Config has Rejects for each Entity Rejects have ID for each Tip I get ID of Tip to be re...

 
9:51 PM
Have you looked at codereview.stackexchange.com? It might be the more suitable place to post this. — Mad Physicist 1 min ago
 
0
Q: Table class to fill array structure with values (ruby beginner)

ChristianThe code creates a table and add rows and columns. Does it make sense to write the code like this? Would you design it differently? Is there any more object oriented approach? class Table attr_reader :content def initialize @content = [] end def << string content << empty...

 
hmm
@SᴀᴍOnᴇᴌᴀ For my own sanity I stay as far from meta as I can — Eyeslandic 1 min ago
 
11:36 PM
^^ sounds like bait
 

« first day (2257 days earlier)      last day (1761 days later) »