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

12:00 AM
RELOAD! There are 6396 unanswered questions (90.0796% answered)
 
12:11 AM
0
Q: Python - checking if phrase appears on a list

MrLok3rsI have a big file with a lot of "phrases", like: sayndz zfxlkl attjtww cti sokkmty brx fhh suelqbp xmuf znkhaes pggrlp zia znkhaes znkhaes nti rxr bogebb zdwrin sryookh unrudn zrkz jxhrdo gctlyz bssqn wbmdc rigc zketu ketichh enkixg bmdwc stnsdf jnz mqovwg ixgken flawt cpott xt...

 
"If there is something wrong about it" - is it not working? Otherwise this would be a better question for CodeReview — zfrisch 50 secs ago
 
12:31 AM
0
Q: Playing rocks,papers and scissors game for five rounds and finally printing results

air2dataI am trying to write a program that lets the user play rocks-papers-scissors against the computer. There should be five rounds, and after those five rounds, program should print out who won and lost or that there is tie. I know there are many ways to wire a code but I want to write strictly using...

 
1:11 AM
0
Q: Find only one subset sum with a specified value in python for large sets

user8108136how can I optimize my code for a large set (10000 elements)? found = False def subset_sum(numbers, target, partial=[]): global found s = sum(partial) # check if the partial sum is equals to target if s == target: print("sum(%s)=%s" % (partial, target)) raise Ex...

0
Q: Check if 3rd element in list ==""

