« first day (3064 days earlier)      last day (938 days later) » 

12:02 AM
REFRESH! There are 7825 unanswered questions (89.3114 answered)
 
12:44 AM
0
Q: First time in a while writing static web application with jQuery -- Does my code follow modern practices?

austinwI created a web app following instructions to write an HTML page with jQuery and CSS which consists solely of a form. When the form is submitted, its data is packaged in JSON format and is sent to a fake URL via an HTTP request. I am a bit rusty when it comes to web development. My web page works...

 
 
1 hour later…
1:50 AM
For code reviews, I'd recommend submitting to codereview.stackexchange.com. This isn't really the place for it. — theOtherMichael 57 secs ago
 
2:39 AM
 
2:53 AM
"This is my full source code" -- please don't try to shoehorn a code review into your question. Keep your code as an example, something minimal but that is still complete enough to demonstrate the one specific piece of functionality with which you need help. — JaMiT 5 secs ago
Since your code work, I believe you should put this question in CodeReview instead but If I understand your intention correctly, your first sort is meant to sort row 8-15 in your screenshot? If so then you can do XRP = Range("A8").End(xlDown).Row instead. Your current code will have XRP = 16 instead of 15 so you are sorting A8:A16 which has 1 empty row. — Raymond Wu 19 secs ago
 
3:36 AM
0
Q: Simple Swing tool which displays a few procedurally generated dungeon levels

RelysI've been teaching myself Java programming. I thought it would be an interesting exercise to program a simple utility for procedurally generating dungeon levels. This program creates a small, random number of dungeon levels and displays them via clicking a JComboBox that switches between custom p...

0
Q: Does my code meet my requirements in full? C++ Matrix Magic Square

SharenI want to make sure if my code meets these requirements, if not how can I fix it? What type of array is being used in my code to create the magic square? How is it being filled when the user enters a number, can I have more explanation whats going on in the code and how I can print out some conte...

 
3:58 AM
Can you clarify what you mean by "improve the code"? Is there an issue with this specific code? If it works and you're looking for more of a code review, then perhaps this question would be better suited for codereview.stackexchange. — Drew Reese 39 secs ago
 
4:26 AM
0
Q: Separating Functions in ES6 in React

Gray SinghI'm calling a function called goGet when clicking a button and I wanted to improve my code on the if else part. Maybe separating the functions? How do I improve something like this below? const goGet = async () => { try { if (product.status === "selected") { const { data: { createProd...

 
5:16 AM
0
Q: Call Bit Query API and return results

chuacwI have a TypeScript file in VSCode that I'm trying to debug. When I launch it, VSCode launches "node CheckFMBackup.ts", instead of calling TypeScript on CheckFMBackup.ts first, before calling "node CheckFMBackup.js". Why doesn't VSCode call "node CheckFMBackup.js", instead, it calls "node CheckFM...

 
5:51 AM
Monking
 
 
2 hours later…
7:43 AM
0
Q: How can I further optimize an ECC code computation?

Paul JonI'm developing an embedded solution (STM32 MCU) featuring a parallel NAND Flash (MICRON) interface and my platform lacks hardware ECC computation powerful enough to handle page sizes of 8KB so I elected to use software ECC. This one, to be precise. I refactored it as much as I could, unrolling so...

 
8:08 AM
Welcome to Stack Overflow. Please be aware that open ended requests for code or advice are generally off-topic as per the help center. Since it seems you have working code and are looking for general improvements, this appears to more appropriate for CodeReview – be sure to check their question guide first, though. — MisterMiyagi 52 secs ago
Suggest anything? I suggest posting this on Code Review, not SO. :-) — AKX 41 secs ago
 
8:41 AM
SO is not a place for code reviews -> codereview.stackexchange.comAndreas 41 secs ago
 
8:57 AM
0
Q: How to optimze javascript find function

aba2sI have two functions: one fetch the api aand get back the data (async function) the other use this data to filter and display information (dropdown function) The problem is the drop down function is very slow when filtering. How can I please optimise this function ? This line take alose lots of...

 
9:15 AM
Your question is off topic. What topics can I ask about here? There is a code review stackexchange for such questions you can find at the bottom of this page. — Rob 5 secs ago
 
9:41 AM
For review of working code, the site Code Review is more appropriate, however the question should be completely reformatted to align with the rules over there. — trincot 36 secs ago
 
0
Q: Name main and assert tests best practices

banana_99I have just finished an assignment and would like to know what best practices I might be missing in my code. Any help would be hugely appreciated. import random random.seed(42) def alphabet_position(text_): def numeric_position(char_): # Built in method for getting the alphabet posi...

