I need to take data from one table and import it into another table. In pseudocode, something like this:
For Each row in table1
If row.personid is in table2 then
update table2.row
Else
insert row into table2
End If
Next
What is the best way to do this in T-SQL? As I understand it T-SQL doesn't support For Each..Next, so what alternatives do I have?
I'm seeking opinion on this. I'm planning a big project in rails and wanted to get some opinion on whether I should start the project in rails 3.0 or start in 2.3 and convert later when 3.0 is declared stable. I'm new to rails and so after reading of some of the big changes in 3.0, i'm unsure of what would be best.
thoughts?
Hi,
In my iPhone application, there is a requirement to save a few log files in the phone(files are run-time generated).
Then I have to copy/transfer the files into the pc.
Can anyone suggest the best way to do this.
Pls consider this as a newbee question.
Thanks in advance..
~Dhanesh
I'm sorry for asking yet another "best [insert-technology] book".
I know a bit of MVC, I want to start a project in MVC 2 and a good book would be really helpful.
Usually, after a while, people come to a consensus what are the top 2-3 books for learning a given technology.
Have you read any ASP.NET MVC 2.0 book? If so, how was it?
I have a following data set:
A B N
1 3 10
2 3 5
3 3 1
3 6 5
10 10 1
20 41 5
20 120 9
I'm looking for an excel function that will normalize A and B to N on scale from 1 to 10.
In above example it would be
1 of 3 is best so N = 10
2 of 3 is in the middle N = 5
3 of 3 is worst N=1
20 of 120 is in second decade N=9
A = 1 && A <= B
B is natural number
1 <= N <= 10
hi,
i'm using pdf2swf but i can't import external swf frame per frame in scrollpane like to scribd (http://www.scribd.com/doc/27241116/BLOOD-GRISTLE)
Best Regards.
Hi
is there a method / possibility to run a function when the scrollview is scrolling?
i found scroll start and scroll end solutions but nothing like a onIsScrolling ...
is there a built in solution? or whats the best workaround (nstimer)?
thanks
Alex
As per the title, I'm trying to parse an XML file containing an xs:duration data type. I'd like to convert that into a Python timedelta object, which I can then use in further calculations.
Is there any built-in way of doing this? If not, what is the best way to achieve this?
What is the best way to download an mp3 file in java (on Android sdk)?
http://developer.android.com/reference/java/net/package-summary.html
Should I be using sockets? If so - what kind of "Stream" reader should I use?
I have also read something about "intents" - is this something that is applicable here?
I am also curious as to what should one do if connection gets interrupted - can I resume the download somehow or restart it?
Any tips?
I am trying to translate the following:
Action:
pushl %ebp
movl %esp, %eax
subl $32, %esp
movl $0, -8(%eax)
movl $0, -4(%eax)
movl -4(%eax), %eax
cmpl 32(%eax), %ebp
movl -4(%ebp), %eax
sall $2, %ebp
addl 8(%ebp), %ebp
movl (%ebp), %ebp
addl %ebp, -8(%eax)
addl $1, -4(%eax)
What is the best way to learn assembly and translating this code?
Hi!
What's the best way for me to take url like: http://foobar.com/foo.torrent and check if that really is a torrent, not a html page or something else funny.
Suggestions?
Thank you :)
Hi All
For Example You know foreach loop is heavy And if we use for loop is Better.
What Tools Can Help me to Write Code With Best Performance In C Sharp net,And Check My Code for this?
Please Help me
Hi
I have a table with two columns:
column A column B
1 2
1 2
2 1
I want to return total of ones = 3 total of twos = 3
The best I can come up with is two queries like so:
SELECT sum(
CASE WHEN columnA =1 THEN 1 ELSE 0 END )
+ sum(CASE WHEN columnB =1 THEN 1 ELSE 0 END )
SELECT sum(
CASE WHEN columnA =2 THEN 1 ELSE 0 END )
+ sum(CASE WHEN columnB =2 THEN 1 ELSE 0 END )
Can this be done in one query?
Thanks
I want to upload files using webservices to sharepoint 2007.
I am able upload using webClient.UploadData(..... method.
But for some files it shows me an error like for cookies type file.
So which webservice is best for uploading files with metadata.
Copy or webClient.UploadData..
Thanks.
Hello.
I have a table in the database which includes all active users. I then have a user list which needs refreshing to see who is the latest users online.
Whats the best way to tackle this?
The user list is always just who is in the active_users table.
Thanks for reading.
I have a SQL Server 2008 database with 300 tables. The application I have to design is an Windows Forms app, .NET 3.5, C#.
Which is the best way to work with Linq-to-SQL ?
I intend to make a datacontext for each business entity.
Is there any problem ?
I need to know if this way of working with Linq-to-SQL has any disadvantage or can create performance issues ?
Thanks.
I'm implementing a binary representation of an equal-side bi-partitioning algorithm and I'm wondering what the best way to iterate through all combinations of N bits that have equal (N/2) 1's and 0's. I'm trying to find the quickest way, not the easiest to code. Thanks.
I have an aspx page with several user controls (ascx) as well as an asp:button for signing out.
The click event of the button clears the session and does a response.redirect to the login page.
However, before the click event is called, since the page posts back, all of the Page_Load events run for all of the controls.
What is the best way to have the click event code run without unnecessary reloading of all user controls?
What is the best moment to commit my code and why?
End of the day
After the workitems (task) I am doing is done (runs and result is there)
After all refacorting and documenting is done
Rr any other scenario(s)?
I have seen demos of ComponentArt's and Telerik's toolsets.
I am interested mainly on finding a grid control, a tabstrip control, a menu control and a treeview control
Do you know any company besides the forementioned that offers ASP.NET MVC controls solutions?
Which one do you think is the best/most reliable?
I have an image of a floor plan. Best way to think if it is a hotel floor plan.
(Similar to how stubhub does their ticket maps)
I want the user to select rooms. Instead of slicing each room in Photoshop, is there a way to split up the image in HTML5 canvas or Javascript. Would like to avoid flash.
Thanks for the responses!
example:
http://adamsaewitz.com/housing/housing.html
(top left rooms, hover)
What do you think is the best way to implement an interactive grid similar to a Sudoku board for a native iPhone application? I did not see an object to fill this need in the SDK.
Should I make a custom control for an individual cell, then initialize as many of them as I need in a grid form?
Any and all comments are welcome.
Thanks!
I have a project which as part of the build process creates an XMLBeans jar file (stbSchemas.jar) which I want to include and reference in this project.
Is this the best way to go about this (Single project) or should I have a child project which is built from the parent project?
I am building this using Maven2 inside Eclipse. Is there a better way to do this so that I can maintain the integrity of the projects and stability of the builds.
So i've read around that instead of calling a event directly with
if (SomeEvent != null)
SomeEvent(this, null);
i should be doing
SomeEventHandler temp = SomeEvent;
if (temp != null)
temp(this, null);
Why is this so? How does the second version become thread safe? What is the best practice?