« first day (1850 days earlier)      last day (2174 days later) » 

12:00 AM
RELOAD! There are 5319 unanswered questions (90.0032% answered)
 
12:47 AM
0
Q: Javascript - Using ES6 classes and keeping variables private

keithlee96I'm a junior developer and I've recently created a simple npm module that was designed to allow users to create Sets of objects in JavaScript. This was done by implementing a single class ObjectSet that would provide all of the functionality that I needed. This class made use of an attribute call...

 
1:20 AM
0
Q: Simple logger class in C# - Follow up

Lee NelsonI've asked a question about this particular code before, although it was a little different back then. I took the suggestions from people who replied to my question and decided to post a follow up to that question, in attempt to improve the class even more. Simple console logger used instead of ...

 
codereview.stackexchange.com — Dawood ibn Kareem 58 secs ago
possible answer invalidation by Jamal on question by Sammi: codereview.stackexchange.com/posts/178503/revisions
 
1:55 AM
0
Q: XML world loader and populator + bonus entity printer

Gustavo6046This not-so-little Python project I was working on for over 8 hours, is actually the skeleton of my RPG engine. Basically the test script uses the engine module to load a game world, including entities (which can be of random variants and even amounts), and then prints the name and location of e...

 
2:31 AM
0
Q: Which is a better design in this case: wrapping function objects or a simpler approach?

SebastianIn my codebase I often create structs containing const char* and std::function. In doing so, I can then put these std::function in menus/UI etc. We use this a lot while developing. If someone on the team wants to run some code in the system, they can create one of these structs and add it to the...

 
2:52 AM
0
Q: Modularized Tic Tac Toe in C

gustaf brostedtI know several there have been several posts about tic tac toe games previously, nonetheless I was really hoping that you may take a look at my attempt. I have tried to keep it as modularized as possible to minimize side effects. I started teaching myself C only about a month ago, so any and all ...

 
3:29 AM
Those are lists, not arrays. Improving working code is the business of codereview.se, but for starters, indent your code consistently. — David Conrad 6 secs ago
If you want a solid, in depth review of your code with comments, critiques and concerns, you'd be better off on the code review stack exchange site. If there's a single space out of place, they'll tell you. They also help out with optimization a whole bunch, too. Stack Overflow is mainly for when you run into a coding blocker as opposed to general review if you don't have any unique questions on the topic of forms. — James Whyte 22 secs ago
 
 
2 hours later…
6:02 AM
0
Q: Array-based stack

