« first day (2411 days earlier)      last day (352 days later) » 

12:00 AM
RELOAD! There are 6297 unanswered questions (90.0725% answered)
 
12:11 AM
-1
Q: Converting code C# to vb.net not error trow

Walter Nuñezi have this code: if (progress.InvokeRequired) { progress.Invoke(new Action(() => progress.Value = int.Parse(Math.Truncate(percentage).ToString()))); } else ...

 
1:01 AM
@MadPhysicist, I have edited my question. Could you please reconsider your opinion and help to open it again. The question has absolutely nothing to do with Code Review part of stack websites. Thanks — Sergey Nudnov 28 secs ago
You might want to check out Code Review, though it is your duty to check if your question is "on topic" for the site. — John_ReinstateMonica 35 secs ago
 
1:54 AM
0
Q: C# + Linq - grouping objects by frames of time found in the data

jakubiszonA bit of background. In the application I work on there are emails sent to notify users about articles they need to review. Each email+recipient pair is stored in database and may be assigned a different creation date ( called DateCreated ) due to emails being generated over some time. I needed ...

 
 
1 hour later…
3:16 AM
0
Q: How to enhace my Javascript function that justifies text

Mikey AkamiheOn Codewars, there is a challenge where the goal is to justify an str into a certain len. I have managed justify text correctly but there a few flaws that I am stumped on: a word that are to long for a length, and short length that causes nothing to happen. I would appreciate any possible solutio...

0
Q: Advent of Code 2019: Day 4

Tobi AlafinAdvent of Code 2019: Day 4 I'm doing Advent of Code this year. Below is my attempt at day 4: Problem Part One --- Day 4: Secure Container --- You arrive at the Venus fuel depot only to discover it's protected by a password. The Elves had written the password on a sticky note, but so...

 
 
1 hour later…
4:20 AM
0
Q: Balance Parenthesis

nadishThe function should return a string with balanced parenthesis. The code I wrote is working for all the inputs below. I am using stack data structure. I suppose this should work for all the edge cases. can this solution be optimized further? please advice. import java.util.ArrayList; import java...

 
4:43 AM
Monking
 
5:22 AM
0
Q: Failure to check if user guess is a hit or miss in Java Battleship

user214713Okay, So I'm creating a basic battleship game in Java, where the ships are auto generated on a grid, and the players enter both a column, and a row. If the column and row equal the same column and row as the ship, it is a hit. Otherwise, it is a miss. Most of the game has been created for me,...

 
@CaptainObvious not working as intended
 
@narayana If you're looking for feedback on a functioning program, you might be better off on codereview.stackexchange.com. — Alexander Cécile 22 secs ago
this is a very nice question! since the code seems to be working (mostly) you might consider moving that question into codereview.stackexchange.com - that would be the right page to improve code quality — Martin Frank 22 secs ago
Given that your code is already working (on some level), and you just want pointers on how to improve upon it, your question might fit better on our sister site Code Review Stack Exchange. — Tim Biegeleisen 37 secs ago
 
5:53 AM
Ben Popper on December 10, 2019

This week we chat with Chris Dixon, a general partner at Andreessen Horowitz, where he helps lead its Crypto Fund. Dixon and a16Z are now launching a new Crypto Sartup School devoted to educating young developers and entrepreneurs interested in the crypto space.

You can check out the back story of Dixon’s first company, SiteAdvisor, here. It was built during a time when spyware was a booming business and browsers had few systems in place to combat bad actors. The company was acquired by McAfee in 2006. It’s a great trip through the history of web security at the time. …

 
Considering the code works and all you seem to want is a review of the code, then I suggest you post on the Code Review SE site instead. — Some programmer dude 17 secs ago
 
0
Q: Python code to check special characters in a file if the data is in single line

