« first day (1970 days earlier)      last day (2048 days later) » 

12:00 AM
RELOAD! There are 5623 unanswered questions (89.8654% answered)
 
12:15 AM
0
Q: MVVMLight Toolkit Data Binding Technique

SachI'm simulating my real-world application by using a really simple demo app here, but it has the same concept. The question is MVVM Light Toolkit specific, as the purpose of my project is to learn the workings of the toolkit. Let's say I have a Main form, inside which I have a UserControl. The Ma...

 
12:31 AM
0
Q: Gameboy emulator in C

Benjamin CrewI've been coding a Gameboy emulator in C for some time(seems like a common project for people). It's reasonably functional and has some MBC1 support, but has some minor graphical glitches still. I've coded on and off for a long time, but consider myself still very much an amateur and have no pr...

 
1:04 AM
0
Q: Frequency Analysis & Chi-Squared Test

RubberDuckFollowing up on my implementation of Cryptopals Challenge 1, this is my solution to Challenge 3. Single-byte XOR cipher The hex encoded string: 1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736 ... has been XOR'd against a single character. Find the key, decrypt th...

 
1:46 AM
 
2:08 AM
0
Q: Count Contiguous Sub-array whose sum is perfect square

PmanglaniI have to count number of contiguous sub-array whose sum is a perfect square Like if we have an array number = [1,4,2,3,5] Now the contiguous sub-arrays whose elements sum is perfect square are [1] [4] [4,2,3] total count = 3 To solve this problem I took an array which stores the prefix ...

0
Q: Imgur URL Parser

def_toneFairly new to Python, and I have been doing a few Edabit challenges, to better help with my problem-solving. I have just completed a some what semi-difficult challenge, and I was hoping for some feed back. The challenge itself: Create a function that takes an imgur link (as a string) and ex...

 
 
1 hour later…
3:15 AM
possible answer invalidation by 200_success on question by snorkle: codereview.stackexchange.com/posts/204316/revisions
 
4:02 AM
0
Q: Smart house webhooks handler application

gmaskI created a PHP application in Slim 3 that accepts and handles webhooks from IFTTT and Plex so my house can respond to certain events. Though it's a personal application I published it here: slack-house in hopes someone may find it useful. This is the first thing I've created in Slim and I'm not...

 
4:21 AM
Monking
 
4:51 AM
0
Q: node.js Sequelize.js many to many create with association

SaifThis the first time to post on code review, I'm not even sure if this is the right place to post this: In the following code I use sequelize.js to create 2 tables (users and tasks) which have many to many relationship. I create a user and then check for tasks: if a task already exists, assign i...

 
5:25 AM
possible answer invalidation by Kian Lee on question by Kian Lee: codereview.stackexchange.com/posts/204272/revisions
 
@Duga rolled back
 
5:57 AM
Monking
 
6:44 AM
0
Q: Swapping the characters of a String

Abcd Question: Write a program to swap pairs of characters of a String. In case of odd number of characters last character should remain unchanged. Examples: Input: HI Output: IH Input: hello there Output: ehll ohtree My Code: import java.util.*; class SwappedPai...

 
7:00 AM
0
Q: Thread-safe, performant and convenient random number generator

TrauerI'm spawning a lot of threads in my program and I'm using a lot of random numbers. I was creating a System.Random instance whenever I needed to, but turns out creating a System.Random instance is quite expensive. So I googled a bit and found [ThreadStatic] attribute. And one of it's "drawbacks" ...

 
7:20 AM
OT: guys / gals I didn't know that the english language is also trying it be as politically correct as german - I always thought that guys in english means both man and women :-o (as you hear this often in movies) — t3chb0t 19 mins ago
@t3chb0t The gender of "guys" is context-dependent and subject to interpretation.
 
7:33 AM
-1
Q: Trying to rename multiple files present at a file location using Python script

user7841468Input : Set of multiple files named like - 1.Road_America_MAPFRE_FNOL_Quality_Form_Delete_Select_08_2018 2.Road_America_MAPFRE_FNOL_Quality_Form_Index_08_2018 3.Road_America_MAPFRE_FNOL_Quality_Form_Index-ReadOnly_08_2018 4.Road_America_MAPFRE_FNOL_Quality_Form_No_Data_08_2018 5.Road_America...

 
8:14 AM
What is the question? Are you looking for a code review? Does this work? What is the better way of fetching the data in such a case fetching the data from where? — Darren Sweeney 40 secs ago
 
9:10 AM
0
Q: ADI-Method for solving advection-Diffusion equation in 2D

