« first day (2045 days earlier)      last day (1977 days later) » 

12:00 AM
RELOAD! There are 5839 unanswered questions (89.7298% answered)
 
 
3 hours later…
3:12 AM
If it is constructive criticism that you seek, better to post over at Code Review. That said, a couple of suggestions: it is imperative that code checks for success of calls to malloc() before attempting to use the allocation. In the same vein, it is a mistake to directly assign the result of realloc() to the pointer to the original memory being reallocated; if realloc() fails, NULL is returned, and code is left with a memory leak. It is much more efficient to double memory when resizing than to add 1 space at a time: fewer calls to realloc(). — David Bowling 35 secs ago
 
3:22 AM
@Duga Seems more reasonable to have an answer explaining readability to OP than to format code for them. (I can't do rollbacks, not enough rep)
 
 
1 hour later…
4:27 AM
-1
Q: percfectly run but stringoutofboundexpection

MILIND DEVimport java.util.*; import java.util.Scanner; public class hackerFirst { public static void printCharacter(String str){ for(int i=0;i<str.length();i++) { if(str.charAt(i) == str.charAt(i+1)) { //mm is correct but mn gives an string out of bound exception which means statement not s...

 
4:41 AM
Code Review is a better place to ask this kind of question. — Barmar 23 secs ago
 
-2
Q: App crashes on First Open only when AdMob is added but working fine on next open

GumanganMy App is working fine and then I tried to add AdMob dependencies. That's when things get complicated. On first install and then open App crashes. But on second and consecutive open the app is working fine, all ads are showing. For me, this is a bad user experience because at first open they thi...

 
 
1 hour later…
6:05 AM
It doesn't look messy to me, but this type of questions belong here to code reviewc0der 25 secs ago
 
 
2 hours later…
8:17 AM
0
Q: C++ Project Euler 92 Performance

Philipp Siegmantel A number chain is created by continuously adding the square of the digits in a number to form a new number until it has been seen before. For example, 44 → 32 → 13 → 10 → 1 → 1 85 → 89 → 145 → 42 → 20 → 4 → 16 → 37 → 58 → 89 Therefore any chain that arrives at 1 or 89 will bec...

 
 
2 hours later…
9:53 AM
0
Q: Assebmly. Best practice to track the stack

user1225207I wrote simple trainer for some game using assmebler. One question I have is how to track the stack to find out what it has before each call (WinAPI call in my case)? Sometime for optimizations yoy don't want to remove something from the stack and just treat it as anything else. Also under Window...

 
10:20 AM
possible answer invalidation by Muhammad Luqman on question by Muhammad Luqman: codereview.stackexchange.com/posts/208432/revisions
 
0
Q: Parse html bookmarks export to a json with python for further management

Pitrow P.I made this piece of code as first step for a bigger project to iterate and manage bookmarks: open, rename, place in new folder structure, or delete each one of them. This first step is a parser to get a useful json file with the structure and data of each bookmark and folder. I've usex regex ins...

-1
Q: nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: SOAP 1.2 header elements must be namespace qualified

Vlada Zhigulyovtsev // soap 1.2 SaajSoapMessage soapMessage = (SaajSoapMessage) message; SoapHeader soapHeader = soapMessage.getSoapHeader(); QName wsaToQName = new QName("http://www.w3.org/2005/08/addressing", "To", "wsa"); SoapHeaderElement wsaTo = s...

 
10:42 AM
0
Q: parking lot system design

AkankshaProblem Statement I own a multi-storey parking lot that can hold up to 'n' cars at any given point in time. Each slot is given a number starting at 1 increasing with increasing distance from the entry point in steps of one. I want to create an automated ticketing system that allows my customers ...

 
11:29 AM
-1
Q: Regular expression template using lookahead assertions in Python

Nikos AlexandrisI built this regular expression pattern using grouping and named groups after Landsat's new product identifier pattern. It looks like this: (?P<prefix>L)(?P<sensor>[C|O|T|E|M])(?P<satellite>0[14578])(?P<delimiter>_)(?P<processing_correction_level>(L1(?:TP|GT|GS)))(?P=delimiter)(?P<path>[012][0-9...

 
11:52 AM
This question is probably better suited on code review, but you need to explain more about what the code does. — Lasse Vågsæther Karlsen 3 mins ago
 
12:20 PM
0
Q: Finding numbers where the nth power of the sum of the digits of the number is equal to the number itself

AcedPIThe title explains the code but I'll give examples. The number 81 fits the code because 8+1=9 and 9^2=81. The number 512 fits the code because 5+1+2=8 and 8^3=512. The number 17576 fits because 1+7+5+7+6=26 and 26^3=17576. The power of the sum of the digits can be any positive num...

 
 
2 hours later…
1:57 PM
Monking
 
 
1 hour later…
3:15 PM
0
Q: BST Remove method implementation in Python

Miro Lammiclass BSTNode: """ Represents nodes in a binary search tree. """ def __init__(self, key, value=None): self.key = key self.value = value self.left = None self.right = None def height(self): """Return the height of this node.""" left_height = 1 + self.left.height() if self....

0
Q: Is my old VIX calculation code correct?

michael chenI created a function to calculate the VIX using the old method. However, since I have no sample data, I have no idea whether I implemented my code correctly. Can you please help me check if my code is correct? Link to its calculation: https://drive.google.com/file/d/1R7Pk8dN5hiXl8pACj-7uKZa5_tY...

 
4:06 PM
Your statement is clearly wrong: the conventions for naming stuff in Go programs exist since ages. One of the answers to your question cite the "Effective Go" document which deals precisely with your question, so watch your language, pal. And by the way, this guide by the Go core devs is also a must read for wtiting production-grade code; it deals with naming as well. — kostix 7 mins ago
 
4:20 PM
0
Q: LinkedHashSet Implementation in Java

Hamidur RahmanBelow is an implementation of LinkedHashSet in Java. Although this is limited with its functionality, it will do the basic job. I used interfaces so then I can use that interface for BST. //Set interface package interfaces.set; public interface Set<E> extends Iterable<E> { int size(); ...

 
possible answer invalidation by Pitrow P. on question by Pitrow P.: codereview.stackexchange.com/posts/209305/revisions
 
5:13 PM
I think this belongs on codereview.stackexchange.com doesn't it. That's where working code goes. — Daniel T. 4 mins ago
 
5:37 PM
Welcome to SO. Write some code first, and then come and ask some questions here if you have problems with it that you can't solve, or https://codereview.stackexchange.com if you want someone to peer review the code you've written. — Andy 40 secs ago
Maybe you'll be interested in posting to Code Review for a code inspection? — Thomas Matthews 1 min ago
 
 
1 hour later…
 
6:58 PM
0
Q: A more efficient way of parsing displayed month/year for calendar

linus72982I have a 6 x 7 grid for a calendar = 42 DateTimes. I'm trying to display the displayed month/year at the top of the calendar. If there are 3 months displayed, I only want to show the name for the middle month (October 2018, for instance). If 2 months are displayed, split the name (October - Nov...

 
There are not enough details provided to give a meaningful answer. Perhaps if you showed the relevant code it would give us some idea about what you are talking about. Also, if the code already works but you would like to improve it, Code Review might be a better place to ask. — John Coleman 12 secs ago
 
7:24 PM
A Guide To Code Review For Stack Overflow Users is a good place to start in figuring out which of the two sites is a better fit at any given time. — Charles Duffy 1 min ago
 
0
Q: Converting end user local to UTC and back

TsukasaWondering if I'm doing this correctly or if I went too far or not far enough. I have a scheduling/POS system which each location has it's own data. Each location will report on it's own data. The "owner" will be able to run reports for all locations. I'm storing datetime as UTC. Each location ...

0
Q: Parsing million words of list in python regular expression is slow

Neeraj SonaniyaI have been working on a project in python which takes content from web links and find some important words from content of that page. I used regular expression to do so. But it takes huge time to get the results. How it works: It makes request to given url take whole html content and data fro...

 
 
1 hour later…
8:44 PM
Your question is a good one, however you may get more in depth answers if you moved your question to codereview.stackexchange.com That site is centered around questions like this one. — Scott Chamberlain 37 secs ago
 
0
Q: Platform-Agnostic Windowing library

Gabriele ViertiI am making a C library that abstracts window creation with support for the new Vulkan API under a unified API; I have a github repository that you check out. main.c #include "vkwf.h" int main() { VKWFWindow* window = VKWFCreateWindow("Test Window", 800, 600); while (!VKWFWindowShould...

 
9:18 PM
What is your concrete question? If you're looking for a code review,this is not the good place. — JB Nizet 16 secs ago
 
 
1 hour later…
10:30 PM
This may be better posted on: codereview.stackexchange.com. — smj 18 secs ago
 
10:47 PM
@zertyz Doesn't really matter. I would typically use double rather than float all around, actually, but even here where B is float for whatever reason I'd rather not bloat the calculation with extra gumpf on my literals that doesn't serve any practical benefit. But I can see why you'd want to keep it symmetrical so wouldn't reject that change at code review. — Lightness Races in Orbit 37 secs ago
 
0
Q: Credit Card Validator python 3.7.1

skyn37I am doing some projects so i can teach myself programming. The one that i finished states: "Credit Card Validator - Takes in a credit card number from a common credit card vendor and validates it to make sure that it is a valid number (look into how credit cards use a checksum)." Would be glad ...

 
11:18 PM
0
Q: Twitter scraper, advice on avoiding getting locked out of API and Twitter service

Frank PintoI wrote a Twitter scraper using the tweepy so I can scrape user information and tweets. Given that the free API doesn't let me get the number of messages per tweet, I had to rely on BeautifulSoup to do so. Here's my code: class TweetAPI(): def __init__(self, k1,k2,k3,k4): self.key =...

 
11:40 PM
I'm voting to close this question as off-topic because review of functional code is off-topic for Stack Overflow. Your question may be on-topic for Code Review, which does allow review of functional code for Best practices and design pattern usage; Security issues; Performance; and Correctness in unanticipated cases. Be sure to read their on-topic page prior to posting your question there to be certain it's on-topic in it's current state. — Makyen 38 secs ago
 

« first day (2045 days earlier)      last day (1977 days later) »