narayana1. I have written the below program to read from the file(entire input in single line) 2. to check the any special characters and spaces in the file 3. to check the if the new line is avaible in the file or not. import re file_name=input("Please enter the file name ") with open(file_name, 'r'...

 
6:45 AM
0
Q: Why is my KMP string search algorithm running slower than expected?

o night elf oI am doing a project to compare the time complexity of 2 string search algorithms. I lost my previous code due to some issues and so have had to rewrite the majority. However, this time around, my KMP algorithm seems to be running a lot slower, and I can never actually get it to run faster than ...

 
7:05 AM
0
Q: its doing multiple nested for loop. How to reduce to 1?

aviboy2006I am writing one logic to iterate numbers first and then additional logic to putting them into particular subset of array. What does this code do : Code accept first $n its create array of $n number from 1 to $n Then started converting to subset of $main_array to possible one like ['1'] [1,...

 
7:26 AM
0
Q: Implementation of Number class operations - C++

LapysI've been getting errors in the GCC compiler stating that the overloads for the + operator are ambiguous. This error only crops up when I add constant to number, otherwise I just get warnings about (again) ambiguous overloads. #define STDOUT_FILENO 1 // From `stdlib.h`. #include <unistd.h> /* ...

0
Q: Simple laravel class for data save, validating and search, with controller

Алексей ЯгодаровOrder class - stores data, validates it, saves relations data, returns search data: <?php namespace App\Models\Android; use App\Models\OrderDestination; use App\Models\OrderSeat; use App\Models\Origin; use App\Models\Settings; use Carbon\Carbon; use Illuminate\Database\Eloquent\Model; use Illu...

0
Q: Am i duplicating 'async' & 'await' declaration?

SNicolaouHello I have a service class that inserts data into a storage (implementation shouldn't matter i believe). This is the method that inserts data into a repository. public async Task InsertItems<T>(List<T> itemsToInsert) where T : class { await _dataClient.For<T>().BatchUpsert(itemsToI...

 
Monnking
 
7:46 AM
0
Q: Simplify nested If and else

Mico MedinaI'm new to javascript and I was wondering if there is another possible way to simplify or rather not use if else statements. I am asking this because I've been using a lot of if else condition on my programming and I think it is kinda annoying. I hope you can help me. Here is my sample code. i...

 
8:28 AM
0
Q: List as a property in C#

Dimitris PlatisI would like to ask a question more about semantics probably. I want to create a list as part of a class. In that case, since can be considered as any other type (such as string, int etc) I can consider the List as a property of the Class and can be used with an instance of that class. At the ...

0
Q: Pick a two different random elements from a given closed range

AdobelsI wrote a function which picks a two different random elements from a closed range of ints and returns them as a tuple. I would like to take a your feedback, if the solution is a "Clever", "Best practice" or "non of them" func pickTwoRandomElementsFromRange(_ range: ClosedRange<Int>) -> (Int, ...

 
9:03 AM
This question would best be asked on code review — Kobe 17 secs ago
 
Have I dun goofed with this edit? All the change previews show really strange things, when I moved two paragraphs.
 
1
Q: Simple circuit breaker implementation

TachyonI am trying to implement a basic circuit breaker design for my internal API calls. I would appreciate some criticism and feedback about my code. I am also planning to implement an interface off of the class once I am happy with it. As mentioned this circuit breaker design will be used for interna...

 
@Peilonrayz it looks ok for me. I just changed above code to code below
 
@Heslacher Oh shoot, thanks
 
9:50 AM
0
Q: Change size of elements until parent reaches certain height

SuperUSerI wrote this method and I would like to refactor it so it is easier to understand and looks cleaner. However, I don't know how or where to start. If you could give it your best shot and explain your approach to how you did it, it would be very helpful to me. The function reduces the size of eleme...

 
10:07 AM
Monking
 
10:52 AM
0
Q: Is my login script secure?

Björn CSo, i have been using this for a while. I got it from a tutorial 5 years back. Now i'm wondering if it still is secure, or if it's time to find a new one? (Maby it has never been secure enough) LOGIN <?php //Connect to database require("include/config.php"); //Empty Variable $submitted_userna...

 
For code review there is a seperate stack exchange website: codereview.stackexchange.comLupos 53 secs ago
@Lupos broken code is off-topic on Code Review! Maybe you should read their help-center before advicing users to use Code review. — Heslacher 38 secs ago
If this piece of code works, it better belongs on Code Review. — Eran 39 secs ago
 
11:33 AM
0
Q: Laravel build a route from a model

TMHI've created a library, TomHart/laravel-route-from-model, and looking to get a review on it. As well as the usual code review, I'm also looking for feedback from a users point of view, if you were to use the library, is there anything extra you wish it did, anything different etc. The key class ...

 
11:54 AM
0
Q: Suggestions to refactor my pagination code?

gracie catherineI am writing a component with ReactJS for pagination, however, it's looking a little bit long and complicated! I'm wondering if anyone out there has any suggestions for a better way of writing this? import React from 'react'; const Pagination = ( props ) => { const { currentPage, products ...

 
12:15 PM
2
Q: CIS 194: Homework 3

yasarI am following CIS 194: Introduction to Haskell (Spring 2013) online to teach myself Haskell. Following is my response to first exercise of Homework 3. Since I don't have anyone to show my code, I am posting here to get a little feedback. In which ways I could improve this, without getting too mu...

 
Do you have an actual issue here ? I would rather say this question is more adapted to Code ReviewPac0 14 secs ago
 
12:35 PM
Probably should fill in //handle out of bound index before posting to Code Review, but otherwise looks like a not off-topic question. — Peilonrayz 56 secs ago
 
12:49 PM
Oohthat rings a bell!
Can't remember the last time I had an OoBE
 
0
Q: OpenCV Image Processing GUI

Shan_kI want to improve and do some modifications to my Python code for image Processing OpenCV GUI. Following is my code: import tkinter as tk from tkinter import filedialog, messagebox import os import cv2 from PIL import Image, ImageTk from skimage.metrics import structural_similarity class Button...

 
1:32 PM
Where can i ask this question if its not a valid question at SO and code Review ? — Lyes CHIOUKH 41 secs ago
 
1:58 PM
0
Q: Trying to delete a block of text that has a lot of lines from a text file

LiviosahI want to delete a block of text from a text file that looks like this: 1 Date stored: 2019-02-01; Author name: l; Book title: lll; Quantity: 1; Price: 2. 2 Date stored: 2019-01-02; Author name: ghjk; Book title: okj; Quantity: 5; Price: 4. 4 Date stored: 2019-01-02; Author name: he...

 
@CaptainObvious broken
 
2:13 PM
@Heslacher Most definitely broken.
It has 4 votes to close.
 
If your code currently works, and you are looking to improve it - generally these questions are too opinionated for this site, but you might find better luck at CodeReview.SE. Remember to read their requirements as they are a bit more strict than this site. — Sourav Ghosh 42 secs ago
 
2:41 PM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comMark Storer 30 secs ago
 
2:51 PM
@Vogel612 Heh, that is how you edit an alternative solution into a review. Well done by the user.
 
This site is for issues with your code, not for code that is working. I think you want codereview.stackexchange.comfreefaller 24 secs ago
 
3:31 PM
By asking if the code was a security risk, the assumption was that it was working code, but maybe not the best code it could be... that's why I suggested the codereview site. I would write a new question, and make it clear (with better formatted code, so it's not in a single line) that your code isn't working... and explain what the issue is... what it's doing, what it's not doing etc. There's no point trying to resurrect this question with -5 — freefaller 29 secs ago
@freefaller on Code Review we require the code working as intended otherwise the question would be closed as off-topic. — Heslacher 58 secs ago
@Heslacher - as I've stated, I was under the impression it was working code, which is why I suggested codereview originally — freefaller 26 secs ago
 
0
Q: cross-origin looking for similar code solution

user82927My code is a security risk. Customers have to place a javascript code on their websites, to display a ad banner. So i try to understand if this could be security risk for anyone. So yes and even will be blocked by browser (as stackoverflow teached me). Is there an other solution out there. Worked...

 
3:56 PM
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.comToto 29 secs ago
 
0
Q: User defined operator in Raku

hsmyersI'd like to improve this operator code if I can. I don't know enough Raku to write idiomatically (or any other way for that matter), but suggestions along those lines would be good also. use v6d; sub circumfix:<α ω>( ( $a, $b, $c ) ) { if ( $a.WHAT ~~ (Int) ) { so ( $a >= $b & $a <=...

 
4:22 PM
0
Q: How I refine my Javascript function that tries to justify text

Mikey AkamiheOn Codewars, there is a challenge where the goal is to justify an str into a certain len. I have managed justify text correctly but there a few flaws that I am stumped on: a word that are to long for a length, and short length that causes nothing to happen. I would appreciate any possible solutio...

 
4:36 PM
If the code is complete and works, it should be on Code Review, not here. This site is primarily for fixing broken code. — Carcigenicate 1 min ago
I'm voting to close this question as off-topic because it should be asked on Code Review instead. — EJoshuaS - Reinstate Monica 35 secs ago
 
4:50 PM
Monking
 
5:24 PM
1
Q: Java implementation of the caesar-cipher

chrysaetos99I've wrote a little program that encrypts text by using the caesar-cipher. Also it contains a little GUI, created by using swing. Here's the full code: import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTextArea; import java.awt.Dimension; public class caesar { ...

 
 
1 hour later…
6:26 PM
-1
Q: How to refactor a typical DataAccess layer Method?

SamuraiJackSo, I have a project that has a lot of methods that look something like this: public CustomReturn < List < ParkingSlipDetails >> GetAllParkingSlips(int offset, int fetch) { SqlConnection sqlConnection = null; try { List < ParkingSlipDetails > ParkingSlip...

 
6:40 PM
possible answer invalidation by chrysaetos99 on question by chrysaetos99: codereview.stackexchange.com/posts/233803/revisions
 
@Duga rolled back
 
0
Q: simple python music quiz

KrishnaI'm currently learning python and created a simple music quiz. the rules of the game are as follows: The user has two chances to guess the name of the song If the user guesses the answer correctly the first time, they score 3 points. If the user guesses the answer correctly the second time they ...

0
Q: Beginner's Implementation of Guess The Word

tamerfrombkAs the title suggests, I'm a complete beginner in Haskell. I've just made my way through the "Input and Output" section of Learn You A Haskell For Greater Good and I thought it would be good to try my hand at a simple project like a "Guess The Word" game in Haskell. The idea behind the game is t...

 
7:05 PM
possible answer invalidation by jakubiszon on question by jakubiszon: codereview.stackexchange.com/posts/233739/revisions
 
7:28 PM
1
Q: follow-up - caesar-cipher - java

chrysaetos99I now processed the suggestions you can find here. I've deleted some duplications and corrected some other minor mistakes. Here's the code: import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTextArea; import java.awt.Dimension; public class caesar { public...

-2
Q: OpenCV - Translate code from Python to C#

Andy SchmittI'm trying to convert a code from python to C#. The code is based on an OpenCV framework, and I'm using EmguCV as the wrapper in C#. The python code I have is: import cv2 # Load image, grayscale, adaptive threshold image = cv2.imread('1.png') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) thre...

 
7:48 PM
-1
Q: Reverse polish notation calculator (Python)

Mutism NanoI am trying to solve a codewar challenge (link), I have 2 problems, the first is that the code looks awful and I don't know how to improve it tbh, I also want this code to be able to compute multiple digit numbers and i feel like i need to start from scratch if I want to add that. Note : This...

 
@Duga adding context that was asked for in comments. Doesn't appear to be mentioned in the one existing answer
 
8:26 PM
Can someone protect this question?
I'm still 3,9k short of being able to do that myself.
 
@Mast Did you flag it for moderator attention?
 
8:42 PM
@kaya3 Oh whoops, I think I'm thinking of Haskell. I just read a Haskell question on Code Review. — Carcigenicate just now
 
2
Q: Poor written Neural Network

LuposI programmed a Neural Network in python. Feedback every kind is appreciated. I tried to use some vectorization but it turned out to become quite a mess. Because you can't append to numpy arrays I sometimes needed to use numpy arrays in list and sometime I could use just numpy arrays. Is there a ...

 
8:58 PM
Did you have a question about it? Otherwise, this kind of post would be better on code review: codereview.stackexchange.comJacob Penney 7 secs ago
 
9:11 PM
0
Q: Password validation class using database values

EditI have a password validation class that takes values from our database and depending on their values, checks if the password is valid. If it is not, I built an error message containing everything that is wrong with the entered password. I want it to be easy to change when I add a validation attr...

 
@Mast Done
 
10:13 PM
0
Q: TPL Dataflow - Timer Action Block

TheRockI'm new to TPL Dataflow and was looking for an action block to basically push an object on a timer - specifically to produce heartbeats on every interval. I was unable to find anything out of the box so I decided to create a wrapper class on action block that would give me the desired functional...

 
10:50 PM
I think this kind of questions go here: codereview.stackexchange.com read stackoverflow guidelines. — arieljuod 32 secs ago
 
0
Q: Simple converter: Is it better to use a function within a function?

BarbBelow is an example of a simple converter. In the first example temperature I have used a function within a function. In the second example milli I have used a more direct approach. Which would you consider is the better method to handling calculations in functions and why? Also feedback on my ap...

 

« first day (2411 days earlier)      last day (352 days later) »