Hamidur RahmanDescription: An array-based Stack class. Since this class is designed using an array the size of the Stack is limited to whatever the program gives you. The key reason was not to use any outside help like Arrays.copyOf(array, size) to increase size etc. (In future, LinkedStack will solve size...

 
possible answer invalidation by michael.zech on question by michael.zech: codereview.stackexchange.com/posts/195259/revisions
 
6:21 AM
-1
Q: stable matching problem in python

Jingyao Zhuquestion is :Write a Python function stableMatching(n, menPreferences, womenPreferences) that gets the number n of women and men, preferences of all women and men, and outputs a stable matching. The function should return a list of length n, where ith element is the number of woman chosen for the...

 
6:42 AM
Monking
 
0
Q: Not notified of unwanted edits to question

JVApenI was surprised to see one of my questions being changed that much that the intent of the question was removed from it. As C++ is evolving rapidly, I was experimenting with one of its features: constexpr. However, it did only take a few hours to remove the mentions of constexpr from both the tit...

0
Q: Not notified of unwanted edits to question

JVApenI was surprised to see one of my questions being changed that much that the intent of the question was removed from it. As C++ is evolving rapidly, I was experimenting with one of its features: constexpr. However, it did only take a few hours to remove the mentions of constexpr from both the tit...

 
7:20 AM
This might be better suited for codereview.stackexchange.comMike Scotty 34 secs ago
ok, but what why to give -ve point to the question? I wasnt even aware that codereview exists. Just a tip/suggestion could do the job — blackbug 43 secs ago
 
Monking
 
In that case, thanks for tip! I will move the question to the codereview. — blackbug 57 secs ago
 
7:46 AM
0
Q: Processing an input image using probability

blackbugI have the function below which is used to process an input image using probability predicted by a CNN network model. def interp_map(prob, zoom, width, height): zoom_prob = np.zeros((height, width, prob.shape[2]), dtype=np.float32) for c in range(prob.shape[2]): for h in range(he...

 
8:33 AM
@Feeds Can we get that migrated to our meta?
Nvm, it's cross posted.
 
8:46 AM
Monking!
 
Monking @sineemore
@Graipher It's gone.
 
@Mast Yep, just saw that as well.
 
Hi Guys, I wanted to discuss about good api design
 
@CodeYogi Please explain the following sentence:
> I made some changes in my code to make it more testable. I hope it's to make your code more testable.
We don't have the original code.
So we won't know.
 
9:02 AM
maybe I should edit that line
 
9:48 AM
0
Q: Calculate total time minus non-business hours

ChrisI'm calculating the time it took a consultant to respond to a client using a start time and end time as input. I need to strip out any after hours, weekend, holidays etc and end up with only the time it took within business hours. The basics of my function: Starting with the start date, I loop...

 
10:06 AM
-1
Q: How to create a 4 million element array in java?

ArmanI have to use an Algorithm that need an array with 4 million element. It's impossible?

 
10:45 AM
This question seems unfit for StackOverflow. You might want to try: CodeReviewIan A.B. King 13 secs ago
 
10:59 AM
This is more suited for CodeReview ... — Pogrindis 29 secs ago
 
11:14 AM
0
Q: Generate 2D array with set amount entries?

MadmenyoI want to generate an array where each row and column needs to have a random generated amount (between 2 and total size of dimension -1) of true values. Currently I am running each row then columns and check if it validates. If it does not it regenerates and has to do another full loop to check ...

 
11:31 AM
-1
Q: java programming (enhanced for loop)

user170701Rewrite the following loop, using the enhanced for loop construct. Here, values is an array of floating-point numbers. for (int i = 0; i < values.length; i++) { total = total + values[i]; }

0
Q: Encrypted safebox

ortisI am developing JSafebox, a portable safebox project written in Java. The goal is to provide a secured environment where the user can browse encrypted files without leaking data on the drive. The project is highly focused on security and I would appreciate any feedback that would help improve th...

 
11:43 AM
these questions are better suited for codereview.stackexchange.comVandesh 56 secs ago
@TopherCharles There is Code Review for reviewing working code. Also see Fisher-Yates shuffling algorithm. — user202729 8 secs ago
 
12:06 PM
0
Q: How to get tuple data in an array containing only one element from another tuple?

JackExample: I want to select tuple in an array(t_bet), which contains just one element from judge_tpl = (5,12,24). For example, (3, 4, 5, 16, 30) is ok while (3, 12, 24, 29, 30) is not because it contains two elements. t_bet = [(3, 12, 24, 29, 30), (3, 13, 18, 19, 22), (1, 11, 16, 17, 22), (3, 4...

0
Q: Why this AES256 method is limited to encrypting 16 characters?

Aiden StewartI found this aes256 encryption method somewhere on the internet. It is working but it is limited to encrypting 16 characters in ecb mode. Where this limit is defined on the code ? How can i remove this limit ? virtualAES.h #pragma once #define VIRTUALAES_H #define _CRT_SECURE_NO_WARNINGS #incl...

 
That would instantly fail code review in my company: we are not allowed to throw unchecked exceptions. — Stelios Adamantidis 55 secs ago
 
12:23 PM
0
Q: Simple C++ allocator for POD types

Jean-Michaël CelerierThe incentive here is to allow some compilers (clang as of clang-6.0 for instance) to remove allocations in some cases, by observing that they are able to optimize out new/delete pairs but not ::operator new/::operator delete pairs : see the following in https://godbolt.org/g/jumtCU #include <al...

 
12:40 PM
If you don't have any specific problem with this code, post it to codereview.stackexchange.comNico Haase 43 secs ago
 
12:52 PM
@JoshHardman I would really be interested in looking at your code if you post it on Code Review, then I can give you more concrete suggestions. — Simon Forsberg 11 secs ago
 
1:02 PM
0
Q: A simple "couple creator"

KobyI just made this simple generator as a side-project to one big project I'm working on (demo on github pages here) and would like some opinions, feedback or suggestions on how to improve it. I hope you guys like it despite it being so shitty and thanks in advance! index.html <!doctype html> <ht...

0
Q: Riot js based SVG elements

Amit GuptaTo convert my image labeling tool imglab to react based application, I've created a library of riotjs based SVG elements. I'm also trying to make it generic so other projects can use it. Aim We should be able to draw a SVG element on SVG canvas(HTML5 SVG tag) with mouse. We should be able to t...

 
1:29 PM
o/
 
1:52 PM
0
Q: Understanding shoppingcart php code with ability to add to cart

Martin MortensenFUNCTION 1 <?php session_start(); $connect = new mysqli("localhost", "root", "", "test"); $connect->set_charset("utf8"); if(isset($_POST["add_to_cart"])) { if(isset($_SESSION["shopping_cart"])) { $item_array_id = array_column($...

 
2:12 PM
0
Q: Remove heart or life icon in ionic

amiegaI am building a small quiz app in ionic. I have these three heart (life) icons <ion-icon name="heart" style="display: inline; color: red; "></ion-icon> <ion-icon name="heart" style="display: inline; color: red;"></ion-icon> <ion-icon name="heart" style="display: inline; color: red; "></ion-icon>...

 
2:51 PM
@rolfl Considering this meta answer of yours, I suspect this question is in violation of the Terms of Service (explained in my comment). False alarm? Or should I contact SE about it?
 
@Mast neither, honestly.
It might as well be a TOS violation, but that's not your call to make (and not a diamond call either)
We're not responsible for keeping copyright stuff safe.
Nor are we responsible for the legality itself of any one question.
You can definitely contact the community-team though, if you wish to do so.
 
I honestly don't care about the infringement, but I do care about CR. So if CR (SE) policy is to ignore, I can happily do that.
 
0
Q: How to fix jerking bugs sticky table on mobile?

DanI made my table based on the jquery floatthead plugin. The table has a sticky head. And on the mobile below appears table scrolling and the first column becomes sticky. But on real devices it works crookedly. The table header twitches. The first column, too. How to fix these bugs? My table: http...

 
3:42 PM
0
Q: I want to speed up the performance of my methods

Kabira SulemanI have been running JMH micro benchmarking tests on my code and I am not happy with the average speed or my methods. public static String getPropertybyId(){ System.out.println("Enter an id number to search properties: "); int n = reader.nextInt(); // Scans the next token of the input as a...

 
I'm voting to close this question as off-topic because it belongs in Code Review (codereview.stackexchange.com) — vol7ron 14 secs ago
Thanks @vol7ron I don't knew the codereview community. — FabianoLothor 18 secs ago
 
3:59 PM
0
Q: Best way to do this optimising the performance

FabianoLothorI'm needing optimize my logic below. var tenNumbers = []; var iterations = 0; while(tenNumbers.length < 10) { ++iterations; randomNumber = Math.floor(Math.random() * (10)) + 1; if(tenNumbers.indexOf(randomNumber) === -1) { tenNumbers.push(randomNumber); } } console.log...

 
0
Q: Alias constexpr to a new tag, constant-expression

IncomputableBackground C++11 has added a new keyword, constexpr. Although it was added later, C++98 already had constant expressions, albeit of extremely limited form. The keyword itself is just a specifier without constant expression. How is it different from constants or just no tag at all? no tag I'...

 
monking
I made a new tag proposal and realias proposal. Could you please see if I formed it well? I believe the gist is to show how different it is compared to the available tags, and I believe the example shows it well.
 
@Incomputable Wasn't constexpr synonimized with constants already?
 
@Mast I'm proposing to realias it to constant-expression
constant-expression in C++ requires different kind of syntax and library usage, thus I believe it should be a different tag.
 
4:14 PM
IMO, you could build your case more clearly.
 
should I include those messages in the question?
 
What messages?
 
the two I've written as a response to your first question
 
0
Q: Computing the intersection of two big lists is not fast enough

Jeyekomonimport random import string LENGTH = 5 LIST_SIZE = 1000000 def generate_word(): word = [random.choice(string.ascii_lowercase) for _ in range(LENGTH)] word = ''.join(word) return word list1 = [generate_word() for _ in range(LIST_SIZE)] list2 = [generate_word() for _ in range(LIST_SI...

 
@Incomputable No, write a clear case regardless of the messages.
Although it would probably read the same. But with more context.
 
4:17 PM
@Mast, made the changes, does it look good now?
 
4:31 PM
Interesting;
Breakthrough Starshot is a research and engineering project by the Breakthrough Initiatives to develop a proof-of-concept fleet of light sail spacecraft named StarChip, to be capable of making the journey to the Alpha Centauri star system 4.37 light-years away. A flyby mission has been proposed to Proxima Centauri b, an Earth-sized exoplanet in the habitable zone of its host star, Proxima Centauri, in the Alpha Centauri system. At a speed between 15% and 20% of the speed of light, it would take between twenty and thirty years to complete the journey, and approximately four years for a return message...
 
4:53 PM
@skiwi but where do they get the funding?
 
0
Q: Web ToDo application in Javascript, HTML, CSS

GiovachoI would like to share with you the code from the application I just finished. It is a web application written in HTML, CSS, JavaScript and jQuery. It uses LocalStorage to store your tasks. The application also displays the date of adding and completing the task. You can add, edit, delete and mark...

 
> Sending the lightweight spacecraft involves a multi-kilometer phased array of beam-steerable lasers with a combined coherent power output of up to 100 GW.
That's where I stopped reading.
Their list of challenges is somewhat interesting though. Most of the information is written overly optimistic, but I guess at least a couple of people will get their PhD trying to bring those challenges a little closer to attainable.
 
@Mast Huh what book are you reading?
 
@Mast the complexity level looks similar to what boost org required for google summer of code
 
5:16 PM
@FreezePhoenix Site, not book.
 
o.O OK.
 
@Mast If you've ever played Factorio then you know that it's possible
 
@skiwi If that's how it works, I'd prefer one of those Star Trek transporters. No more traffic when going to/from work.
 
Question should be migrated to codereview.stackexchange.comPaul Spiegel 17 secs ago
 
5:25 PM
sigh
 
0
Q: Split a Dictionary into lists based on dictionary key

ieros tsantI have two lists each list contains a number of values. I wanted to create a dictionary that contains the pairs of each list as dictionary keys and the number of occurences of each pair as dictionary values(e.g (weak , 0) : 2). Now, what i want to do is to split the dictionary into lists based ...

 
5:46 PM
0
Q: Is my code vulnerable to SQL injection?

Shamol Singha ExtrI am creating a CMS but I do not know how to write the code to get saved from SQL injection. Let me know if there is an SQL injection vulnerability in my code. if(isset($_POST['cout'])){ $servername = "localhost"; $username = "root"; $password = ""; $db = "ba...

 
@Mast There's nothing clearly running against the ToS that I can see. The code itself does not read like it has any problems, it's only when you run the code that things look iffy.... and even then, the running code and iffiness is not actually on our site. I'm not going to do anything myself.
 
possible answer invalidation by Jean-Michaël Celerier on question by Jean-Michaël Celerier: codereview.stackexchange.com/posts/195337/revisions
 
6:07 PM
@rolfl Thank you.
 
fMRI testing showed that subjects who don't agree to participate are much more likely to escape from the machine mid-scan.
3
 
6:36 PM
@CaptainObvious what kind of answer are we looking for here?.... can I answer maybe without first looking at the rest of the post? I am totally JK'ing
 
7:04 PM
It seems that your code currently works, and you are looking to improve it. Generally these questions are too opinionated for this site, but you might find better luck at CodeReview.SE. Remember to read their requirements as they are a bit more strict than this site. — AChampion 43 secs ago
 
7:14 PM
0
Q: Performance of dynamic Fibonacci generator and dead rabbits

CalendarJI would like to improve my code style and its efficiency. I'm just moving beyond the standard recursive approach to a lot of simple algorithms. This post has two code snippets with slightly different but related problems. They're both in Python. The first snippet is just to produce Fibonac...

 
7:30 PM
-1
Q: Setting and Getting Array values from different Functions in C++

JannatI am trying to get array values from a getter function for this I am passing array values to a setter function from main, to set values to an array of size 2, then I'm retrieving those values from a getter function but I am unable to retrieve array values correctly. I'm unable to find the problem...

 
7:50 PM
This seems more appropriate for codereview.stackexchange.com. — Rein Henrichs 1 min ago
 
 
2 hours later…
10:02 PM
-1
Q: Connect four code imrovement

JimmyHello I wrote this code witch runs a connect four game. You can play vs another player or another computer. Currently the computer choose the position that it will play randomly, but I would like to do this so the computer wins every time. Any ideas? #include <stdio.h> #include <stdlib.h> void...

 
 
1 hour later…
11:15 PM
This question is best over at code review... — Codexer 48 secs ago
 
11:48 PM
0
Q: Parse and sort domain names and their prices

AnimeshI set out to write a small Python script to tell me cheapest domains. I manually scraped for data from iwantmyname.com into a plain text file as follows: .COM Commercial $14.90 The most registered domain extension on the planet. .CO 48% off! Colombia $19.90 then $39.00/year It's .com without the...

 
If the code works but you just want to improve it, try posting on Code Review. — SomethingDark 57 secs ago
 

« first day (1850 days earlier)      last day (2174 days later) »