« first day (1966 days earlier)      last day (2036 days later) » 

12:00 AM
RELOAD! There are 5612 unanswered questions (89.8762% answered)
 
12:16 AM
0
Q: python 3 calculator with tkinter

RivI have been programming for a long time. Only recently have I decided to take a stab at python (I should be working with C# as I am in school for it, but I don't care for windows. Long story) Anyway I was on this site and it showed source for a calculator. I took it, and put it in PyCharm and st...

 
12:32 AM
0
Q: Creating an Enum with a Custom Type in Swift 4.x

AdrianI was in a code review today and someone said, "Why don't you do an enum on that?" I had started to, but conforming to a bunch of protocols seemed like a gigantic PITA and it seemed more error prone than just writing something simple, readable, and maintainable. That said, I started to fiddle ar...

 
1:04 AM
I'm voting to close this question as off-topic because questions about improving working code should go on codereview.stackexchange.com. — erip 13 secs ago
 
1:53 AM
0
Q: Naming initialization functions in a lookup table based implementation of integer logarithms

Aleksi TorhamoBackground (Feel free to skip; the help center just recommended adding background information :) A few days ago, I was looking at some code which happened to use a flat array to store a complete binary tree. That got me thinking about calculating some properties of such a tree. The number of no...

 
2:26 AM
0
Q: c# alternative to fooreach

IcantCodeI am hoping someone can lend a hand here to what must be a simple a problem. I have searched for an answer but I think part of the problem is I don't exactly know what I am asking. I have the following code. @using System; @using System.Collections.Generic; @using System.Linq; @using System.Xml....

 
2:38 AM
Hi there! SO is for problems. As your code works fine, I suggests you to ask this question on this site. — vasily.sib 56 secs ago
 
0
Q: java - GPA calculator that needs correction

Pkd /*This is a program I typed up for a project pertaining to GPA calculation. However, I want to find an alternative to if then statements that are NOT conditionals, loops, or arrays. Is there an alternative solution to changing this format?*/ import java.util.Scanner; //imports scanner ...

 
 
1 hour later…
3:45 AM
Actually this destination repo is used by another team for code review, training and other purposes. So we need to keep production repo and another team different for different teams. — MrDj05 just now
 
4:04 AM
0
Q: Hash function in C for sets and associative arrays

Quinn MortimerI wrote a non-cryptographic hash function in C, which I am hoping might be suitable for use in an implementation of hash sets or hash maps. uint_fast32_t hash_u32(uint_fast32_t x) { uint_fast32_t h = x; h = h ^ (h>>16); h = h * 0xae6a495b; h = h ^ (h<<16); h = h * 0xae6a495b;...

 
4:23 AM
Monking
 
4:49 AM
@makLoy, after fixing your html form input elements, perhaps post your code on codereview: codereview.stackexchange.comProgrock 55 secs ago
 
Monking
 
5:57 AM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com — Mikhail 50 secs ago
 
6:46 AM
0
Q: Find Largest Smaller Key in Binary Search Tree

Gilad Given a root of a Binary Search Tree (BST) and a number num, implement an efficient function findLargestSmallerKey that finds the largest key in the tree that is smaller than num. If such a number doesn’t exist, return -1. Assume that all keys in the tree are nonnegative. The Bst Class...

 
7:27 AM
Are you asking for code review, asking for stack overflow to write your code for you, or do you have a specific issue you'd like help with? — Rook 39 secs ago
 
0
Q: Font and color checker extension in Javascript

BhansaI have written the below code for a color and font checker on a webpage. The code is current and not so good. I would really like if I can get comments, reviews or any better approach for my PoC. PoC: I want to highlight all the colors or fonts which should not be used on the webpage(the doma...

 
7:51 AM
-1
Q: Nested foreach in C# MVC?

Sumon TitoI'm New to C# MVC and I'm failed to implement following situation, I have a database and it's table Data like below +----------+----------+----------+--------------+ | Company | Branch | Section | Employee_ID | +----------+----------+----------+--------------+ |abc ltd. | branch11 | sectio...

 
8:08 AM
0
Q: Error handling that prompt the user to enter only integer greater than 1

user71346I am trying to write a Python function that asks for an input of integer greater than 1 and return or print the input value. For example when the code is being run: Error case 1: Enter an integer greater than 1: 1 Output: Please enter a number greater than 1: Error case 2: Enter an integer grea...

0
Q: Initial values for dictionary as parameter

MHComputechI want to create a class that holds a dictionary of <int,int>. This dictionary contains an itemId and the amount of this item. Let's say there are 50 existing items and this class initializes the dictionary with zero values. It should be possible to setup some initial values and "merge" them to ...

 
8:24 AM
0
Q: Component Refactoring - ReactJS

Santosh PrasadIn my project, I am getting an array of objects from api, i want to divide all the elements of array into 3 parts based on the value of shelf property of each array element which is an object. Now for doing that I am using formatBooks function inside the same component. Where i am creating 3 arra...

 
 
1 hour later…
9:29 AM
0
Q: Consuming rest api

dafieI want to consume api from site. Lets say its url is http://www.example.com, and you can get the user data by sending POST to http://www.example.com/api/users/1 (1 is the user's id). namespace SiteSharp.Endpoints.UserEndpoint { public class User { [JsonProperty("id")] pub...

 
9:46 AM
I'm voting to close this question as off-topic because SO is not for code review. — Bhojendra Rauniyar 17 secs ago
 
10:40 AM
Not the appropriate place to ask for feedback about your code. codereview.stackexchange.com would be more appropriate, though you'll gonna be asked for actual code instead of github links there too. — Cristik 49 secs ago
 
10:50 AM
@PatrickHaugh The link you posted literally reads "If your question is not specifically on-topic for Stack Overflow, it may be on topic for another Stack Exchange site." And yes, questions about identifying bottlenecks are more appropriate for codereview. — erip 25 secs ago
 
0
Q: I write a sample iOS app, apply clean architecture design

Kien TranI write a sample iOS app, apply clean architecture design. You can checkout the github link https://github.com/ttkien/WeatherAppWithCleanArchitecture Could you give me any feedbacks to improve it better

 
11:40 AM
0
Q: Accumulating all asserts in a single unit test project and then finally checking all have passed or not

user180157I have written a code in c# that actually iterated over a dictionary and check the key and value match so if the value matches I am adding Assert.AreEqual(obj1,obj2), so like this I have three if blocks and three Assert.AreEqual(). I want to add break statement when all asserts have passed and I...

 
If you haven't tried to code up your login system, try first. If you have tried and have broken code that you can't fix, ask us how to fix the broken part. If your login system works, but you wish to have it reviewed for security vulnerabilities, post you code on CodeReview. — mickmackusa 31 secs ago
@mickmackusa thank you. My little system works; but I'm not sure if it is not secure. I'll post it in CodeReview when I have time. — user2208447 50 secs ago
 
11:56 AM
0
Q: Custom serialiser with object factory

CaiwanA couple of years ago I wrote a serialisation library for my project. By the time it worked well, but recently I thought it could be modernised. Back then I needed something that looks similar to Boost's serialiser, but also support polymorphism. I need to serialise and deserialise different type...

 
0
Q: How to Remove Duplicate Multiple Line in Python?

Vasanth M.VasanthI am new for python . I tried to get output on Single line but its came on multiple line , Could you please how can I do this ? , Sample code and Example given bellow : Code : def cpu_info (): with open ('/proc/cpuinfo') as cpu : print ('=============CPU MODEL=============') f...

 
Greetings, Programs.
 
12:28 PM
0
Q: Safe string formatting in Python

LudisposedI am a fan of f"{strings}" in Python, However some situations could possibly be dangerous when doing f strings from user input, leaking API keys or even code execution! So I decided to make something to mitigate these attacks. It works by searching with regex over the input string, and will ret...

 
1:17 PM
0
Q: Download all pictures and store in separate folders based on URL

YogwhatupI am attempting to download all images from multiple websites using BeautifulSoup. I am not able to figure out how to loop through each URL. Additionally, I would like to have these images saved to individual folders for easy identification of the source URL. For example, there were 10 picture...

0
Q: Any easier way of defining an array for tile-like map?

UlivaxSo I've been messing around with arrays as I'm learning them currently in my book and they gave the idea of a chess board using for loops alongside multidimensional arrays to give them individual values which you can therefore print out. However, I thought of the old console RPG games from way b...

 
1:40 PM
possible answer invalidation by Norbert Skalski on question by Norbert Skalski: codereview.stackexchange.com/posts/204060/revisions
 
2:10 PM
@r3musn0x, I thought I was going to need it when writing my review of Conway's Game of Life command line program in C++, but in the end, I managed to reorganise the code to make it unnecessary. I'm still glad I asked, as I at least learnt something in the process. — Toby Speight 55 secs ago
 
@Donald.McLean that sounds like lots of fun, but I don't want to move out of Minnesota
 
2:30 PM
possible answer invalidation by Norbert Skalski on question by Norbert Skalski: codereview.stackexchange.com/posts/204060/revisions
 
@Malachi Fun is a relative thing. I think preparing for the launch of a new telescope is great fun, even if some of the work is fairly mundane, and they're threatening to make me learn Python.
@Duga No, I think those changes are ok. Judgement call on the question being off-topic.
 
0
Q: Adding TCP client code to an existing BLE code to get the data on TCP server

Smit ModiI have a BLE code in c#. And I have made a new projects for TCP client and server also in c#. However, I am looking for a way to add these code in an existing BLE code to get the data on TCP server. Is there a way to do that ? I have added the libraries for TCP server/client in BLE. but not sure ...

 
2:53 PM
@Donald.McLean Python wouldn't be so bad...
 
2
Q: Active bounties image is not loaded

LudisposedToday whilst scrolling CodeReview, I came across this broken image. Seems the Active Bounties image is not working properly anymore.

 
3:28 PM
0
Q: Determinant using Gauss Elimination

jeeaWe had a question in examination to compute determinant of general square matrix. Now I had made the normal program using Laplace Formula of determinant, ie, recursive solution. Now I was thinking of reducing it into Upper Triangle Matrix and then the product of diagonal elements gives the deter...

 
3:54 PM
Monking
 
0
Q: Yet Another Non-Intrusive Reference Counted Smart Pointer Implementation

Super Cyb0rgI needed a reference counted smart pointer for my project, and for some reason early in my project, I decided that I did not like the std::shared_ptr. I can't remember the exact reasons why, but I do remember there was a reason for it. It fell short in some area, but for the life of me I can't re...

 
4:23 PM
posted on September 21, 2018 by CommitStrip

 
4:34 PM
0
Q: F#: Is this code abusing functional composition/point-free style?

NikIn my pet-project there is the following block of code: (A lot of code is omitted for clarity, but happy to provide any missing bits.) let onForwardSlash() = let onUnterminatedMLComment = ... state |> consumeChar // Line comment |> tryConsume '/' ...

 
4:50 PM
0
Q: Improving Roman Numerals Implementation in Java

Igor RyabchukI am learning Java and would like to get feedback on the code I wrote. I have written an implementation of an algorithm (found here) for converting any decimal Arabic number to Roman numeral string. My concerns are: The code seems too long for some methods. It is not clear what is going on in ...

 
5:06 PM
-1
Q: Take a string of letters and find 12 words exactly using each letter once

SaraI don’t know even where to start with this or how to do it. Everyone i ask who knows how to code says it isn’t possible. There has to be a way! Please send help :(

 
I suspect this will close as "a request for free work" in its current state. It may be better over at Code Review, but moreover, you need to be aware that the Stack Exchange sites are not clearing-houses for free labour. If you can approach any site with the view (and the wording) that you'll be doing most of the work after receiving valuable guidance, that is a good way forward. — halfer 48 secs ago
 
5:22 PM
0
Q: JavaScript Anagram checker

MavinterI have written a code that finds whether the entered words are anagrams or not. I tested and it works, but I know that there are some details that I must change or modify. So what do you think I have to change in this code? function findAnagram (firstWord, secondWord) { var testWord = ""; var c ...

 
5:33 PM
Monking
@CaptainObvious no code
@CommitStrip So the code is apparently modifying the shoe laces... maybe that is a metaphor that his shoes will be tied together...
 
0
Q: Is this a 'proper' use of a trait in PHP?

flyingL123In Laravel 5.6 an Illuminate\Database\Eloquent\Relations\BelongsTo relation was given the ability to support default models. This allows a model that will be returned if the relationship is empty. Most of the code for doing this lives in the Illuminate\Database\Eloquent\Relations\Concerns\Suppor...

0
Q: Electricity Billing System for Home in OOPS

AnkitaI recently appeared for interview for code-pairing round and I was asked following question: Electricity Billing System for home“. The corresponding power usage of home appliances(Fan, AC, Fridge, Light) was given: Appliance | Per hour unit consumption Fan 4 Light 2 AC 10 Fridge 8 The slab cha...

0
Q: Google Mobile Usability says “Content wider than screen” even though I can't reproduce that locally, either google bug or mine in css

LeonidMewUnable to fix error Google Mobile Usability > Content wider than screen in Google Search Console. I have try chrome mobile layout emulator from DevTools, set width to 320px but no horizontal scroll appears. So, all looks fine in emulator but google raises error. I have add following to css: ht...

 
If this code is working, you should post it on CodeReview — vash_the_stampede 35 secs ago
To quote What topics can I ask about here?, SO's scope is limited to questions about specific problems. A generalized request for improvements to already-working code belongs on Code Review, not here. — Charles Duffy 47 secs ago
 
5:57 PM
If your code is working Please post it to Code Review — vash_the_stampede 48 secs ago
 
6:11 PM
0
Q: Hotel booking system help on how to book nights and memberships [Python]

QnomalyHere is my code now tell me if i need any improvements or anything Doing a GCSE NEA project to practise http://www.gcsecs.com/uploads/2/6/5/0/26505918/gcse_computer_science_1cp1_specimen_nea_april_2017.pdf while True: import random import time select = input("==========================...

 
 
1 hour later…
7:12 PM
@Malachi There are four types of languages that I seem to have trouble working in: loosely typed, interpreted, script, and assembly.
 
0
Q: Isolate a Database Change Within Django Transaction.Atomic

Jonathan VeitI have been typically adding the @transaction.atomic decorator to my endpoints and appreciate if a request fails at any point the data completely rolls back. However, some of my endpoints will make an API call to another API service. If my token for that API service is invalid, I refresh the to...

 
@Susi: If you want to get a review of your HTML, you can ask a question on Code Review. — unor 31 secs ago
 
0
Q: Accepting without upvoting

firdaWhat could be the reason for accepting an answer but not upvoting it? Situations: Accepting own answer - ok, no upvote on self-answers OP not having 15 reputation cannot upvote - oh hell, that sounds stupid to me in this context, he/she cannot upvote accepted answer / it won't be visible = does...

 
7:32 PM
0
Q: pass argument to jQuery .on() event handler callback

Aaron GoldsmithIn my web application, a user will click a button which will call a function that triggers an AJAX call. That function accepts a single argument. I would like to be able to put that function in place of the anonymous function in the jQuery event handler. I suspect that this is a scoping issue....

0
Q: Create a Java program that declares four variables and asks the user to input their values

Ebtisam Alamri(class Age) Create a Java program that declares four variables and asks the user to input their values. These variables will contain: • your big brother name • your big brother age • your small brother name • your small brother age Then produce output in this format using your four variables:...

0
Q: Small Javascript elevator simulation

CodezillaI created a small Javascript elevator simulation that works as expected, however, being pretty new to Javascript I can t help but feel like this code in unnecessarily complex. Honestly any feedback would be appreciated. const doorOpenSpeed = 3 var Elevator = function() { this.currentFloo...

 
8:20 PM
possible answer invalidation by Norbert Skalski on question by Norbert Skalski: codereview.stackexchange.com/posts/204060/revisions
 
 
1 hour later…
9:43 PM
0
Q: Creating a simple Caesar Cipher for java

SploodleI am currently working on creating a Caesar Cipher for my introductory Java class and am need of a little help. The instructions are: -You should read a string from the keyboard using the Scanner class object. -You should then encrypt the text by reading each character from the string and addin...

 
10:09 PM
500 rep bounty on my most recent question: codereview.stackexchange.com/q/204017/27623
 
10:20 PM
possible answer invalidation by 200_success on question by Qnomaly: codereview.stackexchange.com/posts/204148/revisions
 
10:48 PM
0
Q: Fisher-Yates Shuffle

Jesse C. SlicerThis is a cut-and-dried Fisher-Yates implementation. As not typically a JS developer, I've tried to incorporate as many best practices as I can. I would appreciate any input as to make it conform to more best practices and continue to be maintainable. (function fisherYates () { "use strict"...

 
11:10 PM
and here people do not help with code performance issues. maybe CodeReview is a better place — Juggernaut 36 secs ago
 
11:53 PM
0
Q: Handling related generic type parameters

NetMageIn answering a question on StackOverflow, it occurred to me that a more generic version of GroupBy for C# that delegated membership in each group to a class could be useful. This is my attempt, but I am unsatisfied with a few things. I don't like having to list the group type and the element typ...

 

« first day (1966 days earlier)      last day (2036 days later) »