To Calculate The Difference Between Two Time Variables


i want to calculate the difference between two time variablesi need ur help since i'm not getting the result correctly    actually i'm getting the result differently in hours,minutes & seconds but not collectively as 2 hours : 20 minutes : 45secondsplz help

View Answers
Very similar questions
Difference Between Two Tag Formats? stackoverflow.com

I'm starting to learn ASP.NET and going through the tutorial videos on www.asp.net. I understand the basic concept of web application frame works like ASP/PHP/ASP.NET. HTML/XHTML is created with special tags that the server knows to read and replace with content. I did a little bit with ASP during a summer internship back in the 90's. Yet with the few examples of ASP.NET I've seen so far it seems ASP.NET has two types of server interpreted tags. Most of the time I see <asp:XXXX > tags such as <asp:ContentPlaceHolder ID="HeadContent" runat="server"> </asp:ContentPlaceHolder> but I also see regular ASP tags like <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="TailspinSpyWorks.SiteMaster" %> What is the difference between these two tag formats? Both are interpreted by the server correct? Why would I use one over the other?

Find The Difference In Two Colors? www.dreamincode.net

I was wondering how I can compare rgb values i get from my GD library in php. I want to see if a pixel is closer to one pixel more so than another. So a red pixel would be matched with an orange pixel instead of a green pixel because the colors are closer. In my PHP script i have RGB values, but I have a function for HEX conversion too. I googled this topic but I found only intense mathematical formulas.

Percentage Difference Between Different Values In Same Keys Of Two Different Arrays stackoverflow.com

I'm looking for a solution to this problem. I got 2 arrays, like this: [CODE....] Now I'd like to create a new array, with the % difference between the values per key. Would be something like this: [CODE....] how to create that array?

Main Differences B/t MSSQL And MySQL forums.devshed.com

Hi, I'm on a team that is developing a site in PHP / MySQL. We've been asked by the client to convert the database over to MSSQL. I've never used MSSQL, but after looking at the syntax available on php.net, there really isn't all that much difference in doing basic queries. I was wondering if any of you MSSQL gurus knew of some major differences between MySQL and MSSQL that I may be overlooking. Anything, however basic or complex, would be helpful. Thanks in advance, Taylor

MSSQL ODBC Difference Compared To MySQL social.msdn.microsoft.com

The source for this problem can be found http://www.wellytop.com/SQLProblem.zip This test creates two threads each with a database connection and uses transactions to insert values into the same table. The objective of this test is to check that a thread cannot read the results from a pending transaction on a different thread. In effect this checks dirty reads do not happen and transaction locking. The test runs correctly and displays "PASSED" with MySQL indicating the transaction and threading worked. When running with MSSQL Express 2005 it reports a deadlock error during a transaction. It's not really possible to re-run the transaction and I would like MS SQL to operate similar to MySQL, i.e. MySQL waits for the other transaction to finish before the next transaction can operate on those table rows. I'd like to use MSSQL but I am wondering why this error doesn't happen with MySQL and so have, for the moment, chosen to use it as my preferred database solution. I have experimented with transaction isolation levels and this doesn't seem to solve the problem. I've tested this with a fresh install of Windows XP SP2 and no firewall turned on. To run this test with MSSQL Express2005 use the ODBC Data Source Administrator (odbcad32.exe) to create a data source named MyExpressTest and attach this to an empty database that has been created with the default values. Enable the #define MSSQL in the coude otherwise it tests with MySQL. To run this test with MySQL (to show how this test should work) use the ODBC Data Source Administrator (odbcad32.exe) to create a data source named mySQLNewTest and attach this to an empty database that has been created with the default values. Comment out the #define MSSQL to switch to MySQL mode.

Difference Between Synchronous And Asynchronous Webservices? forums.asp.net

What is the difference b/w synchronous and asynchronous Webservices? And In what situation we gonna use in real time.

Difference Between Asynchronous And Synchronous Communication? forums.asp.net

I would like to know the difference between asynchronous and synchronous mode of communication in .Net. Does ajax use asynchronous communication?

What Is The Difference Between .DLL And .EXE www.sitepoint.com

I would like to know about the difference between .DLL and .EXE?

Difference Between SVN And TFS? forums.asp.net

What is difference between  SVN and TFS.

What Is The Difference Between <%= And <%: forums.asp.net

I thought that <%: had replaced <%=, since mentions on [URL]Prior to ASP.NET 4, the <%= %> syntax was used to execute code and write it out to the page. Starting with ASP.NET 4, you should always use the <%: %> syntax instead..." However, I've noticed that <img src='<%=ResolveUrl("~/Images/MyImage.jpg")%>' alt="blah"> works, whereas <img src='<%: ResolveUrl("~/images/MyImage.jpg")%>' alt="blah"> doesn't. I'm not sure what the name for these types of expressions are so I've had trouble googling it.

What Is The Difference Between The 1.0,2.0 And 3.5 forums.asp.net

what is the difference between the 1.0,2.0 and 3.5 

ADO.NET :: Difference Between L2S And EF? forums.asp.net

What is the difference between L2S (Linq to SQL) and EF (Entity Framework), much appreciated if you highlight the cons and pros?

Difference Between <%: And <%=? stackoverflow.com

Possible Duplicate: ASP.NET “special” tags I hope this isn't too much of a newbie question. I seem to always use the correct syntax, but I don't really understand why I'm using the <%: and <%= in ASP.NET, and I was hoping someone could clarify for me. I found this article which explains <%= and <%#, but wasn't able to find anything in Google on <%:. Examples of where I have used the various syntax: <div> <%: Html.LabelFor(model => model.Type) %> <%: Html.TextBoxFor(model => model.Type)%> </div> and <div id="header-menu"> <ul> <li><%= Html.ActionLink("Home", "", "Home" )%></li> </ul> </div> Possible Answer (per ChrisF): ASP.NET "special" tags

