« first day (2268 days earlier)      last day (1734 days later) » 

12:00 AM
RELOAD! There are 6265 unanswered questions (89.7189% answered)
 
12:29 AM
0
Q: Project Euler # 24 Lexicographic permutations in Python

emadboctorA permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicographic permutations of 0, 1 and 2 are: 012 021 102 ...

 
Never used Code Review. I'm new to this site but thanks for the info 👍 — Chris B 47 secs ago
 
12:49 AM
0
Q: Project Euler # 25 The 1000 digit Fibonacci index

emadboctorThe Fibonacci sequence is defined by the recurrence relation: Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1. Hence the first 12 terms will be: F1 = 1 F2 = 1 F3 = 2 F4 = 3 F5 = 5 F6 = 8 F7 = 13 F8 = 21 F9 = 34 F10 = 55 F11 = 89 F12 = 144 The 12th term, F12, is the first term to contain three digits....

 
 
1 hour later…
2:10 AM
possible answer invalidation by elisa on question by elisa: codereview.stackexchange.com/posts/224261/revisions
 
2:48 AM
0
Q: Checking the strength of a password using regexes

BidI'm a beginner in Python and I made a password checker, I'm following these rules: - I have to use regex - password must be at least 8 characters - must have at least one lower case character - must have at least one upper case character - must have at least one special character - must have at l...

 
 
2 hours later…
4:51 AM
-1
Q: Defining Rule Factory for Transformation of one Json string to another json string c#

SHISHIR SINGHpublic interface IMappingRuleFactory { IMappingRule Create(string mappingRuleName, dynamic parameters); } Interfaces.IMappingRule: public interface IMappingRule { void Execute(); } In your API, create a MappingRule folder/namespace. Implement the factory, e.g., public class MappingR...

 
5:20 AM
@ekhumoro the question as is is off-topic on Code Review and would be closed. — Peilonrayz 48 secs ago
 
5:50 AM
0
Q: What is the exact alternative of rand() % vector.size() in c++ to java

Thuriya ThwinI am facing difficulties of converting rand() % TDx.size() in c++ to java. I convert this as Random r=new Random(); int j=r.nextInt(TDx.size()); But,this works sometimes and sometimes not. I exactly convert c++ to java like this. int j=(int)(Math.random() % TDx.size()); But,it causes my ...

 
6:50 AM
0
Q: Interpreter for a Rule-based Interactive Fiction Engine (RIFE)

user11536834I'm designing a minimal rule-based DSL for authoring interactive fiction; see this meta question for more background info. This is part one of a multi-part question. This part focuses on the interpreter. Part two will focus on a complete program written in the DSL, and lay out the details of how...

 
7:21 AM
uh oh
rife with negative feedback?
@200_success what information do you need, entire spec for dsl? Thought it would be better to break this up into multiple questions, have seen lots of accepted reviews here that address style and not substance, thought reviewing this would be possible
 
Even if you don't publish the full spec, at least give enough information so that the code makes some sense.
 
hmm, do you think something along the lines of the info in the meta question is enough? Could move some of that over
 
0
Q: naive implementation of sort inplace

