« first day (2009 days earlier)      last day (2306 days later) » 

00:00
RELOAD! There are 5793 unanswered questions (89.7012% answered)
0
Q: Simple Hangman Game in Python 3

Augusto D'ArrudaNote: I'm Brazilian, and part of my code is written in portuguese, but is understandable. This is my game, it works quite good, but I need to do something that I'm struggling so hard. For you to choose a word you have to select a number between 0 and 49. Once the secret_word is chosen, the gam...

00:48
0
Q: XTEA Block Cipher

766F6964Usually people recommend to never implement cryptographic algorithms yourself unless you are an expert in the field. This of course makes a lot of sense mainly because there are numerous things that can go wrong, resulting in a vulnerable implementation. However, for learning purposes I decided ...

 
2 hours later…
02:33
0
Q: Template matrix class suggestions

ChemistppThis is my first matrix class which I updated after already asking [here][1] already. The updated code is below. Are there any suggestions regarding member function parameters? Is there a convenient way to get a single function that allows to set/get with a single function? I considered...

0
Q: Effective to-do list in PHP and jQuery AJAX

gomdI made this to-do list since I never seriously used jQuery (in particular way AJAX) and I need this kind of script for a project that I'm working on. Principal features: Use of a database to manage to-do list values (using PDO). Possibility to add/delete to-do list values. Possibility to edit t...

03:16
Lastly, if the code is working (very important aspect) then you could post to codereview.stackexchange.com instead. Remember to read about what kind of question you can ask there as well as what kind of questions you shouldn't ask there. — Some programmer dude 47 secs ago
 
3 hours later…
06:19
0
Q: Implementing Iterative TDMA on a 2D steady state heat transfer

Khal BroI am having a problem with a python code that i wrote Physical problem: 2D rectangular domain steady state heat transfer problem. Left edge is fixed temperature at 10 degree, Right edge is fixed at 100 degrees. Top boundary is convective heat flux defined as hf*(T_external - T), bottom surface is...

06:48
0
Q: Top K Frequent Elements

