1
vote
0answers
15 views

Python compare every line in file with itself

I am implementing a statistical program and have created a performance bottleneck and was hoping that I could obtain some help from the community to possibly point me in the direction of optimization. ...
-1
votes
0answers
7 views

Running this C# Salsa20 code

I'm trying to run this code user @scotttyb has posted which is close to this implementation on github. Salsa20 stream cipher implementation ...
3
votes
1answer
19 views

Eloquent methods to calculate the average rent of apartments

I am working on a Laravel 5.1 website where I am counting the average rent of apartments in a specific area. Besides of that I want to get the average rent by amount of rooms in the apartment. The ...
-1
votes
0answers
9 views

How to Make Words random in C? [on hold]

Suppose i have word apple in variable b like this char b[100]; b[]={a,p,p,l,e} How can i generate random string like this: ...
3
votes
0answers
8 views

Simple Notification class that models database

I'm updating a website I made awhile ago from a functional design to an OOP design. There are still a lot of functions below this class that I haven't implemented yet but I'm getting to it (such as ...
4
votes
1answer
22 views

Struct in Python

I'm writing a struct class in Python and was wondering if this were a good way to write it: ...
1
vote
1answer
19 views

Cycling through 15000+ rows in Excel VBA

I created a formula that is placed in an inserted Helper row (CR) and copied down to the bottom row (up to and sometimes exceeding 15000 rows) Method 1 (Preferred out of the 2): ...
6
votes
2answers
75 views

Base64 encoding implementation

I am learning C and decided to make an implementation of Base64 encoding according to the info Wikipedia provides about it. My main question is: should I declare the index_table array inside the ...
5
votes
3answers
174 views

Simple calculator with classes in C++

I came to C++ from Java. This is my attempt at making a calculator on about 2 days worth of knowledge. I don't really know what is redundant or unnecessary. Nor do I know of the better ways to achieve ...
4
votes
1answer
17 views

Normalized random position generator

I place various divs on screen by adding random x and y positions successively normalized with this function. My question is, how well is it written? Can I improve it? If so, then how? I am worried ...
-2
votes
1answer
16 views

Implementing Arrays in Java Class

I have the following code to write: Modify the Student class so that instead of 3 tests you will now have an array of 100 tests. However, not all of the scores may be set. You need to add an ...
3
votes
2answers
45 views

Counts the number of times a particular character, such as e, appears in a file

This question came from a Java tutorial online: Write an example that counts the number of times a particular character, such as e, appears in a file. I was just wondering if there is any way to ...
0
votes
0answers
11 views

Displaying available destinations using Angular.JS

