« first day (3501 days earlier)      last day (522 days later) » 

12:07 AM
REFRESH! There are 7613 unanswered questions (90.0278 answered)
 
1:02 AM
0
Q: Finding a function from a name within a string

user16217248The code is designed to see if the first alphabetic characters in the *str argument refers to a known function, as part of a calculator app, and sets *str to the first character after the name of the mathematical function if found, similar to the endptr argument in strtol, strtod, etc. I seek to ...

 
 
3 hours later…
4:27 AM
0
Q: GO Lang: Script for sending txt file to e-mail

Matt BomerI am working on script for sending txt file to e-mail. When I run this code I only get path to txt file. Can someone check my code package main import ( "fmt" "log" "net/smtp" "os" ) func main() { // Set the email address to send the text fil...

 
 
1 hour later…
5:43 AM
Right; I don't interpret the OP as building something for inclusion in nixpkgs -- if they were, there's a robust code review process that will iron things out -- but rather as trying to follow patterns they saw there. — Charles Duffy 16 secs ago
 
 
3 hours later…
8:45 AM
0
Q: lemmatize very long texts in python

Piergiorgio Di Pasqualei really need to optimize this piece of code for my master thesis. it take up to 20 seconds to lemmatize documents with >6000 words. the problem is that i have to lemmatize more than 200.000 documents with an avarage of 10.000 words each. import pandas as pd import nltk import gensim from nltk.s...

 
9:10 AM
0
Q: Text-based Java RPG, what y'all think?

Chance HI'm new to SO so forgive my bad formatting. This is a code I created for my CS 1 class that I want to complete. I want to add functionality to my choose() method to look at player stats and remove/display choices based on stat requirements. Besides this is pretty basic and I don't really know how...

 
9:34 AM
 
0
Q: C safe getline()

404 Name Not FoundFor a recent project of mine I had to do read input from the console in pure C with no external libraries (in other words, code I've written by myself). I don't like the standard formatted input such as scanf or std::cin in C++, I feel like having to do a dummy read to get rid of the leftover new...

 
10:02 AM
0
Q: Format code to be more readable when counting a filtered list

rupinderjeetI have following code: fruits = content.find_all("fruit") matching_fruits = [fruit for fruit in fruits if fruit.has_info('name') and fruit.has_info('source') and fruit.info['source'].endswith('primary')] return len(matching_fruits) How can I either reduce the code, or make it more readable?...

 
10:27 AM
0
Q: Quick Sort - How to apply recursive and get output

UnKNOWnI am working on a school exercise on Quick Sort. I have succeded to do the first exercise which is Challenge Given an array 'array' and a number 'p' in the first cell in the array, can you partition the array so that all elements greater than 'p' is to the right of it and all the numbers smaller...

 
 
2 hours later…
12:36 PM
0
Q: Appropriate use of std::atmic in concurrent code

riokiI recently had flaky unit tests in concurrent code. I found a solution, but am unsure if that is the right one. I would like a few other opinions on my solution and approach. I will start from the outside in; there is one of the flaky tests TEST(parallel, parallel_any_of) { auto nok = std::ve...

 
1:27 PM
0
Q: filtering array of nested objects

knot22The following code is producing the desired output but I'm wondering if there's a way to accomplish the same result by applying .filter() to data. Any other more concise approaches than shown below are also welcomed. Data description: scenarios consist of a scenario object plus an array of profi...

 
1:41 PM
@CaptainObvious This could be a good question with some help.
 
2:19 PM
@CaptainObvious One can try to help a new user write a good question, but that doesn't mean they will accept the help.
 
3:10 PM
0
Q: Yet another sparse set implementation

TabI got inspired by this blog post and implemented a fixed-size sparse set, removing the need for vectors, because the sparse set's size equals at least sizeof(value_type * Size), it should be allocated on the heap when using a large set. The idea is to be enable for the creation of contiguous sets...

 
4:01 PM
0
Q: Greeting Kata in Swift

Asif MujtabaI've just completed the Greeting Kata and I am hoping for some feedback. Here's the Kata: Requirement 1 ------------- Write a method greet(name) that interpolates name in a simple greeting. For example, when name is "Bob", the method should return a string "Hello, Bob.". Requirement 2 ---------...

 
4:27 PM
0
Q: The most efficient way of making this sum in 8051 assembly

And9686I was studying 8051 registers and how they work and I found this example that's a sum of (R1 + R2) – (R3 + R4): MOV A,R3 ;Move the value of R3 into the accumulator ADD A,R4 ;Add the value of R4 MOV R5,A ;Store the resulting value temporarily in R5 MOV A,R1 ;Move the value of R1 into th...

 
4:52 PM
0
Q: Multitier architecture and Repository pattern too much boilerplate?

lhiapgpeonkI read up on and dived into the Repository pattern for a project I am working on. I have understood that the repository abstracts the actual access to any form of storage for my data model. What I was a bit hazy on was how to use everything in the context of an ordinary application, so I had a st...

 
5:10 PM
Monking
 
 
3 hours later…
8:17 PM
0
Q: alternative to multiple .forEach() loops for filter in Javascript

knot22There is a use case to filter key/value pairs that have a value of zero out of the following dataset. If all the values are zero for the given key then the key/value pair is to be filtered out entirely (as is the case for keys 41521, 41530). const simpleData = { "41511": { ...

 
8:36 PM
If you want an open-ended code review, there is a dedicated site for it: Code Review. Such questions are too unspecific here on Stack Overflow. — mkrieger1 32 secs ago
 
0
Q: Thread Safe Queue

riokiI have a thread safe queue in my library c9y. It is generally used as a task queue in the task_pool class, but in can be used for any producer / consumer problem. queue.h #ifndef _C9Y_QUEUE_H_ #define _C9Y_QUEUE_H_ #include <mutex> #include <condition_variable> #include <deque> #include <chrono>...

 
 
1 hour later…
9:45 PM
@ner0ck Because it's stackoverflow policy to ask a single question per post ;) if we vote to close a question, 'asks multiple questions at once' is even one of the official reasons we can enter. It has to do with the purpose of stackoverflow - it is meant as a huge Q&A for other people to search. And if you ask multiple questions or ask for personal code review, that's not much use for other people. — Finomnis 58 secs ago
 
 
2 hours later…
11:43 PM
0
Q: C++ Long Interger Library

bowtoyourlordMy second little project. I would like to hear all the critics possible. This is a C++ Long Int library. It is self-education project, however I would like to make it better. For me possible things to change are: Fix enormous re-copying, where it shouldn't be. Add move-semantics where possible. ...

 

« first day (3501 days earlier)      last day (522 days later) »