user5447339I am working on an interview question where I need to return the k most frequent elements given a non-empty array of integers. Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Here is my code: public static void main(String[] args) { System.out.println(topKFrequent(new int[] {1, 1, 1, 2,...

07:18
0
Q: Shapes keep going off screen before bouncing off the side of the window

GuardianV25I'm not sure where my code is going wrong, but I wanted the shapes (circles and stars) to bounce off all sides when they get there, rather than go off screen and then bounce back... I've been sitting here thinking about how to fix my code so that collision detection would work properly but the co...

07:34
Monking
 
2 hours later…
09:53
And you remember right. A signed integer overflow is UB. Actually, Blink uses this kind of circular sequences in several places around the codebase, and some have been rewritten in order to avoid it. — David 29 secs ago
0
Q: Fluent interface for Logger

EnrichmanI was trying to wrap a Logback logger in order to provide some handy methods and already defined default keys of the logged json output and I came up with something like this. Do you spot any problem with it, or do you have any suggestion? public class Log { private Logger logger = Logge...

Monking
10:32
0
Q: Why is my javascript click listener registering 2 clicks on 1 click?

rufusI have been having a mare in trying to figure out why my simple slider is going a bit mad and incrementing 1 click in the console when the element is only clicked once. Basically i have 4 slides and i can click through them fine every time the slider is loaded. I have set the 'btn--next' and 'btn...

10:51
Monking
11:02
0
Q: Techniques for Database Integrity and User Interface Design

Attack68I am designing a website on which users can configure (CRUD) various objects which are mutually dependent upon other types. I am preventing a cascade delete, so lets say a Team is created in the database and some Players are created associated with that team (by ForeignKey) then the team can't be...

11:18
Barely enough people reviewing.
We need 5 votes to close a question. Regardless of how many reviews 2 people can do on a day, they don't have 5 votes per question.
11:37
I think this question should be on Code ReviewBlack Thunder 55 secs ago
12:01
0
Q: python jupyter notebook

najam bilalWrite a function with the name is_prime that takes in one number and decides if that number is prime. It should return a boolean value depending on the decision. You must use the definition of a prime number given above. Moreover, a real number – which has some value other than 0 in the mantissa(i...

12:32
Monking
 
1 hour later…
13:46
0
Q: Simple recursive solution in python

Vikrant BiswasThis simple python code I wrote for a problem asked during an interview. The problem statement is: Given a tuple (a, b), transform this into (c, d) by applying any of the two below operations multiple time in any order you like: (a, b) -> (a+b, b) (a, b) -> (a, a+b) The prog...

14:01
0
Q: Finding "perfect" MAC hash

cerrI need to find a hash algorithm that let's me store 32000 MACs in a table. I've taken a stab at it with some demo program that looks like (where MacSum is my hash macro): #include <stdio.h> #define MAX_MAC 32000 #define seed MAX_MAC #define MacSum(x) (((x)[0]*(2^128) \ +(x)[1...

14:16
0
Q: Effective 3d array transposition in Rcpp

Artem KlevtsovTask is reshape 3d array from [row, col, slice] to [slice,row,col]. I tried implement base::aperm analog with Rcpp. // [[Rcpp::export]] Rcpp::NumericVector array_perm(const Rcpp::NumericVector& x) { if (Rf_isNull(x.attr("dim"))) { throw std::runtime_error("'x' does not have 'dim' att...

15:00
0
Q: python_weight graph

shahlaHow to weigh a graph؟؟ my graph: edge_from= 25476039 edge_to= 1163257579 speed= 5 length= 7 Edge=-100619426#0 Lane=-100619426#0_0 weight= 0 edge_from= 1163257576 edge_to= 25476039 speed= 5 length= 41 Edge=-100619426#1 Lane=-100619426#1_0 weight= 0 edge_from= 25474753 edge_to...

15:40
Also don't bloat you question with additional requests about improving your algorithm or reducing the line count. They are secondary and probably not withing scope for SO - that is more a code review issue. — Clifford 49 secs ago
 
2 hours later…
17:11
@LuisRamonRamirezRodriguez - Then it is really complicated, I think this should help. — jezrael 45 secs ago
0
Q: Fibonacci Nth term using tail recursion

AjeshI have created a program that prints the Nth term of the Fibonacci sequence. The fib function needs to use tail recursion. If what I have coded isn't tail recursion, I would like to know how to change the fib function so it does. #include <iostream> #include <sstream> int fib(int n, int i = 0, ...

17:45
0
Q: Implementation of Sieve of Eratosthenes in Python 3

ArshiaslayaI'm trying to learn how to code by solving some of the Project Euler problems. I searched up that an efficient way to find primes number in a certain range is to use Sieve of Eratosthenes, however, I don't think my implementation is right, but I have no idea why. The code itself does output prime...

18:29
-1
Q: Is my code efficient if not then how can I make it more better or efficient?

Yogesh RautI have written Js functions to convert Excel sheet into JS Object. Structure of Excel sheet will look like this for the Single section, there can be multiple sections can have more than 25 question each. The JS file I ve written for above is like this. function controller(fileType, JSONOb...

18:43
@Mast malachi nuked some questions from the queue... but yea, it's kinda bad..
-1
Q: Convert HTML input string to JavaScript Array literal

OguntoyeI am trying to accept JavaScript array literals in an HTML text input. The problem is that HTML text inputs are captured as strings, such that an input of ['name', 'who', 1] becomes "['name', 'who', 1]". My intention is for the following samples to yield the corresponding outputs. "['river'...

18:59
@Vogel612 I noticed.
if he hadn't I'd have...
This is what the CV list for today looks like:
That's 4 people.
At any day, we preferably have at least 5.
@Vogel612 I know, we should have enough moderators to prevent the queues from getting excessive.
7 reviewers over the last two days
Besides, a lot gets caught right from The 2nd and doesn't even need to get reviewed. Usually.
19:59
monking
heya :)
20:18
this should be on code review. you asked and answered your own question at the same time. very strange. — Alex 19 secs ago
@Alex this would be off-topic on code review as it isn't a real implementation, additionally, self answers are also a thing on stack overflow.... — Quill just now
0
Q: Word Ladders Program in Python

Bo WorkBackground information: Given two different strings of equal length, the spacing between them is the number of other strings you would need to connect them on a word ladder. Alternately, this is 1 less than the number of letters that differ between the two strings. The challenge: Given an input...

20:58
0
Q: Printing a K-ary tree stored in level-order in an Array

Prithvi BoinpallyI am given an array that represents a k-ary tree (I am also given the branching factor "k") that is stored in level order. My task was to print the tree in level order. For example a binary tree stored as {0,1,2,null,4,5,null} (It doesn't have to be full or complete) would print out as: 0 1 ...

 
1 hour later…
22:00
possible answer invalidation by Prithvi Boinpally on question by Prithvi Boinpally: codereview.stackexchange.com/posts/206888/revisions
22:15
possible answer invalidation by 200_success, Prithvi Boinpally on question by Prithvi Boinpally: codereview.stackexchange.com/posts/206888/revisions
22:43
0
Q: Google Complains This Script is Malicious

Erisan OlasheniI have written a JavaScript analytics tracking script for one of my client. Basically, the script source link is generated using a dynamic GUID and an example of the link is https://whoshouldisee.azurewebsites.net/scripts/F68ADA02-D003-4A56-9BA1-34051CD50381.min.js. This link then points to some ...

23:10
side note: replace while (i <= 6) with while (ch[i]). This will loop until the string ends and prevent weird behaviors should someone provide a shorter-than expected string. That leads to another recommendation: test to make sure the user's given enough data. It might be worth asking over at Code Review for ways to improve this program. I've been a bit of a dick and linked you to the how to ask page. I strongly recommend reading it before asking a question at Code Review. — user4581301 just now

« first day (2009 days earlier)      last day (2306 days later) »