I wonder to know if there is any bad smell on my practice for i18n on Angular. I put the I18n translating function on Angular controller (because I don't know how to put it on HTML template file) And ...
3
votes
0answers
15 views

Roman numerals in Haskell

I have written a module that provides some functions for dealing with Roman numerals. I would like some feedback concerning my style, potential performance or elegance improvements, and any ...
1
vote
0answers
9 views

Return most recent DateTime C# Entity Framework

Job -> Many Quotes Quote -> EmailLogList EmailLogList -> Many EmailLogs I want to return a CreatedDate from an EmailLog which has been created most ...
2
votes
0answers
14 views

Screen of chars

So its a class that lets you make a 'Screen' which is a n x n grid of chars. Your able to move a cursor by chosing the row and which column in the row and using that you can insert into into that ...
1
vote
0answers
18 views

Python Implementation - Conway's Game of Life

This is my implementation of Conway's Game of Life in Python. Now since I am a novice coder, naturally I have some key doubts: The usage of idioms and code redundancies - Are there any small ...
1
vote
1answer
16 views

Matching patterns of characters

I was wondering if there are any significant improvements that could be made in order to make the program more concise or efficient, particularly in the findmatch ...
3
votes
1answer
18 views

“The Trip” expense-equalizing challenge [on hold]

I've solved The trip from Programming Challenges. My solution suffers from lack of floating-point precision, though. The problem: Your job is to compute, from a list of expenses, the minimum ...
0
votes
0answers
18 views
5
votes
1answer
21 views

Compile-time plugin system

Background For a piece of software that I need to get extensible, I wanted to design a simple compile-time "plugin" system in C++. My use case was that the program (actually a library) can accept ...
-2
votes
0answers
10 views

Multiple Lists comparison in Java [on hold]

I have multiple user entered details into multiple lists mapping to UserDetailClass. I need to compare each list to other and see if any 2 users have same details along with user name. Can someone ...
1
vote
1answer
23 views

Linked object for creating chains without lists

I need a LinkedList but unfortunatelly the one that the .NET provides didn't have the functionality I was looking for (not working with linq and the LinkedListNode ...
0
votes
1answer
16 views

Answer checking script

I got this basic script which I'll be using to check if the answer is right. The only problem is that I'll be using with many forms. That's why I need this code to be more like DRY code. ...
0
votes
1answer
25 views

Code to select a random student from a class list

This is code to select a random student from a class list, stored in a .ss file. Here is my code. ...
4
votes
4answers
266 views

Expanding compressed string

I wrote this for a problem in one of the online contest at hackerearth. Problem statement is: Input: The first line contains the compressed string in form a2b4h5a2 Expanding it ...
3
votes
1answer
22 views

Going to the thread pool and back using custom awaiters

I've figured out a way to switch threads in the middle of a method. The benefit of that seems super obvious to me: that's what everyone wants to do anyway, and splitting up methods, using callbacks, ...
-1
votes
0answers
13 views

All Subsets Of A Given Set Of N Words C# [on hold]

This is the task: Write a recursive program, which prints all subsets of a given set of N words. Example input: words = {'test', 'rock', 'fun'} Example output: (), (test), (rock), (fun), ...
1
vote
0answers
14 views

Benchmarking function variations

I'm trying to benchmark two variations of one of my functions. Namely, these functions are for displaying integer values on the command line. The first of the functions uses my own implementation of ...
0
votes
2answers
20 views

Database Connection and Query methods

I have my class DBFuntcions containing this 2 methods: The method for the connection to the database: ...
2
votes
0answers
30 views

Analysis of call center employee performance

This code basically calculates a few metrics based on numerators and denominators and then it bins the data into quintiles. This is a common operation that I perform for various data sets. My issue is ...
-3
votes
0answers
12 views

Big data learning [on hold]

I am a student of BS Computer Science from a standard university.this is my third year of this degree.I want to learn Big data from the very start, as I am very passionate about it .I can work in C ...
0
votes
1answer
20 views

Entity Database Add/Update method

What would be the most elegant way to refactor the following method? ...
0
votes
1answer
16 views

Read Twitter direct messages and check messages for links

I'm learning Clojure and I'm doing a little thing that reads direct messages from Twitter using twitter-api wrapper. The code doing that is below. ...
4
votes
3answers
105 views

Filter column and row according to regex in header

I'm writing a script that can grep the rows and columns from a text file that match a regex. I have an implementation but I'm looking to make it more elegant. input.tsv ...
2
votes
0answers
13 views

Complex Space Factorization

I have posted a discussion on Math.SE regarding visualizing the complex space and effects of factorization methods on that space. A quick link to the paper is available here. I have 3 routines in ...
2
votes
1answer
54 views

Recursive function application

I use a lot T4 templates and want to avoid extra code writing when it could be generated. Currently I have following class: ...
1
vote
0answers
24 views

Implementation of disjoint set in Java with linked-list

I have just wrote a linked list implementation of disjoint sets in Java for the Rainfall Problem. Can you take a look and tell me if there is something missing and also make a judgement in ...
0
votes
2answers
33 views

Page for personal portfolio animations

I built my portfolio page using Bootstrap and jQuery, but on lower performance computers the animations seem choppy. I am interested in JavaScript optimization and was hoping you all had some ideas on ...
2
votes
3answers
44 views

Reflection optimization

In a web application I'm working on I have a class that Map objects to other (different) objects. It is implemented with something like: ...
2
votes
1answer
13 views

Geocoding and Reverse in python using Geopy

I had done this program that takes an input from STDIN and processes it to check if it is a Latitude/longitude combo or a place's name. Then it uses geocoding and returns an address corresponding to ...
-2
votes
0answers
16 views

Unity tiles endless map 2d [on hold]

Do anybody put all work code for this (Unity3D)? Please help me! Only code for this map. When player goes create new generation tiles. for example, I need this: http://dondgames.netii.net/ this is ...
3
votes
2answers
45 views

Comparison function for strings

I got a function that has as input 2 strings, computes the string similarity of all the combinations and give back and output the highest similarity. For example, "you are" and "are you" will have 1 ...
3
votes
1answer
29 views

A function determining intervals of values greater than threshold

I wonder if there exists a shorter/more elegant functional programming way than listing all the possible cases. Here, a function that determines positions of beginning/end of subintervals greater than ...
2
votes
0answers
28 views

Updating offers based on selected products

I have some nokia mobile models with some offers. There are two objects, one for nokia models with price, another one for offers. For example I have offers for these two models: "brandname": "Nokia" ...
1
vote
1answer
15 views

Compare sequence & maps headers in fasta file

This is the perl code which compares the sequence in fasta file & maps the header. Though the code is working well, I still would like to make it more efficient. Since the files I compare has ...
0
votes
0answers
20 views

Converting CSV To MYSQL With PHP In My Custom Wordpress Plugin

I have a function which converts a file from CSV to MYSQL The file could be 5,000 rows long up to 90,000 rows long. Based on ...
-1
votes
1answer
41 views

JavaScript function to compare strings

I've written this function for to check if two strings are equal. Can I improve it? Is there a better way to accomplish the task? ...
1
vote
1answer
36 views

Check WiFi Connectivity and internet connectivity in Background thread - with a return value

I have written this class to check internet connectivity on Android, while there are many instances when WiFi is connected is taken as an implication that internet is connected as well. I wanted to ...
-2
votes
0answers
19 views

Mock Unit test with Service locator [on hold]

I am new to Unit testing, so can someone please guide me how to implement Mock unit testing for my code. HomeController ...

15 30 50 per page