Woo LooSo i have a function iterates through items and should return nested list. And inner list will be skipped when last element =="" Code: def get_row_data(table): for tr in table.find_elements_by_tag_name('tr'): if tr.find_elements_by_tag_name('td')[2].text=='': continue yield [td....

0
Q: WPF BindableProperty<TValue> to Reduce Boiler Plate

HarrisWI'm sure anyone who has used WPF is familiar with the irritating boilerplate code surrounding properties, usually of this form. class TestViewModel : ObservableObject { string m_someValue; decimal m_someOtherValue; public string SomeValue { get => m_someValue; se...

 
 
1 hour later…
2:13 AM
@SimonForsberg - the factorio game is still active. Shift-space to unpause. I added an extension to a couple of things, but it's looking for the next step. Feel free to pick it up some more. Still 0.18.3 though
Actually, I'll save, upgrade, and restart.
Restart is hopefully multiplayer. It does not really indicate whether it is, or not, though
 
2:50 AM
0
Q: Playing rocks-papers-scissors for five rounds and finally printing the result losers,winners or ties

air2dataI am trying to write a program that lets the user play rocks-papers-scissors against the computer. There should be five rounds, and after those five rounds, program should print out who won and lost or that there is tie. I know there are many ways to write a code but I want to write strictly usin...

 
 
2 hours later…
5:13 AM
@Arelus no worries - sorry you didn't see the same improvement... you might want to consider also posting this question on codereview.stackexchange.comNick 40 secs ago
 
5:50 AM
-1
Q: Remove duplicates from Javascript array

user2381681Three ways to filter out duplicates from an array and return only the unique values. I prefer using Set because it’s the shortest and simplest. const array = ['',1,2,'',3,'',4]; 1. Using Set Set is a new data object introduced in ES6. Because Set only lets you store unique values. When you pa...

 
6:10 AM
0
Q: build up object[] from raw data set

jacobcan118I have a list of raw data like following mockData and need to generate to a object[] format, some key-value pair are required from raw data like first, last, state. but some key-value pair are option like nickname. Eventually, I need to build a object array with some same key-value like raw data,...

 
6:50 AM
-1
Q: Create a program to calculate interest rate and total balance - the program consists of

Michelle(a) A class that encapsulates the interest rate and total balance calculation Constructor should accept initial balance and interest rate Methods: Returns interest amount Returns total balance Set interest rate Set initial balance (b) A test program that uses class from step (A) to perform the ...

 
7:29 AM
-1
Q: Trying to get every 6th set of 4 bytes from a python array

Jim RuxtonI have an array of bytes 6144 bytes long. I want to extract a set of 4 bytes every 6th set of 4 bytes . So every 24 bytes I want to extract 4 of those bytes and join them in a new array. So arr=[a0, a1 ,a2 ,a3 ,a4 ...a6143] should become arrNew=[a0, a1, a2, a3, a24 , a25, a26, a27, ...a1020, a102...

 
 
2 hours later…
9:27 AM
Your suggested algorithm is quite vague. If you have a working implementation, then this is not the right place to ask the question. CodeReview might then be a better place: but you need working code. If you don't have a working implementation, but one that fails, then you could consider asking a question specifically about that failure. But you must provide code then, and the question should then not be about optimisation. — trincot 56 secs ago
Ah! Got it. Going to use your adapter pattern design on a project I am working on. Ill send you the link once I post on Code Review, would love your feedback. Will also be implementing @Matieu Guindon MVP Pattern he taught on his blog — Jose 50 secs ago
 
Monking
 
9:46 AM
@rolfl I've been super busy this week so I haven't played anything. Two days this week I haven't even started my computer at home. This weekend also looks fairly busy, but I might drop in some time to check how it's been developing, and maybe make some stuff.
 
 
1 hour later…
11:08 AM
0
Q: Json wroten text file - counting all integers (Python)

MrLok3rsI have a .txt file wroten as it is a json file. There is a lot of list, dicts, integers etc. inside and I need to get out all numbers from there and return it's sum. {"e":[[{"e":86,"c":23,"a":{"a":[120,169,"green","red","orange"],"b":"red"},"g":"yellow","b":["yellow"],"d":"red","f":-19},{"e"...

 
Hello, @Cobrastilts21. Welcome to the Stackoverflow community. I suggest you ask something more specific about your code that would help you improve your skills. Instead, the question as it is seems like a code review which is off-topic. Please, check for more info here: meta.stackoverflow.com/questions/278138/…pedrez 40 secs ago
 
 
1 hour later…
12:32 PM
I'm voting to close this question as off-topic because code reviews should be asked on the Code Review stackexchange. For future reference, you are required to post a minimal reproducible example here, within your question, and not a link to any other sites. — Rob 54 secs ago
 
12:48 PM
Adding code to your off topic question does not make it any less off topic. Please delete this and ask your question, instead, on codereview.stackexchange.comRob 27 secs ago
possible answer invalidation by HBatalha on question by HBatalha: codereview.stackexchange.com/posts/236728/revisions
 
1:31 PM
MOnking
 
1:47 PM
Please try to improve the focus of your question so it is answerable here. If want people to review your code, take it to codereview.stackexchange.comHymns For Disco 14 secs ago
 
2:06 PM
0
Q: Any can help me to sepeed up my cython code?

zebus3dI have this code in Cython (is a voronoi fracture for blender with sorcar addon): #cython: language_level=2 import bpy import cython from mathutils import Vector #import numpy as np cimport numpy as np #ctypedef np.double_t DTYPE_t #ctypedef np.float64_t DTYPE_t # this np.ndarray[np.float64_...

0
Q: Production ready user signup, login and logout using python and tornado

Felix FarquharsonDoes anyone see a reason to make this asynchronous, why would i do that? How do i work out the maximum number of users it can handle at one time? at what point will i need to optimise it and are there any easy things i can do to handle more users. import os import sqlite3 import hashlib import b...

 
2:56 PM
@MustafaShama, please do not make substantive changes to your questions after you have received answers. Moreover, requests for advice on improving existing, working code are off topic on SO, but they are the bread & butter of Code Review SE. — John Bollinger 32 secs ago
 
3:09 PM
Where is everyone, this room has been very quiet all week?
 
3:46 PM
0
Q: way to find 4 consecutive Buttons in an 2d array of buttons java

heehounknowni'm trying to find four consecutive Button in 2d array of Buttons with the same number on it as text the 2d array is (7x6) i need to check vertical and horizontal but my logic isn't working my two loops didn't see the 4 consecutive buttons what's wrong with my code this is the code which...

0
Q: color and canvas implementations in Rust for Ray Tracer Challenge

Nate GlennI'm learning Rust by working through Jamis Buck's The Ray Tracer Challenge. The book instructs the reader on what to build in what order, and provides all required test cases. Included here are my implementations of 1) an RGB color representation, and 2) a canvas, which is essentially an editabl...

 
4:07 PM
0
Q: Canvas Drawing / Bucket Filing Kotlin

