« first day (2328 days earlier)      last day (1672 days later) » 

12:00 AM
RELOAD! There are 6153 unanswered questions (90.0760% answered)
2
 
@Vogel612 show those exams who is the boss!
TTGH
 
12:40 AM
0
Q: Created 3 for loops to pull data from multiple excel files, is there a better way to do this

Jacob Saxingerkinematic_viscosity = [] kinematic_viscosity_1= [] kinematic_viscosity_2= [] #*empty arrays for creating after loop in completed* for dynamic_viscosity in DV: kinematic_viscosities = dynamic_viscosity/Density_PE_298k kinematic_viscosity.append(kinematic_viscosities) for dynamic_viscosity...

 
1:00 AM
0
Q: Pseudo Game of Cups

Linny DESCRIPTION: [Inspired by Chandler's GameOfCups with Joey in "Friends"]. Program gets 5-digit zipcode from user. (Assume user won't make a mistake, and will enter exactly 5 digits). Program awards points based on a series of rules, and reports the total points ea...

 
1:14 AM
The way this question is currently phrased is not quite a perfect fit for CodeReview but I believe that changing the phrasing to this question a bit would make it a better candidate for CodeReview than here. — Dair 42 secs ago
 
 
1 hour later…
2:40 AM
0
Q: React Language Localisation

VencovskyI have made this Language Localization for React Native (it can also work for react js). It should get the device language, but the user should also be able to change it. import React, { useState, useContext } from 'react' import { Platform, NativeModules } from 'react-native' import PropTypes f...

 
 
2 hours later…
4:43 AM
Monking
 
 
1 hour later…
JAD
6:11 AM
@DerKommissar that is of course worth a lot. Glad to hear it's helping then :)
 
6:31 AM
The appropriate place for the code review portion is codereview.stackexchange.comchris 19 secs ago
Questions seeking improvements in code are better suited for codereview.stackexchange.comCinCout 24 secs ago
 
4
Q: Operation logger