0
Q: Python code that is unzipping files

NorthAfricanI have a small program that is creating a counterpart of existing data files, unzipps them and then changes the names of the files. This process runs on a remote desktop server (windows). I have one problem: The runtime of this program is really slow, to create a counterpart of one directory and ...

 
10:06 AM
Monking
 
10:32 AM
This is probably a better fit for Code Review. — David 28 secs ago
 
11:25 AM
0
Q: Transformations on a game board represented as a bitset

martinI'm using a long as a bitset to represent a game board. If a field is set (X) the corresponding bit is set, if it's empty (-), it's not. The fields are numbered from left to right starting from 0. For example, the following board 0 1 2 X - X 3 4 5 - X - 6 7 8 X - X becomes 1 * ...

 
This is probably better suited on codereview.stackexchange.com, unless you have a specific question. — waterloomatt 20 secs ago
If it really works and there is no issue, please consider posting it at Code Review. — Wiktor Stribiżew 42 secs ago
 
12:08 PM
If you wonder why this is getting downvoted, it's probably because it's not a specific problem but a demand for code review. If you are still interested, you may have more of a chance on the dedicated StackExchange site for code reviews. — laancelot 8 secs ago
@waterloomatt No, broken code is not ready for review until it's fixed. — Toby Speight 11 secs ago
 
0
Q: Generate random string to match a specific pattern

