0
votes
0answers
4 views

Python class review - wiki api getter

First, I know there are other Python wiki API classes out there. I'm writing this one because I don't need all the bells and whistles, no edits, no talks, etc. I just need to be able to search for ...
1
vote
0answers
6 views

RSpec integration tests for a simple Rails API

The Model is simple. A Player class with three attributes: first_name, last_name, and team_id. I'm just trying to get a handle on TDD for what will expand into a much more robust API. Below is my ...
1
vote
0answers
7 views

Identifying equivalent lists

Title: Identifying equivalent lists I am using lists as keys, and therefore want to identify equivalent ones. For example, [0, 2, 2, 1, 1, 2] [4, 0, 0, 1, 1, 0] are 'equivalent' in my book. I ...
1
vote
0answers
23 views

Familiar with dynamic languages, new to JavaScript: criticize my style

Preamble I am trying to learn JavaScript by writing code and looking up documentation, one problem at a time. I am already familiar with several "dynamic" languages, so I'm hoping to be productive ...
-1
votes
0answers
11 views

Jquery prefixing for js files [closed]

In an effort to make jquery readable.... Is there any hard and fast rules for prefixing methods based on the .js files they might reside in? For instance, if I have a common.js file in my project, ...
2
votes
0answers
22 views

TryGetValue in a covariant interface

In a custom interface for keyed collections I need to implement, I want covariance. So the signature of the interface is IKeyedCollection<TKey, out TValue>. I would also like to include a method ...
1
vote
1answer
7 views

Emulating a carousel loop in JQuery, stopping setInterval on click

I was hoping someone out there could help me make my 'carousel' slideshow more efficient. I have it functioning, but I'm using very primitive methods for accomplishing this. I also have it in a ...
2
votes
0answers
8 views

OpenCV Mat processing time

I'd like to know whether having different variables for the src (source) and dst (destination) of an OpenCV function will have an effect on the processing time. I have two functions below that does ...
3
votes
2answers
46 views

Can this class be improved?

I have this class whose code I pasted in full. The CredentialsManager class is not shown here as all it does is return the DB connection variables. My question is if this class can be improved or if ...
8
votes
2answers
135 views

Is this a proper way of programming in c#?

I have a menu, where a user selects one out of 4, and another 2 or 4 options will appear. I used big buttons; a picturebox + label to create the buttons. The 4 main buttons are fixed, but the 4 other ...
2
votes
2answers
35 views

Creating an 2D array using pointer/malloc, and then print it out [closed]

I am trying to write 2 functions, one to read the matrix (2D array) and other one to print it out. So far I have: /* Read a matrix: allocate space, read elements, return pointer. The number of ...
4
votes
2answers
68 views

C# Implementing a good TCP Socket Server

public partial class ServerForm : Form { #region Fields private bool isServerRunning = false; private const int CLIENT_LIMIT = 10; private TcpListener listener; #endregion ...
0
votes
0answers
11 views

MySQLdb Python prevent duplicate insert [migrated]

I wrote this python script to import a specific xls file into mysql. It works fine but if it's run twice on the same data it will create duplicate entries. I'm pretty sure I need to use MySQL JOIN but ...
2
votes
0answers
26 views

Wrapper for jquery ajax to ensure redirects occur on clientside

Recently I had the need to make some ajax calls within a MVC 3.0 with Razor and jQuery application. After a bit of trial and error and refactoring it was discovered that a number of different needs ...
3
votes
0answers
37 views

Print all permutations with repetition of characters

Given a string of length n, print all permutation of the given string. Repetition of characters is allowed. Print these permutations in lexicographically sorted order Examples: Input: AB ...

15 30 50 per page
1 2 3 4 5 365