Tagged Questions
Add this tag to your question to indicate that you are new to the language of your code. This will often be taken into consideration by reviewers when assessing your code.
-1
votes
0answers
29 views
Check for appearance of specific string
My code is really simple, but it looks bloated and I think there is a simpler and more efficient way of doing this. I am a beginner, so I am interested in improving my skills.
...
2
votes
1answer
39 views
Poker Hand classifer part 3: Deck Object and 7 Card Hand
Part 1: Beginnings of a Poker hand classifier
Part 2: Beginnings of a Poker hand classifier part 2
I'm a beginner programmer, working on learning c# and object orientation and have been working on a ...
1
vote
1answer
49 views
Project Euler problem 2 in Haskell
I have just started Haskell, and I want to check if my code is following the spirit of the language.
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find ...
4
votes
2answers
240 views
CodeWars: Gap in Primes
I wrote a javascript code for finding the first two consecutive prime numbers (that doesn't have divisors except one and itself) with a specific gap between them. It works well but take too much time ...
8
votes
2answers
437 views
Python traverse a directory recursively and print contact numbers
I am writing a python code to recursively traverse a directory containing only text files and then print the 10 digit Indian phone number and all its variants. I am very new to python and I have ...
6
votes
2answers
56 views
Browser-based Mafia game in PHP
Because I'm rather new to PHP and Object Oriented Programming, I'm often looking for some practice. Thus I decided to focus on making a browser-based Mafia game that should work like a Dutch variant: ...
6
votes
2answers
122 views
Implementation of merge sort algorithm in C++
This is my implementation of "merge sort" in C++. I'm still a newbie at C++ so:
Have I understood how merge sort works and implemented it in the right way?
Have I used any bad practices?
How could ...
6
votes
2answers
415 views
Reading large amount of player properties from CSV
I have written a class with a function that reads out the CSV from the webpage and creates an object with it.
The class seems too big - it seems very unoptimized, prone to mistakes and it's not very ...
0
votes
1answer
49 views
Javacript code to flatten JSON via recursion with conditional logic
I'm flattening a JSON structure where objects have their interaction type appended at the end, for use in an HTML/PDF generated file. I have variable names for Checkboxes, Text inputs, TextCheck is a ...
2
votes
0answers
20 views
Responsive layout for showing/hiding 4 panels
I have 4 panels that will contains tables for data. There will be instances where a panel will contain no data, so I have combated wasted space with the code below. I'm relatively new to both jquery ...
5
votes
2answers
91 views
Using generic types for a custom mapper
I have a method which takes a certain generic object, which basically orders these objects based on a list of tags. Because I want to use this method for multiple objects, I have created a class which ...
2
votes
2answers
48 views
Locating people by roleId
Basically, I'm trying to find all active people with a roleId of 3 (analyst id). But I want to exclude ids that were created as test analysts, i.e. "130", "252", ...
1
vote
0answers
30 views
Angular MVC structuring and code usage
I use the following code which run OK with very simple Angular UI
that run intro page with form and when you click on button it navigate to another simple form to create data. since this is my first ...
13
votes
7answers
1k views
Binary Heap where a comparison delegate is used
I currently have a Generic Implementation of a BinaryHeap. It must be able to maintain it's integrity with elements that may or may not implement ...
6
votes
2answers
65 views
Sending a Torrent magnet link using the Deluge JSON API
I have built this script that sends a magnet link to the client. As I never ever had any proper programming lessons I would want to ask you if this approach is good, if I am missing something, There ...
4
votes
0answers
59 views
Dynamically creating login screen on Android devices
This has been an experience. I'm well above "hello world" java is not a language I use often when programming and I don't program too much. I find myself a lot on Google.... basically just about for ...
1
vote
0answers
15 views
SICP - exercise 2.5 - Represent pairs of nonnegative integers
Exercise 2.5. Show that we can represent pairs of nonnegative
integers using only numbers and arithmetic operations if we represent
the pair a and ...
3
votes
1answer
83 views
Calculating the angle between the clock's hour and minute hands with unit testing
I am learning PHP OOP and unit testing so I made a code using OOP and TDD approach where it calculates the degree of and angle betwee the clock's hour and minute hands.
I would like to know:
Is the ...
2
votes
2answers
85 views
Convert hours and minutes to total minutes
This is a simple exercise in C designed to work on IO. The purpose of the program is simple: convert a number of hours and minutes to a total number of minutes.
...
-4
votes
0answers
27 views
Im learning python and i am trying to make a Rock, Paper, Scissors program [closed]
It should work according to basic logic so I think it is a syntax error or perhaps I am missing something. The last logic part is not working I think. It omits all when it is only suppose to omit any ...
6
votes
2answers
148 views
Kinematic Equations
I'm learning the kinematic equations in Concepts of Engineering and so here are the equations I am learning:
To complete the lesson, I was told to create a Python program that outputs the horizontal ...
-3
votes
0answers
40 views
UnitTesting retrofit network call
I am testing the sync network call via Retrofit.
I wonder whether the test below is good enough to determine if a call was successful or not?
As I have never written a test before, I also wonder ...
5
votes
1answer
64 views
Number to Roman Numerals in Python
I recently started learning python.
Requirements
Input: Integer between 1 and 3999
Output: String with Roman numerals
I would appreciate it if someone could have look at the code and give me any ...
9
votes
5answers
1k views
Beginnings of a Poker hand classifier part 2
Part 1 - Beginnings of a Poker hand classifier
I'm a beginner programmer I've been working on a poker hand classifier to improve my object orientation and programming skills, I've improved and ...
1
vote
0answers
18 views
SICP - exercise 2.3 - Implement a representation for rectangles in a plane
Exercise 2.3. Implement a representation for rectangles in a plane. (Hint: You may want to make use of exercise 2.2.) In terms of
your constructors and selectors, create procedures that compute the
...
-1
votes
0answers
26 views
Swift 3 pod Alamofire 4.3 ObjectMapper 2.2 pod and AlamofireObjectMapper 4.0 [closed]
Here is the API response which I want to parse into the model file.
API Response: Link
...
8
votes
3answers
491 views
Read hex from file and convert to decimal
I made a small script to read text file that contain hexadecimal and convert to another file in decimal by using command-line as a filename input.
...
4
votes
1answer
39 views
JS Data Fetcher and Stripper for Statistics App
This is pretty much the first actual (not "hello world") program I'm writing. It's a rewrite of this app and my aim was to increase the fetch speed, and increase the cache storage efficency. I've more ...
5
votes
1answer
54 views
C program for whitespace normalization
I have made a beginner program using C that uses file handling and formats the given file. Formatting includes removing trailing blank spaces, replacing one or more blanks by a single blank and also ...
6
votes
4answers
583 views
Beginnings of a Poker hand classifier
For practicing/learning object orientation, I made a Card class and am practicing doing stuff with it such as shuffling decks and dealing hands etc...
I have a ...
0
votes
2answers
57 views
C++ binary search tree with templates
I implemented a binary search tree with methods of insert, search, size and print using the << operator. All the methods works with ...
-2
votes
0answers
17 views
Adding wrapping tags before and after a specified tag via query [migrated]
I've recently started a course on jQuery and wondered what's going wrong with my code. I'm wanting to add an opening li before each "wcprow" div and closing the li after the closing div... so it looks ...
9
votes
2answers
598 views
Number to English word converter
This is a simple program that I wrote. It takes a 64-bit unsigned int as input and returns its English name.
...
2
votes
1answer
76 views
Generate the alphabet and select only specific letters
I am learning java and would like to create a very simple application but which uses SOLID principles.
The required functionality is: generate the alphabet with a possibility to select specific ...
5
votes
2answers
65 views
Parsing the lsblk output
I am a Python beginner learning Python 3. I have written two small functions that parse the lsblk output and return Linux physical and logical disks. Here is the first function:
...
2
votes
1answer
44 views
HashCash Algorithm header generation in Haskell
A thought exercise on my part as I'm relatively new to Haskell. I wanted an interesting project to work on so I decided to implement the Hashcash Algorithm, which is most commonly used as the basis of ...
2
votes
1answer
34 views
Arcpy script to check for TIFF files and add them to different lists
My script goes through sub folders in my main directory and based on a wildcard checks if a tiff file exists or not, if it exists then the file path is appended to the corresponding list. For example, ...
7
votes
1answer
76 views
+100
Settings JAVA_HOME with Powershell
Previously in the Settings JAVA_HOME with batch post, I had created a script in bash to change my JAVA_HOME env variable. Since then, I have been trying to use more ...
0
votes
1answer
64 views
A quartic polynomial in four variables, for numerical integration
About half year ago, I derived a integral of a piecewise polynomial, which was a complex formula. Below is one of that formula:
Obviously, the above formula has relationship with four varibles \$u_i,\...
0
votes
0answers
21 views
table for scattergories
Scattergories program
This is a simple table, I wrote it with the purpos of scattergories.
I would like to know how to make in more efficent because I'm sure it's really bulcky...
Sorry for bad ...
1
vote
1answer
40 views
Codewars Challenge Kata
I was recently doing a challenge on Codewars and this is what challenge said:
There are no explanations. You have to create the code that gives the
following results:
...
4
votes
2answers
69 views
Password generator in Django
I am a system admin, not a developer, so this might be pretty horrible code. This is a password generator. The point of the attempt was to become more familiar with Django at a lower level. I current ...
-1
votes
1answer
52 views
Patten matching to check for non-empty argument list
I'm learning Elixir.
while building a trivial cli application (as seen here http://asquera.de/blog/2015-04-10/writing-a-commandline-app-in-elixir/) I'm defining a module that implements a ...
6
votes
4answers
372 views
Simple Oracle connection using JDBC
I'm trying to continue the learning process in Java, and I've made a simple yet useful class which will allow me to retrieve the data inside a table from an Oracle DB, using JDBC.
What I'm especially ...
3
votes
1answer
67 views
Text based game
I've made quite a long text-based game which I'm quite proud of and would like to know ways in which to improve it! I plan to keep working on it and make it much longer and more complex!
Main:
...
4
votes
1answer
63 views
Print fragment of multiplication table
I am learning Python online on Stepik platform, and unfortunately I don't have any opportunity to get reviews from the tutor. The platform only checks the correctness of the answer that my program ...
5
votes
2answers
252 views
Print some elements from input
I am studying Python, so it is very easy task. I want to get best and most elegant way to solve each simple task.
The task is:
Write a program that reads the integers from the console one number ...
3
votes
1answer
36 views
REST Server for Users using Restify and Mongoose
I am creating a REST API to access a database of users. I am new to Node.js and developing REST APIs in general. I am also trying to use best security practices.
main.js
...
4
votes
0answers
27 views
F# implementation of the A* algorithm round 2
This is my second attempt at implementing the A* algorithm using F#, the first one is here.
What I changed:
I removed the Node class and added two records named ...
3
votes
1answer
50 views
F# implementation of the A* algorithm
This is my first attempt at writing something useful in F# and in a functional way in general. I would appreciate if you could point out any issue, even details, as I'd like to put all the bad habits ...