0
votes
0answers
5 views

Reusable Properties File Reader

I have implemented a properties file reader. The goal behind creating the properties reader is to cater to different application teams to import the class and read the properties in their projects. ...
-1
votes
1answer
11 views

Refactoring angular code

I am a newly developer in angular. I want to do some homework to create forms with Angular. I spent nearly a week to do it, but my teacher was not really satisfied about it. I tried to follow some web ...
0
votes
0answers
7 views

Acquiring payment service ID

I have a utility class, called Bills, that extracts some information from a billId and a ...
1
vote
2answers
13 views

Script for removing empty rows in a sheet

I often receive Excel sheets (with empty rows) which I've to process as a pivot table. Because pivot tables don't allow empty rows, I've made this script. Any feedback is welcomed. ...
-3
votes
0answers
7 views
-2
votes
0answers
8 views

How can I convert my react-native code to use a listview? [on hold]

So a lot of people online and offline tell me that using a Listview is the most performant and I've never really understood how it works. I have instead used a ...
1
vote
2answers
9 views

Selection sort algorithm in Rust

I am just trying to use Rust so I will be thankful for all remarks and corrections: ...
0
votes
0answers
8 views

Distinct List of attribute values from XML, using a pre-defined set of attribute names

I have an XML stream that looks like the following (attribute and node quantity , and node depth reduced for demonstration purposes.) ...
0
votes
0answers
10 views

Returns an IEnumerable using Linq-to-SQL which is then bound to a GridView. Horrible performance

So, this is my function. It works, but its really really slow and the generated SQL is gargantuan and horrible to look at. It's also very expensive to run when it shouldn't be. ...
0
votes
0answers
7 views

Stacked bar charts using python matplotlib for positive and negative values [on hold]

I am trying to plot a stacked bar chart with python Matplotlib and I have positive and negative values that I want to draw. I have had a look at other posts talking about how to plot stacked bar ...
2
votes
0answers
12 views

Pokemon stats calculator

