I am using jquery validation plugin to validate a registration form.
Each text input field has instructions pre-filled as values in the input box
ex: for a text-input box id='Name', the default value will be set to 'Enter Your Name'. I have pasted below sample code:
<input type="text" id="Name" value="Enter Your Name" onfocus="if(this.value == 'Your Name'){this.value = '';}" type="text" class="required" onblur="if(this.value == ''){this.value='Your Name';}" size="25" />
What I need to know is how to specify in the validation rule such that the plugin throws a required field error if the input box contains either the default message or empty values.
Help much appreciated.
I will use the Linux NTFS driver as an example.
The Linux kernel NTFS driver only has very limited write support in the kernel, and after 5 years it is still considered experimental.
The same development team creates the ntfsmount userspace driver, which has almost perfect write support.
Likewise, the NTFS-3G project which is written by a different team also has almost perfect write support.
Why has the kernel drive taken so much longer? Is it much harder to develop for?
Saying that there already exists a decent userspace application is not a reason why the kernel driver is not compelte.
NOTE: Do not migrate this to superuser.com. I want a programing heavy answer, from a programming perspective, not a practical use answer. If the question is not appropriate for SO, please advise me as to why so I can edit it so it is.
I have a WebMethod that recevives following types of parameters:
[WebMethod]
User(long userid,int number)
When Client send parameter with different types, I have to catch this error and write to database etc..
How can I solve this?
Thanks.
Hi,
When text is selected in the iPhone OS, the user is given the option to copy/cut etc. How would I go about adding a new option here?
An example of this is in CourseNotes for iPad http://www.youtube.com/watch?v=VLQhKkgco_I where the option is used to look up on wikipedia (around 55seconds in).
Thanks
i have searched for calendar libraries and i have found TimeSquare calender on this site
https://github.com/square/android-times-square ive downloaded the file
and add made an import for the folder in ecilipse and everithing worked fine then i have exported with gradle and imported in android studio and everything worked fine.THE problem is that i want to use this calender in an app i'm developping so i have added folder library as a module and synced with grade but when i define <com.squareup.timessquare.CalendarPickerView
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
just in xml and run the app it crashes on setcontentview and i cannot make anything in plus can somebody tell me how to use this library correctly.
I am using gcc. Please tell me if I am wrong -
Lets say I have two classes A & B
class A
{
public:
A(){cout<<"A constructor"<<endl;}
~A(){cout<<"A destructor"<<endl;}
};
class B:public A
{
public:
B(){cout<<"B constructor"<<endl;}
~B(){cout<<"B destructor"<<endl;}
};
1) The first line in B's constructor should be a call to A's constructor ( I assume compiler automatically inserts it). Also the last line in B's destructor will be a call to A's destructor (compiler does it again). Why was it built this way?
2) When I say A * a = new B(); compiler creates a new B object and checks to see if A is a base class of B and if it is it allows 'a' to point to the newly created object. I guess that is why we don't need any virtual constructors. ( with help from @Tyler McHenry , @Konrad Rudolph)
3) When I write delete a compiler sees that a is an object of type A so it calls A's destructor leading to a problem which is solved by making A's destructor virtual. As user - Little Bobby Tables pointed out to me all destructors have the same name destroy() in memory so we can implement virtual destructors and now the call is made to B's destructor and all is well in C++ land.
Please comment.
Hi, I read on OSDev wiki, that protected mode of x86 architecture allow you to create separate segments for code and data, while you cannot write into code section. That Windows (yes, this is the platform) loads new code into code segment, and data are created on data segment. But, if this is the case, how does program know it must switch segments to the data segment? Becouse if I understand it right, all adress instructions point to the segment you run the code from, unless you switch the descriptor. But I also read, that so colled flat memory model allows you to run code and data within one segment. But I read this only in connection to assembler. So, please, what is the case with C compiled code on Windows? Thanks.
I can't seem to find this on google anywhere. I am trying to move to emacs from eclipse but I can't for the life of me figure out how to set my svn author name so it doesn't default the author name OR save the password so I don't have to type it in any each time. I am Ubuntu 8.10 if that matters.
Any insight would be great. Thanks.
Hi all
As we know for UDP receive, we use Socket.ReceiveFrom or UdpClient.receive
Socket.ReceiveFrom accept a byte array from you to put the udp data in.
UdpClient.receive returns directly a byte array where the data is
My question is that How to set the buffer size inside Socket. I think the OS maintains its own buffer for receive UDP data, right? for e.g., if a udp packet is sent to my machine, the OS will put it to a buffer and wait us to Socket.ReceiveFrom or UdpClient.receive, right?
How can I change the size of that internal buffer?
I have tried Socket.ReceiveBuffSize, it has no effect at all for UDP, and it clearly said that it is for TCP window. Also I have done a lot of experiments which proves Socket.ReceiveBufferSize is NOT for UDP.
Can anyone share some insights for UDP internal buffer???
Thanks
I'm currently working on a plugin for excel (using VB.net--not VBA) that will attempt (among other things) to recognize the format of the source data of a chart and configure the chart's series' number format strings appropriately. That is, yearly data should always be two numbers, monthly data should always be a 3-letter month followed by a 2-digit year, etc. The goal is to have a uniform representation across all charts for monthly data, annual data, daily data, etc.
My question is this: how do I find the number format string for the cells (or any cell that is part of that series, as I will be assuming all cells that make up a particular series have the same format) that represent the source data for the chart?
Note: I can assume that the chart will always point to a range of cells (not, for example, an array of data).
Is it possible to use NServiceBus to publish and consume messages in the same application, specifically a web application?
In the future we will almost certainly need to maintain a separate long running service to process messages generated by this application, and this is why we are hoping to use NServiceBus from the start, but right now it would be nice to just start up the consumer and the publisher when the web application starts. This will make testing and deployment far easier for us.
I presume I will need to reference the NServiceBus.Host.exe and start up the process in the global.asax, but need help on what exactly I need to call to do this.
Hi,
I am aware of this question already existing, but it has given me no luck.
I have an application which loads a physicial XML document via the following method:
jQuery.ajax( {
type: "GET",
url: fileName,
dataType: "xml",
success: function(data) {
etc...
I parse the XML and convert it into a string which is saved into a variable so that it can easily be stored in a database. How can I now convert the data in this variable back into an XML object so that it can be parsed as such?
I have the following code in a subroutine that produces an incompatible types in initialization error on the varVal library in the subroutine evaluateExpression:
NSDictionary *varVal;
for (int i=0; i<varCount; i++) {
[varVal setObject:[(i+1)*2 stringValue] forKey:[i stringValue]];
}
double result =[[self brain] evaluateExpression:[[self brain] expression]
usingVariableValues:varVal];
My subroutine declaration in the brain.h file is:
+(double)evaluateExpression:(id)anExpression
usingVariableValues:(NSDictionary *)variables;
I'd appreciate any help.
I have multiple email addresses linked to my gmail account.
I am signed up to some email groups that send emails out with
To: [email protected]
I can't remember which email address I used to sign up for this group. How do I find out which email address this was addressed to?
Anyone has experience measuring glibc regexp functions?
Are there any generic tests I need to run to make such a measurements (in addition to testing the exact patterns I intend to search)?
Thanks.
This query fails when I add the line shown...
:BEGIN FAIL:
I have this so far
Select Companyid, count(*) as cnt
from mytable
where State is not null
and cnt = 1 <------------------------- FAIL
group by CompanyID
:END FAIL:
Any way to do this?
Here's a long winded background if it'll help....
I have a single table query.
here's a sample of the table:
CompanyID, State
1,OH
1,IL
1,NY
2,IL
3,NY
3,OH
4,NY
5,CA
5,WA
I want a query that'll return something like this:
2,IL
4,NY
I have this so far
Select Companyid, count(*) as cnt
from mytable
where State is not null
group by CompanyID
This gives me a count of the number of records for each company.
IE:
1,3
2,1
3,2
4,1
5,2
Now I want to filter the above list to just the two records with one result.
I tried adding another where clause, but it failed:
BEGIN FAIL:
I have this so far
Select Companyid, count(*) as cnt
from mytable
where State is not null
and cnt = 1 <-------------------- FAIL
group by CompanyID
END FAIL:
I need to fetch only first record (because I need last date) of resultset, at the moment I have this resultset from this sql tring:
SELECT BCACC,FLDAT
FROM ANAGEFLF
ORDER BY FLDAT DESC
and I see this record:
A.M.T. AUTOTRASPORTI SRL 20080220
A.M.T. AUTOTRASPORTI SRL 20080123
A.M.T. AUTOTRASPORTI SRL 20070731
APOFRUIT ITALIA 20080414
APOFRUIT ITALIA 20080205
APOFRUIT ITALIA 20071210
APOFRUIT ITALIA 20070917
APOFRUIT ITALIA 20070907
now I need to take only one record (first) for every BCACC, I would take this resultset:
A.M.T. AUTOTRASPORTI SRL 20080220
APOFRUIT ITALIA 20080414
I've just try group it for BCACC but I receive an sql error, I'm workin on DB2 ibmI
Hi,
I'm taking some information from some variables I have already defined outside this function to create a html svg text box.
Here is the function which is causing me trouble:
RenderTextBox:function()
{
alert('this.x: ' + this.x);
alert('this.y: ' + this.y);
this.textBox = paper.text(this.x, this.y, this.htmlTextBox);
}
The alerts works prefectly, and prompt me with the values expected. However, the final line which is supposed to create the text box puts them nowhere to be seen. Does anybody know why?
If I replace 'this.x, this.y..' with numerical values in the final line of the function, the text box is placed correctly. It's only when I use the 'this.x' and 'this.y' that I have issues.
I need to implement a web API for a project I'm working on in this period. I read there are many standard protocols to do it: XML-RPC, SOAP, REST. Apparently, the XML-RPC one is the easiest one to implement and use from what I saw, but I didn't find anything about using it to implement an API. Instead I found many tutorial about creating a REST API in PHP, for example. Is there any counter-indication for using XML-RPC to implement a public web API?
Also, more generally speaking, I could (sort of) define a custom protocol for my API, to keep things simpler (i.e. accepting only GET request containing the parameters I need): would this be so bad? Is using a standard protocol a must-do?
Hi, I am curious, do new compilers use some extra features built into new CPUs such as MMX SSE,3DNow! and so? I mean, in original 8086 there was even no FPU, so compiler that old cannot even use it, but new compilers can, since FPU is part of every new CPU. So, does new compilers use new features of CPU? Or, it should be more right to ask, does new C/C++ standart library functions use new features? Thanks for answer.
Anyone know how to get a random set of lines from a text file?
I want to get a set of 3 lines with
<br>
on the front of each and display them through html.
example:
set 1
<br>Hi
<br>what's your name
<br>goodbye
set 2
<br>stack
<br>overflow
<br>hi there
set 3,4,5....
Choose one random set and display it.
The sets of lines would be stored in a text file.
Thanks a lot!
I already set USE_L10N = True in settings.py
But in following view:
from django.contrib.humanize.templatetags.humanize import intcomma
dev view_name(request):
output = intcomma(123456)
Output is always "123,456" for all locales.
Hello
I'm trying to build an app with ASP.NET MVC 1.0. I already have installed MVC 1.0 but after running the application It trows an exception:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1705: Assembly 'MVC_CustomControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Routing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Any help is greatly appreciated.