« first day (2472 days earlier)      last day (1545 days later) » 

12:00 AM
RELOAD! There are 6391 unanswered questions (90.0890% answered)
 
12:31 AM
0
Q: Request for comments and improvements

prof.hellFirst of, thanks for looking at this an apologies if this is a duplicate or is off-topic. Problem Statement An airline wants to allocate seats in their aircrafts such that each group of four passengers travelling together are to be seated next to each other in clusters of 4. A contiguous clust...

 
1:11 AM
0
Q: Python - Calculate Hand Value in Blackjack Hand

KevI have built a Blackjack simulator in python. I need to increase execution time performance. I have used a profiler to identify key influencers in execution time. The following function is responsible for about 15% of the total run time. def value(self): value = 0 has_ace = False fo...

 
 
1 hour later…
2:38 AM
@KlausD. I was happy with the code I wrote to perform the action and came to SO for knowledge. I agree it would have been better to go to Code Review. Apologies! — AccLok 31 secs ago
 
 
3 hours later…
5:15 AM
0
Q: Longest Substring without Repeating Characters Problem - Kotlin Recursion

GoldFlshI am practicing coding questions on leetcode. I have been an OOP my whole career, and I am trying to wade into the dark abyss that is functional programming. So I am trying to do things purely functional, e.g. using recursion to try to get to the answer. The problem statement is this: Given a str...

 
5:35 AM
0
Q: unsafe bit reading.in parallel

BanMe private static IEnumerable<bool[]> InMemGetBooleanArray(Bitmap bitmap) { BitmapData data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadOnly, PixelFormat.Format1bppIndexed); bool[][] ba2 = new bool[bitmap.Height][]; unsafe ...

 
 
4 hours later…
9:10 AM
Monking
 
 
1 hour later…
10:17 AM
-1
Q: useless use of cat with word count (wc)