Difference Between Asp And C# ? stackoverflow.com

Are asp and c# completely different things or ..? Is asp a language or asp.net? Are c, c++, c# languages? What is a framework, stack, language

Exe Difference Between 1.1 And 2.0? forums.asp.net

i tried to use the exe file which is created in .net 2.0 in .net 1.1.. but it is not supporting.. we need any supporting files.. what is the reason for that.. 

Difference Between <%# And <=? forums.asp.net

I wanna know all about <%# expression %> and <%= expression %> or any other possible type.

Difference Between C#.net And Vb.net? forums.asp.net

What is the  difference between c#.net and vb.net ? I faced this question in an interview. Any technical difference is there ? I heard that there are two methods additional in vb.net which are not there in vb.net.

Difference Between MVC And MPV? forums.asp.net

What is the differnce between MVC and MVP. for asp.net application which bettor one to use.

MVC ::difference Between C# And VB.NET? forums.asp.net

I am in the process of learning MVC, and thought I would parallel the work in both C# and VB.NET.  I ran into a snag when right-clicking in an action method inside of a controller to add a view - in C# if I choose to strongly type the view it includes all the objects in the models folder in the drop-down list for selection; however, in VB.NET none of the models are available in the list.  Is there some step I need to take in order to make the models objects available in the drop down for selection?

Difference Between IIS 7.5 And Web(PI) 3.0? forums.asp.net

I want to know the difference between IIS 7.5 and Web(PI)3.0?

Difference Between MVC And AJAX? forums.asp.net

the difference between MVC and AJAX ? What elements should be considered by me when choosing one of them for system development ? 

Finding Difference With VB.net bytes.com

Difference between ASP.net and VB.net. Is it not the same... I feel that in ASP.net we can do our coding using this language VB,C#,etc. Am I right or not..... or Both are different. Explain me with some sample code for ASP.net and ASP.net(C#), ASP.net(VB). VB.net

What Is The Difference Between These 2 Objects www.vbforums.com

Have a C# application. When I look in the project folder I see an .exe in bin/debug folder, when I click it executes the application fine. I also see the same .exe in obj/debug folder, when I click it executes but gives me error. What is the difference between these 2 objects and why do I have 2 of them?

What Is Difference Between Vwd And Expressionweb www.sitepoint.com

Replacing Frontpage 2003 Having tried out the free version of visual web developer 2005 an 2009 I eventually decided to get the full version of expression web 2.I started out thinking that vwd was the successor to frontpage , alas that is not so. Apparently, thats expression webs thing I enjoyed the ability to compile vb.net in vwd, but ,,,can anyone tell me why Microsoft has 2 separate web widgets

Forms Data Controls :: Grid Showing Two Lines And Then The Difference? forums.asp.net

Before I get too involved in this new page, I want to besure I am going to go about it the correct way.  What is needed is a grid of some sort. The query returns groups of records, every two records are related and I need to insert a summary line after each pair of records.  Company 1 current       Company 1 previous *insert a summary of the currency amounts displayed with the two records. Company 2 current Company 2 previous *insert a summary of the currency amounts displayed with the two records. . . and so on What data control should I use to do this (a girdview, datagrid, listview??, something else?) I am running VS. 2008.  I was given a summary sample on a previous post: [URL] But I want to be sure this is what I should actually use.  

What Is The Difference Between Client Browser's Submit Mechanism And The Postback Mechanism stackoverflow.com

Button.UseSubmitBehavior property is used to gets or sets a value indicating whether the Button control uses the client browser's submit mechanism or the ASP.NET postback mechanism. So, What is the difference between client browser's submit mechanism and the ASP.NET postback mechanism?

.net - Difference Between Properties Of An Object Showing In Debugger Vs Proprties In Intellisense stackoverflow.com

When I inspect an object in the debugger, I see a lot more properties in the debugger than what is available in Intellisense or code. For example, the Page object in ASP.NET in the debugger shows a property RelativeFilePath which has a value. But when I try to use it in code, it doesn't exist. Why is that? I looked up the property RelativeFilePath in MSDN, it exists for mobile controls. Not sure why it shows up then in the debugger for a regular asp.net control.

Forms Data Controls :: Main Difference Between Using Gridview And Datalist forums.asp.net

I am building a website which include a shopping cart. I have been following some of tutorials in this website and also a book called ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter Kit. And Althought both this website and the book have been great help, I am at the point of creating my shopping cart as explained in the book. However the problem which I am facing is as follow: In the book in the databse which has been used there are two tables that form menu, called MenuItemTable and SizeAndPrice, and it has used Datalist and repeater to show the menu. However in my database I only have one table representing the menu and I have used Gridview to show the menu. But my question is that is DataList is only suitable for when we are trying to extract information from more than one table or could it be used even if ther is only one table representing the menu.

Difference Between Numeric And String Value? stackoverflow.com

I am getting a difference when comparing two string which are 0 and '0' in PHP. Can I do anything to make them be compared equally in an if action?

What Is The Difference Between Switch And IF stackoverflow.com

what is the difference between switch and IF function in PHP?? What I can see is where ever "switch" function uses "IF" function also applies there..correct me if I am wrong.. Or any performance wise difference between two??

Read/Write Text File At The Same Time? www.phpfreaks.com