Dmitry NoginGitHub, NuGet This component traces execution in a logical order instead of chronological as everybody else :) For example, the following code: static async Task MainAsync() { Op.Log.Subscribe(WriteLine); using (new Op()) await Task.WhenAll( ...

 
6:55 AM
The question should be closed on SO since there is no issue with the posted code. Please post at Code ReviewWiktor Stribiżew 58 secs ago
 
7:22 AM
@DerKommissar Eventually, but that set costs more than my monitor did.
Looks interesting though.
Not feasible, since I'd need one for both myself and work and work isn't going to spring for it, but definitely interesting.
 
If your code works well and there is no issue, please consider posting the question at Code Review. — Wiktor Stribiżew 11 secs ago
 
8:01 AM
Can you share a link with more details, that may be interesting for the ones reading this. However to my understanding .gitignore can help you to keep files from being added to source control, however it does not prohibits code do be hard-coded into your source. This however can be mitigated using source code analysis and code review — papanito 9 secs ago
 
8:23 AM
0
Q: Loading KML files into leaflet Javascript map

Mariusz KrukarThis is working code for input KML files into leaflet map // Load kml file fetch('lotA.kml') .then( res => res.text() ) .then( kmltext => { // Create new kml overlay parser = new DOMParser(); kml = parser.parseFromString(kmltext,"text/xml"); ...

 
8:56 AM
This would be better suited to Code ReviewDarren Bartrup-Cook 15 secs ago
 
9:43 AM
0
Q: Performance of ID's checking between Access and Excel

Frederici want to increase the performance of this code: Dim... ... ... ... ... Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True Set wb = objExcel.Workbooks.Open("C:\Dateipfad\Dateiname.xlsx", True) Set rs = db.OpenRecordset("Select DataPointVID from My_ValidReport", dbOpenSna...

0
Q: LINQ to database takes too much time

saidoffI have an HttpPost function , which returns a JsonResult: [HttpPost] public JsonResult GetDeadlines(string selectedCountriesStr, string selectedTypesStr, string yearEndDate) { List<int> selectedCountries = new List<int>(); List<string> filingTypes = new List<string>(); //if selected...

 
10:23 AM
0
Q: SQL SELECT query inside the loop

Bobi DesiIm doing small search engine but at the beginning i end up with to many loops and looking way to reduce them . $words = trim(preg_split('/\s+/', $string)); print_r($words); Array ( [0] => test [1] => test1 [2] => test2) Each product have a focus word so 1st im trying to match that focus...

 
10:33 AM
Storing everything in memory is a sure way to kill your computer when the file is huge. This code would never pass a code review here. — bruno desthuilliers 25 secs ago
 
10:50 AM
I would fail this in a code review. Something shouldn't be a one-liner just because it can be. — Michael 58 secs ago
 
11:23 AM
0
Q: Swift : attempt to reduce data more conveniently

dengST30I have some data, let points = [(718, 620), (4596, 1280), (410, 333), (4597, 993), (410, 337), (4597, 996), (428, 337), (4597, 1000), (431, 335), (4599, 1044)] That is pattern, [(pointStartOne.x, pointStartOne.y), (pointEndOne.x, pointEndOne.y), (pointStartTwo.x, pointStartTwo.x) // ... ...

 
12:03 PM
0
Q: Automate tasks with Lambdas in java

Aashish PawarHi Code Review Stack Exchange! Can I use #define fori(s,n) for(int i=s;i<=n;i++) in java ? And of course, java doesn't have precompiler so we cannot do that in java. So I thought we can do that fori method either using stream() or manually defining a method. But I thought instead of just t...

0
Q: parse json file recursively with JAVA

oanI have a json file that contains chapters which contain chapters and sub chapters .... it is not always the same number of chapters and sub chapters: For example { "IDCours" : "CS10.44", "title": " .... ", "chapters": [ { "idChapter": "1", "title": "Introduction", "c...

 
 
1 hour later…
1:05 PM
If you have working code, this might be a better question for codereview.stackexchange.com. It's too opinionated for SO. — jaco0646 19 secs ago
 
Greetings, Programs.
 
1:23 PM
0
Q: NRPE script for monitoring filesystems usage

David MoslerNext script returns NRPE friendly output. It checks percentage usage of all local filesystems. Desired output if everything is ok: OK | /=56;;;; /boot=20;;;; /opt=40;;;; /var=60;;;; (and exit_code0 = ok) Desired output if something is wrong: CHECK /var | /=56;;;; /boot=20;;;; /opt=40;;;; /va...

 
Also this question might be better suited for codereview.stackexchange.comBarry just now
 
1:43 PM
1
Q: Algorithm that spans orthogonal vectors: Python

NelverThe code consists of three functions: Spans arbitrary vector (takes dimension as an argument) Spans vector orthogonal to the one passed in the argument Finds cross product between two vectors. The code is following: def span_vector(n): '''n represents dimension of the vector.''' retu...

 
1:58 PM
This is one for Code ReviewMansoor 14 secs ago
@mjwills: I have updated my question, I still have a feeling this seems a bit too complicated for something that seems like a common tcp server/client scenario? Is there a better way to do it (or should I ask on code review)? — Lou 55 secs ago
@Cristian Iacob This post may be better suited for the code review stackexchange since it seems to be working code that you want optimized/reviewed. — Nexevis 52 secs ago
This question should be asked on CodeReview as you require optimization across entire script. StackOverflow helps with coding errors or undesired results. — Parfait 47 secs ago
 
2:18 PM
@JAD I mean it's not the answer, but it's definitely making things a little better.
@Mast Same. For me, the ergonomics of my back not hurting as much are worth it.
Either spend $40 / week on a chiropractor, or $354 once on a keyboard that helps a lot, with as much as I type.
3
 
@DerKommissar I thought you might be spending that money for your back.
 
Honestly, at this point, my back is so bad it's almost unnoticeable anymore.
 
@DerKommissar Have you had a "Slipped Disc" or other disc problem yet? I had one in the "C" region of my spine that caused me to limp for 2 years.
 
Not that I've had diagnosed...
(Did have a Hernia about 2 years ago.)
 
Put a Jacuzzi/Spa into your place, it might help and could improve the resale value.
 
2:32 PM
Monking
 
2:42 PM
@pacmaninbw no not mine, sir
I retracted mine after sufficient edits were made
 
3:21 PM
@JonathanLeffler Yeah, there are lots of ways to do it better, but this isn't Code Review. So I kept it similar to the original code. — Barmar 32 secs ago
 
0
Q: asp.net mvc 5, EF 6 filter performance

TrainI'm creating a filter with Linq in an asp.net mvc application. I was hoping I could get some tips on performance enhancements. Aside from any possible performance enhancements. I have a few questions. Should I ToList before my extension methods that use .Select? Would Adding AsNoTracking help p...

 
3:53 PM
This question may be better suited to codereview.stackexchange.comcybernetic.nomad 43 secs ago
If this code is already working as you expect, it might be better to post to codereview which is a dedicated exchange for reviewing code and improving it. The code must be fully functional though. — Nexevis 19 secs ago
 
Monking
 
0
Q: stochastic gradient descent - backpropagation over mini-batches in one go

simonalexander2005I have been working through a tutorial on neural networks (http://neuralnetworksanddeeplearning.com). I have then been translating the code to java, to help improve my understanding of what the code is doing. The book mentions a way of speeding up the program (http://neuralnetworksanddeeplearnin...

 
4:23 PM
2
Q: Simple timestamping filter in C

Thure DührsenI wrote a simple timestamping filter that prepends each line with the UNIX timestamp in nanosecond precision as returned by clock_gettime, as well as the difference to the previous timestamp. for i in {01..15}; do printf '%s\n' "input $i"; sleep 0."$i"; done | ./timestamper BEGIN CLOCK_REALTI...

 
4:43 PM
0
Q: suggestions and or improvements for my C# Vector library

FutureCakeI have been working on a vector library for a little bit now. And At this point the basics are down and i am looking for some tips and advice this may include: suggestions for things that might be missing and should be added. Improvements for readability and of-course efficiency. If you h...

 
@SᴀᴍOnᴇᴌᴀ seems to have been going over pretty well
 
@Vogel612 nice
 
5:01 PM
If the code works correctly, and you only want to increase its performance, consider asking on codereview.stackexchange.com instead of SO. — Algirdas Preidžius 49 secs ago
 
5:18 PM
Without the over-use of bold and with a proper description, you might have on topic post for the Code Review site. See their guidelines on good questions. — Martijn Pieters ♦ 38 secs ago
 
0
Q: Dictionary comprehension with nested for loop and conditional if

Andrew HamelLet's suppose I have two lists: list_b = ['cat.2','dog.6','bear.10','zebra.13'] list_a = ['cat','dog','bear','zebra'] I would like to create a dictionary with the desired output: dict_ = {'cat.2':'cat','dog.6':'dog','bear':'bear.10','zebra.13':'zebra'} I have two possible solutions. I am as...

 
5:41 PM
 
6:00 PM
@dfhwze Found it in the Close queue and wondered why, it looked fine.
 
6:17 PM
@Vogel612 mission accomplished +90%
@pacmaninbw perhaps because of some out-date comments. They are removed now.
 
6:30 PM
this post is better suited for codereview.stackexchange.comuser2682863 47 secs ago
If you want help improving working code you should post this on CodeReview.SE. If you do decide to do so please delete the question here. — NathanOliver 11 secs ago
 
0
Q: My project, Im I heading the right direction? Python Only script

98EdHave been working on this project for about a week now. Using Python only, including importing tkinter etc.. I'd like to hear some feedback from the Stack community about my project. I am halfway through, and would like to stop here and see if I am heading the right direction. I am a total beg...

 
7:42 PM
Questions relating to code reviews are off topic here. If there is something wrong with your code, in which it does not produce the results you expect, then please include that. Simply asking "how can I make this better" is too broad. — gunr2171 59 secs ago
 
8:00 PM
If your code is working and you just want it reviewed, it should be on Code Review, not here. — Carcigenicate 47 secs ago
Sorry about that. I will post it in code review. — cyberprogrammer 43 secs ago
 
@DerKommissar Never needed a chiropractor, but I imagine the stakes change once one gets involved.
@dfhwze @pacmaninbw FYI it should be knocked out of the review queue now.
Looking for 1 more VTC here, lacking context. Code is too far turned into hypothetical.
 
@Mast My contempt for structural typing prevents me from internalising the code, but I've VTC'd based on the text; feel free to ping me if it ever wants reopening because I won't be watching go.
 
8:24 PM
0
Q: Encryption algorithm which encrypts & decrypts plain text and Files from a given directory

winzhack999I have created an Encryption and Decryption Algorithm that encrypts plain text using a given cipher and also decrypt it back to original. That perfectly works. This was my code for a test and the reviewer told me that the class structure is inverse of what is the right way of doing it. Plus it ...

 
8:44 PM
-1
Q: VBA - For Each File with extention ".dwg" preform commands

Joshi cant seem to get my loops to work right in VBA hoping im missing something simple. Im trying to index thru a specific folder and has tons of files in it and for each file that ends with ".dwg" i want to do create a script (one script for all dwgs files thats why i need to index thru them to get...

0
Q: Python - The Collatz Sequence

cyberprogrammerCan I get a review of my code for the the Collatz Sequence from Chapter three of "Automate the Boring Stuff with Python"? I am mainly wondering if there is a cleaner way to write it? Thanks in advance def collatz(num): while num > 1: if num % 2 == 0: print(num//2) ...

 
8:56 PM
Since this is a pretty subjective question, I'd suggest asking over at Code Review Stack Exchange. — cubrr 55 secs ago
Extremely hard to discuss a refactor if there are no implementation details given. What do the calculations look like? Do they share similar elements? Bring this question up at Code Review and be sure to add more details. Refactoring usually involves stripping out duplicative logic and good/better namespacing/object oriented approaches. — Andrew 27 secs ago
 
@Mast I got back too late to help.
 
0
Q: PySide2 Row and Column Creator

Cosmicfirst things first, I'm new here so if I did anything wrong please tell me and I will try to fix it best to my ability to understand it. Request: In short, I need help simplifying and optimizing this code because now that I have switched to a from 2 list widgets to a tree widget, loading the tab...

0
Q: Mapping abstraction?

I'll-Be-BackThere will be a huge object mapping (transforming) with a lot of calculations and logic for some fields. I would like to refactor this to classes or some kind of separation so it will be easily testable (jest) for each field. How would you abstract these to a few classes or which design pattern...

 
9:24 PM
0
Q: Function that returns both solutions Python

Ed1995I'm having a problem modifying the code so function solve_quadratic, that returns both solutions of a generic quadratic as a pair (2-tuple) when the coefficients are given as parameters. It should work like this: This is my code import math def solve_quadratic(a, b, c): d = int(b*b) -...

 
9:44 PM
0
Q: An Alternative Algorithm for Sorting a Stack Using Only One Additional Ttack

Michael WrightFrom "Cracking the Coding Interview": Write a program to sort a stack in ascending order (with biggest items on top). You may use at most one additional stack to hold items, but you may not copy the elements into any other data structure (such as an array). The stack supports push, pop, is_em...

 
@CaptainObvious Has an answer now, but was really looking for a 'fix' I think. Oh well.
 
possible answer invalidation by 200_success on question by cyberprogrammer: codereview.stackexchange.com/posts/229270/revisions
 
 
2 hours later…
11:45 PM
0
Q: Validate URL with Regex and java.net.URL

Rasela DonI'm writing a URL validator. It first check for special characters in the input. Then add 'http://' manually and check for validity. /* Returns true if url is valid */ private static boolean isValidURL(String url) { boolean containsSpecialCharacters = specialCharactersExists(url)...

0
Q: ADODB Wrapper Class (Revisited)

rickmanalexanderI recently posted this question on my implementation of an ADODB Wrapper Class. I realized in my own review that I was missing some very important things, so much so, that I decided it would be worth it to re-write the entire class. Saying that I have done quite a bit of restructuring so I am goi...

 

« first day (2328 days earlier)      last day (1672 days later) »