Bogdan Mindimport random import string def random_char(y): return ''.join(random.choice(string.ascii_uppercase) for x in range(y)) p1 = str(random.randrange(1, 99)) p2 = str(random_char(5)) p3 = str(random.randrange(1, 9)) p4 = str(random_char(2)) p5 = str(random.randrange(1, 9)) p6 = str(random_cha...

 
Before you post at Code Review, make sure to read A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". Be sure that the code works correctly; include your unit tests if possible. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. — Toby Speight 40 secs ago
 
12:39 PM
0
Q: Format pem key one line string in JS

frontMasterI receive .pem key as one string which needed to be formatted to be able to create signature const input = '-----BEGIN RSA PRIVATE KEY-----somekey-----END RSA PRIVATE KEY-----' const newStr = str.replace(/-----BEGIN RSA PRIVATE KEY-----/g, '-----BEGIN RSA PRIVATE KEY-----\n').replace(/-----END RS...

 
12:54 PM
If this is working code that you think could be improved, see Code Review. If not, please clarify the problem. — jonrsharpe 39 secs ago
 
 
1 hour later…
2:17 PM
0
Q: Refactoring Ruby REST API Wrapper

ArtyrcheekI am trying to create an API wrapper for recharge (A Shopify subscription service), I am using the HTTParty gem module RechargeAPI require 'httparty' BASE_URI = 'https://api.rechargeapps.com' API_TOKEN = 'my_token' class Client include HTTParty base_uri BASE_URI headers 'X-Re...

 
2:58 PM
@AlexWaygood Hmm, I guess I could. Would go against the problem statement, though, which shows a regular tuple. And I think it's unrelated to the question. Maybe suggest that in an answer for their codereview question? — don't talk just code 40 secs ago
 
3:37 PM
Monking
 
4:08 PM
Monking
 
Monking
 
4:20 PM
0
Q: How does one use the abstract Decoder class properly?

Kittoes0124Am experimenting with the IAsyncEnumerable interface and PipeReader class. Have come up with the following to decode a stream of bytes into chunks of characters and am able to decode all of my test files successfully but that doesn't mean that one hasn't thought of every edge case. Of main concer...

 
 
1 hour later…
5:44 PM
I don't think there's a way of doing this directly, so you'll just have to catch it in code review or testing. Over 300 custom message types is a lot! — Useless 20 secs ago
 
5:59 PM
0
Q: Count k-mers (substrings of length k within a biological sequence), including reverse complement, in a fasta file using Rust

suchapalaverK-mers are substrings of length k within a biological sequence. Counting how many times they appear across sets of data is often the first step in a number of analyses conducted by bioinformaticians. Here is my src/lib.rs for a CLI program that counts the kmers of length k as input by the user in...

 
6:37 PM
Maybe it's time to get a more modern program? — 41686d6564 1 hour ago
^^ easier said than done
-8
Q: OLD MS-DOS PROGRAM SHUTTING DOWN IN TWO DAYS

Richard SavoieI have an old Business MS-Dos program that is shutting down in two days. The Company I purchased the program is out of business and the owner past away suddenly. He used a code generator to keep my program running for 35 years. Is there a file that I can delete to keep the program from shutting d...

 
0
Q: Outputting User Submitted Links Securely

Nut Cracking DudeI wanted to allow my website visitors (any Tom, Dick & Harry) submit their links to my webpage for output on my page. I thought it's best to parse user submitted urls before echoing their submitted urls on my page. Best to parse the urls as I won't know what urls they will be submitting nor the ...

 
7:20 PM
@EOF as far as "should have been the whole expression from the start" - you're right there too, but you'd be surprised (or maybe not) how many otherwise good programmers object to that in a code review .... no matter how much I push back ... (their objection is the "implicit" conversion to bool" "implicit" not in the C++ sense but in the "OMG this is confusing because you didn't write it out" sense). — davidbak 35 secs ago
 
7:54 PM
This is probably a better fit for codereview.stackexchange.com; if your code is working and you're just looking for improvements, it's not a good fit for Stackoverflow. — Tim Lewis 26 secs ago
 
someone help me with the review of my development in a branch of github?
 
0
Q: Mapping .txt files with target labels mentioned in .csv file for training data

Sherlock I am preparing training data for document classification using .txt files and .csv I have multiple .txt files in my directory and their classification labels mentioned in a .csv file along with .txt file name. now here I am looking to read my .txt files one by one and cross check .txt file name i...

 
@FranciscoNúñez-TodoPoderoso Not something we do
 
8:50 PM
ok thank you, it happens that bringing the code of a project is difficult ... so if I present something in pieces ... the context would not be well raised ...
 
@FranciscoNúñez-TodoPoderoso we briefly discussed this last week
If you haven't already read this meta then it would behoove you to do so
58
A: Can I put my code on a third party site and link to the site in my question?

Simon ForsbergNo. We require the code to be contained within the question, for the following reasons: To avoid dependency on third-party hosting services. These links tend to go away after a while. To prevent review requests of huge projects. To make it easier to see the code and so it can interest more revie...

 
9:16 PM
0
Q: Sudoku Defining Buttons Problems

CarterI'm currently making a Sudoku game in python using tkinter. I defined one button (just for testing so I wouldn't have to edit 81 buttons each time I change something) that has the text as 0 (to represent an empty space) and the command is cycle (which is mentioned above in the code). In that cycl...

0
Q: Running an Excel Macro from a Child Process Using Multiprocessing Cannot Access Excel Object in Main Process

HoogieCodeFirst, some background on what I am actually trying to do here: I am trying to open an Excel Workbook from Python, then run certain macros within that workbook, but with a timeout feature, so that, if any macro takes longer than a specified time limit, the execution will be stopped. I have been u...

 
9:40 PM
0
Q: Getting metadata out of a Shoutcast stream

Isiah LI have written the following class used to get the metadata out of an internet radio station. It takes a Node Stream and transforms it to grab the metadata out of the mp3 stream and then removes the metadata bytes from the stream so it isn't audibly heard. If you need to know the Shoutcast metada...

 
10:05 PM
0
Q: Kruskal's algorithm (Minimum spanning tree)

Niraj RautI completed this tiny class assignment, and I would like to have a critical code review on this implementation. Also, shall I choose my name as vertex_1 or vertex_one? I think it hardly matters but vertex_1 doesn't look good to me because 1 is a bit taller than rest of the characters. What's your...

0
Q: How would you make this code block more compact and readable?

lgrassiniI'm working on creating code with a nice balance between concise and readable. How would you improve this Laravel code block to make it more compact and readable? public function canEdit(Request $request) { $canEdit = Permission::canEdit( $request->user(), ...

 
This logic is strange and somewhat misleading, OR you have a bug reversing your result. You return true if f1.power is not greater than f2.power, by converting a bool to int and returning true when the result is equal to zero (false). That negation plus unnecessary switch machinery confuses people (possibly even yourself.) The code is valid according to the rules of C++ but it would not pass my code review. — Chris Uzdavinis 39 secs ago
 
10:29 PM
0
Q: Using block comments in Ruby

Timur ShtatlandAre block comments in Ruby a good programming practice? What are the pros and cons of block comments compared to line comments? For example, please see the code below. I deliberately removed most of the code from this file (which is a migration in a bioinformatics application), because my questio...

 
10:54 PM
0
Q: Reduce multiple re rendering of components in React

swapneshFollowing is my working application that contains a Search Container, a Sorting Container and a listing Container. Based on Search and Sort the listing data changes in the listing container. The application works fine though I noticed in my Search container whenever I am changing the input value ...

 

« first day (3064 days earlier)      last day (938 days later) »