I very new to php and all I am simply trying to do is read the contents of a text file and echo it out on the screen. I have tried many things to see what I am doing wrong but it just simply isnt working for me. I know the server I am using has php enabled as well because I have tried a simple echo and it works fine. This is the code I am currently using. <?php $file = fopen(file.txt", 'r'); [code]... I have a file.txt on the server I am using in the same directory as index.php, I feel like this should be working but I get no result!Alls I have in the text file is a statement that says "hello world".

HTC Wildfire :: How To Link Two Together Facebook Contacts androidforums.com

New to the forum and Android system. I have my Facebook contacts in people but I have my wife in people on a different name. Can someone tell me how to link the 2 together please?

Ubuntu Networking :: Samba - Access The Share On 300 Windows Machine - Systems At A Time ubuntuforums.org

I have ubunto desktop 10.04 LTS I installed samba and able to access the share on windows machines. However i want to access the share on 300 windows machine(for example) systems at a time Is it possible.

Fedora Networking :: Samba Share With Two Network Cards - No Internet Access forums.fedoraforum.org

I have a fedora 10 box with two network card on eth0 I have a pppoe connection to the internet, on second card eth1 I share my internet connection end I set up a samba server but I don't know if the settings are good. How to do this settings right to work fine, the ip are assigned by dhcp I don't use any static ip .When I try to browse the internet from the other computers some site's like {.com ; .org ; .info} are block, other site from {.ro} are working. Someone tell me something about turn off all my filters, but I don't know where to find this filter to turn it off. And when I use samba I can't have and internet access or vice versa. My network look like that: Code: eth0 |<--pppoe connection | MyComputer (fedora 10) | eth1 | switch | comp.1 comp.2 Win OS MacOS

IPhone :: Link Two To Icloud Without Mixing Phone Contacts, Apps Etc discussions.apple.com

can i link two phones to icloud without mixing phone contacts, apps etc Info: iPhone 4S, iOS 5.1.1

Link Server Doesn't Work Except Through Query Analyzer: MSSQL Freezing / Timing Out bytes.com

Environment: Server1 (Local) OS Windows 2000 Server SQL Server 2000 Server2 (Remote) OS Windows 2003 Server SQL Server 2000 (Both with most recent service packs) Using Enterprise Manager, we have set up the Link Server (LINK_A) in the Local Server 1 to connect to Server 2. The SQL we need to run is the following: INSERT INTO table1(column1,column2) SELECT A.column1, A.column2 FROM LINK_A.catalog_name.dbo.table2 AS A WHERE A.column1 xxxx; When we run this from the Query Analyzer, it completes with no problems in a few seconds. Our problem: When we add the DTS Package as the ActiveX Script (VB Script) to the Local Package, it times out at "obj_Conn.Execute str_Sql" Dim Sql, obj_Conn Set obj_Conn = CreateObject("ADODB.Connection") obj_Conn.Open XXXX obj_Conn.BeginTrans str_Sql = "INSERT INTO table1(" str_Sql = str_Sql & "column1" str_Sql = str_Sql & ", column2" str_Sql = str_Sql & ")" str_Sql = str_Sql & " SELECT A.column1" str_Sql = str_Sql & ", A.column2" str_Sql = str_Sql & " FROM LINK_A.catalog_name.dbo.table2 AS A" str_Sql = str_Sql & " WHERE A.column1 0" str_Sql = str_Sql & ";" obj_Conn.Execute str_Sql ---------------------------------------------------------- When we make a Stored Procedure and run the following SQL, it freezes. INSERT INTO table1(column1,column2) SELECT A.column1, A.column2 FROM LINK_A.catalog_name.dbo.table2 AS A WHERE A.column1 xxxx We've also tried the following with the same results; INSERT INTO table1(column1,column2) SELECT A.column1, A.column2 FROM [LINK_A].[catalog_name].[dbo].[table2] AS A WHERE A.column1 xxxx The same thing happens when we try to run the "SELECT" by itself. SELECT TOP 1 @test=A.column1 FROM LINK_A.catalog_name.dbo.table2 AS A WHERE A.column1 xxxx ORDER BY A.column1 What is going wrong here, and how do we need to change this so that it runs without timing out or freezing?

Adding Event Macro To A Command Button At Run-time Causes VB Editor To Pop-up www.vbforums.com

I'm using Excel 2003 SP2.The premise is I add worksheets at run-time based off of user actions. The sheets then add command buttons and then assign some vb code to be fired when clicked. Everything works great except the VB editor pops up (even when its closed). This is annoying, any way to stop it from doing so?VB Code:Public Sub Test(myWS As Excel.Worksheet)    Dim OLEObj As OLEObject    Dim Rng As Range    Dim WS As Worksheet    Dim CodeMod As Object    Dim LineNum As Long        Set WS = myWS    Set Rng = Range("I13")            Set OLEObj = _    WS.OLEObjects.Add(ClassType:="Forms.CommandButton.1", _        Top:=Rng.Top, Left:=Rng.Left, Height:=Rng.Height * 2, _        Width:=Rng.Width * 2)    OLEObj.name = "test"    OLEObj.Object.Caption = "test"    Set CodeMod = _    ThisWorkbook.VBProject.VBComponents(WS.CodeName).CodeModule    LineNum = CodeMod.CreateEventProc("Click", OLEObj.name)    CodeMod.insertLines LineNum + 1, _        "msgbox(""test"")"        End Sub

Saving Data To A File And Checking How Many Times A Command Button Has Been Pressed www.vbforums.com

I've searched for "Saving", "Saving file", and "Saving to a file" but I couldn't get exactly what I wanted.I have a label that is a integer that changes its value.I want to save that data somehow so that I can load the file later to apply the changed value to my default label value.My second question: is there any way that I can see how many times a button has been clicked or pressed until some kind of an event?I have three boxes that contain one digit numbers, which change (or may change according to the random number) every time a command button has been clicked, and when those boxes receive certain randomized numbers, the program is supposed to pop up a MsgBox.I want to figure out how many times that box has been clicked from the beginning of the program or after that same event upto that event.Am I making any sense? I'm getting confused myself...Any help appreciated.

Write And Read From Database At Same Time www.phpbuilder.com

I am running a dedicated server with a fast internet connection. This is the issue; I have a web site that displays data held in an SQL database. The web site page displays the data 10 rows at a time rolling on to the next page until the last page is reached, then reloads the complete page which also runs the SQL query to get the lastest data. The refresh rate is set 2 15 seconds. The data table is updated every 2 mins with new data from an outside source. The issue I am having is that at random times the browser get a message "Internet Explorer cannot display this page". This happens on clients PCs in a number of different locations. My question is: could the error be anything to do with the source table been updated at the same time as the client PCs are reading it.

Link Two Text Boxes Like In Quark? www.photoshopforums.com

link two text boxes in photoshop like you do in quark?

HTC Droid Eris :: Handcent Not Showing Facebook Pictures From Time To Time? androidforums.com

Hey I think this was covered in a Hero forum but there was no good answer. Does anybody know why Handcent decides to not show facebook pictures from time to time?

Android :: App To Change Profiles Depending On Time Of Day androidforums.com

I am looking for an app, that say when I go to bed at 2300, it auto silences. It goes back to loud at 0600. When I get to work at 0800, it silences again. Yet, when my GF calls, I want it to always override and ring no matter what time it is.Are there any programs like this that will work for what I want?

Android :: Setting Profiles Doesn't Work 100% Of The Time androidforums.com

Sometimes it works and sometimes it doesn't. I have a profile for "in dock" to turn on GPS and bluetooth. Last night it didn't shut off and this am - DEAD battery. I've noticed sometimes in the dock it doesn't turn those features on either - but sometimes it does work?

Android :: Any Way To Link Two Accounts androidforums.com

But how do you 'link' the me contact (the contact which is used for smsing) to one of your own google contacts (vincent in my case).

SQL Query Two Tables At Once And Loop Result As JSON Objects stackoverflow.com

I have a MySQL database with a table called "Locations" which looks a bit like this id | name | other parameters 1 | shop1 | blah 2 | shop2 | blah [Code].... This works, but it is inefficient calling the database through the loop, how do I avoid this?

String Search - Parse The String Of Characters One At A Time www.vbforums.com

I have written a program that uses an array of the english alphabet and Morse code. I also built a form with a input box for the alphabetic information and an output box with the Morse Code. What i am trying to do is basically type a word like "Hi" in the input box and produce the Morse Code equivalent in the Morse Code output box. [Code] This works but only one letter at a time. Do i need to Parse the string of characters one at a time, and then run it through a loop like i have created?

Any Way To Combine Two Queries? forums.asp.net

I am trying to UNION the two queries below without success. Dim ds1 As New DataSet Dim MyConnection1 As New OleDb.OleDbConnection(GetPOWERConnectionString()) [Code] .....

Flash :: Calculate Days Between Two Dates? stackoverflow.com

I use this script currently to determine the difference between two dates: [Code]... The problem with this is I want to monitor the actual physical day change so if someone accessed the application at 11:59 PM and then came back 5 minutes later this would register as a 1 day difference (a new day), this current script requires atleast 12 hours to have passed between two dates for it to register as a new day. I have thought about using the date number etc, but because months and years are so different it is quite a complex route, there must be something simpler.

Flash :: Handle A Time Object From Php In Flex (parse It To A Date Object) stackoverflow.com

I've got a php backend which delivers a time (e.g. '07:00:00'). This time is recognized as a string but I need it as a Date. So what I need is: Convert a string '07:00:00' to a Flex Date object. Is there a way to do this (without using regular expressions)?

Time For A New Shared Server Host www.webhostingtalk.com

I have been with Page-Zone for a couple years now. Just the past year I have had little problems with them. -For instance once I was trying to update my website and their server went down. I thought it was something on my end so I started trouble shooting it for an hour and then it came back up. -Another time the users on my website were without e-mail for a week, because they changed IP address. -And finally the e-mail accounts couldn't receive any e-mails from Comcast, MSN, or Hotmail accounts. So I ended up setting up a Google Aps account for us to use for e-mail. Granted they are very cheap but I have been having many problems with little support. Also today I just noticed that in the whois it lists Network Solutions as the technical contact. Are these things that I should be looking for a new host for?

Hosting One Website Accross Two Different Servers www.sitepoint.com

how to host one domain accross two different servers that gives resliance and load balancing? I know I could setup my domain on two servers and have two of the following records: www.domain.com x.y.z.a (IP add 1) www.domain.com y.y.z.a (IP add 2) But the problem is users also access emails by www.domain.com/webmail. Now the MX record is pointing to one sever as we want to gather all the emails at one point. So how do I get the users to go to one particular server for the email? I was thinking to alter the email url to something like www.mail.domain.com/webmail which only goes to one server.

Hosting Website And Email At Two Different Places forums.devshed.com

One of my clients like to host his emails at Yahoo hosting service, but he also wants to host his website at another hosting company with the same domain.

Slow Transfer Speeds Between Two Win 2008 Servers www.webhostingtalk.com

I have two servers running windows 2008(rtm) and I'm getting just crappy transfer speeds between them. server 1: dual xeon quad core 8gb ram dynamic mirrored disks (windows software raid, ick i know hyper-V, 6 or so VMs, not real heavy load server 2: dual xeon quad core 8gb ram 3ware 9650Se raid card, raid1 (using latest engineering drivers/firmware) The servers are connected to each other via gigabit crossover. When I start to do a file transfer (a 40gb virtual machine, through windows file sharing) it starts fast. 60+MB/s says 12minutes remain but after 5minutes and 5gb or so of transfer it's slowed way down to 7MB/s and the network usage graph that was smooth and is now choppy.

How To Give Full Path For Two Required Parameters Of Copy Method www.vbforums.com

I have already create special folder to copy default picture for new user and put it inside that folder. I have used copy method (system.io.file) to do that and works fine but I have to give full path for two required parameters of copy method for example: I want to pass sourceDir = "~xyzdefault.gif" destDir= "~xyz" + userId + ".gif" can anyone guid me to another method to do that without write full path?

Serving Domain Through Apache And Lighttpd At Same Time www.webhostingtalk.com

There are 2 different domains with the same IP being served by Apache. I want one of the domains to be served by lighttpd, is it possible without having to change the IP of that domain?

X264 Video Conversion Cluster- (To Reduce Encoding Time) www.webhostingtalk.com

I would like to know if there's any way we could reduce "conversion times" for videos while converting them with "mencoder" and "x264 codec"? Is it possible to cluster 2-3 or more servers (Quad core/8GB RAM) so that I can reduce the conversion timings effectively? The original video sizes are around 500-700MB on an average and I'd like to convert them using mencoder in x264 codec @ 500Kbps bitrate and 2pass settings. Ofcourse it'll take atleast 1-2hours to encode 1 such video at these settings on a 'single' such server, so is there a way to reduce the conversion times to around 10-15minutes/video by using "parallel encoding" with x264 codec?P.S: I know how to form a cluster, using beowulf/rocks, etc...what I need help with is 'using' the cluster with x264 codec

How To Change Html Elements Attribute At Run Time In Web User Control forums.asp.net

I have a web user control menu of page. Now I want HOME (which is an hyperlink text) in menu to be Bold at the time default.aspx Loaded (Load event)! How can I do that If any one can provide code! I am using VB .Net at back.

MVC :: Two Different Action With The Same Name? forums.asp.net

I have two actions with the same name: [Code].... I think everything clear here. But I don't like that parameter int k which I never use and which I pasted in order to create another function which will be launched when some data was posted to that action.

Bind And Action To Two Or More Entities? www.sitepoint.com

Let's say you have a complex html form. Some of the fields will be used to enter data into table 1. Other fields will be used to enter data into table 2, but only if the insertion into table 1 succeeds. Let's also assume that for whatever reason, you do not wish to split this up into two separate steps, using Session to cache the previous result. Is it possible to define your action thusly: public ActionResult DoFooThing(Entity1 e1, Entity2 e2); Where e1 contains the fields required for the first part of the process and e2 contains the fields for the second? Will both entities be properly bound? Note: these entities will have fields unique to them, so that no field is shared between them. An example of this would be in my forum project. A thread cannot exist without at least one post, so I make the user create the first post when creating the thread. My entity for Thread does not contain a field for Message, as it is not in that table. So I am wondering if I can safely bind my action like this: // ID is the forum id the new thread is going into public ActionResult CreateThread(int ID, Thread newThread, Post newPost); Then proceed to attempt to insert the thread, and on success insert the post, rolling back if either fails.

Web Forms :: How To Show The Time Needed For A Page To Show forums.asp.net

I wnat to evaluate the performance of my web page. How can I show the time comsued of a page?

JQuery Method Not Working Second Time? stackoverflow.com

I have a JQuery Method. When I click on button "btnSelectDisclosure", a popup appears but only once. Not for next time. [code]...

ADO.NET :: Getting Error As Failed To Convert Parameter Value From A String To Date Time forums.asp.net

data.MakeInParam( "@DOB",SqlDbType.DateTime,10,cust.DateOfBirth), im new to .net,  reponse grt intput for me to get in to it.

Localization :: Format Money In Two Formats In C# forums.asp.net

i want to format money in two formats 1) US dollors like this $126,765 2) is normal only seprate with comma when thousand occurs like this 126,765

