All Questions
-1
votes
0answers
19 views
1
vote
0answers
8 views
Interprocess CancellationToken
I have a situation where I have a program will start up another program and it will do some work. I need to be able to stop this work if certain conditions arise. I want to use a CancellationToken ...
3
votes
1answer
12 views
Custom collection implementing IList<T> saving current, next and previous element
I'm developing a Tic Tac Toe game where you can change your pawn look
Now as You can see it has 2 buttons one for next one for previous, and You can also pick if you want to edit the O or the X ...
0
votes
0answers
7 views
Finance Manager
Somewhat experienced with javafx, but this is my first potentially large javafx project that I recently started and wanted some feedback on anything that could be done better or more efficiently thus ...
0
votes
0answers
3 views
Download all the files / folders from an FTP with vb.net [on hold]
currently my program can download only the files and folder if a plant is part of the lot. I can not have my ressoudre problem so that it downloads files & folders. Thank you in advance for your ...
0
votes
1answer
14 views
String hash generator
There is a lot of code duplication because it generates hashes using multiple cryptographic hash algorithms.
How can I improve this code?
...
3
votes
1answer
14 views
CSV concatenator
I have the following code (running in LINQPad) which takes tens of thousands of CSV files and concatenates them to create a single file.
Each CSV file has two lines: a header line and a data line. I ...
0
votes
0answers
8 views
Reimplemented QAbstractTableModel::setData
I have subclassed Qt QAbstractTableModel with QJsonDocument as data source which I have reimplemented the ...
2
votes
0answers
14 views
CSV file parser and compare
This may seem like a lot of stuff? I just need help with 2 small parts the code works, however I have provided the rest of the info in case some one can help.
Code below is responsible for comparing ...
1
vote
1answer
15 views
Phone number/email regex verifier
Is there anything I can do better here? I tried looking for ways to simplify this with comprehension but could not figure out how and was told it is better to explicitly use ...
1
vote
0answers
21 views
Factoring a polynomial with integer coefficients
I haven't programmed in a while and need to improve my code in any way possible: efficiency, readability, etc. This program is for getting integer coefficients of any polynomial and factoring: ex.
$$ ...
1
vote
1answer
20 views
Program for binary to decimal and vice versa
I started to learn C a week ago and this is my culminating program of what I've learned but I could use a few pointer.
...
0
votes
0answers
10 views
Simple factory for CRUD operations on Sqlite using Javascript and Q
I have written this implementation and I would love to make it more efficient.
While I am indeed requesting a code review/suggestion, I would also love to get feedback on readability and coding style....
0
votes
0answers
6 views
IntentService to perform Asynchronous Retrofit 2.0 request
I'm planning to use a IntentService class to perform all my server request using Retrofit 2.
I just want to make sure it's thread safe and accurate since all my ...
0
votes
0answers
9 views
case class marshalling in spray-json
I have a case classes hierarchy. I want to define abstract format method in parent class to ensure that all my case classes will be serialized.
...
2
votes
3answers
45 views
1
vote
1answer
64 views
Pokemon search engine
I am making a simple function to find and match any possibilities what Pokémon the user wants. This is accomplished by taking in the input (what the user thinks the Pokémon is named) and compare its ...
0
votes
0answers
9 views
Login and Pay with Amazon [on hold]
Right now i have integrated Login with Amazon using the below code where it pulled out name,email,customerId like this :-
...
1
vote
1answer
20 views
Idiomatic F# unit test using xunit and unquote
I'm writing some unit tests for testing C# code but I'm using F# and Unquote for the first time for the unit tests and would like some input as to how I might make the tests more 'f-sharpier' to take ...
2
votes
0answers
22 views
Strongly connected components in a graph: Kosaraju's algorithm
I implemented Kosaraju's algorithm on a graph with 800k vertices and 5100k edges.
The time taken by various operations are:
building graph took 11.84 seconds
ordering took 2.54 seconds
...
6
votes
1answer
44 views
Checkers moves using union types
How do I refactor common code with different union types?
I'm still struggling with refactoring F# code with different types but same behavior.
I have the following function that I would like to ...
1
vote
1answer
60 views
How to keep game code organized
What are the best practices to writing clean, expandable game code? I always end up getting overwhelmed with my games because the code gets very unorderly. I use OOP (java), but I still feel like my ...
-5
votes
0answers
14 views
when click on Datagridview button then PDF file is open [on hold]
when i click on datagridview button then PDF File should be open.
Here the design of My Form ]1
0
votes
1answer
28 views
-2
votes
0answers
20 views
How can I speed up the following function in R?
I wrote the following function in R. I want to iterate it, say 50000 times. I used "sapply" in my function but it runs slowly in R.My PC is still working about 20h now and I have no idea about the run ...
6
votes
3answers
566 views
Determine if a file is either in JSON or XML format
The purpose of this function is to determine if report_input_file is either in JSON format or XML format, this is what I came up with, just want to know if this is ...
0
votes
1answer
42 views
CRUD code for a finance WebForm
I have a finance web-application in ASP.NET WebForms using Telerik RAD controls. Two event handlers wound up being very similar in implementation.
What steps could I take to improve the organization ...
2
votes
2answers
30 views
Intel® TinyCrypt: AES-128/CTR to encryption/decryption of 2D arrays
I need to encrypt/decrypt 2D arrays (double pointers) using AES-128/CTR using Intel TinyCrypt (written in C). The following are two helper methods to simplify the library usage. Any comments would be ...
4
votes
1answer
54 views
3
votes
2answers
41 views
C++ Mergesort Implementation
I am currently in the process of learning C++. As such, I am making small programs to get more comfortable with the language. One of these programs is a small mergesort function with a basic wrapper ...
0
votes
1answer
23 views
Generating variables to be named, filled in and operated on the fly in python
I am very new to python and trying to refactor my code which is ripe for error.
Currently I manually name a bunch of arrays:
...
5
votes
1answer
46 views
Generating a sequence of MAC addresses
The following code will generate a sequence of N mac addresses based on the input from user. The input must be atleast one octet to generate the sequence , ie :
...
-2
votes
0answers
21 views
Adding additional data to buniess model [on hold]
I have problem with extending classes used business logic and pass them to another systems. For instance I have RetailOrder class that is model for order processing classes. It holds ids of articles, ...
3
votes
2answers
348 views
Memoization with factorial in Python
I wrote a Python module to learn about memoization, and I have some questions on what I did.
How pythonic is this?
Does it make a difference if I used a class attribute instead of a function ...
2
votes
0answers
28 views
Interop between C++ and C# via C++/CLI with callbacks
I want to use an existing C++ library in a C# app. The C++ library will have async callbacks for things like OnConnect and user updates so I want to reflect this in ...
2
votes
0answers
16 views
Generating public/private RSA key pair programmatically, using it for JWTs
In my app I'm using JSON Web Tokens for authentication purposes, using the pyjwt library. Instead of using static keys and/or worrying about key distribution, the server generates a public/private key ...
2
votes
1answer
192 views
2
votes
0answers
26 views
Hackerrank Simple Text Editor in Swift
I solve this problem in Swift. However, some cases I got terminated due to timeout because the solution isn't efficient enough. I did check the solutions and they are correct. Any tips on making it ...
0
votes
0answers
17 views
Does the Update Statement target the nested query in the middle [on hold]
My question is would the CoverageGeom in FeatureExtraction.dbo.ProfileAreas in the innermost nested select be updated according to the join in the innermost select with the outer selects code change? ...
0
votes
0answers
17 views
A (possibly) great Polymer autocomplete widget
I have just finished writing this:
https://github.com/mercmobily/hot-autocomplete
This is the source at the time of me writing this post:
https://github.com/mercmobily/hot-autocomplete/blob/...
4
votes
0answers
18 views
Simple Web Analytics Logger
I've been learning Go for a few months and this is one of my first projects with it. It's an analytics beacon for my low-volume blog; it emits a tracking pixel and logs parameters from the browser to ...
2
votes
1answer
49 views
Create Database Connection and run the Insert,Delete,Update queries Class in C#
Recently while developing our demo project I had to a write a lot of repetitive code for executing the database queries(Insert,Update,Delete). So, I have put all the repetitive code into a class ...
-2
votes
0answers
9 views
Why I'm getting segmentation fault (core dumped) for higher inputs in primitive calculator using DP? [on hold]
You are given a primitive calculator that can perform the following three operations with the current num-
ber x: multiply x by 2, multiply x by 3, or add 1 to x. Your goal is given a positive integer ...
2
votes
1answer
7 views
Shell script wrapper for Docker build and run
I have written a simple wrapper for docker build and docker run that allows me to build and run my image without having to use ...
1
vote
0answers
37 views
REST web service to interface with a customer database
In what ways could I improve this? Does it look good? Any security concerns? I am using Jersey, Jackson and JPA. What about the architecture? I basically have ...
0
votes
1answer
28 views
List and post tasks with jQuery
I've written the code below to display a list of tasks from a Flask API. The form and associated .ajax method post to the API, immediately appending the data to the list of tasks. The code is working, ...
0
votes
0answers
6 views
Retrieving data from MySQL database to display in Google-Maps infowindow [on hold]
I'm using Google Maps API V3 to make a map where people can click to add a marker and save a form in the infowindow that pops up. This data is then stored in a database, but I don't know how to access ...
-1
votes
0answers
12 views
Reactjs + Redux Am I on the Right Path? [on hold]
I am learning Reactjs + Redux and been watching some articles and videos. It seems like everyone does it a bit differently so I decided to just dive in and see how it goes.
Wondering if what I have ...
1
vote
1answer
37 views
Pixel manipulation performance
I have created a function that adds "shadow" to the content of a canvas. The algorithm for adding shadow follows these rules:
If the either x or ...
4
votes
0answers
12 views
Python wrapper for Instagram API
This code wraps the user endpoint and media endpoint of Instagram API. Any best practices/ styles or glaring bugs you can see? I wrote some unit tests for each class but did not include for ...