I have 2 text boxes one for email and one for Name. If text is entered in email I want to make Name required field. How can I do this using .net validation controls?
Thanks
Are there any example for a recursive function that call an other one which calls the first one too ?
example
function1()
{
//do something
f2();
//do something
}
function2()
{
//do something
f1();
//do something
}
how to to implement multithreading where
one thread updating UI
and other one is reading the database record
in windows application
Any guidelines really appreciated...
In my app, when one particular image button is clicked and held, i must be able to calculate the time for which the image button was held pressed. Can any one help me by giving some simple guidance or sample code. i am really stuck up here. Is there any specific event listener for this particular requirement.
This time my setup looks like this: one table with galleries names (gallery_id, gallery_name) and another table with galleries photos (photo_id, photo_gallery_id, photo_name).
What I need is to get all the galleries with one random picture for each gallery.
Is it possible to do this with a single query?
I'm working with an existing JavaScript-powered cart module that I am trying to modify. I do not know JS and for various reasons need to work with what is already in place.
The text that appears for my quantity box is defined within an existing function:
function writeitems() {
var i;
for (i=0; i<items.length; i++) {
var item=items[i];
var placeholder=document.getElementById("itembuttons" + i);
var s="<p>";
// options, if any
if (item.options) {
s=s+"<select id='options"+i+"'>";
var j;
for (j=0; j<item.options.length; j++) {
s=s+"<option value='"+item.options[j].name+"'>"+item.options[j].name+"</option>";
}
s=s+"</select> ";
}
// add to cart
s=s+method+"Quantity: <input id='quantity"+i+"' value='1' size='3'/> ";
s=s+"<input type='submit' value='Add to Cart' onclick='addtocart("+i+"); return false;'/></p>";
}
placeholder.innerHTML=s;
}
refreshcart(false);
}
I have two different types of quantity input boxes; one (donations) needs to be prefaced with a dollar sign, and one (items) should be blank.
I've taken the existing additem function, copied it, and renamed it so that there are two identical functions, one for items and one for donations. The additem function is below:
function additem(name,cost,quantityincrement) {
if (!quantityincrement) quantityincrement=1;
var index=items.length;
items[index]=new Object;
items[index].name=name;
items[index].cost=cost;
items[index].quantityincrement=quantityincrement;
document.write("<span id='itembuttons" + index + "'></span>");
return index;
}
Is there a way to declare a global variable based on which function (additem or adddonation) is called so that I can add that into the writeitems function so display or hide the dollar sign as needed? Or is there a better solution?
I can't use HTML in the body of the cart page because of the way it is currently coded, so I'm depending on the JS to take care of it.
Any help for a newbie is welcome. Thanks!
Hi, how can I remove specific rows and columns from an excel file using only classic ASP? For example, given the excel file
col1 col2 col3
one two three
four five six
I want to be able to programmatically delete the first row and second column to produce
one three
four six
Thanks!
I need to display the selecteditems in a label
I am using VB 2005
I set the selection mode to multi-extended
It did work selecting only one item with the following code:
me.xresultslabel.text= me.xlisttextbox.text.selectedItem.tostring
But when I tried to display more than one item using the following code:
me.resultlabel.text= me.xlisttextbox.text.selectedItems, I get the following string on the label:
system.windows.forms.listbox+selectedobjetcollections.
any help will be highly appreciate
Hey all,
im building a webshop in Drupal and i was wondering if you could help me with the following problem:
I got one big image frame (500x500) and 5 little image thumbnails(95x95) underneath the big one.
How can i realise that if the visitor clicks on the thumbnail, the big image frame gets filled with that specific image?
Q:
I have the following case :
set of letters (grades)
A,A+,A-,B,B+,B- stored as strings in
the database i wanna to order these
grades logically from the small
one to the big one ,, but this not
what happen in real.. because these
are strings the order is:
A,A+,A- i wanna
ASC
A-,A,A+
DESC
A+,A,A-
i bind those grades in drop down list
and i wanna these grades with this
logical order in it..
is there any idea how to do something
like this..
I have a simple array like:
var myArr=["one","two","three"];
an I have a counting loop, which increases the value of var "i" by one.
What I want to do is print the next value from the array each time the loop runs, next to a text string, like so:
alert('value number '+myArr[i]+);
But for some reason I can't get this to work.
The following code works, so I'm assuming I'm not calling the counter right:
alert('value number '+myArr[0]+);
I'm running two load balanced servers for one website, and I'd like the databases to be synchronized. Queries may be run on either of the two servers because they are both production sites, so the replication can't just work one way.
It doesn't have to be in real-time, just fairly accurate so people don't notice a difference when they get switched to a different server.
Hi there,
I am taking credit card details and I am taking the expiration date in two form field, one for the expiration month and one for the expiration year, I am wanting to store the expiration date as timestamp. Will strtotime("05/2010") create a time stamp or do I need to pass a day as well or is there an alternative?
Thanks
http://www.dofactory.com/Patterns/PatternFlyweight.aspx
There is a UML diagram on that page. It has three different kinds of connections. The shared aggregation connection, the generalized connection (triangle arrow), and the other one... How do I get the other one in Visio? I can't find it...
Thanks.
I have a MySQL table with a column called "priority". The column can have two values: high or low. I want to select 8 records from the table at random, but I want 6 of them to be high priority, and 2 of them to be low priority. If possibly, I would like to do it in one SQL statement. Is there any way to do two LIMITS in one query based on this kind of criteria?
import random
def some_function():
example = random.randint(0, 1)
if example == 1:
other_example = 2
else:
return False
return example, other_example
With this example, there is a chance that either one or two variables will be returned. Usually, for one variable I'd use var = some_function() while for two, var, var2 = some_function(). How can I tell how many variables are being returned by the function?
How would I download files (video) with Python using wget and save them locally? There will be a bunch of files, so how do I know that one file is downloaded so as to automatically start downloding another one?
Thanks.
I have two page one is login and second is attendance..
In attendance page there is two button In and Out visible any one of them at a time..
while i am pressing back button it navigates to previous button instead of previous page. plz give me solution for this..
Not quite sure what I'm missing, but my SQL statement is only returning one row.
SELECT
tl.*,
(tl.topic_total_rating/tl.topic_rates) as topic_rating,
COUNT(pl.post_id) - 1 as reply_count,
MIN(pl.post_time) AS topic_time,
MAX(pl.post_time) AS topic_bump
FROM topic_list tl
JOIN post_list pl
ON tl.topic_id=pl.post_parent
WHERE
tl.topic_board_link = %i
AND topic_hidden != 1
ORDER BY %s
I have two tables (post_list and topic_list), and post_list's post_parent links to a topic_list's topic_id.
Instead of returning all the topics (where their board's topic_board_link is n), it only returns one topic.
I have a service and inside one of the functions i'm creating a domain object and trying to save it.
when it gets to the save part, i get the error
No Hibernate Session bound to thread,
and configuration does not allow
creation of non-transactional one here
What do i need to do in order to save a domain object inside of a service. everything on the internet makes it look like this should just work....
hi i am very surpise when somebody post question everybody are saying it is homework please show us your effort now i have done this code http://stackoverflow.com/questions/2902781/priority-queue-implementation question is is this implementation correct? and nobody tell me answer also this one http://stackoverflow.com/questions/2896811/question-about-siftdown-operation-on-heap-closed can anybody explain me what is happened?no one answer me
why?
I have a directory containing list of files.
Those files have some list of values as x and y ordered as line by line.
And my question is just I would like to read those files one by one and to plot line graphs based on those values. Could you please help me for that?
Recently i designed one Abode air Chat application, which gets the chat messages from admin-Application(we bApplication), band width consumption is too high while each client launching air application to pull the data from database to my-amf endpoint.
in this am using blazeds,Jetty server,simple java classes(not servlets) calling with remote object,
Please any one suggest me few techiniques to
1)reduce the bandwidh consumption while sending message to each client from admin
2)minimize the time to pull the data from database while client launching application.
Regards,
Thirst for Excellence
I've found out that my R.java is never updated, so it doesn't contain info about my new resources, so I decided to delete it and thought that Eclipse will generate a new one. But that didn't happen and I don't have R.java now. How can I generate one?
I'm using Win7, if that changes anything.