Regex For Diffrent Date Time Formats? forums.asp.net

Every date time format can  be represented by a regular expression  how can i get the a regular expression for a perticulat format?using .net API

C# - How To Get Date And Time Formats Based On Culture Infomation stackoverflow.com

What I want is..If culture is en-US then string dateFormat="MM/dd/yyyy"; string timeFormat="24.00 hrs"; If culture is en-GB then string dateFormat="dd/mmyyyy"; string timeFormat="24.00 hrs"; and so on for other countries..Now how do I get these date and time format values ? What are the standards? Like which all countries use similar date/time formats and which ones don't ?ok I tried this :- DateTime myDate = new DateTime(); string us = myDate.ToString(new CultureInfo("en-US")); string us gets value =1/1/0001 12:00:00 AM Now how do I extract "dd/mm/yyyy" and "24.00 hrs" out of this...in my Dateformat column in my Table... I want to store STRINGS such as dd/mm/yyyy or mm/dd/yyyy NOT dates..In my TimeFormat column in the table, the values to be stores are STRINGS too, like I need to store either "24:00hrs" or "12:00hrs" How do I do this now ?**using ShorTimePattern returns these values as h:mm tt and HH:mm If I want to store the values in my DB exactly as "24:00hrs" and "12:00hrs", how do I use these values..h:mm tt and HH:mm,which one is for 24 hr format and which for 12 hr format ?**I want the information about Decimal Separator and Thousand Separator too based on the CultureInfo...whats the property for that ?

