« first day (2176 days earlier)      last day (1842 days later) » 

12:00 AM
RELOAD! There are 6006 unanswered questions (89.8262% answered)
 
114
Q: Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)

Taryn Update 2019-04-18: We have hit some unexpected issues and are postponing the maintenance. The new target is Tuesday, April 23rd pending several dependencies. tl;dr: Planned service interruption that will impact all Stack Overflow/Stack Exchange sites, Jobs, Chat, and Teams. All sites will ...

> Update 2019-04-18: We have hit some unexpected issues and are postponing the maintenance. The new target is Tuesday, April 23rd pending several dependencies.
 
@Redu, thanks for preparing the way for my tutorial on CodeReview. Meanwhile, I've found another related question at Page Segmented SoE in JS that seems to need the same treatment and for which I am preparing a tutorial answer. Actually, what I am preaching is an algorithm rather than a program in a particular language and, when the code starts to approach a couple of hundred lines would usually use F# (Fable to transpiler to JS) or Nim. Can CodeReview be language agnostic? — GordonBGood 51 secs ago
 
 
3 hours later…
3:09 AM
Code reviews belong at Code Review. — rmaddy 9 secs ago
 
 
1 hour later…
4:24 AM
This question might be more appropriate for Code Review. — MikaelF 24 secs ago
 
4:46 AM
0
Q: Reduce processing time for re.sub() in a nested loop

Hari KrishnanI am preprocessing a set of files where one file is included in another file with an include tag like shown below: file A include file B include file C contents of file A include file D contents of file A Here i need to replace the include tags with contents of each of the respective files....

 
5:33 AM
 
6:23 AM
0
Q: Why is return nothing?What is mean?

Nare Shaghbatyanpublic void tableMousePress(MouseEvent e) { if (tablePositions.size() == 0) return; }

 
You may want to try SO's sister site: codereview.stackexchange.com. — orde 17 secs ago
 
6:42 AM
0
Q: Program to check if in line are doubled words

KurachaLike in title i made program with check if in text lines are doubled words And in the end shown number of lines without doubled words. this is example text: sayndz zfxlkl attjtww cti sokkmty brx fhh suelqbp xmuf znkhaes pggrlp zia znkhaes znkhaes nti rxr bogebb zdwrin sryookh unrudn zrkz jxhrdo...

 
7:08 AM
I'm voting to close this question as off-topic because it belongs at codereview.stackexchange.comJoakim Danielson 1 min ago
 
 
2 hours later…
8:38 AM
0
Q: Golang tool to check public repositories list in Github

setevoyDidn't post on the Codereview for a while but trying to learn Golang now and wrote my first utility a few days ago and will be glad to see what I did wrong here and what can be done better. This tool is used to check public repositories in out GitHub organization and compare such a list with ano...

 
8:50 AM
Post the relevant code in the question itself. Links die. In any case, SO is about programming questions. codereview.stackexchange.com is the appropriate site for code reviews. — Panagiotis Kanavos 15 secs ago
@PanagiotisKanavos, codeReview doesn't allow modifying others codes. — user366312 21 secs ago
 
0
Q: Store a hash in a cookie to identify the user's account to keep logged in after close browser

nobodyI made a option to user choose to stay logged in even after he closes the browser. It's really simple to implement, but i'm not sure about the hash i used to identify the user that is stored in a cookie. To generate the hash i used bin2hex(random_bytes(59/2)) this function generate a string lik...

0
Q: words dictionary out of a text file

MoytabaI'm python newbie please tell me what the weak spots of this code are (specially in terms of efficiency) and how I can improve it: def get_word_frequencies(filename): handle = open(filename,'rU') text = handle.read() handle.close() MUST_STRIP_PUNCTUATION = ['\n','&','-','"','\'',':',',',...

 
9:49 AM
This question should be for Code ReviewKunal Mukherjee 38 secs ago
moving it to code review then — asdasdsdf 53 secs ago
This is amazing. Thank you so much. I spent the last month trying to learn/understand pointers, and so I overlooked that I may be over-complicating the code. I removed the pointers and turned the chars into strings, fixed the foreach loops, removed the stupid extra bracket, and BOOM! Later today I will take look at your code (thank you for the excellent comments) to see how to work with chars again in the future. Sorry, I know this isn't a code review site, but I had nowhere else to go! — aName 8 secs ago
 
10:36 AM
-1
Q: how to test input image from pre trained CNN model

Faiqa Saleemi have saved my CNN model in .pth file. Using Pytorch. I want to predict input image from my .pth file .I m getting this error. File "C:/Users/MS/PycharmProjects/GUI_last/test.py", line 148, in print('Accuracy of the network on the test images: %d %%' % ( 100 * (correct) /total)) ZeroDiv...

 
11:14 AM
 
