0
votes
0answers
4 views

UIKIT style not working correctly [on hold]

Hi Guys I followed UIKIT's sample of html editor my problem is that although its working fine but the design is not... It didnt became the same as what on their docs I followed everything but still ...
2
votes
1answer
16 views

What are the best practices with multithreading in C#?

For a while I have been interested in seeing if some tasks work well when split across multiple threads. On the one project I have been busy with I have been creating a lot of small utility apps, to ...
0
votes
0answers
4 views

Writing Hibernate SQL query without exceptions

This is the hibernate query I have written: ...
2
votes
0answers
17 views

School applicant form

I have created, in Django 1.6, a site for a school, where an applicant can get registered. It's a form that requests some information from the registrant and creates a random code for each applicant. ...
-1
votes
0answers
13 views

just one email at every two minutes swiftmailer is not helping me [on hold]

I am trying send some emails with swiftmailer and a smtp relayer at two minutes interval. I need to send as many as 300 emails, and each email must hit each recipient's indox at the rate of just one ...
0
votes
1answer
21 views

Skiena's Programming Challenges: The Trip problem

I have the following solution for the Trip problem from Skiena's and Revilla's Programming Challenges (full problem description here). ...
3
votes
1answer
16 views

Set up event on class and initialize state

Very similar to this question, I'm curious about common patterns/best practices for handling events in coffeescript classes, particularly when you also need to call the event handlers immediately to ...
0
votes
1answer
21 views

Return type as int or bool from function returning booleans [on hold]

