« first day (1897 days earlier)      last day (2119 days later) » 

12:00 AM
RELOAD! There are 5445 unanswered questions (89.9370% answered)
 
 
1 hour later…
1:16 AM
@user3508811: That's a completely separate question, and should really be asked on Code Review's StackExchange site. — ShadowRanger 45 secs ago
 
0
Q: finding the closest pair of points divide-and-conquer speed improvement

DRmohere is my code for the famous "finding the closest pair of points" problem from CLRS book section 33.4 using a divide-and-conquer approach (this code returns the minimum distance between pair of points). this code works correctly but the run time is too long. As seen in the code, i pre-sort so ...

 
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comklutt 5 secs ago
Perhaps this should be on code review. — Dan Robertson 12 secs ago
 
 
2 hours later…
3:51 AM
0
Q: Rust Tcp Socket Server Using "mio"

ralstonWould love to have my (simple) Rust SocketServer constructively reviewed. Basically followed the mio docs (somewhat), and threw together a few other things I found around. The goal of this review is to make sure that there aren't any stupid/huge mistakes, and to make sure the fundamentals of bu...

 
4:46 AM
0
Q: C++ Generalized Cartesian Product

Bailey ParkerMuch to my chagrin, neither STL nor Boost has a cartesian product. Namely, given as arguments one or more iterables, create an iterator producing std::tuples of every combination of elements (with one drawn from each iterator in the order of the arguments). My goal here was to make cartesian_pro...

 
 
1 hour later…
6:09 AM
0
Q: A-Star Search with 3D Universe

wKaveyI am attempting to write up a program in python that will find the shortest path between two nodes in 3D space. The actual domain is the EVE-Online Universe, which is composed of systems connected by stargates. The input to my program is a list of systems, represented as python dicts (JSON). I a...

 
7:04 AM
0
Q: C linkedlist garbage collection

37712Ok, this is a simple, unordered, link list. please tell me how bad my code sucks and any suggestions would be greatly appreciated, feel free to be brutally honest if necessary. My only concern is that since C doesn't have garbage collection, I am not sure how to implement such feature in to my c...

 
8:00 AM
0
Q: BA network generator and Percolator with OpenMP and also Linear code

Digonto IslamHere I upload a very basic Barabasi-Albert network generator and then a percolator which conducts percolation over the network following some rule. I have used openmp to parallelize the loops. Here 3 arrays, maxclus,delmx and entropycalc are shared between the parallel threads and netmap1,netmap2...

 
 
1 hour later…
9:08 AM
@Jer, normally, Git initializes these fields with your current logged in username and create an email address based on your username and the server name. Each user can change this configuration, so they can choose what username and email address that will appear in their commits. You can establish a convention with the developers as to which username and email to use. As the project admin, you can also setup code reviewing, if it is not already done, to make sure the convention is respected, so you can always see who made what changes. — summercycle 14 secs ago
 
 
2 hours later…
11:16 AM
-1
Q: Passing by reference

vibhanshu kumar While,I am trying to pass "num" and "num1" as reference in the function "rev" ,it is showing error as i am adding the value returned by two rev function. #include<iostream> using namespace std; int rev(int num){ int n = 0; while(num){ int d = num % 10; n = n * 1...

 
11:48 AM
Mon
king
 
Monking
 
12:29 PM
@ShashaankVV The type system and the implicit conversion rules reflect a design decision in the language. The trade-off is between ease of method use and terse notation for cases when implicit conversion would cause no harm vs. compiler complexity and source code readability. Value-contingent type compatibility would require a source code reviewer (who might happen to be the author!) to look up the method declaration to understand. It might also trick the author into thinking of the wrong method signature. The java designers deemed strict static typing the better approach. — collapsar 14 secs ago
 
Monking @Mast
bubble.is looks really promising for what I've been looking for: A way to build an application/website with minimal coding
Especially as it's just a personal project I want things to just work and not have to spend too much time on it
 
Monking
 
Monking @Vogel612
 
12:48 PM
0
Q: Project Euler #15 (Dynamic C++)

GentlebudI've recently solved Project Euler's 15th problem stating: Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner. How many such routes are there through a 20×20 grid? This is my dynamic ap...

 
Monking
 
1:04 PM
0
Q: Java - too much generics? Should I simplify? How?

LppEddI'm coding for a multi-step process. Say there are 3 of these steps. Each accepts the same type of input. Lets begin. This is the object which is passed as input to each step. This object acts as a wrapper for another tye of object, alongside some steps' shared values. Be aware names are invente...

 
 
1 hour later…
2:11 PM
Monking
 
2:47 PM
Hmpf, every system I'm working with cannot deal with variable currencies, is it really that crazy?
I make purchases in different currencies (mainly EUR, USD, GBP) and I want to preserve that data, however ultimately I want to work with EUR for analysis purposes as that's my own currency
 