Web Forms :: Time Out Downloading Large Files? forums.asp.net

I used this sample to work around the issue we were having with large files. [URL] Unfortunately, when I attempt to download large files of 30MBs or more, the download times out and the user gets a partial download. It doesn't seem to be a consistant percentage of the download either. I attempted to download a 50MB file and got to 33MB. When trying a 30MB file, I downloaded 24MB.Below is my code. if (File.Exists(strFilePath)) {                fileName = System.IO.Path.GetFileName(strFilePath); Response.Clear(); system.IO.Stream iStream = null; byte[] buffer = new Byte[10000]; int length; long dataToRead; try { iStream = new System.IO.FileStream(strFilePath, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read); dataToRead = iStream.Length; //FileInfo file = new FileInfo(strFilePath); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Length", iStream.Length.ToString()); Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName.Replace(" ", string.Empty)); while (dataToRead > 0) { if (Response.IsClientConnected) { length = iStream.Read(buffer, 0, 10000);..................

SQL Server :: Switch Two Field Data? forums.asp.net

I pulled a fast one today.  I imported thousands of records and accidentally put the FName in the LName and the LName in the FName.  I don't have a clue how to write a SQL or TSQL that will switch them.  I do have a parameter for the SQL though.  WHERE User - System Import.on ASP.NET because this is my place for help instead of going elsewhere to a more specific type of forum just for SQL.  I do only ASP.NET VB/CS development so this is my home to find all my answers.  (99% of the time).