CleusI am using the advection-Diffusion equation in 2D to study animal movements. ∂N/∂t=∂/∂x (D ∂N/∂x)+∂/∂y (D ∂N/∂y)-∂/∂x (uN)-∂/∂y (vN)-zN I was inspired by the work of Sibert, J.R.,et al 1999 (An advection–diffusion–reaction model for the estimation of fish movement parameters from tagging data,...

 
9:37 AM
@200_success Honestly, on the internet, nobody knows who/what you are anyway and IMO we shouldn't care.
I won't ask you whether you're a human male, female or a fish.
 
0
Q: Need XUnit test for the class methods having async methods which are calling private methods

ashes321Need xUnit tests for following class methods:- I am not sure how do I write a unit test case for this. This is pretty much difficult for me. There are few methods which I am not sure how to test or mock as there is await method which needs input parameters but they are not available as the...

 
10:15 AM
0
Q: Advice on designing a generic REST service

DypsoMy team and I have designed a new api to manage user account details. I am in need on some feedback and critics on our design. The user account will be created by another API... In order to have the possibility to update details (address and comments) in bulk we have a message based api : Accou...

 
10:33 AM
This is not a suitable question for StackOverflow. You should maybe try codereview.stackexchange.com. — Palle Due 35 secs ago
 
@CaptainObvious no code no glory
 
@PalleDue nope. Code Review is for improving existing and working code only. — Heslacher 35 secs ago
 
0
Q: SSRS ReportViwer in MVC5 Empty or Blanked Issue

Sumon TitoI have Created some SSRS Report. But every time when I want to generate report browser popups for credential. Therefor I want to Generate report from C# MVC5 forms. I have searched a lot and create a solution but it shows report as empty, even report control is also empty. here below my web.con...

 
10:50 AM
@CaptainObvious broken
 
11:14 AM
Well the thing is that this is a part of code that I have, this code usually is being called automatically when a new patch is upload to Gerrit Code Review and in this scenario has the strange behavior, but when I launch the job manually this code works very well, so the issue is when is being triggered automatically :( — shaveax 23 secs ago
 
Monking
 
11:36 AM
0
Q: Applying a filter to a large array with elements that are not regularly spaced

NotsoI need to apply a Gaussian filter to a 2D numpy array where the distance between adjacent array elements depends on the row of the array. (Specifically, the data are evenly spaced in latitude and longitude but are not evenly spaced in terms of distance on the surface of the sphere.) This means t...

 
12:20 PM
possible answer invalidation by Mr Pro Pop on question by Mr Pro Pop: codereview.stackexchange.com/posts/204212/revisions
 
0
Q: Simple Genral Purpuse Parser Implemen

MegaIngThis is an implementation of a general Purpose Parser/Matcher that can operate on any input stream of objects and will return all possible combinations. In this case I do not value performance that much but if you find something major, tell me. This does by design no optimizations before parsin...

 
1:00 PM
perhaps better for code review SE — ThisGuyHasTwoThumbs 50 secs ago
 
1:43 PM
If this is a working code, you might rather ask your question on codereviewIcepickle 35 secs ago
 
0
Q: How to refactor the body of object initializer by using separate method?

tesicgThe code in C# looks as following: var seller = GetClient(Participant.Sender); var buyer = GetClient(Participant.Receiver); var sellerAddress = GetLocalAddress(Participant.Sender, parentClientId); var buyerAddress = GetLocalAddress(Participant.Receiver, parentClientId); var blank = new ApiBillU...

0
Q: Feedback on a simple React App to sort and display dynamic data

Sambhav GoreI created this simple react application as coding challenge for a job. The README file in linked codesandbox describes the tasks. It was basically an empty table and I created the components and helper logic to achieve the tasks (which is to display dynamic data and to provide sorting capabilit...

 
2:00 PM
possible answer invalidation by Ladoo on question by Ladoo: codereview.stackexchange.com/posts/204172/revisions
As of Swift 4.2 there is no need anymore do define your own hash combiner, see my update to codereview.stackexchange.com/a/111573/35991. — Martin R just now
 
0
Q: Need an advice for completing the Xunit test methods for ASP.NET Core async methods

ashes321Need xUnit tests for following class methods:- I am not sure how do I write a unit test case for this. This is pretty much difficult for me. There are few methods which I am not sure how to test or mock as there is await method which needs input parameters but they are not available as the...

 
2:18 PM
-1
Q: try using sieve algorithm

Vixftry to solve spoj prime generator Peter wants to generate some prime numbers for his cryptosystem. Help him! Your task is to generate all prime numbers between two given numbers! Input The input begins with the number t of test cases in a single line (t<=10). In each of the next t lines there a...

 
this should be posted in code review. — Funk Forty Niner 7 secs ago
I'm voting to close this question as off-topic because I feel it should be posted in code review codereview.stackexchange.comFunk Forty Niner 6 secs ago
 
2:34 PM
1
Q: Is this a 100% safe from SQL Injection and will work correctly for any input?

Steve143$a=$_GET["a"]; $b=$_GET["b"]; $a=str_replace("%", "\%", $a); $b=str_replace("%", "\%", $b); $sql="SELECT * FROM table "; $sql.="WHERE ColA LIKE :txtA AND ColB LIKE :txtB"; $query = $db->prepare($sql); $query->bindValue(':txtA', '%'.$a.'%', PDO::PARAM_STR); $query->bindValue(':txtB', '%'.$b.'%', P...

 
This question belongs on codereview.stackexchange.com. — jaco0646 10 secs ago
 
2:50 PM
0
Q: Solve Project Euler #4 in PHP

LukeA palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. <?php function isPalindrome($input) { return (string) $input === strrev($input); ...

 
3:04 PM
@Duga rolled back
 
3:25 PM
possible answer invalidation by learnAsWeGo on question by learnAsWeGo: codereview.stackexchange.com/posts/202345/revisions
StackOverflow isn't a place for code reviews. Please consider posting to Code Review Stack Exchange instead. — Adriani6 37 secs ago
 
0
Q: Basic arithmetic calculator with float, parentheses and operator priority support

Inter VeridiumSummary: The basic calculator which allows the end-user to calculate the value by evaluating the math expression string. It supports all the main arithmetic operators, also extended by modulo and exponent operations. Evaluation does follow the classic arithmetic rules and precedence and does take...

 
3:50 PM
Greetings, Programs.
 
4:11 PM
-1
Q: Using Neo4j with Java by passing Cypher Query into Eclipse

user180487I'm working with neo4j-community-3.4.7 and Eclipse Oxygen. I've installed the neo4j driver and added the neo4j community edition lib files to my Eclipse library. My problem is that I'm trying to import a csv file located in the import folder of the neo4j-community directory by passing in the Cyp...

 
4:37 PM
@CaptainObvious Broken, no cookies.
 
5:03 PM
Neo4j is an interesting technology. I'm trying it out in a personal project I'm working on and liking it, so far.
 
5:16 PM
-1
Q: MVVM Light with UWP print Codebehind

Konrad Śledziewskii'm looking for quick code review. I want to print screen from my UWP app. I created a service for printing but i need to provide UIElement to use it. The best way (IMHO) is to pass UIElement in codebehind. I did it like this: public sealed partial class ViewPage : Page { public ViewPageView...

 
@Donald.McLean Greetings, User
 
Feedback requests for working code should be made at codereview.stackexchange.comFrançois Andrieux just now
 
5:32 PM
-1
Q: Finding subset sum using java vs c++

Gaurav PantI am trying to implement a solution to the following problem - Given a set of numbers, check whether it can be partitioned into two subsets such that the sum of elements in both subsets is same or not. Input: The first line contains an integer 'T' denoting the total number of te...

 
Monking
 
5:48 PM
-1
Q: Recyclerview add one item at a time

Emma.bkI have a recyclerview and a button in my main activity and three layout ressource files (right.xml, mid.xml and left.xml [They're relative layout]). I have an arrayList and each time I push the button in main.xml the first content of the arrayList will appear at the bottom of the screen (either ...

 
 
1 hour later…
6:53 PM
-2
Q: Java Programming Project Fraction.java

user180496Add subtract, multiply, and divide methods to the Fraction class. Also, add two more constructors. one of the constructors will have no parameters; it initialized the fraction to 0/1. the other constructor will have one parameter, representing the numerator of the fraction; the denominator of the...

 
"I was wondering if there is a more pythonic method to make the code run faster."—"More pythonic" and "run faster" are different things. In any case, this is probably better suited for Code Review. — Chris 54 secs ago
@Chris thanks for the clarification. I had not heard of Code Review before this — Briain O Donnell 56 secs ago
 
7:26 PM
0
Q: How to enter GPA numbers instead?

Pkd/*I want to change the input to ensure that integers, not letters, are inputted by the user, and that the program understands the numbers out into the machine (which would understand the number and recognize that number as a certain GPA grade). I only understand how to put in letters and plus/min...

 
7:58 PM
-1
Q: Python Script to edit an .sql file

630The purpose of this simple script is to transform Hive SQL to Impala SQL. The biggest issue that I see is that this script will only work if the file is formatted exactly the same each time. Any suggestions on how I can make this more adaptable would be very much appreciated. Thank you for your t...

 
8:31 PM
0
Q: LiveData - Refresh query-livedata object - MVVM and Repository Pattern

RicardoI'm using MediatorLiveData class because seems useful to update the source of a LiveData object. I mean, the majority of tutorials that I've found on internet just use Livedata or MutableLivedata without a dynamic source, in example: fun search(/*no input params*/): Call<List<Person>> But in m...

 
9:19 PM
1
Q: Finding peaks in a DataFrame

Seanny123I would like to compare the min/max values of a time-series with a test time-series. Additionally, I would like to compare the time of the "peaks". However, I'm having trouble extracting these features from a Pandas DataFrame. Given the following data: def fake_phase_data(): in_li = [] ...

 
Working code that you think can be made better? This looks like a job for Coooooooode Review! I've linked to the how to ask page because it's worth a read to make sure any posts you make meet their requirements. — user4581301 51 secs ago
 
 
2 hours later…
11:02 PM
This question isn't really about programming. Is this in the context of some existing tool (a better fit for superuser.com or unix.stackexchange.com), or designing the command-line interface for something you're creating (a better fit for softwarengineering.stackexchange.com or codereview.stackexchange.com)? — aschepler 5 secs ago
 
11:13 PM
0
Q: A "vending machine simulator"

DevI recently got a homework assignment from my C++ teacher. The verbatim assignment was this: Write a program that simulates a vending machine. A customer selects and item for purchase and inserts a bill into the vending machine. The vending machine dispenses the purchased item and gives change...

 

« first day (1970 days earlier)      last day (2048 days later) »