I'm got a comment form for an article and i'd to prevent re-submission. I notice that Worpdress handles this very well (going back doesn't cause the browser to request a form re-submission), but I can't figure out how they do it, even though our methods are very similar.
My Script
User visits mydomain.com/article/1/article_title.html
Fills…
I've searched the iPhone documentation and on google but have not found any information regarding locale values for preferred measurement units such as kg or lb and etc.
Does anyone know if this does exist? Or conversely NOT exist?
Thanks
Successfully used jquery-infinite-carousel in the past but for my current project I need it to loop forever AND also jump 3 items at a time.
Example of how it works jumping 1 at a time here.
jQuery.fn.carousel = function(previous, next, options){
var sliderList = jQuery(this).children()[0];
if (sliderList) {
var increment =…
I'm a .NET developer who knows very little about Python, but want to give it a test drive for a small project I'm working on.
What tools and packages should I install on my machine? I'm looking for a common, somewhat comprehensive, development environment.
I'll likely run Ubuntu 9.10, but I'm flexible. If Windows is a better…
I am trying to devlop a regex for finding camel case strings in several code files I am working with so I can break them up into separate words for use in a SQL query. I have strings of the form...
EmailAddress
FirstName
MyNameIs
And I want them like this...
Email Address
First Name
My Name Is
An example SQL query which…
I'm new to MVC and ADO.net Entity Framework. Instead of having to create an edit/display for each entity, I'd like to have the controller base class generate the view and validation code based off metadata stored in a table - something along those lines.
I would imagine something like this has already been done, or there…
I am using the Qt QGraphicsScene class, adding pre-defined items such as QGraphicsRectItem, QGraphicsLineItem, etc. and I want to serialize the scene contents to disk. However, the base QGraphicsItem class (that the other items I use derive from) doesn't support serialization so I need to roll my own code. The problem is…
Two of my users have reported a problem with my Android application, OftSeen Gestures. Both of them are using a Motorola Droid. The app saves a text file which is just a list of gesture names and phone numbers, both strings. It saves the file to the private data area. I don't know that it is this code that is failing but…
After cobbling together a few questions I've managed to get this far to showing / hiding divs:
$(document).ready(function(){
$('.box').hide();
$('#categories').onMouseOver(function() {
$('.box').hide();
$('#div' + $(this).val()).show();
});
});
HTML:
<div id="categories">
…
Many times I've seen a semicolon used after a function declaration, or after the anonymous "return" function of a Module Pattern script. When is it appropriate to use a semicolon after curly braces?
I have a site that is using Forms Auth. The client does not want the site session to expire at all for users. In the login page codebehind, the following code is used:
// user passed validation
FormsAuthentication.Initialize();
// grab the user's roles out of the database
String strRole =…
Problem: I have an address field from an Access database which has been converted to Sql Server 2005. This field has everything all in one field. I need to parse out the individual sections of the address into their appropriate fields in a normalized table. I need to do this for…
In clojure, keywords evaluate to themselves, e.g.:
>>:test
:test
They don't take any parameters, and they aren't bound to anything. Why then, would we need to qualify keywords in a namespace?
I know that creating isa hierachies using derive requires namespace…
I have a Python program that spawns many threads, runs 4 at a time, and each performs an expensive operation. Pseudocode:
for object in list:
t = Thread(target=process, args=(object))
# if fewer than 4 threads are currently running, t.start(). Otherwise, add t…
My question is what can I do to determine the cause of the slowness, or what can I do to speed it up without knowing the exact cause.
I am running a simple query and it appears that the mapping back to the entities is taking taking forever. The result set is 350,…
WARNING! THIS IS ABOUT A VIRUS ON MY SITE. IT APPEARS IT HAS BEEN THERE FOR SOMETIME AND I'VE HAD NO PROBLEMS. BUT PLEASE BE CAREFUL. READ EVERYTHING I SAY AND SEE IF YOU CAN HELP ME WITHOUT VISITING THE LINK. AVG PICKS UP ON IT AND BLOCKS IT, MCAFEE DOES NOT.
…
I'm working in an ASP.NET 3.5 MVC application where i've got a view with multiple forms in it. Form 1 contains information about products and will form a shoppingcart with a remove button. Form 2 is as below and is to be used to get the information from the…
I read the transcript of a speech by Richard Hamming included as a part of this SO question and the speech had a quote that got me thinking about when someone should move into development.
When your vision of what you want to do is what you can do…
We have had many questions for interviewers to ask interviewees. But none addressing information flow in the other direction, interviewee to interviewer. Just an indirect question about "deal breakers" and one about "finding dream jobs".
What I'm…
Pretty much everyone that writes about the UISplitView on the iPad uses the following code structure to dismiss a popover:
if (popoverController != nil) {
[popoverController dismissPopoverAnimated:YES];
}
I though Objective-C was happy to…
First approach: bare metal
require 'java'
require 'rubygems'
require "c:/ruby/jruby-1.2.0/lib/ojdbc14.jar" # should be redundant, but tried it anyway
odriver = Java::JavaClass.for_name("oracle.jdbc.driver.OracleDriver")
puts odriver.java_class…
G'day,
I was reading the article "Database as a Fortress" by Dan Chak from the excellent book "97 Things Every Software Architect Should Know" (sanitised Amazon link) which suggests that databases should not be designed using an agile approach.…