SQL Server :: Select Query Based On Two Fileds With Different Column forums.asp.net

This is my Table structure:-Table1 Field1        Field2     Age Dean         Chen      20          Janel         Wast       25 ann            Miller      20 I used this select statement  select Field1+' - '+Filed2 from Table1 and i binded this in dropdownlist now on selecting dropdownlist i need to show age in label. so how would be my select statement... to show age base on Filed1 and Filed2

WCF Service Failing Every 23 Hours - Request Channel Timed Out stackoverflow.com

We have a WCF service self-hosted in a Windows Service. Right now we're experiencing a really strange behavior with it, which is that every 23 hours, approximately, the service raises an exception for every call made to it with the following error: Server was unable to process request. ---> The request channel timed out while waiting for a reply after 00:01:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.---> The HTTP request to [URL]has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.---> The operation has timed out. The duration of the failure is between 4 and 6 minutes and, without touching anything at all, the service then goes out of the failure and the following responses are ok, for the next 23 hours, and then, again the error. As pointed above, the WCF service is self-hosted in a Windows Service, installed on a Windows 2008 Server OS. The clients calling the service are two different Asp.NET web services, one running on the same server and the other on a virtual server in a production environment. Both clients have presented the same issue. The configuration of the complete environment is this: Phone calls are received in an IVR system (let's say node 1), which calls a web service (node 2) that retrieves some information about the customer calling. Once the customer approves the operation, the IVR calls the web service (node 2), which relays the call to the WCF Service (node 3) to process a credit operation. The WCF then makes a TCPIP socket operation through a VPN connection to another entity (node 4). That communication lasts between 3 and 10 seconds, is registered in a persistent database and then is sent back in the same path to the customer (node 3, 2 and 1). This platform processes about 2,000 transactions a day, 24/7, except for the ones failing with the timeout. The reason to have the transaction relayed to a second service is for security purposes. The amount of data exchanged in each call is about 200 or 300 bytes. I've already tried most of the workarounds posted right here in stackoverflow ([http://stackoverflow.com/questions/981475/wcf-timeout-exception-detailed-investigation][1]) and the ones appearing there and some others found in google. The error is still persistent. The TCPIP socket operations are logged to a text file, and found no issues there with the response times from the external entity. The largest time was 9 seconds. Also, a database operations trace has been logged and did not show any performance issues either. The concurrency mode of the service is set to ConcurrencyMode.Multiple and, before going into production we made an stress test with ten clients making iterative calls over 2 hours, processing the wcf service about 30k transactions with no signs of performance impact. However, I already discarded a concurrency issue because the average time between transactions is one minute, and the largest one lasts for 9 seconds approximately. Besides, all other transactions complete successfully, independently of the load on the service. I cannot increase the timeout of one minute given the fact that the service is for executing ecommerce operations and in fact there's nothing really taking more than a few seconds to complete. This are the facts, and I hope you guys could come up with something I haven't already tried yet. Please have in mind at the time of answering that this is a critical mission service, and the changes or configurations possible to apply in a production environment are very limited.

Security :: How To Add Digital Signature On Two Web Service forums.asp.net

I have never write code like this... so I am trying to explian what problem I meet here.. assuming I have 2 web service one named WS1 another named WS2 WS1 (send data  to WS2) → WS2 then WS2 (receive data from WS1 and do something then return result to WS1)→WS1 if I want to add digital signature between WS1 and WS2 so that WS1 connecting to WS2 , WS2 will recognize who is connecting by digital signature what do I need if I want to do that? and how to do?

Two Controls Calling Same Method? forums.asp.net

I have 2 text boxes inside my aspx page and I want to call the same method func(object sender, EvenArgs ev) on ontextchanged events of these textboxes.I want to parse the text of these textboxes inside this function - now the question is how would func(object sender, EvenArgs ev) know which of the textbox's has called it? I need to know that so that I could then use text property of that textbox to parse it and further process it.Isn't there a thing like sender.equals(textbox1).Or probably is there a way I could pass the text as a string argument to func()? If yes, how and whats the format?I dont want to make two functions separately for ontextchanged events of these textboxes, when the fucntionality of this method remains exactly the same.

AJAX :: Passing Arguments Between Two Forms Using Jquery? forums.asp.net

I tried using Ajax & Jquery for the following need, but not able to do... I have Two Forms StringMain.aspx & Returner.aspx.... I have created 4 Divs at StringMain.aspx and a sample text "ToCheck" at First Div.. In the Returner.aspx form page load, i placed a label like this protected void Page_Load(object sender, EventArgs e) { Label1.Text = "hello"; } I have set StringMain.aspx as default running page. So When i run StringMain.Aspx page, the text i placed in the First Div "To Check" should concat with the label Text "hello" of Returner.aspx and display it together in the First Div of StringMain.aspx like this "To Check hello".. The Technique i used is $("div#First-Div").load(" Returner.aspx");--But dint work...

Format Datetime With Or Without The Time stackoverflow.com

Sometimes I get a datetime with a time sometimes it's just the date. Of course if it's just the date I I want to format with "dd.MM.yyyy" and if it has a time "dd.MM.yyyy HH:mm".. This is in a repeater, so I thought may be it's possible without a simple if statement?

