« first day (1781 days earlier)      last day (2239 days later) » 

12:00 AM
RELOAD! There are 5176 unanswered questions (89.9973% answered)
 
12:13 AM
0
Q: Getting location using LiveData and FusedLocationProviderClient

LieForBananasMy goal is to get the location when the app starts, and if the user navigates away and comes back, to receive one location update and that's it. I am worried about removing the observer in the getLocationUpdates method. BoundLocationManager.class public class BoundLocationManager extends LiveData<

 
12:50 AM
I think this is a better candidate for Code Review. — shmosel 18 secs ago
 
1:04 AM
-1
Q: Program with memory leaks

newbieProgrammerI wrote a C++ program for an assignment. I am able to get the desired output, but after running my program with Drmemory, I found that my program has some major memory leak issues. Memory is something I honestly struggle with a lot, and I have no idea how to fix the issues with my program. #incl...

0
Q: Haskell sentence segregation

danbroooksI am trying to implement sentence segregation using Haskell, I have achieved a decent bulk of it using the NLP.FullStop library, but this doesn't seem to account for sentences with full stops at the end of quotes like this." or like this.', or at the end of bracketed sentences like this.) I also ...

 
1:57 AM
0
Q: VBA UDF SUMIF with Array Parameters

RaystafarianI was trying to give SUMIFS3D User-Defined-Function a nice review and ended up getting pretty side-tracked trying to figure out how to pass some parameters by array and whether or not I could send a 3D-range through the function (seems not). It's a good one for review, I'm sure there are improve...

 
2:50 AM
0
Q: Is this an acceptable to support debugging?

thisI have an C# application that may be spawned by another process using Shell or its equivalent. As such, it is not trivial to simply F5 into a breakpoint, nor launching an external program will work since a brand new process get spawned. Thus it is problematic especially when doing integration tes...

 
3:06 AM
-1
Q: matlab function plotting graph

Aisha I need to write two Matlab functions to evaluate the two numerical stencils above, over the domain -2<= x <= 2. Each function should have a single input, the number of points n. For each stencil,i need to create a plot showing the numerical solution for n = 8; 16; 32 points. Also i need to over...

 
3:42 AM
0
Q: Javascript RPC Call Handles Data and Returns DB Response

abrarismeI have a service within a larger set of microservices that's handling a RPC call. My function mainly just parses through the request, uses the data to insert data into our MongoDB database, and then returns the data that got stored into the database (should be idempotent). Endpoint Function typ...

 
4:30 AM
SO is not a Code Review Platform. "tell me if my program is wrong or not, what I must add or change" is not a question. — Duloren 46 secs ago
 
4:54 AM
0
Q: C# Two Sum Leetcode

Greg DegruyLooking for some feedback on the Two Sum LeetCode problem. Looking for feedback on code style in general, use of var, variable naming and initialization, return placement, and any other feedback or optimizations I could make. Problem Given an array of integers, return indices of the two numbers...

0
Q: Graph Representation using smart pointers. Kosaraju's algorithm implementation

Aradhya SharmaComing from a Java background, and being fairly new to C++ as well as code review, I am trying to get accustomed to C++11/14 concepts. I have been reading Modern Effective C++ by Scott Meyers to internalize the concepts but I would love to hear some feedback on the implementation(s) below. I want...

 
5:34 AM
Monking
 
Monking
 
Monking
 
5:51 AM
I think codereview.stackexchange.com would be a better place for your "question" — Anders K. 26 secs ago
 
 
1 hour later…
6:53 AM
 
7:11 AM
0
Q: grading sheet using java