12:13 PM
0
Q: Building complex sentences based on a data structure

Vera PerroneI really do not like how bad this looks. It is not readable and I am not sure if I need the stacked map's. There are a lot of iterations going on here (map, join, replace) and performance is really important, please help :( Input: const alternatives = [ "flex", "float", [ "background-...

0
Q: JWS token inside a message rather than the root of the message?

Jesse de WitI'm trying to implement a peer-to-peer system for exchanging 'data'. I'm developing a theoretical model for exchanging this data. For my specification I have some constraints to comply to: Data can only be published to clients by registered hubs. All published data should be centrally verifiabl...

 
12:33 PM
0
Q: Determine whether array could become non-decreasing by modifying at most 1 element

thadeuszlayThe task Given an array of integers, write a function to determine whether the array could become non-decreasing by modifying at most 1 element. For example, given the array [10, 5, 7], you should return true, since we can modify the 10 into a 1 to make the array non-decreasing. ...

 
12:50 PM
 
0
Q: Persist payload containing multiple items using EF Core Performance Improvements

VinnyGuitaraI have an .NET CORE EF application setup as Database first that is supposed to take in a payload containing items to be persisted to my database. They payloads can be huge all containing multiple "Securities" and each "Security" has multiple "Positions/Transactions" to be persisted to the databa...

 
posted on April 19, 2019 by CommitStrip

 
possible answer invalidation by Community on question by ParanoidPanda: codereview.stackexchange.com/posts/202663/revisions
 
1:16 PM
Greetings, Programs.
@Lothar Very clever, congrats!
 
 
1 hour later…
2:30 PM
0
Q: Bubble Sort in C (for tab of string)