Web Forms :: DataList: Collecting IDs And TextBox Values At Same Time forums.asp.net

 Collecting IDs and TextBox values at same time.I have a datalist with 2 columns of products with a TextBox next to each product so my customer can enter a number in each checkbox (to determine the order sequence when this list of products is printed to the screen). I have a button for my customer to click when she is happy with the sequence chosen for each product and this calls a subroutine within which I need to be able to collect each productID and the number entered into the textbox next to it. This worked perfectly in my old system using Classic ASP and can't understand why it's so difficult to offer the same funtionality in ASP.Net! I have tried various approaches but none of them work in collecting the number entered into the TextBox and the ProdId at the same time. I tried storing the ProductId in the ID of the TextBox in the hope that I could then retrieve both the ProductId and the value of the TextBox for each product when the button is clicked but values of the TextBox ID are values such as 567 or 784 and are set dynamically (these are the productIds). The error I'm getting is as follows: The ID property of a control can only be set using the ID attribute in the tag and a simple value. Example: <asp:Button runat="server" id="Button1" /> and the line containing the error is: <asp:TextBox runat="server" ID='<%# DataBinder.Eval(Container.DataItem, "Prod_ID")%>' Text='<%# DataBinder.Eval(Container.DataItem, "Sequence1")%>'>

JQuery :: One Line, Two Separate Selection Sets? forums.asp.net

Imagine you have this HTML layout: <div id="msg"></div><br /> <div id="submitButton"> <input type="submit" value="OK" style="width:50px" onclick="$('div.subtleMsg').hide(); return false;" /> </div> I know how to manipulate the contents of <div id="msg"> any way I wish but I'm wondering if it's possible, IN THE SAME LINE OF JQUERY CODE, to also manipulate <div id="submitButton">. Everything has to be combined into one long jQuery string because I'm passing it from the server-side code as a script.

Checking If Session Has Timed Out? stackoverflow.com

