« first day (2207 days earlier)      last day (1804 days later) » 

12:00 AM
RELOAD! There are 6051 unanswered questions (89.8567% answered)
 
 
2 hours later…
1:35 AM
0
Q: File Encryption using pynacl

Matt SiekerI need a rather simple file encryptor/decryptor in Python, after some research, I decided to use tye pynacl library reading the file in blocks, writing them back out, and then at the end using Blake2b to generate a signature for the file. Each file is encrypted with a unique key, which will be di...

 
1:46 AM
It doesn't seem that you have a particular problem with your code. Perhaps you are looking for a code review? — Henry Yik 40 secs ago
 
0
Q: Hangman Final Project - Intro to Java

davishenFor my final project in my intro to Java class, we were tasked to make a 2 player game like connect 4, battleship, checkers, hangman, etc. I chose hangman because I thought it would be easiest. I'm having a few problems with my code. Say the word to guess is 5 characters long; if you guess any 5 ...

0
Q: C++ inheritance

user201072I have to write a program using inheritance in c++. details of program area: Base class: Animals; traits are: skull, vertebrae, tail, calcific, warm blooded; Then limbless, legs, wings, fins, arms; gills, lungs, skin. classes: Mammals, Birds, Fish, Reptiles, and Amphibians. i have no idea what i...

 
2:11 AM
Indeed you did answer, very much in CR style. Part of why I discourage CR recommendations is that the numpy/simpy traffic is too low there. But this poster did ask for beautiful and pythonic. codereview.stackexchange.com/questions/219781/… is an example which I think should not have been migrated. — hpaulj 53 secs ago
 
2:30 AM
It looks like they've lifted the code from Code Review, it isn't theirs. They have copied code from elsewhere and are expecting someone else to fix it for them. This is not how you do homework. Also, re:input, you can google, do a little reading on input v/s raw_input. — cs95 17 secs ago
 
3:06 AM
You're requesting to refactor working code, which is not the purview of this site. Rather these types of questions are usually best suited for the Code Review Stack Exchange, but if you do consider posting it there, read their help site first to make sure that it is written correctly for that site as well. — Hovercraft Full Of Eels 22 secs ago
 
0
Q: Simple integration of async and tkinter in Python

GeeTransitI've been a fan of coroutines and asynchronous programming for a while, and I recently took a trip down memory lane to when I was using Python's tkinter module for a GUI. I wanted to combine the two worlds, one of smooth coroutines and one of callbacks. My hope is to find a better solution for t...

 
3:32 AM
0
Q: i am not able to get the correct output. Is there any error in this code. Please give me your answers

