-1
votes
0answers
10 views

calling local javascript in html [on hold]

I am a newbie of web; and I've tried to create a html site calling javascript. However, the javascript doesn't seem to be activated. Am I calling the javascript in a right way? I had searched google, ...
1
vote
0answers
8 views

Calling many web services asynchronously

I need to process a bunch of completed orders (thousands). To make it faster, I'm using a SemaphoreSlim to schedule a number of orders to be processed in parallel. ...
-3
votes
0answers
17 views

C++ Faculty/Student managing program compiles, but nothing happens at runtime. Possible txt file loading issue [on hold]

https://gist.github.com/Sarahbravo/4e8104480b5285314f37 That is my code. It compiles, but nothing happens when it runs--I worry it is an issue with loading the txt files. Can someone take a look for ...
-1
votes
0answers
9 views

What is a good design pattern for generating an Excel (xlsx) file in code? [migrated]

I occasionally have projects where I have to output some data as an Excel file (xlsx format). The process is usually: User clicks some buttons in my application My code runs a DB query and ...
6
votes
2answers
232 views

Managing student budgets

I have just started to play around with C++ and I want to make my code efficient and clutter free. Please critique this code constructively and give feedback that will help me in my programming ...
6
votes
2answers
124 views

MySQL class to add user/database

I'm creating tool to add new virtualhost on UNIX-box. One of tasks is to add a new user and database to MariaDB (aka MySQL) server. In fact - this my first 'real' attempt to use OOP. Here is class, ...
2
votes
1answer
40 views

Concurrent Linked Hash Set

Basically I want to create a concurrent LinkedHashSet which returns proper size too. I am mainly concerned about adding and removing iterations. Suggestions ...
3
votes
2answers
61 views

Project Euler #10 - summation of primes

(From Project Euler) The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. Can someone please help me improve this code? ...
4
votes
2answers
109 views

Converting multiple query to use parameters to avoid SQL injection

I have some dropdownlist in my aspx page and I am using the choices from them in my SQL query: ...
0
votes
0answers
8 views

Simple class container for hdf5 files

I implemented a simple class container for hdf5 files in matlab. The situation is as follows. Measurement data is safed in hdf5 ...
6
votes
3answers
272 views

Removing the largest values encountered so far in a list

The problem is, in summary: A set of values will be given. Whenever the input is -1, the largest number from the values inputted until then needs to be printed, and is then deleted. Here is the ...
3
votes
3answers
166 views

Australian income tax calculator

I'm looking for some feedback on my first Javascript app. I've build an app that calculates tax for Australian tax payers. Would be great if someone could have a look over the code that I have ...
0
votes
0answers
10 views

Techniques to optimize this stored proc to generate a sales report?

I need to optimize the following stored proc. Please let me know of any techniques or modifications that I can make to optimize this piece of code. The procedure is for a report that needs to run ...
6
votes
6answers
974 views

How to simplify this if else statement?

How would you simplify/improve the readability of this code? Because even after my attempt to improve the readability I think it still looks messy. ...
1
vote
1answer
39 views

Service class that handles form validations

I've made a (service) class to handle all form validation of my application. It contains a set of frequently used validation callables extracted into private methods that I use to build each ...
3
votes
1answer
27 views

Keeping UI code DRY in iOS projects

I've subclassed UI button and used it in my View Controller's viewDidLoad method, like so: ...
0
votes
1answer
22 views

Possible cross site scripting vulnerability caused by url_with_protocol [on hold]

I used pullreview to review my project. It came back with a security concern ( Possible cross site scripting vulnerability) on this line: ...
-1
votes
0answers
14 views

Refactoring a multi-thread asynchronous application [on hold]

I'm trying to refactoring a multi-thread asynchronous application. I have a class the every time that the application launch particular event(they are generate from external devices) it launch a new ...
5
votes
1answer
140 views

Cast a raw map to a generic map using a method, cleanly and safely in a fail early manner

Casting, instanceof, and @SuppressWarnings("unchecked") are noisy. It would be nice to stuff them down into a method where they won't need to be looked at. ...
-1
votes
0answers
5 views

a view returns system.data.entity.dynamicproxies [on hold]

i beginn in asp.net Mvc. I want to return view of question with the answer. this is the answer table and question table I make a third class to join class with a exam. Now i want to return a view ...
0
votes
1answer
30 views

Possible memory issue in linked list program [on hold]

I am trying to write a program which will count the occurrence of words in a paragraph. The logic I am following : I am using a linked list for the purpose. And I am searching sequentially - if new ...
1
vote
1answer
127 views

Slow Python text-processing script

This script of mine merges columns 1 and 2 from one input file and sees if these merged combinations exist in the other infile (and vice versa). I know I get stuck in appending. It did not get past ...
3
votes
0answers
30 views

.htaccess index.php removal, static content serving

I am writing a CMS type application and I am trying to restrict how the server gets accessed. Any content (in js/, css/ or images/ directories) should be served as is, as long as there is an ...
2
votes
0answers
38 views

