Newest Questions
77,845 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
4
votes
3
answers
129
views
Macro to remove rows with data not meeting certain requirements
I have created several macros that delete rows based on cell values. I run it 5 times for different data, but think there should be a way to combine them and speed up the macro. Currently, it is ...
1
vote
1
answer
122
views
My Python 3.6 script to detect stamp card redeem fraud and prepare a csv report
I have a requirement to write a Python 3.6 script which should be able to detect following case within a time period and be able to create a text file report that lists the condition violated and ...
9
votes
1
answer
1k
views
Traceroute implementation in Rust
I made this simple traceroute implementation using the libpnet library, which sends ICMP echo probes with an increasing time-to-...
1
vote
1
answer
423
views
Testing a service that makes database calls, without a database
I'm working on a new service, for the past year I haven't needed to write tests from scratch. I've either been bug fixing, or adding features that require modification of tests, but not writing ...
1
vote
0
answers
940
views
Getting Video file path from uri
I am using below code to get a video file path from uri.
Need review for the following:
1.Code optimization
2.Crash(Code is working fine in the devices I tested but i need to make sure that it ...
4
votes
2
answers
635
views
3
votes
2
answers
651
views
Advent of Code 2018 day 1 part 2: find the first aggregated number that occures twice
I am using the coding puzzels of https://adventofcode.com for improving my F# skills.
Problem:
Day 1 Part 2:
Starting with frequency 0, a list of numbers should be added successive generating new ...
3
votes
1
answer
3k
views
Rehashing a hash table in c++ with quadratic probing
The code below is my attempt at trying to create a hash table. I'm currently stuck with the rehash function as I think it's not efficient enough (I believe it's O(n^2). I'd be grateful if someone ...
4
votes
1
answer
7k
views
1
vote
1
answer
81
views
Showing a message when the column is true
I'm making an app using Rails. I have 4 Boolean columns in a table like below, and I want to show a message if that column is true.
...
5
votes
2
answers
321
views
Count characters in a string
This code is supposed to count each character in a given string and account for error handling and type casting as well, and it should do it in the most efficient manner possible, with O(n) being an ...
2
votes
3
answers
963
views
Leetcode #91 - Number of ways to decode a string
I'm working on problem 91 on Leetcode.com called Decode Ways and I've successfully managed to get a working recursive solution but it results in Time Limited ...
3
votes
1
answer
184
views
Find the length of a frequency-change cycle (Advent of Code 2018)
I tried to do the second part of the 1. December challenge of Advent of Code in Haskell. I'm fairly new to Haskell but I have plenty of experience in other (procedural) languages. I struggled with the ...
2
votes
2
answers
120
views
Parse IP address from a GPRS module reply
I'm writing a parser to get the IP address from a string I get from a GPRS module. Examples of the string I get from the GPRS module:
+QIACT: 1,1,1,\"10.162.143.228\"\r\n\r\nOK\r\n
+QIACT: 1,1,...
1
vote
1
answer
342
views
Vector addition and Pythagorean Theorem code
I would like to share my code that is meant to help me add 2 vectors together. It is very simple and I would like to kindly ask you whether you could review my code. Also, I decided to keep separate ...