This is my base class for all pages except EndSession.aspx override protected void OnInit(EventArgs e) { base.OnInit(e); if (Context.Session != null) { //check the IsNewSession value, this will tell us if the session has been reset. [Code].... But on EndSession I try to navigate back to, say default.aspx, and then this code above just redirects be back to EndSession.aspx. So for better clarification: Step 1: Go to mypage.aspx Step 2: Wait for timeout Step 3: try to navigate away Step 4: get redirected to EndSession.aspx Step 5: try to navigate away Step 6: GoTo set 4 Setp 6 should be actually being able to navigate away...

Jquery :: Timing - Setup A Worker Function Thats Called Every 5ms By SetInterval stackoverflow.com

Im working on processing data. I setup a worker function thats called every 5ms by setInterval. I'm calculating the amount of time it takes the function to run, its 0 to 1ms. I'm also calculating the speed at which the function is actually invoked and its about 80ms. My question is, if it takes only 1ms to run through the function, and I'm calling it every 5ms, why is it invoked every 80ms? I do have a second worker function updating the canvas based on the current data the processing function is doing, but its run in its own setInterval. These numbers were taken while in Chrome. I've tested in Opera, Safari, FF3 and FF4 as well and the issue is the same, though the invoke time is different. (all this on a mac) I know this code does not yet work in IE. I know parts of this are ugly.. I haven't started to clean up the code yet... Lines 77 to 84 are the setInterval calls. You can see a working example here:

Php - Merging Two Set Of Array Values Into One Multidimesional Array stackoverflow.com

i'm a newbie in programming and in php too and i was wondering if anyone can help me with my array problem. i have two set of array, example: $name = array("peter","peter","joe"); $cars = array("ford", "gmc", "mercy"); and i would like to merge them into a multidimensional array like this $merge = array(array($name[0], $cars[0]),array($name[1], $cars[1]),array($name[2], $cars[2])); now, i would like keep the structure as above but i would like to do it with a native array function or foreach function. i've tried array_merge and array_combine but it didn't turn out as i expected. i've tried $arr3 = $name + $cars; but it didn't work too

Too Long Time For Performing Script www.phpfreaks.com

There is a PHP – script on the server, which is worked out for a long time (over 10 min). The connection breaks up while performing the script and the absence of output to the client’s browser since the browser thinks that the server stops answering.  How can I solve the problem that part of the PHP script on the server can not be performed because of connection interruption? 

Performing Simple Multiplication On Two Query Results? www.phpbuilder.com

I have two mysql queries that return a bunch of different records and figures. but I want to multiply one figure from one query by another fingure from the second query. Here are the two queries: (they return exactely what I need, I'll post a follow up showing the output of each...) [Code]...

Create Blocks Of Times From Multidimensional Array? stackoverflow.com

I am working on a scheduling system and I need to grab all consecutive times of 4 or more which I have accomplished: Array ( [0] => Array ( [0] => 18:00:00 [1] => 19:00:00 [2] => 20:00:00 [code].... How would I take this multidimensional array and put them into potential time blocks of four as check boxes? For instance: Checkbox 1 = 18:00:00 - 21:00:00 Checkbox 2 = 19:00:00 - 22:00:00 Checkbox 3 = 09:00:00 - 12:00:00 Checkbox 4 = 10:00:00 - 13:00:00 and so on...

Display DIV Only If User Has Been Idle For X Amount Of Time stackoverflow.com

I would like to display a helpful DIV that basically shows the user how to accomplish something on a particular page, but only if the user has been idle for a period of time, say, 30seconds. What I mean by "Idle" is: Not clicking any links Not right clicking anywhere Exceptions: I would like to exclude the following conditions from the Is User Idle rule: User has scrolled up or down/left or right User has pressed mouse button on an empty area on the site/ or on an element which has no source/link for example, an image with no hyperlink. and, Pressing keyboard buttons Can this be done? Or can we only detect when a particullar event occurs?

Calculate The Hamming Distance Of Two Binary Sequences? stackoverflow.com

hamming('10101010','01010101') The result of the above should be 8. How to implement it?

Display List Of Bands That Haven't Played For Over Two Months :S phpbuilder.com

I need to display a list of bands that haven't played for over two months and I'm having difficulty gettings my head around it because of the multiple tables. Code:

JQuery :: How To Check If Two Elements / DIV Belong To Same Parent stackoverflow.com

I am working on this piece of code for a shopping cart $('.addtoCart').click(function() { //get button id var cartID = $(this).attr("id"); //get check box id var checkBoxID = $('input.cartLevelChecked:checked').attr("id"); //get parent id var levelListID = $(this).closest('li').attr("id"); if(('#'+cartID && '#'+checkBoxID).parent('#'+levelListID)){ $(".selectPlan").show(); } //alert(/*cartID + checkBoxID +*/ levelListID); }); Basically I'm checking to see if the check-box the user checked and button they clicked on belongs to the same parent then show a div.

Two Dimentional Array forums.devshed.com

I want to using two dimentional array like. name | age | location i want to show the data in table form like name | age | location ------------------------ Rose | 15 | USA ------------------------- Viki | 25 |UK ---------------------- in this table the columens are fixed that are 3 but row is increasing one by one.

Datetime - Generate Random Date Between Two Dates? stackoverflow.com

I am coding an application where i need to assign random date between two fixed timestamps how i can achieve this using php i've searched first but only found the answer for Java not php for example : $string = randomdate(1262055681,1262055681);

ORDER By (dividing Two Columns) www.phpfreaks.com

Im making a gallery which allows users to rate the images. I have two columns noOfRatings (which hold the no of tiems an image has been rated) and totalRatingScore (which holds the total of all the ratings for that particular image) I want to make a sort option e.g 'sort by highest rated' Is there a quick way to return the recordset ORDERED by highest rated.. i wa thinking somethign along the lines of SELECT * FROM TABLE ORDER BY noOfRatings/totalRatingScore Can i do it this way or is some special techinque needed?

MySQL Order By Two Columns www.phpfreaks.com

I got my results to order the way I want. Which is ORDER BY verified DESC. But after that I want to order another column in ascending order. I tried ORDER BY verified DESC, device and that didn't work. I also tried ORDER BY verified DESC ORDER BY device. Does anyone know how I can do this?

Order By Two Columns MySQL? stackoverflow.com

I am implementing a Popular feature into my app where I will select the most popular posts from a databaseProblem is I need to get the most popular in terms of most likes and most comments. I just tried:SELECT * FROM db ORDER BY `likesCount`,`commentsCount` DESC LIMIT $from," . ($to-$from)But that will show an ascending value in terms of the numberOfLikes. How can I get it so that it measures the numberOfLikes and numberOfComments and selects the most popular one?

Hiding Records After A Period Of Time In It / MySQL www.daniweb.com

I created code for my TV guide web site, as mentioned in a previous thread [URL] This is the new code, which works well: <? //connect to mysql //change user and password to your mySQL name and password mysql_connect("localhost","root","PASSWORD"); //select which database you want to edit mysql_select_db("tvguide"); // Select only results for today and future [Code]..... However, once the date has elapsed it hides the records, but not once the time has passed - the records still show. To give an example, if I have a programme that airs at 6:30pm, I want it to show the record, but then hide it once the programme has aired (in this case in 30 minutes), or another example - a programme that starts at 9:00pm and finishes at 10:00pm.

Retrieving Data On A Constant Time Period? forums.devshed.com

I'm wondering how I could grab data from an array that I have in a specified time period, like say every 30 seconds or a minute or so. Tried doing searches via Google and on this site, but so far no luck. Has anyone ever done this or would know how this could be achieved?

Divide Time Period Into Equal Intervals stackoverflow.com

I have to create a function which gets 5 parameters representing information about the working time of some department. - when the work starts/ends, - when the lunchtime (or any other break) starts/ends, - integer representing minutes into how small pieces we should divide time period. Besides - it's possible that there are no breaks in the working time. The function should return all intervals from working time. [Code].....

Block A IP That Has Tried To Login Too Many Times Within A Certain Period Of Time? www.sitepoint.com

What's the best approach to block a IP that has tried to login too many times within a certain period of time?

Preserve Session State For Prolonged Period Of Time? stackoverflow.com

I'm having trouble preserving session state for a prolonged period of time. I use sessions to preserve login state. I require the below snippet of code at the top of each of my pages before any other code. First off, is there any settings I'm missing? session_cache_expire(2880); //set session to expire in 48 hours session_start(); Some people are logged out before the 48 hour expiration time. What types of things could cause this? I know closing the browser kills the session and this is not the case. As far as I can tell it happens when the user is inactive for several hours or more. Users are never logged off while actively browsing the site.

Two Windows Interacting www.sitepoint.com

I have two windows, one, the 'main' window which contains a blog entry, and a 'child' window that contains item in an ordered list. Each item A-Z has a corresponding word a-z in the main window. Whever the user puts his mouse over, or clicks on a-z in the main window, I'd like the corresponding item in the child window to be brought to the top and highlighted. I haven't had much luck looking around for answer because I'm not sure what I should be looking for. Even just some search terms would be helpful (though I prefer a nice solution!).

Sort An Object By Two Criteria? stackoverflow.com

Trying to sort this array of objects according to (1) depth and (2) weight, and am unsure how to modify the function I'm using to include this other level... I'm using this function: function cmp( $a, $b ) { if( $a->weight == $b->weight ){ return 0 ; } return ($a->weight < $b->weight) ? -1 : 1; } [code].... And that will accurately sort the array according to weight, but I need to add in another level of sorting. So that the array is first sorted according to depth, and then by weight. [code]\........

Returning A Two Dimensional Array From SQL Query? stackoverflow.com

Is there way to return a two dimensional array from a SQL query? Like.. "SELECT id, x, y, z FROM test" ..and have it return as id => x, y, z? I could do a loop and create a second array but I imagine that's extra work that I might not have to do. Just not familiar with SQL right now.

JQuery :: How To Move / Drag Items Between Two DIVs Or Selectboxes stackoverflow.com

I want to know how to move the list items or selectbox items between the divs or selectboxes. I am unable to how to know to use the jquery plugins and how to implement. If I download one plugin how to make it use in my application...