Knowing who is the user in every request (in every action and every view)

First: I have many model classes that are mapped from/to tables using EF. Two of them are User and UserCookie, which are stored ...
7
votes
1answer
30 views

Homebrew std::string for use with kernel

I've ported some standard library facilities like vector, algorithm, etc. to my kernel so I can code in C++ instead of C. This is one of them. I'm looking for concerns regarding: Performance Safety ...
7
votes
3answers
389 views

Checking for palindromes using dynamic memory allocation

This is a homework assignment, but it's already done and it's not for a grade; it's meant as a refresher for the rest of the course. I've never done anything with dynamic memory allocation in C ...
3
votes
3answers
74 views

Merge Sort Implementation in Java (that seems slow…)

I decided to write my own implementation of merge sort. Here is the code: ...
5
votes
2answers
368 views

Shutdown Delay Program

I wrote this program a while back that would allow me to set a delay, say 3 hours, and when the delay had expired, my PC would turn off. The purpose of it was so I didn't have to leave my PC on all ...
3
votes
1answer
23 views

Iterative Flood Fill implementation in C [on hold]

I am trying to implement an iterative version of flood fill in C: ...
5
votes
3answers
170 views

Classes for acquiring employee information

I'm looking for a review on the following classes and the comments I applied (class assignment): ...
8
votes
1answer
105 views
9
votes
2answers
777 views

Using large amounts of if-else statements for playing card numbers

I have a method that uses a bunch of if-else statements, and I am thinking how I could simplify it. ...
5
votes
1answer
60 views

A tiny switcher for arbitrary types in C++11

I was about to use the awful enum+map trick to switch on std::strings when I thought to see if I could let some variadic templates do the job for me and I started ...
5
votes
1answer
92 views

RAII Pattern for Downgradable ReadWriteLock

The example for downgrading ReentrantReadWriteLock in the Java documentation seems really unsafe when handling exceptions. I tried to write a simple class to simplify it. Do you see any cases where it ...
-4
votes
0answers
24 views

Connecting together multiple classes [on hold]

In my previous question I learned to divide one class into multiple classes. I divided them into a couple of classes, but it is not working! It just shows blank screen. Main : ...
-4
votes
0answers
38 views

Multiple yield returns in method [on hold]

I have this code : ...
1
vote
1answer
22 views

Refactor Coffee Script to fire on page load instead of change

I have a Rails app where I'm trying to select a list of facilities based on what region is selected in a form. So far, I've implemented group_collection_select to do this as well as a bit of ...
5
votes
0answers
17 views

Normalize Sparse Matrix along rows in C++ Eigen

I wrote a function to normalize sparse matrix along rows using C++ Eigen; however, I feel that it can be improved, and that I am not using some built in functions of Eigen. ...
5
votes
1answer
44 views

'Countdown' Numbers round - combine numbers arithmetically to reach a target

Countdown is a British gameshow where contestants compete in word and number challenges. During the numbers round, six numbers are chosen semi-randomly and the task is to combine them using addition, ...
8
votes
1answer
135 views

Multiple MySQL select statements

I'm making a web application for a restaurant kind of type. The idea is to administrate the orders and customers. For selecting one of the orders and showing more specific data about it, i've got ...
5
votes
0answers
41 views

Getting functional Common Lisp code for handling state in a SDL animation

The following code draws a red rectangle going up and down on a white display. I'm not particularly happy about the (setf speed (if (or.. part: ...
-3
votes
0answers
23 views

Find difference between to window forms [on hold]

I have this two xml files which are identical in structure and the code for parsing one is here: ...
3
votes
1answer
55 views

TaggedLogger - Log wrapper

I wrote this class in order to not having to write tag every time (because of code duplication and risk of typos). ...
4
votes
4answers
546 views

Most basic HTML website - naming and CSS rules

I'm trying to accomplish something very simple as seen here. HTML ...
6
votes
2answers
282 views

MD5 shuffling with a defined pattern of numbers

I've created a MD5 shuffler with a defined number pattern. Does this make sense? Will this make storing passwords more secure? Is it efficient? ...
2
votes
0answers
22 views

Detecting connected acyclic through Tarjan strongly connected components variant

I want to verify that a given directed graph is connected and acyclic (DAG). I have implemented a modification of the Tarjan's strongly connected components algorithm in imperative style (as the ...
3
votes
1answer
40 views

Database and file backup script

I created a Backup class because I couldn't find one that worked well on Windows and remotely, to do this I have combined a lot of questions on stackoverflow with a lot of trial and error to get it to ...
8
votes
1answer
51 views

Labor percentage and wages from clock in/out and sales records

I'm developing a PHP function for calculating labor percentage (labor cost/sales) accounting for daily and weekly overtime rules, if applicable, based on the payroll period; the wages for each ...
6
votes
4answers
451 views

Binary Search Tree C++ Implementation

I've implemented a simple binary search tree for practice purposes: ...

15 30 50 per page