0
votes
0answers
3 views

How to better initialize an AngularJS app?

I've created code in each of my controllers and directives that calls an initer function in the main app.js module, the function just passes strings which are ...
0
votes
0answers
11 views

Checking if a text contains N consecutive repeating characters [on hold]

I want to check a text for consecutive repeating characters. For example, with a minimum of 3 consecutive char's, this should match: Okeee OOOkee Alsoook This should not match: No not okee, oh ...
2
votes
2answers
14 views

Ruby Interrupted Bubble Sort

Working through CodeEval's Interrupted Bubble Sort, I have a working algorithm, but there's a speed issue. I'm trying to do this with Ruby and I keep getting an error that it's timing out after 10 ...
3
votes
0answers
8 views

Find & Delete Duplicate Records on All Tables in current MSSQL Database

The purpose of this code is to search the entire database for duplicate records and produce a script that a user could then run to delete all of the duplicates. The stored procedure takes the ...
2
votes
0answers
8 views

Adding a constraint to a PFQuery on a PFRelation with objects that have already been gotten

Please read the following question that I asked regarding creating the following code. I was playing around with different combinations of whereKeys and queries, ...
3
votes
0answers
8 views

Creating a pseudo Pivot Table / Database using a 4-D array

Why am I not just using a Pivot Table / Database? a) I've never ever used either before. And I don't have time to learn how before this project needs to actually be finished. b) The final output ...
5
votes
1answer
28 views

Getting more detailed Stack Exchange mails — Part 1