int func (int a, int b){ if(a < b){ return false; // or 0 } else { return true; // or 1 } } Given the above function, or another ...
3
votes
1answer
18 views

Ruby Bot application [on hold]

I just want to know if this looks good. ...
3
votes
0answers
24 views

C Development Utilities Library

I have been working on a small library of development utilities for some time now, incrementally improving and expanding it as I make use of it in other projects. I feel that it is fairly mature now; ...
0
votes
0answers
10 views

out of memory error for find and replace colors macro [on hold]

I created a basic find and replace macro for colors. Users can either select a color to find and a color to replace by selecting cells or from the color palette. The macro runs correctly, but after it ...
1
vote
2answers
28 views

Large number to many characters

My goal is to take any size number, and convert it to a string of smaller characters that represent the concatenation of the binary expansion of the number. To illustrate what I am talking about, here ...
3
votes
4answers
116 views

Is there a better version for verbosing the output of the euclidean method?

Here is my implementation of the Euclidean Algorithm. My question is how to make it more "professional". It's working right, but isn't this too newbie? ...
6
votes
1answer
42 views

Optimization of aStar in Java

I'm currently looking to optimize my aStar algorithm as my last run through took roughly a minute to generate one path. I've never had to optimize before as I've never run into performance issues, so ...
5
votes
3answers
95 views

Refactor jQuery multiple click() event handlers

I'm using basic jQuery to render tab data. I was wondering if anybody could comment on how to refactor the click() event handlers, and any general guidance or advice. Here's the code/output in ...
10
votes
4answers
464 views

“Two-pass algorithm” implementation in Java

I'm rather new to Java and to algorithms in general. I implemented the so called Two-pass algorithm, and want to know if there are improvements to my way of implementing it. What it does is it takes a ...
2
votes
0answers
11 views

Optimize way of reading and writing file in node.js

I want to read the content of file then want to make few updates to content and then write that content to another file. I have created the code with node.js as follows. ...
4
votes
3answers
140 views

Storing words from an input stream into a vector

I'm extremely new to C++ and am doing the exercises on the book Accelerated C++. Here is one of the exercises: 4-5. Write a function that reads words from an input stream and stores them in a ...
0
votes
0answers
29 views

Running code once [on hold]

I only want my JavaScript to run once, but I cannot control how many times the JavaScript file is executed. Basically I'm writing a tiny JS snippet into a CMS, and the CMS is actually calling it 5-10 ...
2
votes
0answers
19 views

EF6-Lambda Expressions deep big-tree query

I am looking to improve the following query. We are using EF6 (CodeFirst) and C# Lambda Expressions, and Repository/Unit of Work patterns. Also, we needed to restrict the query in a way that we ...
1
vote
1answer
27 views

Better way of comparing integers

I wrote this class which is comparing some values, how can I improve its performance and maybe make it prettier? You can see at the bottom what type of data it requires, also the array size can reach ...
1
vote
1answer
19 views

Vectorize Matlab sum

I have the following Matlab function: function [res] = a3_funct(x) res = 0; for i = 1:size(x,1) res = res + abs(x(i))^i; end end It's ...
1
vote
0answers
6 views

Memcache Keys Management Class

I have written below class to manage Memcache keys. My Memcache keys structure are like: ...
4
votes
2answers
44 views

Would this be considered MVC?

For many days, I've been re-designing my application, applying some custom pattern and making our code looks like a framework. I have something like this for separate the business logic, from views: ...
2
votes
1answer
14 views

Finding intersection of shapes by combining functions

I've written the following code: ...
3
votes
1answer
23 views

Optimizing JavaScript functions

I've got a tab menu and functions that change the tabs color on click, giving the clicked tab a different color from the others. The thing is, when I click one, I give it another ...
3
votes
4answers
192 views
2
votes
4answers
291 views

Silent Try_catch in high load socket server or not?

I'm working on a socket application that will listen to incoming messages from about 400 devices. They all send a message at least once per minute. Now I have a working program and it has been running ...
1
vote
0answers
19 views

Checking screen sizes for responsive site

I wrote this piece of code to make any breakpoint to the users choice: ...
0
votes
1answer
65 views

Did you like my product?

I have the following MySQL query which selects product details and whether the viewing user likes them. I feel like it could be more efficient and that there is a more practical approach than using a ...
9
votes
1answer
150 views

Organization data class

I believe I have made the following data class quite decently, and I'd like a thorough review on it. The code is built on Java 8 and uses the Builder and Serialization Proxy pattern, it is used to ...
1
vote
0answers
25 views

Themed Folder Classification

I am trying a very simple method of getting the theme information via a theme.xml within each theme folder. What it should do: Scan the theme directory ../themes Return the names of all the theme ...
3
votes
0answers
78 views

Genetic Algorithm in Python

I'm a new programmer, so any help is advised. Preferably to make it faster, avoid heavy memory usage and so on. EDIT: Updated the code, now including a functional test program. Fixed the PEP-8 ...
1
vote
1answer
31 views

Updating MySQL with shuffled numbers between 1 and 50

I need to assign a number to each userId. I think this is too much of a query for updating. Is it possible to reduce the number of queries, or is it okay? ...
-3
votes
0answers
20 views

Why isn't my PHP working? (mysql_fetch_array() expects parameter 1 to be resource) [on hold]

Why isn't this code working? I've already checked by echoing $salt and it echos out the salt on the page, so I know it's nothing to do with the salt. ...
-3
votes
0answers
16 views

Rewriting Dynamic URL with .htaccess not working [on hold]

I am working on a e-commerce website and I am trying to make its URL better. I enabled Apache configuration, then created a .htaccess file, but my URL is still the same. I am not able to figure out ...
3
votes
1answer
56 views

Should I null coalesce EventArgs?

When I implement events, it usually looks something like this: ...
1
vote
0answers
32 views

JavaScript eBay Listing Generator

I'm still pretty new at JS and, frankly, this is probably a little above my skill level. But here's my attempt at a script that will take user input and produce a custom interactive eBay listing. ...
0
votes
0answers
9 views

Wondering why button is not executing code [on hold]

I made a submit panel in the nav to submit files to a website I am currently working on. Dopeyemine.com For some reason the "Submit" button in the submit panel is not working. Please review the ...
0
votes
1answer
45 views

Drawing multiple Images

Im trying to draw a lot of fields image for my world generation, all is perfect 64 fps, but if i began to draw all the time the grass it became laggy, like 59 fps (something that musn't happen! :( ), ...
0
votes
0answers
17 views

Error handling within functions [on hold]

I am wondering how to handle this error. A cron calls this function regularly (every 10 minutes): userNotifications() ...
4
votes
0answers
40 views

Evolution simulation speed too slow to scale up

I'm trying to run this code but it is too slow. I know it is long and I don't expect people to read all of it, but I really need help optimizing the EvolvePop ...
2
votes
1answer
25 views

Using a decorator to apply an inherited method to all child objects of the inherited type

I wanted to share this and get some feedback. My goal was to be able to have an object with methods: ...
2
votes
0answers
11 views

Ember.js file upload code

I am a newbie and tried to find the laziest way to do a file upload using EmberJS, jQuery and formdata (IE10+). The code might look stupid, but it worked. Can you please take a look and give some ...
1
vote
1answer
29 views

Checking empty object

Is there a better method for covering errors in my case? I am looking for best practice for now and future instances. Foreseen errors that could arise: No attributes at all Some attributes could be ...
3
votes
2answers
71 views

Extending Object.prototype in JavaScript

I find the default Javascript extremely poor on useful functions. There are some nice libraries, but somehow I always need something I can't find. Currently, I'd need a method removing all matching ...
2
votes
1answer
35 views

Priority checker for infix-to-postfix converter

I am trying to implement an infix to postfix conversion program using stacks. I have actually have done it successfully, but I'm uncertain about the complexity of the logic that I used for the ...
2
votes
0answers
9 views

Parsing time ranges with PyParsing

The following code is intended to parse a string of the following format and return whether the current time falls in that window: ...
0
votes
1answer
29 views

Can this code utilizing promises be written more succinctly?

I've written the following code to get all .txt files in a directory and read+delete them, repeating every 15 seconds. ...
7
votes
4answers
520 views

An enum that has situationally invalid entries

Is it considered bad style to have that BOTH value in the Direction enum? Problems can arise from ...

15 30 50 per page