Ravi Siddudef sumOfDiv(x): sum = 1 for i in range(2, x): if x % i == 0: sum += i return sum Check if pair is amicable def isAmicable(a, b): for i in range(a,b+1): if sumOfDiv(a) == b and sumOfDiv(b) == a: print(list(a,b)) else: return "none" a=int(input("enter the number...

 
4:17 AM
Monking
 
4:31 AM
Monking
 
4:50 AM
 
 
1 hour later…
5:50 AM
0
Q: Pseudocode supposedly has an error in it

SkryptixRecently finished an exam where I had to spot multiple errors, I can't seem to find 1 from the pseudocode: Count = 1 Input Number High = Number Low = Number Repeat Input Number If Number > High High = Number End If If Number < Low Low = Number End If Count = Count + 1 Until ...

 
seems like refactor is not a tag on code review — Ray Tayek 47 secs ago
 
 
2 hours later…
7:27 AM
0
Q: Record does not insert database

RaviI am trying insert data in database. Unfortunately data does not insert database now i beginner to repository pattern and unity framework. This is my code: Controller: public ActionResult Create() { return View(); } [HttpPost] p...

 
7:46 AM
0
Q: Use await in a recursive asynchronous method

H. PauwelynI want to get all items of an API (MS Graph) but the results are paged. This I want do with a recursive async method using code below. public async Task<IEnumerable<T>> GetAll(IGraphServiceTCollectionRequest request) { return await GetAll(request, new List<T>(), 1); } private async Task<IEn...

 
Python code in the comments section is not working out, because whitespace is important. Please paste the code in the original question and format properly. Also, what is the actual problem, rather than just wanting a code review? Have you tried it and it's not working, or? — bosnjak 42 secs ago
 
8:29 AM
Firstly this is a question for codereview not SO. Secondly your code looks overcomplicated but it is difficult to tell anything before we know much more about your task — Fabjan just now
 
9:23 AM
0
Q: Linked list delete a node with a particular value

hagoI am trying to search a single linked list with a particular value and delete it. Only the first occurrence of the value. typedef struct node { int val; struct node * next; } node_t; So my code is: int remove_by_value(node_t ** head, int val) { /* TODO: fill in your code here */ node_t *temp ...

 
9:43 AM
0
Q: HTML5 Custom Audio Player with SASS

Oliver Lluberesi made an audio player in html5 for learning purposes, also i tried to use BEM pattern with sass (i dont know if i did it well) i also encapsuled my code as much as possible, but i think i can make it better, maybe i can include some js pattern or maybe i can divide my code in different files, ba...

 
10:02 AM
0
Q: Python script to extract text from PDF with images

Iakovos BeloniasI have the following Python script. The purpose of the script is to extract text from PDF's. I use textract for that because soon I realized there is no easy way to check if a page contains an image or not. So I extract the whole text using textract. The workflow is like this. main() parses eac...

0
Q: Parallel computing extractions with PySpark on an external API

svacxpythonI am currently developing a script on Databricks to extract weather data using an external API called DarkSky. The goal is to extract weather data on a daily level for a set of city locations to use this data as a data feed into a machine learning model. For the sake of simplicity, I will only sh...

 
Asking "is there a better way to code this" is not really on-topic on Stack Overflow - questions here should be about code that's not working. You might look at the guidelines for posting on the Code Review site and see if this isn't a better fit, there. Also, one issue per Question is the rule, here, since the site concept is Q&A - this isn't a discussion forum. The two questions you ask are not related to each other... — Cindy Meister 21 secs ago
 
10:29 AM
@Mast I agree with your comment on this, but keep in mind there is a big difference between "SO can address this" and "SO will address this" codereview.stackexchange.com/questions/220540/….
 
10:41 AM
0
Q: Reduce Complexity from StrategicAdvisor

Martin FrankI'm implementing a Yahtzee app and i have a class StragegicAdvisor who is responsible to decide, which strategy should be followed. The StrategicAdvisor has some tools, a RollAnalyzer who provides information about the current roll and a BoardAnalyzer who can tell us about the Fields vaccant (or ...

 
possible answer invalidation by AlexV on question by Iakovos Belonias: codereview.stackexchange.com/posts/220550/revisions
 
10:58 AM
0
Q: Create Tag Clean Code

Martin FrankHi i'm to low rated to create a tag name clean-code i really miss this tag since clean code is a major aspect of code reviews (just nowadays more thanin the older days)!

 
@Mast Didn't expect it to be that borked. Someone came then along and showed me a dupe
 
11:39 AM
0
Q: Simple calculator in C# where the user inputs two numbers which are then added up

ErikI am trying out C# and am a beginner. I found a tutorial to help me to learn C#. One of the first "projects" is to make a very basic calculator. When for example: I input the numbers 5 and 5.6 the answer is 61. I can't figure out the mistake. namespace ConsoleApp3 { class Program { ...

 
11:59 AM
0
Q: SQL (ODBC) bind to C++ classes

OwnageIsMagicI created it to map buffers returned by ODBC driver to my objects. It works quite nice but, I have some questions marked (A), (B), (C), (D). You can ignore parts related to ODBC using namespace std; // for SO // for variant visitor template<class... Ts> struct Visitor : Ts... { using Ts::operat...

 
0
Q: Type Mismatch VBA

C.EdoMy code can't run and I got an error message that "Type Mismatch" on Set mytable = ShSReturn.ListObjects("SurveyReturn"). Can you please help me to edit it or give some advices and is my code correct? Sub LOf() Dim cell As Variant Dim myrange As Long, lastrow As Long, finalrow As Long, result...

0
Q: it calculates ax^2+bx+c (

rothexDThe first code i ever wrote, sorry that the prints are in german. I tried to do some code imrpovements myself but well whenever i do i fail. Hopefully somebody can help me improve my coding skills while True: print(" ") print("ax^2+bx+c ausrechen UwU, Bitte Achte!!! Bei Kommazahlen . ben...

 
12:57 PM
0
Q: Nested for each statements optimization C#

Evan QuinnHi im trying to optimize this nested foreach and if statement function for work, Any ideas on how I can make it run faster? Thanks in advance <3 My code is retrieving data from a SSMS SQL database with thousands of fields from multiple tables of data, moving them to lists and then looping throug...

 
1:16 PM
0
Q: Two text files should open in text.exe using Python

VinodNeed a program in Spyder that Two text files ( name_1.txt and name_2.txt) should open in TEXT.exe. I'm able to with one text file opening in text.exe. this is program that I used to work. import subprocess as sp programName = "notepad.exe" fileName = "name.exe" sp.Popen([programName, fileName]) ...

 
1:36 PM
0
Q: Visual Fox Pro Automation

meltigelLOCAL oWord, oDocument, oRange, Lc_start, Lc_expr, Lc_ris, Ln_count, Lc_val DIMENSION Lc_funct[1] Lc_expr = "" Ln_count = 1 oWord = CREATEOBJECT("Word.Application") oWord.Visible = .T. cFile = GETFILE() oDoc = oWord.Documents.Add(m.cFile) oRange = oWord.ActiveDocument.Range() nWordCount =...

 
possible answer invalidation by Cacahuete Frito on question by Cacahuete Frito: codereview.stackexchange.com/posts/219994/revisions
 
2:29 PM
Also consider asking on Code review? — Solar Mike 37 secs ago
 
2:50 PM
possible answer invalidation by Robert Todar on question by Robert Todar: codereview.stackexchange.com/posts/220370/revisions
 
3:06 PM
Monking
@Duga rolled back
@Duga response to comment.... I'd leave it unless @MathieuGuindon wants it rolled back
@Duga its okay - formatting correction on variable name within text
 
4:10 PM
0
Q: Count all vowels in string

David WhiteFor a homework assignemnt, I was asked to complete this CodeStepByStep problem. It's coded correctly and gave me a right answer. I'm just wondering if there's an easier way to solve this problem without the big blocky code in the if statement. The fact that I have to check each lowercase vowel AN...

0
Q: Linked List In Rust

XolveI am still learning Rust and I think I have a long way to go. This question is from exercism.io. I am posting here to get some more reviews and suggestions to improve my code. Linked list aren't a good data structure but they help to learn a programming language better. I know I can use recursi...

 
4:28 PM
In idiomatic Go code the normal program flow (aka. "happy path") is as far left as possible (within reason, of course). If a continue statement allows you to do that, use it. Don't use it if puts the error handling left of the normal flow. — Peter 11 secs ago
 
posted on May 20, 2019 by CommitStrip

 
5:10 PM
1
Q: Grouping a Pandas Dataframe by two parameters

AbhishekI have a .csv file of 8k+ rows which looks like this: state assembly candidate \ 0 Andaman & Nicobar Islands Andaman & Nicobar Islands BISHNU PADA RAY 1 Andaman & Nicobar Islands Andaman & Nicobar Islands KULDEEP RAI SHARMA 2 An...

 
possible answer invalidation by Cacahuete Frito on question by Cacahuete Frito: codereview.stackexchange.com/posts/219994/revisions
 
@pacmaninbw Yea, but it's not like people actually read that difference into it. They'll just assume we sent them there.
 
5:37 PM
Monking
 
5:48 PM
Welcome @CacahueteFrito - do you have any questions about why your post edits were rolled back?
 
Not about the first one, I didn't know that I couldn't do that but I learnt it from your link :) I would like to know if I'm supposed to not fix typos
Especially when nobody noticed them, so there is no answer/comment invalidation
BTW, hi!
 
if its typos in the code (or code comments) then I would leave it alone... you can always post again (*<sub>unless your account gets put on hold</sub>) with updated code to be reviewed again...
 
6:38 PM
@SᴀᴍOnᴇᴌᴀ Take a look at the question. It's a fix of an omission, not of a typo.
 
6:51 PM
@Mast maybe CF thought such omission is considered a "typo" (at least with his/her understanding of the term)
 
7:06 PM
2
Q: Querying based on condition

Dot Net developerI am using Entity Framework Core as ORM in my ASP.NET Core 2.1 project. I want to perform server-side pagination in Career Controller for getting list of careers. I have a model which looks like: public class Career { private string _title, _description; [Key] publi...

 
7:30 PM
This seems like it might be better asked on codereview.stackexchange.com. They might still down vote, since they aren't a free source of labor, either. — computercarguy 35 secs ago
 
8:24 PM
0
Q: Leetcode: Map Sum Pairs C#

Gilad Implement a MapSum class with insert, and sum methods. For the method insert, you'll be given a pair of (string, integer). The string represents the key and the integer represents the value. If the key already existed, then the original key-value pair will be overridden to the new o...

 
8:55 PM
Your title is already asking to close the question as "opinion based". Consider to post it on codereview.stackexchange.comPaul Spiegel 44 secs ago
@PaulSpiegel in its current form, this post would not be on-topic for CR because it doesn't appear to have code to review. See "Which Site?" and "Code Review or not?"Sᴀᴍ Onᴇᴌᴀ 28 secs ago
Does the code work, though? If so, then this is just a request for optimizing the code, which is off-topic for StackOverflow, and should be asked on CodeReview instead — Remy Lebeau 44 secs ago
 
2
Q: Find filenames with 4 digits which are not divisible by 20 and delete them

DeltaIVI have a set of files in folder my_dir, which is not the folder where my Python script resides. Sample content of my_dir: foo.bar ba.bar moog_0001.h5 moog_0007.h5 moog_0020.h5 moog_0027.h5 moog_0032.h5 moog_0039.h5 moog_0041.h5 moog_0053.h5 moog_0060.h5 I need to: ...

0
Q: Elm suffixes function (Okasaki, Purely functional data structures)

danbroooksI am working through the exercises for Purely Functional Data Structures in Elm, and I have just completed the suffixes problem: Implement the function suffixes : List a -> List (List a) so that it returns a list of all suffixes of the input in decreasing order of length. Then, in comments, a...

-3
Q: Final Codes for this problems please

Trung LeCould you please post the final codes for this problem? Thank you very much! Please post java codes. The example has C#, but I am interesting in Java. Thanks public decimal ShelfPrice { get; set; } public string Name { get; set; } public bool IsImported { get { return Name.Contains("imported...

 
9:17 PM
@PaulSpiegel I was looking at the sql tag info on CR. At the end it reads: "Questions about schema design would probably be best suited to Programmers SE." (note that link to SE SE points to questions with tag database-design) — Sᴀᴍ Onᴇᴌᴀ 28 secs ago
 
0
Q: Animation loop for a sliding puzzle game

nickI'm building a "sliding puzzle" game. This is the animation code for when you click a Tile. This "loop" function is running all the time. When you click a tile, if it's available to move, I set the "isAnimating" property to true and then set the target left position, and the step (calculated wi...

 
9:38 PM
Yay for confusing people.... too bad they don't all read
@SᴀᴍOnᴇᴌᴀ Thanks.. Now I have no idea where I would post it ;-) But I think we agree, that it's OT on SO. — Paul Spiegel 2 mins ago
 
10:20 PM
0
Q: Addition of Strings [in JS]

thadeuszlayThe task is taken from leetcode Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100. Both num1 and num2 contains only digits 0-9. Both num1 and num2 does not contain any leadi...

0
Q: 3-function program computing connected components of a point cloud given a distance matrix

Curran McConnellI wrote this code in Haskell (instead of Python) for the educational benefit. Can anyone suggest ways to improve this code? I'm guessing that I'm using fromIntegral inefficiently. It takes two commandline arguments. The first is a path to a symmetric distance matrix. The second is a threshold. ...

 
 
1 hour later…
11:38 PM
0
Q: First Program Tic-Tac-Toe. Trouble with abstraction?

MarcinThis is the first little project I've made that didn't feel it was complete gibberish. But I couldn't tell. The biggest problem I had with this was using the BoardValue enum working like I wanted to. I understand that classes should have a level of abstraction to them and I suspect that the way...

 

« first day (2207 days earlier)      last day (1804 days later) »