I made the layout for a new project which will allow you to subscribe to periodic emails about your favorite Stack Exchange site (I'm not very happy with the SE-provided one). Since I'm horrible at ...
1
vote
1answer
37 views

Storing an integer counter in indexer

I've been implementing a custom internal server error page in ASP.Net MVC which will check if the current user is either an administrator or accessing the page from localhost, and if so, show them a ...
5
votes
1answer
39 views

Finding the 10001st prime

I'm solving Project Euler problem 7, which says: By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10001st prime number? Here's the ...
7
votes
4answers
512 views

Search query utilizing menus and checkboxes

I'm dealing with a searching query where the user will pick from menus and checkboxes the variables-criteria I'm passing to the toWeb method and a list will be ...
-1
votes
0answers
14 views

Strange thing with import (Intellij IDEA) [on hold]

I work in Intellij IDEA. When I try to include library, I have to write "import pack.*;" So... When I write this, at the end, when I type ';' - the whole string delets. I write 'import pack.*' - ...
6
votes
0answers
32 views

Compile-time list in C++

Everything is evaluated in compile-time. You will need a C++14 compiler. The compilation time is quite long, and with a bigger list input, you'll get some error messages like ...
2
votes
1answer
55 views

An attempt on unit testing in C++

I have no much experience with C++, so it is about time to start actually doing something about it. All in all, I coded this tiny unit test library: assert.h: ...
2
votes
2answers
21 views

Regex for finding After Effects files in scene code format

I haven't used regex a lot and I needed to set up a script that can gather a list of file paths that should adhere to a strict formatting convention, so I thought that sounded like a good opportunity ...
3
votes
1answer
17 views
-3
votes
0answers
13 views

JAVA run time error(NZEC) [on hold]

I've been given the following task: Devu got hold of a 1-indexed array A consisting of N integers while Churu has an empty array B. Devu in his turn will choose a contiguous segment from his ...
-1
votes
0answers
18 views

Django application - code improvements and best practices [on hold]

I have just finished a Django application, and I would like to get from you some code reviews related to my code. Application flow: Basically, my application is accessing a specific URL (always the ...
3
votes
1answer
24 views

MVC partial views and AngularJS modules

I am using MVC+Angular. In MVC, I created partial views for search, listing, etc. I show them using: ...
2
votes
0answers
12 views

Binary tree implementation in Scala

This is my implementation of a binary tree in Scala. How can this be made better? ...
2
votes
2answers
27 views

Analyze very large sets of engineering data from Excel files

I am an electrical power engineer with some programing skills. My boss asked me to make a program which could analyze very large data, make some calculations and give the result. The task lookes like ...
1
vote
1answer
30 views

Calculate trapped “rain water” in structure [on hold]

Supposed my input is [1, 4, 2, 5, 1, 2, 3] . Then we can create a structure like this: ...
0
votes
0answers
19 views

Hide/un-hide directory and open directory based on argument

Update it is working fine now I think it had to do with variable name so I made them more specific. This code checks to make sure a directory is hidden and if not hides it. Then if hidden it will ...
3
votes
2answers
23 views

Advanced CSV-to-SQLite converter

I just wrote an advanced CSV parser that translates CSV to SQL(SQLite Compatible) statements, which are then inserted into the database. It translates variable names in the CSV to values defined in ...
3
votes
1answer
26 views

Pomodoro Timer via setInterval

I'm hoping for some input on if my code is DRY or how I could have made it more efficient. I am pretty new in terms of jQ/JavaScript and this took me far longer than I care to admit. I will post the ...
6
votes
4answers
566 views

Reversing a number

I was working through a programming challenge I found on Reddit and it seemed easy enough: Find all numbers less than \$10^n\$ where the number and its reverse (the reverse of \$123\$ is \$321\$) ...
2
votes
0answers
29 views

Extremely redundant HTML templating

This is horrendous. I'm using lodash's templating engine for this table. Here's the template for an individual record's row. I've got 5 different table and ...
17
votes
3answers
3k views

Oh my goodness: How many selfies have I taken?

The title is a joke on how some people take a lot of selfies pictures Recently, in The 2nd Monitor, there was a brief discussion on selfie answers, starting with this post. At one point, a user said ...
5
votes
1answer
39 views

Multi-threaded bitcoin vanity address generator written in Java

The application leverages the bitcoinj library to generate a vanity bitcoin address. A vanity address is simply a bitcoin address that contains a personalized string. I would like some critical ...
4
votes
2answers
47 views

Modeling rainwater collection and cost

The following is a function that takes an area as an input and outputs some resulting calculations. I thought an object was useful for creating multiple instances with different custom properties ...
1
vote
1answer
32 views

Override values for overlapping objects between two scala lists

Let's say I have a bunch of Widget, where a Widget is class Widget (sku: Int, label: String, name: String, description: String) And I have 2 sources of Widgets: ...
-4
votes
0answers
26 views
10
votes
3answers
564 views

Simple number theory game

I just started JavaScript about a week ago. For my first project, my goal was to use my knowledge of basic JavaScript to create somewhat of a "thinking computer brain," so to speak. I wasn't focused ...
3
votes
1answer
24 views

Defining array contents using multiple statements on one line

I'm writing a sub which is going to determine which type of business is being detailed on a particular line of data. It's going to use column positions to check if the data exists, and then output the ...
3
votes
2answers
42 views

MVC and Services

I'm writing and app in AngularJS and am learning about writing RESTful services. I also want to make sure that I'm understanding the MVC pattern correctly. In my code, this is my take on how I'm ...
1
vote
0answers
11 views

Segment tree with lazy propagation

This is the implementation of segment tree with lazy propagation. Could you please review this code so that I can improve my ...
8
votes
3answers
343 views

Chances to gain yards (text simulation game)

I'm making a text simulation game in C# and I've made the calculations and all. But I know there's a better, faster and more efficient way in doing this. Basically, the first calc is that there's a ...
2
votes
1answer
41 views

A tool to help you memorize text

I wrote a snippet of code to help me memorize text out of files and was hoping to get some feedback on the code, since Python isn't my strongest language. You can see the code on GitHub, but I've ...
3
votes
0answers
44 views

Base-2 representation using C++

I'm preparing for a test and came across this exercise. If possible, dissect this and point out any flaws in it, keeping in mind time complexity. In base -2, Integers are represented by sequences ...
3
votes
1answer
20 views

Webscraping Bing wallpapers

I wanted to scrape all the wallpapers from the Bing wallpaper gallery. This was for personal use and to learn about webscraping. The gallery progressively gets images using javascript as the user ...
-4
votes
3answers
58 views

Regular expression to match all binary strings with even number of ones and zeros [on hold]

POSIX version: ^((00)*|(11)*|((10|01)(\2|\3)*(10|01))*)++$ Emacs version: ...
-3
votes
0answers
21 views

explain matrix creation code [on hold]

Here is the original question where the user asks how to create an empty matrix. One of the answers is the following ...
6
votes
3answers
564 views

C++ Stack using template

I'm learning C++, so I wrote a stack with the help of templates. I'm wondering if there is anything I can improve or if I did something vastly wrong. Stack.h ...
1
vote
1answer
29 views

One hash with params populate two objects

I have a JSON API where a user can update a post and related details to that post. To simplify the process the user just fills in one hash and we don't expose our architecture. What I did here works ...
7
votes
5answers
161 views

Nested object to hierarchical object list

I have a C# type to generate Layer SubLayer: ...
6
votes
2answers
34 views

Re-worked Workbook_Open, Creating DateStrings

So, I had a go at re-writing my Workbook_Open event based on The advice from my previous question. Thoughts? ...
3
votes
3answers
312 views

Convert a date string to a DateTime object in C#

I was just wondering if my code contains defects or if there was a more efficient or general way to convert string to DateTime object. In the input, I have a string ...
6
votes
1answer
114 views

Boost.Spirit UTF-8 string literal parser with escape support

I wrote (as part of a greater work) a Boost.Spirit grammar that would parse string literals, including support for the various escape sequences known from C/C++ (...
-4
votes
0answers
43 views

A basic Tic-Tac-Toe game programmed in Java

I have programmed a Tic Tac Toe game in Java using JavaFX for the UI. I have improved my previous version of the game after it got reviewed here. I will be highly satisfied if you can point out how to ...
0
votes
1answer
71 views

WPF ugly event dictionary

I have a WPF application that gets data from a web-server. It contains two Views LeftView RightView three Models ...
-1
votes
0answers
40 views

Inverting a binary tree [on hold]

So I came across some code which is used to invert a binary tree, and it looks like this: ...

15 30 50 per page