Ramanathan GanesanI have completed a solution for the below problem and uploaded it in Git Reop. Would be grateful if somebody can review in term of code quality, design and Kotlin language usage Repo: https://github.com/ganesara/canvasDrawing You're given the task of writing a simple console version of a drawi...

 
 
1 hour later…
5:19 PM
I think this question belongs on code review SE. — Zera 43 secs ago
 
6:08 PM
-1
Q: understanding simple design patterns

Li BraryI'm going through the head first design patterns book and I want to check whether I'm understanding some aspects of the first chapter. Does the code below program correctly to interfaces, encapsulate changeable behavior, and employ composition in a reasonable manner? Cheers // trying to enforce ...

-1
Q: Simplifying interactive canvas grid

SolipsismI'm looking for some advice to help simplify and improve my existing code. A few methods seem repetitive and I'm sure can be improved. A grid with an array of nodes is created which can be moved by clicking a mouse button and moving it around. When creating walls by clicking on an empty node, the...

 
 
1 hour later…
7:28 PM
0
Q: Parse Wavefront OBJ using ReadP

Giacomo d'AntonioI've been reading Haskell tutorials and books for a while, but I never actually did serious stuff with it. This is my first attempt. It parses an OBJ-file in text format. Later on I will add some mesh-representation and more geometry stuff. Could you please review my code and check for "haskeli...

 
7:48 PM
0
Q: Color highlighter / annotator in Haskell

JonathanI'm a Haskell beginner, and I wanted to make a color annotator or color highlighter, one which takes a text as standard input, and outputs that text, with its color words highlighted using the colors themselves. So, it should replace all instances of the word "red" in a text with <span class="col...

 
8:11 PM
If your code works as expected and you want someone to critique it, you should post your question to Code Review. — DYZ 25 secs ago
I'm voting to close this question as off-topic because it belongs at CodeReview. — DYZ 59 secs ago
 
9:09 PM
-1
Q: How pythonic is this code?

Hilbert HotelHere is the code: class Products: ''' Attributes ---------- products : set of str The set of all products; each product has a unique string identifier. demands : dict of (str,str):float Key = (product,plant) couple; Value = the demand of the product by the pla...

0
Q: Tkinter Conway's Game Of Life Tkinter Python

scruffyboy13I've made below a version of Conway's Game Of Life but when i try to run it, after clicking start, the program shows not responding. Hows should i optimize its speed? #https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life import tkinter as tk from random import randint from time import sleep de...

 
9:29 PM
0
Q: algorithm to find a zero in a board game

Ugur YilmazI got asked this question in an interview and I came up with a solution which I shared in the below but apparently it was not enough to pass. I'm looking forward to hearing how this problem could be solved. The question is : You are given an array of numbers e.g arr= [1, 3, 2, 0, 1, 2, 8, 4, 1] ...

 
9:42 PM
@pacmaninbw It does seems rather desolate this week :(
 
10:00 PM
possible answer invalidation by Peilonrayz on question by jmf: codereview.stackexchange.com/posts/236416/revisions
possible answer invalidation by Peilonrayz on question by Matt: codereview.stackexchange.com/posts/231071/revisions
 
0
Q: Balanced number checking

user4035Problem Balanced number is the number that the sum of all digits to the left of the middle digit(s) and the sum of all digits to the right of the middle digit(s) are equal. The middle digit(s) should not be considered when determining whether a number is balanced or not. If the number has an od...

 
 
2 hours later…
11:40 PM
possible answer invalidation by Hilbert Hotel on question by Hilbert Hotel: codereview.stackexchange.com/posts/236903/revisions
 

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