RedWhat would be the better approach from a readability point of view: X = $(cat sample | wc -l) (which some may argue that is a useless cat usage, but there is a difference between counting the stdin versus a file) alternatives would be: X = $(wc -l sample | cut -f1) or even: X = $(wc -l sa...

 
10:57 AM
0
Q: Lindmayer System Python Fractral Tree

Pradhyumna NarainI have created a fractal tree based on the Lindmayer System in Python. If you could tell me about any algorithmic or efficiency-based problems in the code, I would be grateful. import turtle import time t = turtle.Pen() branch = [] code = "1[0]0" # Change this to modify the structure of the tre...

 
11:16 AM
Monking
@Peilonrayz @pacmaninbw Not just this week either. It's been getting progressively worse (on average) for a while.
 
11:48 AM
@Mast I was even wondering where you were.
 
possible answer invalidation by greybeard on question by Pradhyumna Narain: codereview.stackexchange.com/posts/236922/revisions
 
0
Q: Personal library application, options to add and remove elements

R VI have a javascript application to help me learn and I'm looking to hear from you any improvements or good practices I could apply to the code I've written. In my html I have a bookshelf div and the html code needed for a form which pop-ups on the click of addNewBook button. The code initially ...

 
 
2 hours later…
2:15 PM
This would likely be more on-topic here: codereview.stackexchange.comDavid 6 secs ago
+1 for David's suggestion. Note that code posted on Code Review must be working (which it sounds like this is). — John 22 secs ago
 
2:59 PM
-1
Q: New to C# and looking for feedback

cmills95I've been learning C# for around 2 weeks and I'm feeling a bit more confident and am looking for feedback on my recent unfinished program in terms of efficiency and anything I can improve on. This program allows the user to input car data i.e. "Model and Price" and then search for the stored dat...

 
3:39 PM
0
Q: Implementation of K-means

EmpanI have recently built a class that is an implementation of kMeans from scratch. I believe there is room for improvement and I would happily receive some feedback. The project can be found at: https://github.com/EmpanS/kMeans-From-Scratch All code for the class is found below: # Import useful li...

 
 
1 hour later…
4:40 PM
-1
Q: AI In 2048 Game, Calculations so slow

VicrobotInspired by this answer on stackoverflow for AI implementation in 2048 game. I have been trying to make AI calculate best move by playing the game given specific times in memory preceding by one specific move first, then averaging the score and declaring move with highest score as best move. Th...

 
4:55 PM
@pacmaninbw Still here, but a bit more lurking so not always visible.
@Duga False alarm
 
-1
Q: A general case of Adding numbers represented by Linked List

ChaseI'm looking for some feedback on this code I wrote tackling a general solution to the age old "Add 2 numbers represented by Linked Lists". This specific one aims to be able to sum any given number of linked lists. Ofcourse, the input linked lists must contain the number in reverse order. #include<

 
5:37 PM
@sara.jay you mean basically not only code review, but also understand the subject and do the work for you? I don't undersand… Can you follow this guide in how to write good questions? stackoverflow.com/help/how-to-askRoman M. Koss 51 secs ago
 
6:17 PM
Wrong Q/A site, you should use codereview.stackexchange.com. I'll flag and ask for migration. — Maarten Bodewes 31 secs ago
 
6:45 PM
This is a very broad question. Perhaps you could break it down into the specific things you want to accomplish. Alternatively you could try codereview.stackexchange.com. — Calum Halpin 52 secs ago
 
0
Q: I need help centering a logo

Jaxxson14I've been learning how to code websites using HTML and CSS for about a month now. To practice, I've been creating a fantasy game website, but I've reached a hold up that I can't seem to fix. At the top of my page, I have a stock image logo in between buttons that allow you to traverse the site. T...

-1
Q: AES-256-CBC encrypt and decrypt files in Python

StageflixI wrote a simple algorithm to encrypt and decrypt files in Python using aes-256-cbc. from Crypto import Random from Crypto.Cipher import AES import base64 def pad(s): return s + b"\0" * (AES.block_size - len(s) % AES.block_size) def encrypt(message, key, key_size=256): message = pad(me...

 
 
1 hour later…
8:21 PM
0
Q: Instagram Scraper running to slow

keyz_Can someone help me how to speed up this scraping process getting all the usernames from the # 'cats' on instagram. My goal is to make this as fast as possible because currently the process is kinda slow. Maybe using multithreading? from instaloader import Instaloader HASHTAG = 'cats' loader ...

 
8:57 PM
If you got your code working and you want pro opinions about it, ask on Code Review. — usr2564301 22 secs ago
 
9:22 PM
0
Q: Nim in Pygame (unfinshed, feedback pls)

Rutvik KarupothulaHey I am in the process of making this game, please could I get any feedback on how to further approach this, as I find it kind of inefficient. import pygame import time pygame.init() #Creating the Pygame window X = 500 Y = 500 win = pygame.display.set_mode((X, Y)) pygame.display.set_captio...

 
9:42 PM
0
Q: Hunt the Wumpus

Ty MilesI've made an iteration of the text game Hunt The Wumpus. The specification came from the text Programming Principles and Practice Using C++ by Bjarne Stroustrup. Implement a version of the game "Hunt the Wumpus". Hunt the Wumpus" (or just "Wump") is a simple (non-graphically) computer game or...

 
10:02 PM
0
Q: Six Nations Prediction league Web App

Ian McGarryI built a simple web app to manage my friends and I's six nation prediction league. This is my first go at web development so although it works I am guessing that I am not following all best practices or conventions. Any tips would be much appreciated. The stack I used is: Neo4j <-> Py2Neo <-> ...

0
Q: Can I speed up loading the stylesheets and scripts on my website?

ZeraBackground Information I have made a simple website and I have tried to reduce load times as much as possible. All the content that is loaded is necessary. Question Is there anything thing I can do to my code, such as structurally, to make it load even faster? Side Note I do not want to mini...

 
10:42 PM
0
Q: Rewrite of Array.join

LinnyWhile rewriting Array so I can practice my javascript, I looked at my implementation of .join(). It seems a little clunky to me. I've tried to cover all the edges, like making sure separator isn't null before joining, not adding the separator at the end of the string, and writing some documentat...

 
11:04 PM
If your code works and you're just asking us if there's a better way, you should post it over at Code Review instead. — Magnus Eriksson 41 secs ago
That's what people do in a code review. Reviewing your code and give suggestions for improvement or pointing out potential issues. — Magnus Eriksson 44 secs ago
 
11:22 PM
0
Q: Create 3D monkey head

FromTheStackAndBackIntroduction: The following script contains code that performs what I would usually do when staring a new scene (add lights, camera, objects). The script will serve as a starting point for most of my future scripts. In the future, I might use more complex materials, create animations, or use th...

 
11:43 PM
0
Q: IS it a way to simplify my php script?

perdaperdai'm a beginner in php. Here my script $url1 = $chemin.'include/aaa/url1.php?param='.$param.'&page='.$p; $url2 = $chemin.'include/aaa/url1.php?param='.$param.'&page='.$total_pages; //url2.php $url3 = $chemin.'include/aaa/url2.php?page='.$p; $url4 = $chemin.'include/aaa/url2.php?page='.$total_...

 
11:59 PM
@Kayvia your break only gets you out of the inner loop. Did you want to break out of both loops? You may get a better result posting on codereview. Also can you include a link to the hackerrank page? I can't grok the question from your description alone. — Paul Rooney 24 secs ago
 

« first day (2472 days earlier)      last day (1545 days later) »