I have a simple working (so it's not a hypothetical stub) framework for calculating Pokemon stats that will later be incorporated in a game. It uses the LCRNG from the first game in order to be as ...
2
votes
0answers
7 views

Print Trace Debugger

See my Scala print trace debugger. This project is used for lightweight debugging sort of like the Haskell Debug.Trace module. The README, the documentation, and the test cases need work. To test it ...
-1
votes
0answers
9 views

Trouble using image Array for src [on hold]

Trying to shuffle an array of images, then display them one at a time by clicking the canvas. The full code is below: ...
1
vote
0answers
18 views

XML parser for multiple browsers

I made a basic XML parser that is supposed to be working in many browsers by using most older functions. What it must do is return an AST (Abstract Syntax Tree) of a XML text in a string. (it's not ...
2
votes
2answers
16 views

Max heap implementation in Kotlin

I wrote this class a while ago to learn Kotlin and heaps, so any tips (on either my code style or my heap algorithm) would be appreciated! ...
-2
votes
0answers
17 views

Function takes a list and returns true if any item in the list passes predicate test

The function: I have completed a function that takes a list and returns true if any item in the list passes the predicate test. If a predicate test is not given, the function will return true if any ...
0
votes
0answers
11 views

Web-scraping library

Here are two functions that make a request for a given URL and then takes the response body (HTML) and loads it into the cheerio library: scrapeListing.js ...
0
votes
0answers
8 views

Bootstrap site container width overflowing on mobile [on hold]

I'm not sure what's going on with my site...I've got it working perfectly on 'desktop', but can't for the life of me figure out what's going on with the width on mobile and how to fix it. The site is ...
0
votes
0answers
4 views

Code kata featuring: fetch, promises, Array.sort, Array.reduce, Array.map, String.localeCompare

I just finished a kata and would love to get some constructive feedback regarding code quality, readability, organization. Objectives fetch members of polish parliament (poslowie) group them by ...
3
votes
0answers
12 views

Seeding a database

I'm seeding my database with really complex code as I think. It works but is not good. Constrains: Every meal has exactly ONE main dish (marked as is_main in ...
1
vote
1answer
13 views

Multiple emails and attachments, reusing memory stream

I am generating a pdf form based on user input from an MVC website form. The pdf is genrated using the Foxit .NET SDK, then attached to three separate emails, generated using Postal. It has been ...
2
votes
0answers
16 views

Event delays for a Monogame project

I am making a GUI for my C# Monogame project. So since this was the first time I ever made a GUI that is not winforms-based I took a wrong approach in making it and thus I decided to change it ...
-5
votes
0answers
19 views

Solve Caesar Cipher using Ruby [on hold]

I am new to the Ruby community and would like to advice/help. I have been stuck for so long on this question I need some serious help. I have to write a function to solve a Caesar Cipher. I must do ...
3
votes
1answer
113 views

Simple Hangman game in Python

I recently started learning Python, and made a simple text based Hangman game. I wanted to know if there could be anything done to make the code cleaner or more efficient. ...
2
votes
2answers
43 views

Reading file into structure

At the time I'm trying to read a quite big file into a C program for later user. The file size is in the range of 800 megabytes containing around 20 million lines of data of the following format: ...
2
votes
1answer
47 views

Lazy prime number generator

There are multiple Project Euler problems (e.g. 7, 10) that deal with prime numbers. I decided make a reusable solution that could be used for most of them. I wrote a method to generate an infinite* ...
0
votes
1answer
18 views

Do CriteriaQuery code more readable and elegant

I wrote the code and would like to change it to more readable and elegant: ...
0
votes
0answers
4 views

Designing in MongoDB [on hold]

I'm designing a simple "social network" with MongoDB. And I am wondering if what I did so far is OK or not, and some cons. The idea is, lets suppose: ...
-4
votes
0answers
17 views

Does this “Charge Account Validation” look accurate? [on hold]

Constant Integer SIZE = 18 Declare String account[SIZE] = "5658845", "4520125", "7895122", 8777541", "8451277", "1302850", "8080152", "4562555", "5552012", "5050552", ...
3
votes
1answer
18 views

Putting a matrix from a text file into a list

I'm trying to read a text file with matrix and put it in a list, but I am using two loops here and I want my function to be faster. ...
8
votes
3answers
393 views

“Magic Squares” assignment

The assignment is to take a "Magic Square" .txt file (where the horizontal lines, vertical lines and diagonal line all add up to the same number), read it and prove that they are in fact magic ...
0
votes
0answers
9 views

Best Pratice to write Button.setOnClickListener in Android [on hold]

I am starting with android and I have seen couple of different approaches to set onClick event. First one is to set method name in XML itself ...
-1
votes
0answers
12 views

Java Singleton design pattern [migrated]

Can someone explain how my Junit passed successfully with below singleton implementation EagerInitializations.java (singleton) ...
0
votes
0answers
5 views

Improving the performance of web scraper using BeautifulSoup

I am using python3 with Beautiful Soup to scrape web site, I also used Thread to download images, but it will spend more than 30 minutes to get all information and download relevant images, how can I ...
3
votes
1answer
46 views

Vertical Text Printing (Java)

I was trying one of the problems found on HP Codewars 2007: (2) Task Description: The CodeWars judges and scorekeepers need help printing the team names above each column on our score sheet. ...
-1
votes
0answers
18 views

Show each three word using pointers [on hold]

The user enters a string from the keyboard - a proposal with spaces and punctuation up to 100 characters. Show e three words. ...
1
vote
1answer
22 views

Find all instances of a given weekday in February for a given year

A friend of mine was practicing his programming skills with a textbook meant to prepare students for computer science exams. He asked for help with a specific task. The task is to capture user input ...
0
votes
0answers
36 views

Pass several classes as one parameter with Poker user controls

I have two classes that hold some info about the user. One holds the data, the other one holds the controls info. Now I need to pass both of them as a parameters to a method. However they are ...
3
votes
3answers
128 views

Selection sort algorithm

I am just trying to use Go so I will be thankful for all remarks and corrections: ...
0
votes
0answers
8 views

JUnit @Rule ExpectedException [migrated]

I have been trying to use the JUnit expected Exception to validate my own exceptions for an application, however whenever I try to use this the compiler complains that there is an uncaught exception. ...
0
votes
1answer
32 views

Declare variable to hold the result before checking the status

For some reason declaring "ApiResult" before checking if the answer is in a correct status doesn't look good. I wonder if there is any better way to check the status and return the result: ...
2
votes
1answer
18 views

Replacing XML tag values

This function replaces some XML tag values. The tags appear in the XML exactly once.I want to know if this can be done in a better way. ...
2
votes
0answers
22 views

Bashscript - Find and run main.py file (part of vim-Python IDE)

I try to get into Python and thought I build together my own IDE. Most of it consists of different addons for vim and changes in the vimrc (which of course I simply copied of google), but I also ...
0
votes
0answers
27 views

Webpack code splitting with emphasis on small size

I am using Webpack to create sort of loading sequence of the application. This is approach I came up with. I can simply call prepareInfosite().render() and I don't ...
-1
votes
0answers
30 views
-1
votes
0answers
15 views

Copying one list to another [on hold]

I am copying one ArrayList into another using an iterator: ...
-1
votes
0answers
17 views

Node.js, Angular 2, and PassportJS Seed Application [on hold]

I wrote a seed application to help developers get started using Node.js, Angular 2, Polymer web components, and PassportJS to form a basic OAuth user driven login site with Angular 2. The demo site ...
0
votes
0answers
8 views

PHP detect group members [on hold]

Please tell me where my errors are/how to achieve my goal. I am trying to find all users with group "group". Code: ...
-1
votes
0answers
18 views

HTML single page layout

This is a single page HTML/CSS layout. This is my first ever code and I know it's not perfect, but I would love for someone with a lot more experience to let me know of my mishaps. ...

15 30 50 per page