7hsk:) What do you think of this bubble sorting function in C, for string array. I would like to improve the lisibite, but also the performance if it is not the case, especially good practices. void sort_entries(char **entries, int reverse) { char **next; char **previous; ...

 
2:50 PM
0
Q: DirectX11 Error Handling

MafuI'm new to C++, been a C programmer most of my life. I wanted to get into graphics and Direct3D is C++ so I figured it was about time. I've been learning about strings, vectors, references, smart pointers, etc. Not using classes because I still struggle to understand how to apply them in design. ...

0
Q: Nested loop in lisp to process a 2d array - what's good style (with and/or without loop macro)?

mwalCode below is answer to an exercise in Paul Graham's ANSI Common Lisp (ex. 4.1). The challenge is to rotate an array by 90 degrees. I found an example solution which I've commented below. It seems ok'ish and I'm enjoying learning how to use do, but in this particular case it seems actually more ...

 
3:17 PM
Ahoy, Mateys! Happy Friday to y'all!
What say you of this NAA?
 
Wut
Hey Sam, I had explained the code at the start. The reason why I posted is because there was no solution in python and is very easy to understand. — Prince Pipera 6 hours ago
It's .
 
0
Q: Unique elements of a list and corresponding indices in Haskell

Stéphane LaurentGiven a list vs, I want to get the list vs' of the unique elements of vs, as well as the indices of the elements of vs in vs'. For example, if vs = [7, 8, 7, 8, 9] I want to get [7,8,9] (the unique elements) and [0,1,0,1,2] (the indices). An easy implementation is: import Data.List im...

 
So why exactly this needed a Python answer is beyond me.
@SᴀᴍOnᴇᴌᴀ It's definitely something, I think this is one of those non-intuitive cases where it's more VLQ than NAA.
 
3:34 PM
Feb 27 at 16:17, by Sᴀᴍ Onᴇᴌᴀ
@SimonForsberg some people... they are just... like J.R. Smith said: "something else"
@Mast hence why I commented with this:
 
0
Q: Project Euler #5 in C++

o2640110I'm currently doing the Project Euler challenges to learn C++. The fifth problem is the following. 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the number...

 
3:57 PM
@CommitStrip should she really be that happy? maybe there should be another frame with a different emotion...
@RMunroe settings from ~1995?
 
0
Q: C++ merge sort code

codeforce#include <iostream> #include <vector> using namespace std; void merge(vector<int>& arr,int start,int mid, int end) { vector<int> temp; int ptr1 = start; int ptr2 = mid+1; while(ptr1 <= mid && ptr2 <= end) { if(arr[ptr1] <= arr[ptr2]) { temp.push_back(arr[ptr1+...

 
4:15 PM
@SᴀᴍOnᴇᴌᴀ thankfully it was removed by rolfl ヽ(´▽`)/
 
4:27 PM
0
Q: Pulling images from Windows 10 Lock Screen to a different folder

Der KommissarWindows 10 has an interesting feature where it will display "fun facts" and images on the lock screen. Occasionally, these images are something I would want to use for a background. These images are stored in %LocalAppData%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalSta...

 
4:54 PM
Monking
 
5:11 PM
Do you have a specific issue with your code otherwise you should post this at code reviewJoakim Danielson 42 secs ago
 
5:26 PM
0
Q: C++ protocol for sending arrays over TCP

rwolstAs someone who has programmed in C for a long time, I have just written my first C++ program and feel it would be very valuable to get a review of the code, to see what features of C++ I could make more use of. The program provides a protocol for sending and receiving arrays of data over TCP. Th...

 
5:42 PM
5 months until International Talk Like a Pirate Day :) 🏴‍☠️ ⛵
 
0
Q: Unit testing extension method adding view location expander

PrologIntroduction I'm writing unit tests for an extension method I wrote. Its only purpose it is to wrap startup logic which extends ViewLocationExpanders list by an instance implementating IViewLocationExpander. ViewLocationExpanders is a property of RazorViewEngineOptions, which can be configured i...

0
Q: Image processing using multiprocessing in Python

Hongbo MiaoI have an image stack. I am trying to use multiprocessing to do some process on each image in stack to get new image, and then bitwise_or with the old image. Since multiprocessing won't keep the original order, I pass image index as args. Later I bitwise_or the new image and old image by a for ...

 
6:25 PM
-1
Q: ValidBraces Failed Last Test - Codewar

saviour123The code below works and passed all the test except one. I am wondering why this failed. Can some explain to me why this failed? if string.count("{}") >= 1 or string.count("()") >= 1 or string.count("[]") >= 1: return True else: return False Full instructions available...

 
6:43 PM
@CaptainObvious I left a comment about it not working and thus it is off-topic, OP deleted it
 
0
Q: Simple BMI Calculator (Python 3)

Connor BornakAs my first Python program I have written a simple BMI calculator. I want to know how i can improve this program. Would functions be useful? How can I improve the way that it is presented? #Introduce BMI Calculator print ('Welcome to BMI Calculator!') #Ask if user would like to use Metric or I...

 
7:00 PM
Cross-site duplicate with correct code - codereview.stackexchange.com/questions/27931/…... — Alexei Levenkov 20 secs ago
 
7:31 PM
Hi all, still just looking for design feedback on an Asynchronous Utility I wrote:
https://codereview.stackexchange.com/q/216351/153986

Mostly interested in design feedback as well as responses on the Error handling and use examples toward the bottom
 
@DapperDan if you are looking to attract more attention, you could consider offering a bounty on that post
 
8:15 PM
If the code is truly working, you'd have better luck on Code ReviewChrismas007 47 secs ago
If you have working code that you'd just like others to review for you, then Code Review was created just for that purpose. This site is for specific questions related to problems you're having with programming (code) or use of a programmers tool. You can find more information about this site by taking the tour and reading the help center pages. — Ken White 27 secs ago
It's not really clear what your specific question is. Looks more like you are looking for a code review. If you can simplify your code an ask a more specific question you will more likely get an answer. — Brad Patton 54 secs ago
 
 
1 hour later…
9:33 PM
Replace your switch block with a lookup array. codereview.stackexchange.com/a/216711/141885mickmackusa 58 secs ago
 
0
Q: Basic logic problem in Prolog

DairI thought it would be a good idea to take some easy to solve (by hand) problems and model them in Prolog for practice. Here is a problem I modeled in Prolog: A messy kid wrote a multiplication problem. Alice saw 100 x 6. Bob saw 101 x 6. Dan saw 102 x 9. Each one only mis...

 
 
1 hour later…
10:59 PM
0
Q: C++ Monster Roaming Functionality

RickI have a working monster system that follows players around by moving a certain distance towards the players 2D (X, Y) location. However, I now want to make it so these monsters roam around at random time intervals for a short distance. Say we have a monster that can travel anywhere from 200-300...

 
11:19 PM
0
Q: Recursively create a tree in Rust

JMacThis code is meant to take a rectangular area, and randomly divide it up into smaller rectangles in a binary tree. I'm somewhat new to Rust. I'm concerned mostly about the create_subrooms function. I've tried lots of other permutations, but I can't find any more elegant way of writing this, and...

 
11:39 PM
And on saying that there are many ways you can do this, and unfortunatly stackoverflow is not really the place to ask such questions, try code review — TheGeneral 57 secs ago
 

« first day (2176 days earlier)      last day (1842 days later) »