rodjelyn obenHow can we find an error on grading sheet using java? Simple refactored example: public class UserInteraction { public static void main(String[] args) { UserChoiceManager userChoiceManager = new UserChoiceManager(); UserChoice choice = UserChoice.UNKNOWN; do { choice = user...

 
7:29 AM
0
Q: API Gateway for blocking api calls

MrAI recently had a programming interview, where I had to create an Api Gateway. The description is as follows: - You need to create a gateway in which it only allows certain number of callers to call api and rest of them will be blocked within the given timeframe. For eg : If the time window is 1 m...

 
7:50 AM
This question belongs to codereview.stackexchange.commsparer 36 secs ago
 
8:33 AM
Monking
 
8:49 AM
Monking
 
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com — kryger 26 secs ago
 
Monking
 
@kryger You know, question like this where it is basically stated "I’m not sure if my code works as intended or not" won't be very well received on codereview. — Mathias Ettinger 39 secs ago
Do you have errors or problems? If no, it's better to move it to codereview — Backs 48 secs ago
Anyway, this isn't code review but there are many problems with your code as it is shown above which I'd be happy to go through with you on chat. A simple case statement on Session["typeid"] looks like it will suffice for the redirection. — Jamie Twells 29 secs ago
@MathiasEttinger According to codereview.stackexchange.com/help/on-topic it would be OK: "If you (...) are looking for open-ended feedback in the following areas (...): Security issues (...) Correctness in unanticipated cases"kryger 59 secs ago
 
9:30 AM
0
Q: Toxi tagging in EF Code First (asp.net core mvc)

juFoIs this a correct implementation of the "toxi" tagging system in EF code first (using asp.net core mvc - ef core)? I'm not sure if my relations are correctly implemented. public class Product { public Product() { } public int Id { get; set; } [Required] public string Titl...

 
@kryger Yeah, asking if something (the code) is something you want (thread safe) isn't an unanticipated case. I also don't think threads are really a security issue. Either way, the problem is OP has asked if they've made a hammer, when they're trying to make a hammer. Which isn't on-topic on Code Review. — Peilonrayz 17 secs ago
If you have working code that you'd like to improve on topics such as readability, maintainability, compatibility, and/or speedability, ask on Code Review. — usr2564301 48 secs ago
If your code is otherwise working without problems, it could better fit on Code Review. — usr2564301 38 secs ago
 
9:49 AM
-1
Q: Rational Arithmetic Kattis

AaronI am working on problem sets through Open Kattis for now and am currently stumped as to why, when I use the sample test set provided, I am able to run without any issues, but upon submission, I turn out a wrong answer. As far as I can tell, I have checked my code and am not able to find any place...

2
Q: Poor performance for signal processing

MathieuI have a program doing a LOT of iteration (thousands to millions to hundreds of millions). It's starting to take quite a lot of time (few minutes, to a few days), and despite all my effort to optimize it, I'm still a bit stuck. Profile: using cProfile via console call ncalls tottime percal...

 
This is quite a broad question and answers are likely to be opinion based (which makes it out of scope for stack overflow). I would suggest posting on codereview.stackexchange.comthree_pineapples just now
 
10:06 AM
0
Q: Best procedure calling architecture

Alfa BravoI am going back and forth between the following two architect types to write a program, and I was wondering if one is better than the other. Example one: usabableData1 = ReturnFunction1 usableData2 = ReturnFunction2(usableData1) usableData3 = ReturnFunction3(usableData2) etc. Example two: F...

1
Q: warehouse/store managment tool

SimoI'm learning vb.net for work reasons, and I'd like to ask your help to improve my coding and my programming skills. What can I do better? thanks for your help! The program will be used to store data in the DB like how many pencil, rubber, ecc... you have in the sotre and update these values accor...

 
10:40 AM
0
Q: jQuery global variable vs function

Sergi I have to gather a few posts (a Wordpress site) and I need to hide some elements and move some others. There are 2 simple ways to do this, which one of these is better if there is a better one and why? /* 1 */ var $postCollection = $("#post-3993, #post-4278, #post-4272, #post-4270, #post-4275, #...

0
Q: Method to return a collection of objects, filtered by a string

Danny GoodallI have a Vehicle object which has a few properties such as Make, Model, Price, etc. I also have a VehicleCollection object which derives from List<Vehicle which has a few custom methods, one of which is the following... public VehicleCollection GetVehicles(string _searchTerm = "") { // ret...

 
10:51 AM
If your code is working and you are looking for improvements, you may want to go on another StackExchange website: CodeReviewNatNgs 43 secs ago
 
0
Q: Pandas dataframe custom forward fillna optimisation

David LeonQuestion Dear all, I have a function that synchronizes according to some specifications columns of a dataframe. The functions works, nevertheless I was wondering how to: Improve performances Make it more pythonic Please feel free to leave any suggestions, Thanks. The function, a sample ...

 
11:29 AM
@NatNgs thanks, I will shift the the question to CodeReview. — sbhatporia 49 secs ago
 
0
Q: How can I add all possible cases for negative testing in this one code below?

Mousume haqueI am new in automation scripting. Here is a basic log-in script but I want to add all possible cases in my code like wrong user/pass and null value. package test; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import ...

 
"I'm in the habit of marking twisty, head-bending sections of code with a comment like" - I would savage this in code reviews. The solution to head bending sections of code is not a comment - it should be to simplify and clarify. No wonder you're having trouble. — duffymo 30 secs ago
Shouldn't this be an issue for code review? — D Ie 24 secs ago
 
11:53 AM
0
Q: Complex multiplication and integration with cuda

sbhatporiaI want to perform multiplication on two vectors and integrate the multiplication in a vector called acc_y. The acc_y variable will update over every iteration and is averaged out. I have modified, vector addition code. kernel for the multiply and integration : __global__ void cvctmac (int M,f...

 
possible answer invalidation by Mathieu on question by Mathieu: codereview.stackexchange.com/posts/190012/revisions
 
12:10 PM
possible answer invalidation by Mathieu on question by Mathieu: codereview.stackexchange.com/posts/190012/revisions
 
0
Q: Import Random Image with Random Label

Simon AkersI'm not even sure if this is really random like I'd like it to be. Anyway, any advice on better ways/more efficient code would be great. Also is this something I should be doing on the GPU? #include "stdafx.h" #include <opencv2/core.hpp> #include <opencv2/highgui.hpp> #include <stdio.h> #include <...

 
Monking
 
You should rather post you question at Code ReviewC0deDaedalus 32 secs ago
 
boo
I should say "mmmmmmmm Brainssss"
 
12:44 PM
-1
Q: Somebody please explain the following shell script?

Siddharth KaslayvalidAlphaNum() { compressed="$(echo $1 | sed -e 's/[^[:alnum:]]//g')" if [ "$compressed" != "$input" ] ; then return 1 else return 0 fi } echo -n "Enter input: " read input if ! validAlphaNum "$input" ; then echo "Your input must consist of only letters and numbers." >&2 exit 1 ...

 
Monking :)
 
SO is not about code review. Please take the tour and read the help page. Welcome to SO. — Ron 25 secs ago
possible answer invalidation by Marek Czaplicki on question by Marek Czaplicki: codereview.stackexchange.com/posts/189934/revisions
 
1:07 PM
@Duga that sounds like a good SO question to me. they are looking for the bug? right?
 
possible answer invalidation by Marek Czaplicki on question by Marek Czaplicki: codereview.stackexchange.com/posts/189934/revisions
 
1:21 PM
Ask that at codereview.stackexchange.com here you'll get a Why isn't that code working? close — fubo just now
 
0
Q: Too many ifs in factory method

AlternatexSo I have a HTTP client factory that creates a separate HTTP proxy instance for each of my services - which are in the cloud. The factory creates each instance on the basis of an interface which the service implements. All of the proxies inherit from a base class called DalServiceBaseClient which...

 
1:37 PM
Code review: t = o.t doesn't copy the value, it just make another reference to the same value. (as t's type is std::shared_ptr) — user202729 53 secs ago
 
ermagherd... I'm messing with maven
 
Greetings, Programs.
 
1:57 PM
1
Q: Python calculate arrangements of sequence

James SchinnerI have just started thinking about probabilities. A Problem that come up was how to calculate all the potential arrangements for a given sequence. By arrangement I mean unique permutation. I initially used this method: from itertools import permutations sequence = '11223344' len(set(permutatio...

0
Q: Jump-Diffusion Kou Model Simulation with Python

Zouhaïr LaghmamCan someone help me know whats wrong with my code. I don't understand why I don't have the same price as in literature. I checked the code two times and i didnt found any mistake! import numpy as np import scipy.stats as ss import scipy.special as sc import time import datetime def Hh(n,x): ...

 
2:14 PM
0
Q: A small function that checks if subnet mask string is valid

dear_tzviI've written a small helper function that receives a string and checks if it translates to a valid subnetmask value (255.255.255.0 for example). I would appreciate some peer review! Thanks! static bool isValidSubnetMask(IN char *subNetMask) { char *str = NULL; char *endptr; int cou...

0
Q: (Python) Use IMAP lib to download attachments and email details

Tomasz TarnowskiThis is my first approach to programming in Python, so I hope you will "destroy" my coding! Idea is to use SSL connection to my mailbox and use IMAP to download attachments from emails with particular subject (all have same one for time being). Beside downloading files I want to display given su...

 
We might need some more context, though, to best refactor, and this might be more suited for codereview.stackexchange.com. — chepner 42 secs ago
 
2:43 PM
/me wonders what the flag stats look like nowdays:
Jul 5 '15 at 0:55, by rolfl
Past 30 days -> 864 flags, average handling time 0 days 0 hours 17 minutes 0 seconds
 
"How can I rewrite this so it isn't as demanding and sluggish" is way too broad for this site. Have you tried Code Review? — Mathieu Guindon 17 secs ago
 
0
Q: Improving handling of Express endpoint

abrarismeI have an API gateway in a larger set of microservices, and I'm handling one of my routes. The endpoint ends up making an RPC call to another service, and then I just log the response and send it back to the user. I haven't really completed the error handling section, because was thinking that I ...

 
@rolfl run for mod and you will see it again ;-) monking by the way
 
3:02 PM
I thought there was an end point that you could hit that would give you some of the Mod Stats
 
0
Q: Am I abusing the debug log level here?

SebastianI have a case where I want to introduce some error logging. But at this point I'm not sure how often exceptions will occur here (experimental feature, errors dependent on user input) and I'm a bit worried about flooding the logs with stacktraces. So I came up with this solution: catch (Exceptio...

0
Q: Creating Mongoose model

abrarismeI'm creating a mongoose model for a web service. I have a secondary index on facultyId because majority of the reads would want to search by facultyId. I've included some statics on the model in order to make it simple for people to query. const mongoose = require("mongoose"); const Schema = mon...

 
3:29 PM
0
Q: Red-black trees in Rust

Htet Aung Shinealthough I have done a few toy projects in Rust, I haven't really done anything related tedious memory management tasks. So I set out to create a Database with the help of the project enter link description here. I am using Red black trees for now, and I would love to hear your opinions and criti...

0
Q: user login history pyqt

Anoop A MI have been recently using python and pyqt for UI design. currently I am creating a popup screen where the user will select their name click login to proceed further to use any application. My aim is to have a history of user login stored as a collection (perhaps a list) for further manipulation....

 
@Peilonrayz Will you be running?
 
3:42 PM
posted on March 20, 2018 by CommitStrip

 
@Mast Honestly, IDK. I'd like to, but at the same time I don't know if I should. I'd try to be the best leader I can, but I don't know if I have the drive to be one. I'm not that active, and I'm quite apathetic to CR at times.
 
@CommitStrip Gosh.
 
any of my VB Friends want to check my answer for mistakes? --> codereview.stackexchange.com/a/190044/18427 TIA
 
Good thing it is being marked as spam.
 
@Hosch250 my sentiments, exactly
 
3:46 PM
is that sfw? lol jk
 
@Malachi maybe if you are a certain type of doctor
 
4:03 PM
0
Q: Prim's algorithm implementation in javascript using Adjacency list

AbhijithThis is my implementation of Prim's algorithm to find minimum spanning tree.If you think my code is correct, can you suggest something to improve this code. class Graph { constructor(noOfVertices) { this.noOfVertices = noOfVertices; this.AdjList = new Map(); } addVer...

 
@Malachi nice- beating him at his own game! 🏆
 
lol. it's hard to get edits in ahead of him...lol
even before he was a moderator
 
@Malachi which reminds me of this comment
 
LOL
Dec 6 '13 at 2:43, by retailcoder
I'll tell your mom
 
Huh. The normal Zombie finder apparently ended up in HNQ. The sniper didn't.
 
4:32 PM
code speed up questions belong on Code ReviewScott Craner 53 secs ago
Once you have working code, feel free to put it up for peer review on Code Review - validating whether your approach is good or not is beyond the scope of Stack Overflow. — Mathieu Guindon 46 secs ago
 
0
Q: Count number of registers in interval & location

pcecconRecently I asked how one could count the number of registers by the interval as answered in https://stackoverflow.com/questions/49240140/count-number-of-registers-in-interval. The solution works great, but I had to adapt it to also take into account some localization key. I did it through the f...

 
Monking
 
4:50 PM
@SimonForsberg . what's the flag burndown stats for mods at the moment?
2 hours ago, by rolfl
/me wonders what the flag stats look like nowdays:
2 hours ago, by rolfl
Jul 5 '15 at 0:55, by rolfl
Past 30 days -> 864 flags, average handling time 0 days 0 hours 17 minutes 0 seconds
 
Minor nitpick: Wouldn't a median make more sense?
 
@rolfl Classified! ;)
 
 
Month -> 330 flags, average handling time 0 days 0 hours 46 minutes
Unfortunately I don't have the userscript installed at work, and don't visit CR that often.
 
Makes sense, the flag volumes are similar to the past.
 
4:56 PM
Today -> 17 flags, average handling time 0 days 0 hours 14 minutes
 
Did you see my kovarex process, @SimonForsberg?
 
@rolfl Yes, I did. Really nice layout. Much better than mine I think.
 
Did you understand the u238 belt? It's got three priorities of inputs to ensure continuous delivery.
 
0
Q: simulating template member variables

Darius DuesentriebWhat I really wanted to do is this: class SomeClass { public: template<typename T> T memberVar; }; Since c++ wouldn't compile something with template member variables I tried to simulate the behavior I wanted: If the memberVar of a certain type gets accessed anywhere in the Progra...

 
You do have to "prime" each centrifuge with at least 40 u235's to make it work, though
 
5:00 PM
@rolfl I guess that's the only positive thing of my design then :P
@rolfl I did. Clever design.
Although inserters always start with taking the item that is closer, so that design could be a bit better :)
 
^^
 
is that a mix between minecraft and game of life?
 
It's.. everything
 
It's a mixture of happycraft, and a waste of life ;-)
 
Do what everyone else does: Put together a list of requirements for the function. Break these requirements down into additional helper functions as necessary. Design all required functions. Visualize with diagrams when necessary. Get a design review. Start writing code. Test code. Submit tested code for a code review. Revise code. Rinse repeat. — user4581301 44 secs ago
 
5:08 PM
@skiwi - I go nuclear asap, and don't even try solar anymore.... I have 4GW nuclear capacity on-hand.
 
you mean you mix in SimCity too?
that sounds like a fun Game.....I am sure my Wife would leave me if I started playing it... and I probably wouldn't notice....lol so I won't
 
it's the best $20 I have ever spent.
2
(Actually, $60 because I multiplay with my kids too).
 
I know I can't buy that game... already busy losing my life with World of Warcraft
 
@rolfl That makes sense, guess we'll (playing with a friend) will be going nuclear pretty soon
 
@rolfl I can't wait for that part if it ever happen for me :) (meaning if my kids like to play video games)
 
5:11 PM
Are there still kids who don't like video games?
3
 
That .... ^^^^ ?
 
I guess yes and they might not like what I want to play with them
 
My biggest project will be to figure out how to build an effective rail system though
My friend still thinks it's acceptable to manually edit train routes while I'd like to have everything automated
 
@skiwi I take it that that's not an issue to not be friends over :P
 
@Hosch250 No, but we play multiplayer :P
 
5:15 PM
@skiwi - Logistic Train Network nod is awesome.
 
I made a mistake, didn't I?
 
No.
 
@rolfl But I like vanilla too
 
I installed that yesterday. Same thing, and no problems.
 
what game?
 
5:15 PM
@Hosch250 I mean the fact that I'm installing Visual Studio
 
@skiwi Oh. No, you didn't make a mistake.
Unless you are going to use it to write VB.NET.
 
At work I've been debugging some issue almost all day where a QueryInterface call on a COM Object would just hang, but only when the program is under the Visual Studio debugger
I'm pretty sure that the object is a FileNotFoundException... At one place when you ask if it is an Exception it returns true, but the second time you ask something it doesn't answer anymore, but only under the debugger
Might've driven me nuts ^^
> So to get the json representation of a blueprint from a blueprint string, skip the first byte, base64 decode the string, and finally decompress using zlib deflate.
What kind of operation is skipping the first byte on a string... No mention of encoding at all
 
@Peilonrayz You don't have to be a moderator to be a leader.
 
IMO, you should be a leader before being a mod.
 
5:33 PM
0
Q: Collections of classes in VBA

VityataI have noticed this question in StackOverflow, but it got closed faster than I could have answered. However, it was concerning a best practice for usage of collections of classes. I usually use Array and I add to it like this: Public Sub AddToTeam(emp As Employee) Dim cnt As Long cnt ...

0
Q: JavaScript Random Color Generator

JakAttk123I made a page to generate a random color with JavaScript and set that color to the background of the page. //Global Variables const hexChars = '0123456789ABCDEF'; const container = document.getElementById('container'); const hexText = document.getElementById('hex-text'); //Function to gene...

0
Q: WebApi - Architecture solution

QwertyI develop a web API with AspNetCore 2 My architecture: $/ Core.Model Business.Process Business.Process.Abstractions Business.Model Data.Repositories Data.Entities Service Service.Hosting Core.Model - Contains all shared models between service and business Business.Process -...

 
@CaptainObvious no code no glory
 
@Mast Sorry, I mean I don't know if I have the drive atm to be a Mod long or short term. I'm rather apathetic about most things atm, which is my largest concern. I'll be thinking about if I think I can fix my problems tonight.
 
@Peilonrayz Relax, nobody is being rushed into anything.
 
monking
 
monking
 
5:42 PM
Monking
 
why the slanted M ?
 
Emphasis.
 
Monking - and happy Spring!
 
why the emphasis on M ?
 
Capitalized Monking > ordinary monking.
It's an even better monking.
Don't mind me...
 
5:45 PM
:)
/afk dinner
 
0
Q: I'm using ReactJS & Axios to make an API call. Is there a better/cleaner way to do what I'm trying to do?

elambclass Weather extends Component { state = { title: [], body: [], id: [], userId: [] } componentDidMount() { axios.get(`https://jsonplaceholder.typicode.com/posts`) .then(res => { const title = res.data; const body = res.data; const id = res....

0
Q: spiral copy input matrix snake

NinjaGI find this interview question online at Pramp. Given a 2D array (matrix) inputMatrix of integers, create a function spiralCopy that copies inputMatrix’s values into a 1D array in a spiral order, clockwise. Your function then should return that array. Analyze the time and space complexities of y...

0
Q: Good thread programming - Solving exercises within 20 seconds

Dexter ThornI learned something about threads and I tried to use them in an programming exercise. The user of the program has to solve as many exercises as he can within twenty seconds. After that time the program stops and and prints some statistical values. Is my implementation a good implementation? Are ...

-1
Q: Linked lists in c++ within a certain format

Need HelpI am a student currently attempting to earn a degree in computer science. An assignment I am currently working on requires me to print a linked list and delete a node of the linked list while following a specific format. I was given a sort of base template, but I am unable to figure out how to ...

 
6:04 PM
@CaptainObvious Gimme teh codez
 
6:25 PM
@Mast I was going to think about it yesterday, just some things got in the way :)
 
@rolfl But you have fired the rocket a bunch of times I hope?
 
-3
Q: A crazy project

J.DOEI have problem with my project I try to do it but its really confuse Question is: Create a class named Account with fields that holds the details of the account holder like account number, name of the account holder, address, type of account (savings / current) and balance. During each withdr...

 
is there a problem with your code? If not, this question is better suited for code review exchange. If so, create an MCVE,, not many will be willing to pour through this code dump. — yano 36 secs ago
 
6:44 PM
@yano Just to be clear: Code Review Stack Exchange does not deal with MCVEs. Unlike Stack Overflow, Code Review prefers code in its native habitat, not stripped down examples. — Simon Forsberg 52 secs ago
 
0
Q: Ways to Speed Up Code Execution - VBA

micmcI have code that runs and does what I want it to do with the click of the command button, however when executing, it runs very slow. The code grabs data from one sheet and inserts/formats it into another sheet in two separate tables that have been converted into range. I did this because I need t...

0
Q: Replacing spaces in a string within a batch file

JaeI am attempting to write a batch file which will append a series of multiple CSV files, but only carry over the first file’s header. That part works fine. I’m also trying to replace the spaces in the header line with underscores, but can’t make that work. Any suggestions? SET Outputfolder=c:\Tes...

 
Should decompressing a string using zlib deflate really be difficult in C#?
 
7:27 PM
@Olaf I agree now, but the first version of the question strongly alluded to 2 working implementations and asked which one was better, which was the whole motivation for suggesting code review. — yano 34 secs ago
@yano: Be careful directing people to code review. They have quite specific requirements to questions, e.g. the code must be correct and working. I don't think the first version would be a good match there either, — Olaf 30 secs ago
I think this question is better suited for codereview.stackexchange.comLinus 12 secs ago
 
0
Q: C implementation of singly linked list

BareWithImANoobI realize my code is rather long so I'd like opinions mainly on a couple of things if your time is short: 1) Returning INT_MIN to indicate that it was empty. 2) The removeHead and removeHead functions. Feel free to add more criticism. #include <stdio.h> #include <stdlib.h> #include <limits.h>...

0
Q: Converting an integer to a 3 character String

karvaiI am writing code to convert an Integer which is between 1 - 238328. I want to be able to convert it to a unique String (length always 3 and using characters A-Za-z0-9 which is base62) and also use that String to get back the initial integer. For example I have the number 238328 and convert it ...

 
@SimonForsberg Thanks for the guide, but I still maintain I never said a thing about creating an MCVE for code review. If the original question was still off topic/not well constructed for code review, my apologies for the erroneous recommendation. — yano 47 secs ago
 
@Duga technicalities...
 
@Linus is there a way to migrate this post to codereview.stackexchange? — ekrynak 27 secs ago
 
7:44 PM
@Duga Still a good guide to read.
 
Now it works get your code reviewed at codereview.stackexchange.com` — Martin York 26 secs ago
COde that works and needs improvement belongs to codereview.stackexchange.com - not to SO. — Patrick Artner 35 secs ago
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.com - — Patrick Artner 15 secs ago
 
8:12 PM
0
Q: Code to initialize a .NET object from a CSV file

EJoshuaSI am initializing the following object from a CSV file: private class MassUploadUser { public string email { get; set; } public string firstName { get; set; } public string lastName { get; set; } public string role { get; set; } public bool active ...

 
8:49 PM
@skiwi If there's a proper library available it should be a matter of a single call, right?
 
0
Q: how do uploader the best

Vadim I have working javascript code and i want shorten this code sometimes i use jquery but if you know as un jquery only with javascript this will super function handleFileSelect(evt) { evt.stopPropagation(); evt.preventDefault(); //Check File API support if (window.File && window.F...

 
9:22 PM
@Mast That's what you'd think
pastebin.com/s4nDR2rR C# (.NET Core) feels more complex than need be
And I don't understand the seek 2 on the memorystream
 
That looks like a good candidate for a Bluemix app.....
 
9:40 PM
I'm feeling like Python may be a better language for these kind of things
But what I ultimately want is to generate a blueprint that can play a song, it should be possible, though I barely know anything about musical notes, but as long as I can transform them it's alright :)
 
You want to convert the JSON to the string, not the other way around?
 
9:59 PM
@skiwi Use Kotlin! ;)
I wonder if @rolfl has heard about Kotlin, and what he thinks about it?
(I wasn't entirely serious about "Use Kotlin", I think it's almost as complicated in Kotlin as it is in any other language)
 
10:17 PM
-3
Q: Coding newbie trying to create tabs using JS

Angela ReederI am trying to create tabs using JavaScript. I can not make them work and I don't know how to fix it. I know my code is probably poorly written but any advice would be greatly appreciated! When I run this it won't open tabs 4 or 5 and the text inside the box is all smushed. < script type = ...

 
@rolfl True, but I haven't found a specification of what's inside so I'm reverse engineering
 
Usually, improvement of working code belongs in CodeReview.StackExchange.com — Prune 56 secs ago
@Prune note that [codereview.se] renders to Code Review. — jonrsharpe 56 secs ago
 
10:58 PM
@skiwi - here we go...... factorioprints.mybluemix.net
Pste your blueprint in the top, and get the JSON in the bottom.
You can call it as a rest service as well, with.....
curl -X POST factorioprints.mybluemix.net/decode -d '0eNrtXOtu2 ..... rest of blueprint here '
The code that does the heavy-lifting is....
function extract(data) {
  if (!data || data.length < 3) {
    throw new Error('Input needs to be at least 3 characters long.');
  }
  const src = new Buffer(data.substring(1), 'base64');
  const def = zlib.unzipSync(src);
  return JSON.parse(`${def}`);
}
 
11:49 PM
@CaptainObvious I feel sorry that their English is bad enough that they cannot formulate a semi-clear description of the code...
 
Just for kicks & giggles, I have added in en encode mechanism now too, @skiwi - see factorioprints.mybluemix.net or send data to the encode endpoint: curl -X POST https://factorioprints.mybluemix.net/encode -d '{ "json": "content" }'
 

« first day (1781 days earlier)      last day (2239 days later) »