All Questions
77,794
questions
-1
votes
0
answers
12
views
MS SQL - Detecting users with consecutive weeks [closed]
I need to detect consecutive weeks that a user appears within a table, with obviously no gaps in between weeks, I have the below solution which is based upon an answer here... https://stackoverflow....
1
vote
1
answer
53
views
Best way to deny .php in URLs while keeping access to those files through other URLs?
Here are two examples of what I would like to do:
Example 1: I have a services.php file. I would like it to be accessible on example.com/services. Furthermore, I would like example.com/services.php to ...
-3
votes
0
answers
28
views
Solving genetic algorithm [closed]
The code is running now but the answer is not stable to decrease, it is oscillating. I do not want to change the mutation rate and selection operator since it will be changed after this for further ...
5
votes
1
answer
202
views
String Decryption in C (BIO 2022 Q1)
I was practicing question 1a of the 2022 British Informatics Olympiad past paper.
Each letter in the alphabet can be given a value based on its position in the alphabet, A being 1 through to Z being ...
-3
votes
0
answers
30
views
Weight Calculator in Java [closed]
Assignment Tasks:
Create a new Java project and create two java files named WeightCalculator.java and Planet.java.
Paste the following into WeightCalculator.java.
You will need to finish both ...
2
votes
1
answer
60
views
Excel sheet manipulation program
I'm very new to programming, and I'm hoping I can get feedback on the code I wrote - anything is helpful - what to split into different files (right now 1 large file), perhaps a way to break up the <...
5
votes
3
answers
482
views
Optimizing Pi Estimation Code
I'm trying to write a program in Python that estimates pi, but to get a more accurate estimation in a feasible amount of time, I want to make it faster.
I'm using a method that estimates the area of ...
3
votes
2
answers
243
views
im2double and im2uint8 Functions Implementation for Image in C++
This is a follow-up question for conv2 Template Function Implementation for Image in C++ and An Updated Multi-dimensional Image Data Structure with Variadic Template Functions in C++. For performing ...
2
votes
2
answers
120
views
2
votes
3
answers
466
views
Capture multiple errors before raising an exception
I have a scenario where I need to store values from some environment variables (names of which I cannot control). My first run at this was pretty basic, however this is not usable as an exception ...
0
votes
0
answers
26
views
Presence of UB and memory usage of a std::array initialization: version with temporary array on heap
I proposed several techniques to answer to https://stackoverflow.com/q/78672409/21691539.
A classical way to answer would be to use std::index_sequence-based ...
-2
votes
0
answers
53
views
6
votes
8
answers
1k
views
Reversing vowels in a string
Given a string s, reverse only all the vowels in the string and return it.
The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both lower and upper ...
1
vote
0
answers
32
views
Fast and low Memory Requiring Lookup Tree Library
Background
While working on solving the end game of the russian card game Durak I developed a library small_memory_tree to store the simulation results. You can try the game on my website Modern Durak ...
3
votes
3
answers
598
views
Error handling for singly linked list in C
I have seen many list implementations in C in this site; I know its been asked many times. I need some advice regarding:
Quality of my code, especially my list library.
How to handle errors in main (...