« first day (1990 days earlier)      last day (2032 days later) » 

12:00 AM
RELOAD! There are 5716 unanswered questions (89.7708% answered)
 
 
3 hours later…
3:24 AM
I'm voting to close this question as off-topic because the code is working, so it should be asked to codereview.stackexchange.comekad 59 secs ago
 
0
Q: Image to HTML / CSS conversion using pure JS (performance issue)

icecubJust for fun I wrote some Javascript that "converts" an image into pure HTML / CSS. The user is able to select a local image. This image is loaded into an invisible canvas in order to extract pixeldata from the image. Using the pixeldata, a structure of 1x1 <div/> elements is created with each el...

 
3:47 AM
Code review ("does the following look correct?") is not what we do here; the site's scope is limited to narrow, specific, answerable questions. — Charles Duffy 1 min ago
 
4:14 AM
-1
Q: mundane set-wise operations with objects and arrays. Good library suggestion?

teraryThe following mundane task that I use frequent enough to wonder if there is not a better way. Is a very simple package that already covers these things. Things like: Create an object that has keys: let myObject = inflateFrom(arrayOfKeys); function inflateFrom(array,default=1){ let newObject ...

 
Monking
 
4:29 AM
0
Q: multiple div element and call it on Javascript

Andhica PratamaIt suppose that if i check the checkbox, it also appear status false or true on the table. But it only apperas on the first row. The second and the third row not appear the status. Why is that? how to make it show the status on every single row. Thanks $output =''; $output .=' <table> <tr> <...

 
 
1 hour later…
5:35 AM
If you have a problem with the code you've written, please include your code in the question, and we can help. If you're just seeking a review of your code, and advice on how to "improve it", the Code Review site is probably a better place for this question. — Flimzy 23 secs ago
If the code works and you just want to know if there is a better way, you should post it in Code Review instead. — Magnus Eriksson 10 secs ago
 
6:05 AM
I'm voting to close this question as off-topic because it should be asked on codereview.stackexchange.comekad 9 secs ago
 
6:20 AM
0
Q: How to integrate API from different vendor?

user2164222Let say I have a function to create some data (for example new customer). When I create a new customer in my system, I need to call API from one vendor side so we can insert this data to their system also. If there are multiple vendor APIs, I need to know which vendor API to call when creating ...

 
6:36 AM
0
Q: Return pdf string in response using chrome headless

mauliksompurapublic function indexAction() { $this->setJsonResponse(); $debug = $this->config->debug; $urls = $this->request->getPost(); $config = \Phalcon\DI::getDefault()->getShared('config'); $name = $error = null; $response = [ "success" => [], ]; foreach ($urls as ...

 
6:47 AM
probably better to add to codereview codereview.stackexchange.comDenis Tsoi 7 secs ago
 
0
Q: Add multiples of 3 or 5 below 1000, Can this code be optimised. Project Euler #1

Grv10IndiaI have seen some solution here for the same problem, this and this I have found better ways to solve this problem. I just want to know how good or bad my code and way of approaching this problem is. using System; public class Program { public static void Main() { int sum = 0; ...

 
7:08 AM
0
Q: find a cookie exists in the cookie string - javascript

DILEEP THOMASi need to find a cookie name is available or not in the cookie string , i have achieved this, we can use cookie-parser but i don't want to use the package so i have written the below code ,can i reduce the code in a better way more optimised ? function checkCookie(cookie, cookieToBeSearc...

 
 
7:45 AM
Monking
 
7:56 AM
0
Q: Passing shared memory array to worker pool in Python

ValI'm working with big 2d numpy arrays, and a function that I need to iterate over each row of these arrays. To speed things up, I've implemented parallel processing using Python's multiprocessing module. Each worker of the pool gets an array index, which is used to read the data from the shared a...

0
Q: SDL2/C++ Blackjack Game

NickI recently just finished making this blackjack game using C++ and SDL2. Although this took a lot longer than I expected it to, I feel like I'm getting a good hang of everything. However, this is only my third game and feel like there's bound to be a lot of room for improvement. There's a lot diff...

 
Monking
 
8:54 AM
Actually, if your code works but you are concerned about its performance or architecture, you should post a question on CodeReview. — dymanoid 59 secs ago
 
0
Q: Speeding up Buddhabrot calculation in PyCuda

maxbI've just started using PyCuda, but I have some experience in high performance computing on CPU. I've tried to port one of my old models for generating the Buddhabrot to run on my GPU instead. To briefly explain the algorithm to anyone not familiar, the idea is this: Generate a random complex n...

 
9:31 AM
0
Q: C# Tic Tac Toe first time

ThomasDThis is my first 'real' project in C# , i looked up some tutorials on the Internet for Tic Tac Toe. But they were not how i wanted it to be, so i came up with some own ideas and wanted some tips on improvement, because i know some things could be different. I simply don't really know how. So he...

 
Monking
 
9:47 AM
0
Q: Select single result from Join linq Query in a better way

DoctorPrismeFirst time I ask something here instead of Overflow, so sorry if I do something wrong. I have three objects related to each other : Product, Characteristic, Value. A product can have multiple characteristic, A characteristic can have multiple value, A characteristic can have a single value for ...

 
Given that you don't actually have a problem with this code, it would probably be best to take this to codereview.stackexchange.com :) — Perfi 16 secs ago
 
10:34 AM
0
Q: Tower of Hanoi Recursive Implementation using Python with OOP

Oliver HI have just finished a small program for Tower of Hanoi using recursion. I did it to practice OOP which I recently learnt. It took me about 2 hours to research about the recursive algorithm and write out the code. It works, after much debugging... However, after comparing to other implementations...

 
 
2 hours later…
12:12 PM
It's rather close to a code review question too; I did find a minor issue (answer updated) but the approach is fine. — Martijn Pieters ♦ 46 secs ago
 
 
2 hours later…
1:44 PM
0
Q: Python Pandas - finding duplicate names and telling them apart

Jim Eisenberg(Somewhat) new to python and coding in general! Using python 3.7 and pandas, I'm running code to create a searchable list of people in my dataframe, and I feel like my way of telling duplicates apart is very roundabout. I would love some advice on making it simpler and more efficient. I have a ...

 
2:08 PM
Greetings, Programs.
 
0
Q: Formatting data in array with objects

LeffI am formatting a data result from the array of objects that looks like this: const data = { periods: [{ month: 'January', sickLeave: { differance: '-12000', revision: '6000', paid: '18000', }, holidayLeave: { differance: '10000', revisio...

 
2:32 PM
-1
Q: First solo python project, text based game. After 'fight' method the game doesn't return to main

MitchSo I've been learning python myself from online course and wanted to practice everything I had learnt so far in a fun way, so started a text based game. Now I've gone through quite a few iterations of this game and managed to solve this issue once but unfortunately, I can't remember how I did it,...

 
3:20 PM
0
Q: Fastest way to space-separate a text file into memory

SandiI want to take a text file like: hello my friend and read it into memory, for example as a LinkedList, so I get {"hello", "my", "friend"} Right now, I'm using StringBuilder, like this: private void getTokens() throws IOException { StringBuilder sb = new StringBuilder(); int ch; ...

 
Typically, questions asking for improvements to existing code should go to the Code Review stack exchange site. — Joel Coehoorn 6 secs ago
 
4:06 PM
Monking
 
0
Q: FutureTaskWrapper for Java v2

AudriusI did not like that get synchronizes every time I call it - because I may be calling it more than once. So I wrote the wrapper for the future interface which keeps not synchronized local variable for cached result. I am very sure it is thread safe. Please have a look: import java.util.concurrent...

 
4:39 PM
0
Q: Product and Factor

PerpetualJOverview I was challenged recently to write some code that could find the smallest integer that when multiplied and divided by 2 or 3, retained all of its digits and gained no extras. For example: With 2 285714 When multiplied: 571428. When divided: 142857. With 3 31046895 When multi...

0
Q: This is my corect written Sinusoide Wave-File Generator

Mungo1981This is a little Programm to show how a WAVe-File Generator could be written. It use a Function-Object "SinFunction" to calculade the value of any point of the amplitude in time. This Object and two floats a given to the Constructor of the generator object. The two floats a the Frequency and the ...

 
Welcome to Stack Overflow! Please re-take the tour (you get a badge!), have a look around, and read through the help center, in particular How do I ask a good question?, What types of questions should I avoid asking?, and What topics can I ask about here? This isn't at all on-topic for SO. If app/code review were on-topic, the necessary code would need to be in the question itself, not just linked.People shouldn't have to go off-site to help you; and links rot. — T.J. Crowder 9 secs ago
You may want to get your code reviewed on StackExchange's CodeReviewVariable 55 secs ago
Re @Variable's comment above: But not but just posting a github link. Read their help thoroughly before posting there. — T.J. Crowder 1 min ago
 
5:01 PM
Technically SO is for problems where you cannot get something to work, but it's not like there is a section for PQ on CodeReview anyways. This is pretty much the kind of situation Unpivoting is tailormade for, so any optimization would be in support steps instead of avoiding Unpivoting itself. I made a dummy data set following your rules with 120 columns and 10k rows and your process only took 2 seconds. How long is the query taking for you? — Wedge 18 secs ago
Ok... Sorry. Thanks for the tips. I'll check out code review and try again. — Sean 8 secs ago
 
5:24 PM
I'm voting to close this question as off-topic because this belongs on codereview.stackexchange.com — dbush 35 secs ago
 
5:58 PM
1
Q: Do you need to use elseif when returning in if

Bas van DijkI have a function which does take the names from an array and returns the appropriate string. Now there are two solutions which both work. Solution A function likes(names) { if (names.length === 0) { return 'no one likes this'; } if (names.length === 1) { return `${...

0
Q: Testing Video Frames for Uniqueness

TrevorI'm working on a program that will (hopefully) eventually allow me to perform frame rate analysis like Digital Foundry does. The code below works (as far as I know), but before I iterate on it, I'd like some feedback as I'm new to both C++ and OpenCV. I say "as far as I know" because I'm not su...

 
6:14 PM
0
Q: Auto generate database table code formating

user1286956I have written my own little auto-generated table class, and I was wondering if you guys can give me some tips on how to make this code more elegant and secure and maybe compact it so I use only one function to bind everything when I call it out! The DB connection file: <?php $host = 'localhost...

-1
Q: Is the #100DaysOfCodeChallenge literally an hour a day? Including the part where we get stuck on code?

Asma Rahim Ali JafriPardon if this question is very poorly formed but I'll give a background. I recently started my #100DaysOfCode Challenge and I spare out some time from a really hectic routine. An hour. Everyday. I usually try to code a data structure(today was queues) but I'm confused if I'm supposed to consi...

 
6:30 PM
-1
Q: Need views on my coding style, readability and efficiency

Mihirhttps://github.com/MihirLuthra/C-programs-for-clg/blob/master/QueueImplementationByLinkedList.c simple implementation of queue using linked list in C suggestions welcomed for improvising my coding habits

 
7:02 PM
0
Q: Pattern to ensure only valid Positions are created, in as easy a way as possible

ZymusIn the game engine that I'm creating, I have a Position Service. This service is the single authority of what is or isn't a valid position in the world. A goal of mine for this project is to make it as easy as possible to do the right thing, and as hard as possible to do the wrong thing. I've s...

 
7:18 PM
1
Q: Shutdown or reboot system from LAN

user3628960I've written a simple web service which allows a user to shutdown or reboot a system from the LAN. Although written to be used on an RPI which lacks a power or reset button, it can be used on any Linux system. Aside from the missing secure login (I'm assuming everyone on the network can be trust...

0
Q: Getting a real time data on TCP Server from UWP

Smit ModiThis is a method that sends the data to TCP server. private async void TrySend(string data) { // Create the StreamSocket and establish a connection to the echo server. StreamSocket socket = new StreamSocket(); try { var streamSocket = new Windows.Networki...

0
Q: Boolean Toggles (XOR in Particular)

PerpetualJOver the years I have seen a few different methods of boolean toggling and I am curious on a few things. bool temp = false; private void ToggleTemp() { // Complete breakdown. if (temp) temp = false; else temp = true; // NOT operator. temp = !temp; // XOR operator. t...

 
7:50 PM
1
Q: Perimeter of a geometric figure

StudIt is an algorithmic exercise that must compile and run. I'm concerned about the complexity of the solution, but also about how to present such solution (should I use classes? Standard Library functions? Global variable?). I'm usually trying to have the "best modern c++" style, but I'm a bit conf...

-1
Q: I have tried to create a basic python program where I compare an inputted usernames to an external file

Joshua Hosgoodfilename = open('text.txt','r') y = input('What is the users name?') for line in filename: print(line) str(line) str(y) if y == line: print('Access Granted') else: print('Mission failed, we will get them next time') filename.close

 
8:05 PM
0
Q: Optimizing large file reads with a custom line terminator in Python

GollyJerI asked for help accomplishing this on StackExchange. How to efficiently read a large file with a custom newline character using Python? And ended up providing my own answer which is duplicated here. 👇 class ChunkedFile(object): """ Yields file in 100 megabyte chunks (by default). ...

0
Q: Feedback on first Python game Tic-Tac-Toe

opnightfall1771I'm just getting started with Python and was hoping for some feedback on a simple tic-tac-toe game I wrote. Specifically, is there a simpler way to check the win conditions for the game, and to break the loops at the end without repeating the code twice, and just generally how to shorten this to ...

 
8:37 PM
0
Q: I used namedtuple and list to populate each record of a json file , how can it be improved?

MaverickDI had a JSON file in this format, { "cols": [ "Employee", "start_time" ], "data": [ [ "Serena", "Sat, 22 Aug 2015 14:06:03 -0700" ], [ "Rhonda", "Sun, 25 Mar 2012 10:48:52 -0700" ], ...

 
I'm voting to close this question as off-topic because it should be on codereview.stackexchange.com — Darren Sweeney 30 secs ago
@DarrenSweeney I did not know about codereview... thanks! — dfoverdx 34 secs ago
@darrenSweeney I disagree, not sure if it better fits on CodeReview. — Jonas Wilms 32 secs ago
@darren afaik code review does not really fit for oneliners ... but I'm not that active over there ... — Jonas Wilms 12 secs ago
 
9:25 PM
0
Q: Frontend Code Challenge - Calculating Permutations

NebriI prepared the following code for a job interview in the last few months. Unfortunately the interviewer would not provide feedback on the code itself. I'd like to get some community feedback to ensure that I'm on the right track, and to help improve my performance as a better candidate in the fut...

 
10:12 PM
0
Q: Nibbles/Snake game in Python

Benjamin CrewI am a total beginner at Python, so I wrote a very simple snake game using pygame to get some practice with it. I also don't have too much experience with object-oriented design. Does the code layout look okay? Is it easy to read and understand? I'm sure it can be simplified some. The update...

0
Q: Uploading Multiple Images to Google Cloud Storage Using node.js

pho_phoI am no javascript expert, and I have managed to hack together a node.js script that does exactly what I want it to do: upload images contained within a folder to Google Cloud Storage for a Firebase project, and then return the public access urls. Given that I have limited experience with node.js...

0
Q: Wrapping a web scraper in a RESTful API (Docker + Flask Restplus + Beautiful Soup)

25PostcardsLearning to code whilst learning French! Faire d’une pierre deux coups! The problem I am looking to solve is wrapping a web scraper in a RESTful API such that it can be called programmatically from another application, frontend or microservice. The overall goal is that this piece of code will fo...

 
@CaptainObvious much today
 
10:44 PM
I'm voting to close this question as off-topic because it's asking for a code review of working code, which belongs on codereview.stackexchange.com, not here. — Joseph Sible 40 secs ago
 

« first day (1990 days earlier)      last day (2032 days later) »