« first day (3174 days earlier)      last day (848 days later) » 

12:00 AM
REFRESH! There are 8004 unanswered questions (89.2317 answered)
 
 
1 hour later…
1:13 AM
0
Q: Is this a good, concurrency safe solution for the "A Tour of Go" Web Crawler Exercise?

CageFuryExercise is here: https://go.dev/tour/concurrency/10 Prompt: In this exercise you'll use Go's concurrency features to parallelize a web crawler. Modify the Crawl function to fetch URLs in parallel without fetching the same URL twice. Hint: you can keep a cache of the URLs that have been fetched ...

 
 
2 hours later…
2:55 AM
0
Q: Project Euler 1 in ARM Assembly

SRobertJamesProject Euler #1 asks: Find the sum of all the multiples of 3 or 5 below 1000. In ARM Assembly; I did this in 3 loops, which avoids any MOD or DIV. Each loop is written out, without a common subroutine, since loop 3 is different than loops 1 and 2, and the space savings in combining 1 and 2 ar...

 
 
3 hours later…
5:49 AM
Monking
 
 
4 hours later…
9:42 AM
0
Q: Options for object mapper with automatic migrations for .NET application

TRSI am working on a .NET 4.6 application which needs a SQLite database. I tried my hands with SQLite EF core and I liked object mapping and automatic migrations in it. But I feel that EF core is too much of infrastructure overload for my project when I don't use many of its advanced features. I ha...

 
 
3 hours later…
12:15 PM
0
Q: Logistic Regression on Titanic Dataset - Sklearn

irtexas19The goal of my program is to calculate the chances of a person to survive during Titanic accident, after receiving information such as person's age, class, sex, etc. There's a dataset full of information, that was splitted into testing and training dataset. Any tips for improvement, different dat...

 
12:40 PM
0
Q: Use class instantiation to return an instance of a subclass? (for ABC in particular)

ElRudiIn one sentence Is there a way to use class instantiation to return an instance of a subclass? (for ABC in particular) Setup I have an abstract base class with several sub-classes, which I can instantiate and use just fine. Here a reduced (and nonsensical) example to illustrate: from abc import a...

 
1:06 PM
0
Q: Synchronous Lock system with asynchronous methods

Cyril N.I needed a way to ensure that a function called was done only one at a time. Because of how Javascript is done and with Asynchronous functions, this wasn't the case, and there could be concurrency calls that was causing troubles on my code. So I ended up with the following code. In a nutshell, yo...

 
1:42 PM
Monking
 
2:22 PM
2
Q: Functools extension library

Richard NeumannI wrote a utility library inspired by functools that adds some common operations on functions I frequently use in my projects. As usual I'd appreciate any feed back. functoolsplus.py """More higher-order functions and operations on callable objects.""" from dataclasses import dataclass from time...

 
 
1 hour later…
3:37 PM
@CaptainObvious Not asking for a code review, belongs on another site.
@CaptainObvious Needs one VTC.
 
4:12 PM
Monking
 
4:29 PM
0
Q: Abstract Factory Pattern Implementation

TurtleI implemented the Abstract Factory design pattern as follows. Concrete Implementation interface VideoExporter { void exportVideo(); } interface AudioExporter { void exportAudio(); } class HQVideoExporter implements VideoExporter { @Override public void exportVideo() { S...

 
5:20 PM
0
Q: Djikstra's Algorithm and a Graph Implementation using Hashmap

GodLikeGraph Interface: public interface Graph<T> { boolean addEdge(T src, Edge edge); boolean removeEdge(T source, T destination); boolean addVertex(T vertex); boolean removeVertex(T vertex); void printAdjacencyList(); List<Edge> getNeighbours(T vertex); Map<T, List<...

0
Q: A simple CFG claimed to have no equivalent PEG, that seems to have one anyway

hkBstIn "Packrat Parsing: a Practical Linear-Time Algorithm with Backtracking" on page 30 the author states that the context-free grammar (CFG): S -> a S a | a S b | b S a | b S b | a appears not to have a corresponding parsing expression grammar (PEG). The above CFG is equivalent to: S -> (a | b) S ...

 
Monking
 
5:36 PM
@CaptainObvious Seems to be off-topic, code not working.
@CaptainObvious I was just going to comment and VTC, however, some moderator beat me to the punch by migrating the question.
 
 
2 hours later…
8:03 PM
I'm tempting fate again on SO
 
8:44 PM
0
Q: Forcing HTTPS and www on root domain, but not on subdomains

BrettI want to force HTTPS throughout the site, which is already done no problem with the below: RewriteCond %{HTTPS} !=on RewriteCond %{REQUEST_URI} !\.(jpe?g|gif|bmp|png|ico|js|css|woff|ttf|eot|svg)$ [NC] RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NC,NE] But I also want to make sure ...

 
 
2 hours later…
10:26 PM
0
Q: Interceptor mechanism for HttpServlets

cidraI'd like to implement a simple interceptor mechanism that, unlike Servlet Filters, can be applied to simple "doX" methods. This is what i'd like to achieve: @WebServlet(...) public class MyServlet extends InterceptableHttpServlet{ @MyInterceptor(myValue="hello world") public void doGet(Ht...

 
10:51 PM
0
Q: Rust CLI for playing Wordle

T. KileyI wrote the following CLI for playing the popular word game - Wordle. Wordle is a word game in which players are trying to guess a 5 letter word. Each turn they guess one 5 letter word, and for each letter are told that it either isn't in the word, is in the word, but not here, or is correctly pl...

 

« first day (3174 days earlier)      last day (848 days later) »