All Questions
1
vote
0answers
6 views
Simple top down shooter game
This one of my first Python games in PyGame I decided to make for fun. Basically, you control a from top down perspective and shoot people in a maze.
This is the rewrite of the original code, and I'm ...
0
votes
0answers
5 views
Can anyone tell me why this python code works on my Linux machine but not my Windows machine? [on hold]
I'm new to programming and I have started learning Python. I am trying to write a small script that downloads .exe files from the web. The code seems to work on my Fedora 23 machine (running python ...
2
votes
0answers
10 views
T-SQL Secure String Comparison
The previous version of my function was scalar-valued and employed a WHILE loop to do the comparison, this is SLOW. This new version is tabled-valued and uses a typical tally table in place of the ...
1
vote
0answers
8 views
Merging two multidimensional associative arrays
I just wrote a function that will loop through two multidimensional associative arrays and merge them together based on the key names and their values. While I'm satisfied that this function works, I ...
-2
votes
0answers
11 views
Will omitting “ThisWorkbook” object cause ambiguity in default values for “Sheets”? [on hold]
I have this block of code that uses a With statement to apply to the Sheets object three times:
...
3
votes
1answer
16 views
Adding or replacing a sheet in an Excel file
I have the following function and want to simplify the code to make it more readable by eliminating redundant lines:
...
4
votes
3answers
47 views
Check a string's format using ternary operator
This code checks if string has correct format for passing to struct. Correct format needs to be [123456789'\t'First Name'\t'Last Name'\t'City]. I didn't know how to ...
-2
votes
0answers
10 views
Cannot figure out issue [on hold]
New to coding here. Really new (About a week)
So in C, i am writing down this program -
...
-4
votes
0answers
12 views
What is a good way to fix my logic [on hold]
I have to write a code that converts infix to postfix. I am having trouble sorting out the logic to do so. Here is my current code:
...
0
votes
0answers
11 views
SKlearn model wrapper
I want to make a simple wrapper for sklearn models. The idea is that the wrapper automatically takes care of factors (columns of type "object") replacing them with ...
-1
votes
0answers
16 views
Collision point of a dynamic circle with a static one [on hold]
I am working on a program which needs to simule a collision between two circles. In the case of a circle A moving toward another circle ...
-1
votes
0answers
13 views
1
vote
1answer
24 views
Compare data within an interval and draw rectangles accordingly
I have an interval array like below:
var interval = [[1], [1,3], [3,5], [5,7], [7,9], [9]];
I want to compare an input value say 1.5 with in the interval, and ...
1
vote
0answers
21 views
Select fields from a form by ID or Xpath and fill its value
I'm writing a program/tests in C# using Selenium and Chrome web driver. Everything works well, however I would like to simplify the code and make it object-oriented. I thought about extracting some ...
2
votes
1answer
19 views
Comparing course groupings to completed courses
I'm trying to do some basic math comparing some course groupings to completed courses. The original code shown below seems huge and maybe not pythonic?
I'm trying to write better view code then what ...
4
votes
2answers
23 views
Storing disassembled data in a structured way
I want to store the information returned by the dis function of the dis module in a structured way, using a dict, associating the mnemonics of each code of a line to the correspondent line number.
...
2
votes
1answer
31 views
My spaceship is slow to explode after being hit by the asteroid
I am making a game for my computer science class. And my professor's requirements is:
Write a Processing program that draws a triangle in the middle of the window.
Rotate the triangle when the left ...
1
vote
0answers
15 views
Mapping and sorting lists of Haskell tuples
I'm a newbie with Haskell and I'm trying to learn the language and its idioms while working through a small data analysis project. The first step of my analysis is to take a very long list of data, ...
0
votes
0answers
11 views
Claims athorization service usage increment 2
Is the following API of a claims authorization service ok, from the point of view of usability?
...
1
vote
1answer
14 views
Retrieving access token from SharedPreference
Here is code that retrieves an access token from SharedPreference.
...
-1
votes
1answer
11 views
Clearing Input stream (stdin) in C [on hold]
The following code is used to clean the input buffer while accepting successive user inputs.
...
-3
votes
0answers
10 views
Excel VBA — If Conditional Formatting Color = x, Display Output Y in different cell [on hold]
I have a dataset with approximately 100 conditional formatting rules, which when triggered cause a cell to become shaded red.
I am trying to create a VBA function that outputs the word, "FALSE" in ...
0
votes
0answers
5 views
Streaming of songs takes longer time in android
I want to stream songs, so for this purpose I have been coded this until now. But the problem is it takes much time.
...
4
votes
1answer
26 views
A reusable AJAX polling function
I have written a small JavaScript function which performs an AJAX request every x seconds.
I was hoping some of you could give it a look over and give me any pointers on redundant code or bad ...
2
votes
1answer
15 views
In matrix of sub-matrices, select diagonal indices of off-diagonal submatrices
Let's say I have a square matrix of size (n*m) x (n*m) that is composed of n x n sub-matrices, with each submatrix being a square of size m x m.
I want to select the diagonal indices of the ...
3
votes
1answer
24 views
Choose Your Own Adventure text game
I have made a CYOA (Choose Your Own Adventure) game which you change the game based on the choices you make.
I would like to ask some experts, if the code is clean and if they have any suggestion, ...
0
votes
2answers
53 views
Double linked list c++
I'm trying to figure out double linked lists. I'm looking for any type of comments you might have for my code. Anything that will make it better.
...
1
vote
0answers
16 views
Property validation
I require that the Feature set of my Licence to have a non-empty intersection with a set of features that the module I am loading contains. I expect other lists in my License to form similar ...
1
vote
1answer
13 views
improvement of a database register function
Here is a function in a django rest api, that takes data in json and registers a category for a given website. I'd like to merge two try...except parts that check ...
4
votes
1answer
70 views
A curry function
I am new to the functional style, and I wrote a curry function to practice this new style. This curry function takes a regular function and returns the curried version of it. Currying is a technique, ...
-4
votes
0answers
21 views
Random Number Generator PYTHON [on hold]
I've written a code, but I can't figure out where I've gone wrong. Can someone help? Thanks a million.
CODE -
...
2
votes
1answer
58 views
Function that divides money with regard to the smallest denomination
I'm writing a function divideMoney that takes the value of a sum of money and divides it according to some percentages, then rounds each division to the nearest ...
3
votes
2answers
293 views
Web dashboard using many REST API requests
I have created REST API in codeigniter. REST sever created in codeigniter 3.0 and REST client created codeigniter 2.x.x.
I have wrote simple code for login. After login client created dashboard ...
4
votes
1answer
299 views
Time limit exceeded for java “insertion sort linked list”
I was working on LeetCode to practice myself with Java programming. I encountered a question about insertion sort a linked list. My code currently runs correctly, but it failed on an instance with ...
4
votes
2answers
55 views
Electrocardiography simulator
I am tring to learn coding in clear way. I developed easy application to simulate EKG. I would like to ask some experts, if the code is clean and if they have any suggestion, what could I improve. ...
2
votes
2answers
52 views
Insert rows in the datagridview with a dictionary
I would like to improve the function below without calling twice InserisciRigaNote.
Before I fill my dictionary. When I compare ...
-1
votes
0answers
19 views
Data Migration in Java [on hold]
I'm currently doing a small data migration. I need to connect to SAP to get some data, make some modification, and then insert it into our DB. I've written some java code which would help me ...
2
votes
1answer
13 views
Rendering comments in a Backbone view
I want to make show/hide logic more maintainable in my codebase.
Because they are too faraway located in separate js files, it hard for people to maintain.
The flow in my codebase is:
...
2
votes
0answers
22 views
Application for encrypting and decrypting files in Java - follow-up
(Everything needed for running the app is here.)
I have refactored my previous version a bit.
App.java:
...
1
vote
1answer
39 views
2
votes
0answers
20 views
Attempting to obtain recursive web data-mining using an external file in Perl
Question
I am looking for a way to modify my current "Script" to read an array, as a list in a text file (each hyperlink separated by returns within the same file, as seen in the "Additional Info" ...
-2
votes
0answers
9 views
When i outline my code it shows the section as untitled [on hold]
When I outline this code my section element is showing untitled, I do not want it to be untitled, help please?
...
5
votes
1answer
50 views
Object factory from interface types
I have a library that defines a bunch of ISprite interfaces, like IPieceSprite and ...
9
votes
1answer
354 views
Hangman learning AI
I have been learning AngularJS and have written my first app. It's a Hangman AI which learns words and guesses the solution based on the words it knows.
Please look over my code and provide some ...
5
votes
3answers
316 views
Parsing a complex number using regular expressions
Requirements were to create a constructor for a complex number, that receives a string. For example: \$3+5i\$. The regex extracts positive or negative numbers from the string with optional decimal.
...
1
vote
0answers
43 views
Email text parser
I am writing a parser to parse out the fields of an email message in the following format (note that I expect that the "To:" field could contain multiple lines, same with the "Subject:" field.
...
2
votes
0answers
23 views
Displaying a Google map with multiple complex markers and unique info windows
This JavaScript file is part of a large Ruby on Rails app. Any feedback is appreciated.
...
5
votes
1answer
35 views
Multilanguage class that detects and sets language
I have been learning object oriented programming for quite a while. I understand many concepts about it but I quickly realized that I made a big mistake just reading theory and not doing any actual ...
-1
votes
0answers
17 views
AutoFill WinForm by Paste from an Excel Row [on hold]
I tried my best to find a better way to copy a data row from Excel, and have the user paste it directly in the WinForm by a click of a button. The following function can be called from any suitable ...
4
votes
1answer
37 views
Input iterator in C++
For educational purposes and to understand how iterators are working in C++, I've create an input iterator and I would like others to look at and provide any feedback on my code.
...