This has probably been answer already but I am trying to return the primary key after inserting a record to the database. Does anyone know how this is accomplish after the record has been created?
I have two table
First table
BID Town
1 ABC
2 ABC2
3 ABC
Second Table
PID BID AmountFirst AmountSecond AmountThird Minority
1__ 1___ 1000_____ 1000________ 1000_____ SC
2__ 2___ 2000_____ 1000_______ 2000_____ ST
3__ 3___ 1000____ 1000_______ 1000_______ SC
BID is foreign key in Second table.
I want sum AmountFirst + AmountSecond +AmountThird for individualTown
e.g for ABC town answer should be : 6000 (summation of PID 1 and PID 2)
I want Linq query for this..Please help
Suppose a query "select * from employee" returns 80 rows. I need to display middle rows that is from 20th row to 50th row.
I know, like to display first 20 rows we have option like "select top 20 * from employee" but if we need middle rows how to get it in MS SQL specifically.
I m new to this SQL queries...Can anybody answer to this question.
I found this open question online. How do you process a large data file with size such as 10G?
This should be an interview question. Is there a systematic way to answer this type of question?
Hi All,
I went through all the posts on Reflection but couldn't find the answer to my question.
Can you please tell me what were the problems in programming world before .Net Reflection
came and how it solved those problems.
Please explain with example.
Where in Linux would you look to find out what registers are saved on a context switch? I'm wondering, for example, if it is safe to use FP or vector registers in kernel-mode driver code (mostly interested in x86-64 and ARM, but I'm hoping for an architecture-independent answer).
It´s a short question,
but i searched at google and here and didn´t find a answer for it.
is it possible to find the Process which changed the FileInfo.lastAccessTime or FileInfo.lastWriteTime of a File?
thanks alot!
Got a great answer earlier, but unfortunately, I didn't explain the WHOLE situation:
I need to rewrite:
blog.domainname.com/archives/YYYY/MM/postname/
and
www.blog.domainname.com/archives/YYYY/MM/postname/
to
www.domainname.com/blog/postname/
Thanks in advance!
Quoted from the comment under this answer:
For a lot of mobile platforms Java
isn't an ideal choice anyway as there
isn't fine enough control over freeing
resources.
It seems C++ is the best, your opinion?
This is useful if you are trying to create class methods metaprogramatically:
def self.create_methods(method_name)
# To create instance methods:
define_method method_name do
...
end
# To create class methods that refer to the args on create_methods:
???
end
My answer to follow...
This is my question and apparently this is the answer. I found you can stdout to null by writing NUL in command prompt so i tried writing < NUL at the end of my argument. No luck.
How do i pass in null or do something with the IO locks like that perl code does so i can get my ffmpeg script not locking up after 15 or so seconds?
Hello all ,
I have a string like "SAB_bARGS_D" . What I want is that the string gets divided into list of characters but whenever there is a _ sign the next character gets appended to the previous one.
So the answer to above should be ['S','A','B_b','A','R','G','S_D']
It can be done by using a for loop traversing through the list but is there an inbuilt function that I can use.....
Thanks a lot
hello,
I know it's very basic question and hope not so important, but i want to know the answer, please don't suggest only refer links.
we all daily face <input> type tag and their attributes(type, class, id, value, name, size, maxlength, tabindex etc..), i just want to know that
is there any sequence list of attributes in tag or we can use any sequence?
is there any sequence then what it is?
Hi, folks:
An interview question. Even though I think this kind of questions is boring, I cannot give out the right answer.
Any reply is appreciated. Thanks in advance.
I have code which works on windows, that calls LocalAlloc as follows:
LocalAlloc(LMEM_ZEROINIT, size)
I need the equivalent malloc or calloc call to get this to work on Unix systems, through Mono. Simple answer?
In the following link: http://jsfiddle.net/gCvbT/, if you click on General and then click on Question 1 for example, the answer overlaps FAQ 2. How can I prevent this?
Hi. I have used the tinymce editor in my form. And I have used an validation for checking whether the editor is empty or not. It works for the initial stage. Also, when I press enter and checks for validation the form got submits. When I checked the source code of the editor it contains the information as below:
<p>&nbsb;</p>
Please check it and help me to get me an answer for this.
I have the following code, which just print the key/value pairs in a dict (the pairs are sorted by keys):
for word, count in sorted(count_words(filename).items()):
print word, count
However, calling iteritems() instead of items() produces the same output
for word, count in sorted(count_words(filename).iteritems()):
print word, count
Now, which one should I choose in this situation? I consulted the Python tutorial but it doesn't really answer my question.
Hi guys.
First I want to say is that I am 37 years old and not from programmer background (actually from biology). And my question is should I start learning java? I have coded in php and javascript for a year and a half. Every answer would be appreciated
Thanks in advance
Bobi.
I know many have asked the same question but I am still confused that does Visual studio 2008 or 2010 works with 64-bit computers?
Here in this post the answer is that he can run Visual studio on Windows 64 bit OS? How?
I want to transform a listbox to textbox when I'm clicking a checkbox.
To explain, i have a listbox that contains addresses and if an address does't belong in the list someone can click to a checkbox called 'another address';so he can put another address.Thanx for your answer...
Hey.
I was coding here the other day, writing a couple of if statements with ints that are always either zero or one (~bools), and I asked myself:
Should I use if (int == 1) or if (int != 0) ?
Is there any difference at all?
Please, don't answer with stuff regarding the int may being more/less than 1/0, that's not what I want to know.
Thanks in advance for sending answer to me........
Im the beginner in iphone development.
I tried last 2 days to set background image in UIWebView in iphone.But i can't.
Becoze i doesn't know how to take(proper path) of the image from of project directory and proper syntax of that.