struct node *tmp = malloc(sizeof(struct node)); tmp = ptr;
a memory leak, if I ever saw one...
 
0
Q: Basic python class and memory leak potential

mattFirst time around Code Review so please be gentle (and I am happy for comments on which angles of this post are a good fit and which less so). I'm not pretty much used to software engineering in python, and so I figured this might be a match: import pickle class Lexicon: 'a lexicon holding ...

 
@skiwi Just store the current currency : euro ratio at the time of the trade.
 
@Mast Or store both raw numbers? This is usually purchases through Ebay so Paypal is taking a % cut for the currency conversion
 
@skiwi Store everything, sort it out later.
 
2:58 PM
I guess I'll need to make a currency field myself then to store the actual currency, so split both fields
 
3:09 PM
Looks like I can't dynamically set a currency prefix :(
I can set up rules however that change it based on input data, guess I'll need to do that then
 
-1
Q: Practice Project : Comma Code from Automate the Boring Stuff with Python

KrishThis is a practice project from the book Automate the Boring Stuff with Python. I understand that there are a few threads already with the same problem but I wanted someone to review my code. Thank you for your time. Say you have a list value like this: spam = ['apples', 'bananas', 'tofu', 'cat...

 
This question would be a better fit for codereview.stackexchange.com — Matthew Strawbridge just now
 
It's weird because you can give a field manually a non-default currency, but when you dynamically change it you are suddenly forced to pick from the dropdown of currencies theys upply
 
@skiwi Just pass it along as a separate field.
You're trying to make it too fancy.
Let the view take care of how it looks and pass the data separately.
Heck, you could even do this in an RDBMS.
But that would be overkill.
 
@CBroe is there a way to create our self, because i got this code from codereview.stackexchange.com/questions/8261/… so where do i find documention — sanoj lawrence 25 secs ago
 
3:23 PM
@Mast I mean the data type will be a number, but the input field will be currency
Oh right... for the input field I don't need to take about the currency symbol, I need to care for the display field
 
@sanojlawrence Why is your name on the code if you stole it from someone else at Code Review? — Mast 17 secs ago
 
@Duga 3 gold badges and 1k reputation on that user, still not the foggiest how his stolen code works and incapable of writing a decent question.
SO is broken...
 
0
Q: Regression on Pandas DataFrame

Stefano PozziI am working on the following assignment and I am a bit lost: Build a regression model that will predict the rating score of each product based on attributes which correspond to some very common words used in the reviews (selection of how many words is left to you as a decision). So, fo...

0
Q: A function to calculate closes to zero (in temperature) from an array of temperatures

Chris PanayotovaI wrote this function that given an array calculates the closest number to zero. The conditions are the following: if the array is empty, return 0 if the array has two values share the "closeness" to zero, return the positive (for example if -1 and 1) Here is my code and link to it: https://r...

 
@skiwi A famous saying goes like this:
 
@Mast Wow
 
3:33 PM
> If your code passes all your tests, you haven't written enough tests.
 
@Mast: to be fair, he modified it: He removed all the doc comments /s
 
@Mast ^
If I add a Language type and then make a search/dropdown box for that as the 2nd field (instead of raw text), then I can simply use that currency symbol
 
4:05 PM
@Mast maybe i stole from code review its not a crime to change name in file. — sanoj lawrence 48 secs ago
 
0
Q: Basic Single Header statistics and ml libray for C++ - Scikit-Learn like implementation

VISWESWARAN NAGASIVAMI am developing scikit-learn like implementation for C++ it is in the initial stage while developing I've started doubt myself that is this the correct implementation, since here accuracy is more important than robustness. I am still learning C++ and I would like an expert consultation since the ...

 
4:57 PM
@CaptainObvious OP seems to think he has an Apache licence on his code. IfI understand correct SE doesn't work that way. Should someone disabuse him off this notion?
 
5:14 PM
yes
 
6:08 PM
@Vogel612 I would have but was unsure of the details
although it also probably has more weight coming from a mod
 
0
Q: Is DTO/VM overhead here as per the scenario?

Kgn-webBelow is my domain model. public class Customer { [Key] [Required] public int Id { get; set; } [Required] public string Email { get; set; } [Required] public string Name { get; set; } } This is how DTO looks like public class CustomerDTO { public int Id { ...

0
Q: Anonymous Inner class to lambda

Ravat TailorIn Sonarcube I am getting an error to convert the following code to Lambda but facing difficulty. private MeterFilter getDefualtConfig() { return new MeterFilter() { @Override public DistributionStatisticConfig configure(Meter.Id id, DistributionStatisticConfig co...

 
6:28 PM
-1
Q: Learning JS/Node - algorithm design promise to callback

teraryBasically I am building a facade for Mongoose to simplify and promote uniformity. I notice and that Mongoose supports callbacks and promises. I am considering doing the same. I have now 3 functions. A switcher '_doFindOneMongoID(...)' (to call the promise function or to call the callback funct...

 
6:45 PM
0
Q: Speed-Cubing Timer Console Application [Python]

Jordan S.This code (pastebin: here) is my first implementation of this style of application in the console. In essence a stopwatch with some added functionality. I was interested in getting some feedback before I refactor and begin adding more features. I'm fairly new to programming and I specifically hav...

 
If you're interested in 'personal preference', then don't use a tool like Resharper of StyleCop. If you're interested in standardized code and obviating the need for most code reviews, then pick one of the packages, use the out-of-the-box rules and leave your personal preferences for things like art and movies. — Mike Doonsebury 44 secs ago
 
7:01 PM
Actually, don't just hash the password, salt the hash. Search for "salt" and "hash" and "password" for examples. You shouldn't be messing around with security related stuff if you don't know what you are doing. Be sure to get your design and your code reviewed before you ship — Flydog57 14 secs ago
 
0
Q: Implementing a stack with Java

Karan KhannaI am trying to implement a stack with java. The code for the implementation looks like: public class Stack<E> { Node top = null; public void push(E data) { Node node = new Node(data); if (null != top) { node.next = top; } top = node; } ...

0
Q: java/scala Spring Boot- Is it a bad practice to have an HTTP method returning a String containing a Json, instead of returning an object

Gaspard De[Sprint Boot] Is it a bad practice to have a method with a RequestMapping annotation returning a String containing a JSON, instead of returning an Object or a JSONObject? I have an external model with custom JSON serializer already implemented. @GetMapping(value = Array("/api/user/{id}"), prod...

 
7:36 PM
0
Q: read in a data file with known column number but undefined row number as a 2d vector in cpp

QmmmmLiuI want to read in a data file into a 2D vector. It is known that the data file has three columns but the row number can vary per particular data file. However, the data file always conclude with a sentinel line of -1 -1 -1 and all normal input values are positive. My current code is shown below. ...

 
@skiwi Exactly. Of-course, you could make the input take any string and split out the currency afterwards.
@Vogel612 You could've told him why.
 
8:07 PM
@Mast That would also be possible indeed
I'm having second thoughts about this platform though, what annoys me is that I need to drag and create all elements myself and there seems to be no easy way to structure them
I might still revert back to an application I can use via my job, though I don't like binding myself to it as it's presumably only free up till I leave, and nobody knows when that would be
As long as I make sure the data is easily extractable I can build something myself if I ever need to
 
8:37 PM
monking
is there a good dpi bypass implementations on CR? Quick search didn't give anything. I was planning to write my own, since the existing implementation eats up some CPU
didn't know that slow adoption of IPv6 was a blessing for those under DPI
 
DPI?
 
deep packet introspection
basically it scans the header and starts tampering with it
it seems like latency shoots the roof, and I wouldn't be surprised to discover that due to segmentation used to bypass DPI, network managers will see something suspicious
 
9:01 PM
Well... if you own a server outside the firewalled region, you can always tunnel traffic over allowed protocols
But that requires knowledge about what is allowed and what isn't
 
@hoffmale people tried many protocols for months, but failed. I compiled a program and now can combine it and a vpn
besides, I just want to ruin some dota 2 matches. I tried to negotiate with them, but it didn't work
 
@Incomputable are you targeting at a corporate network?
 
@Vogel612 no, it's just campus network
there was no contract about it, nor a warning
 
0
Q: HashMap exercise, Rust book Ch.8

afgomezI'm learning Rust by learning the Rust programming language book. I'm now implementing the solution for the third challenge. Using a hash map and vectors, create a text interface to allow a user to add employee names to a department in a company. For example, "Add Sally to Engineering" or "Ad...

 
hi y'all!
 
9:14 PM
hi @FallenUser
 
hi @bruglesco
 
9:27 PM
0
Q: Skiplist implementation

NickThis is simplified version of my skip-list. The only simplification is instead of K and V I use special class, that resemble big std:pair<char *,Blob>. At the moment the skip-list acts more like a set of int. At the end of skiplist.cc I also added main() function with some test usage. Real co...

 
@CaptainObvious OP gives "simplified code" and keeps "real code" behind a link.
 
9:47 PM
@bruglesco addressed it in a comment
 
10:16 PM
-2
Q: Wordpress gallery don't display the "next" image

FelipeI'm very new to code, and I have a Wordpress gallery that display all thumbnail images correctly, but doesn't display the "next" image when the Lightbox is open, here is the code: This is the page link, under the GESTION SOCIAL tab: enter link description here Thanks for the help!

 

« first day (1897 days earlier)      last day (2119 days later) »