Maxwell's DaemonI had the following assignment for the Python 101 course I'm taking in my university. ''' Modify the naive implementation (see below) of a sorting algorithm so that the list to be sorted is modified *in place*. Here is the idea: 1. Iterate over all indices i = 0, 1, 2, ... of the input list ...

-1
Q: My custom file parsing is much slower than a library, trying to figure out why

user4838962I'm parsing STL files to load the coordinates. My code is: void Importer::scanFileSTL_ASCII( QVector<QVector3D> &vertices, // Coordinates to be filled const QUrl &url) { QFile file; file.setFileName(url.toLocalFile()); if (!file.open(QIODevice::OpenModeFlag::ReadOnly | QIODe...

 
I'm glancing at the code, and I'm thinking "Game? Reactant? Reagent? Catalyst? What's a rule?" … and I've lost all interest in your question already.
 
yeah, that stuff is all explained in detail in spec for DSL, but was hoping to save that for a followup question, as a review of a small game written in dsl
if you think it's OT without details of dsl, i don't mind if you delete it, can just drop everything in one question... just wasn't sure if that'd be too much for one question, with multiple languages and everything
 
7:39 AM
Judging by the current trend (+0/-1 score, with 2 close votes) and the relative scarcity of Lua reviewers, I suspect that you're not going to get any answers for the question in that form. It's up to you whether you want to delete it, edit it, or whatever.
 
fair enough, i suppose i should probably take this to #esoteric or #intfiction or somewhere instead, was just thinking this might be a nice format to do a detailed review... maybe not a good fit here though, will go ahead and delete
 
-1
Q: Generate a large block diagonal covariance matrix with exponential decay

AshokI am implementing Kalman filtering in R. Part of the problem involves generating a really huge error covariance block-diagonal matrix (dim: 18000 rows x 18000 columns = 324,000,000 entries). We denote this matrix Q. This Q matrix is multiplied by another huge rectangular matrix called the linear ...

 
8:30 AM
-1
Q: PHP PDO Uploading Image to Database & directory Template so far

Ryan StoneI have written out the following code to upload image files to a directory called Uploads on my website server, the image upload part is working and has been tested(So this is working code). But I have a couple of questions or problems. 1st) currently if a file has an extension that is upper cas...

 
8:52 AM
@Peilonrayz Let's see. The guidance says that you should: "Ask about... The quality of your working code with regards to: Best practices and design pattern usage". The OP says "everything is working properly" and wants to know if their code could be re-structured in a better way. Seems like a perfect fit to me (so long as the OP understands they need to show their actual code). — ekhumoro 38 secs ago
 
9:50 AM
-1
Q: C# ObservableList / ObservableListSynchronizer

GregI've been working in a vacuum for sometime on an ObservableList and a synchronization library between two related Observable Lists. https://github.com/gsonnenf/Gstc.Collections.ObservableLists Here is an example of using the synchronization class to synchronize two ObservableLists, where one i...

-1
Q: Object fingerprinting: serialization + untouchable legacy code + Getter-only auto-properties = cornered

alexlomba87I have found myself cornered, so here we go. Context I need to produce a fingerprint hash code for object diffing. Comparing the hashes of two sets of objects will need to tell me if there are identical objects with the same hash. The fingerprint hash must be platform-independent. So I went f...

 
10:09 AM
0
Q: Constant Time Implementation of String Uniqueness Algorithm

Tom Cusack-HuangI've written what I think is a constant time implementation of a uniqueness check. I've seen many algorithms online, which run in linear time, but was wondering whether my conclusion that this runs in constant time was correct. I've seen many linear versions of this algorithm, but I haven't seen...

 
10:29 AM
0
Q: Get list of new questions from StackOverflow

demasI would like to write a little pet project using Clojure to study it, something like StackOverflow client. Here is a my first code to get list of new questions from site. I am in the very beginning in Clojure so any help will be appreciated. core.clj: (ns stackify.core (:require [clj-http.c...

 
10:49 AM
0
Q: Find the next predicted time a satellite is going to take picture of place

Girish Guptacreate a function which predicts the next time a satellite image will be taken of a certain location. When there is enough data to do so, the function should print a prediction for when the next picture will be taken. and when there is no enough data then return error. if prediction date is less...

 
11:07 AM
Maybe you should post it on CodeReview. Possibly avoiding something like this: input.Replace(data, value); (which isn't doing anything). It could also be interesting to know whether LINQ's deferred execution/caching is a vailable option in your scenario, — Jimi 34 secs ago
 
-1
Q: variables in FullCalendar

Maryam Aithello i'm using fullcalendar and i want to declare event.date as a variable to use it like this: $sql = "SELECT * FROM chambre WHERE id NOT IN (SELECT id_chambre FROM reservation_client where start <= event.end AND end >=event.start)"; is it possible to mix between JavaScript and php like ...

 
11:20 AM
@Peilonrayz No, I didn't (as you can see from the end of my last comment). I don't dispute that it's not a great question. But as it's currently written, it strongly suggests the OP is asking for a code review, rather than about a specific programming problem. — ekhumoro 17 secs ago
 
11:49 AM
-1
Q: I need to show if a triangle is a right triangle, using a boolean with three in-command arguments in java

Hannah LexerWhen I go to import numbers, it says some numbers are false when they should be true or viseversa. For example, when I put in -3, 4, -5 it comes out as true when it should be false. public class RightTriangle { public static void main(String[] args) { int a = Integer.parseInt(args[0]...

 
Questions like this are better suited on codereview.SEThomas Weller 18 secs ago
 
12:08 PM
I think your question is better suited here: codereview.stackexchange.comStefan 23 secs ago
 
0
Q: How to replace multiple substrings in a string in C#?

vivek nunaI have to replace multiple substrings from a string (max length 32 of input string). I have a big dictionary which can have millions of items as a key-value pair. I need to check for each word if this word is present in the dictionary and replace with the respective value if present in the dictio...

 
12:29 PM
0
Q: PLINQ code analysis in terms of efficiency of cryptographic hashes generation

JustArchiI have the following code that I wrote in order to find the correct password by generating hashes out of all possible combinations and comparing it with the target. I'm trying to make GetPasswordFromHash() as efficient as possible, in regards to multi-threading, and I've decided to pick PLINQ for...

 
@200_success Why do you feel that it needs cleaning up? As I see it, "it had some unneeded steps as there is no need to split the dict up earlier" is enough for me to consider it an improved version of the other answer, and a good enough answer on its own. Sure, it could have been a comment on the other answer, but as I see it it can also be an answer. So no moderator action needed. If you don't like it, downvote. But I don't see any reason to delete it - neither by a moderator or the community.
 
12:49 PM
-1
Q: How to make knn algorithm more efficient in python

student156I'll have to make the following algithm more efficient. The train data set can include up to 20000 point. The test data set has 5000 points. At the moment the algorithm need up to 10 minutes. import numpy as np import time class Node(): def __init__(self, point): self.point = point ...

 
1:09 PM
0
Q: OOP python blackjack game

Maria LauraThis is an OOP version of Lastest version of my Blackjack game. Also, it now uses PostgreSQL as database. import random import typing as t from enum import Enum from functools import partial import os from getpass import getpass from re import match import bcrypt import psycopg2 import attr lo...

 
 
2 hours later…
2:47 PM
Cross-site dupe codereview.stackexchange.com/q/7001 - just make your number a string and split it into characters first. — Jack Bashford 5 secs ago
 
3:09 PM
0
Q: 2D Tiles Connect Game Best Practices

KeykoYumeComing from a software engineering background I don't have so much experience developing games. Below is a simple 2d tile connect game. What would people improve about it? What are some good practices that could be applied here and what would people suggest? Game Preview Board.cs - main scrip...

0
Q: Loading a file from a FAT32 filesystem in 16 bit real mode on x86 (Intel syntax assembly)

Adam CavenderI am writing a bootloader that needs to load a file from a FAT32 filesytem. Since I need to load both the root directory first to find the start of the file, and then the actual file, I wrote a function to load a sequence of clusters from the disk to 0x8000 in memory (since the bootloader is load...

 
3:49 PM
0
Q: Google Play Billing + Firebase Functions: Creating a One-Time Product, server-side

JarsOfJam-SchedulerMy Android app must request my Cloud Functions server to create in-app purchases at runtime ; then, the server responds with the created one-time product. I've written the server Cloud Function that creates the product. Here is how it works (full minimal, executable code is embedded at the end of...

 
4:29 PM
0
Q: Page-by model of data output and search results with values for UI

OwlThis is my first experience of designing classes with inheritance. I would like to get feedback on the interaction between the presented classes. It is unlikely that this code will seem complicated. But if you need a description of it, please specify in the comments. There are several classes th...

 
5:09 PM
1
Q: Optimal way to find number of multiples of 3

therealshankmanI'm attempting a practice problem in Codeforces that requires you to find the number of multiples of 3 less than a given number. I have written the following code but it gives a TLE once the test case reaches the order of 10^8. int x = Reader.nextInt(); int count = 0; for(int i = 3; i<=x; i++){...

 
6:09 PM
0
Q: Issues related to solving problem on optimal BST

ExcelsiorI was coding the problem https://www.codechef.com/problems/KOL16L I think I have solved it, but I ran into time limit exceeded issues. I am new in Competitive Programming, so I was seeking for a better, time efficient logic for solving the same. Time limit- 1 secs , My time -3.01 secs. Here is...

0
Q: (Python) 1st Library: A way to associate images/colors with emotions

thewhitetieI am creating a Python library for quickly associating colors with emotions. The core idea is that I got a dataset on colors and emotions with features like ["emotion", "color"]. I then take an image/set of colors and use a KNN classifier to predict emotions that would be felt from such an image....

 
6:28 PM
0
Q: Implementation of Generic Binary Tree Code

suMmGuyI'm in the process of independently learning Generics as a way to build on a college assignment for Binary Search Tree. I've completed this program without Generics first and now I've converted over but I wanted to get some peer review. It seems to be working well and I've run a few tests already...

 
6:57 PM
If the code as-is works, the question might be better suited for CodeReview. — Turing85 20 secs ago
I'm voting to close this question as off-topic because the code works. The question might be better suited for CodeReview. — Turing85 35 secs ago
 
7:12 PM
In that case I agree with Turing85. What the OP wants is a code review, but there is no actual problem to solve. — Michael 1 min ago
 
 
1 hour later…
8:42 PM
Would this question be better served in the code review section of stack exchange? — Michael Litchard just now
 
 
1 hour later…
9:48 PM
0
Q: Count all X-shaped bits from 8 integers

Mark CeitlinI am given 8 positive 32-bit integer numbers. The task is to write program to count all X-bits. X-bits are groups of 9 bits (3 rows x 3 columns) forming the letter "X". task is to count all X-bits and print their count on the console. Valid X-bits consist of 3 numbers where their corresponding b...

 
10:08 PM
0
Q: How does the following code calculate a cubic spline?

m.lewis1995I am currently exploring cubic spline interpolation methods and I have come across the following code which interpolates in 3 dimensions, however I am unsure exactly how it works. I've researched cubic spline interpolation however all of the formula seem to only apply in 2 dimensions. Can anyone ...

 
11:08 PM
0
Q: Ruby if block refactor from new synthax needed

mr_muscleI have this, I guess, new Ruby syntax in my method but Rubocop are warning me that the second last line is too long. Could you please help me to refactor this method def show identification_document = IdentificationDocument.find(params[:id]) authorize identification_document return unless ...

 
11:48 PM
0
Q: Project Euler # 28 Number Spiral Diagonals in Python

emadboctorStarting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows: 21 22 23 24 25 20 7 8 9 10 19 6 1 2 11 18 5 4 3 12 17 16 15 14 13 It can be verified that the sum of the numbers on the diagonals is 101 (21, 7, 1, 3, 13, 25, 9, 5, 17]. W...

 

« first day (2268 days earlier)      last day (1734 days later) »