461 Posted Topics
Re: I would create a log file for both programs, im not aware of a way to write simultaneously to log files. Perhaps one of the more experienced members of the forum does? | |
| |
Re: Here's an XSLT Stylesheet: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cs="urn:cs" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="cs"> <xsl:output method="xml" omit-xml-declaration="yes" indent="yes" /> <msxsl:script language="C#" implements-prefix="cs"> <![CDATA[ public string GetCurrentDateTime(string name) { string filename = name.Substring(0, name.IndexOf('.')); string extension = name.Substring(name.IndexOf('.')); return(filename + "_" + DateTime.Now.ToString("ddMMyyyyHHmmss") + extension); } ]]> </msxsl:script> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> … | |
Re: int[] TheArray = new int[20]; //Declaring TheArray to hold 20 objects //Adding to TheArray TheArray[0] = 5; //Arrays always start at 0, so 0-19 in this case. TheArray[1] = 10; TheArray[2] = 15; //Reading from the first entry in TheArray Console.WriteLine(TheArray[0]); //Reading from all of TheArray foreach(int in TheArray) { … | |
Re: I could be completely wrong here as not tried any of code only looked at it, But shouldn't `((CheckBox)row.FindControl("chkTypes")).Checked;` Be `(CheckBox)(row.FindControl("chkTypes")).Checked;` So that is casts the object found as a CheckBox and not the row? | |
Re: Quick google turned [this](http://www.codeproject.com/Articles/43705/Remote-Desktop-using-C-NET) up, perhaps it is what your looking for? | |
Re: @riahc3, I assume your on about this: foreach (c in contact.Nodes()) { Console.WriteLine(c); } In which case `c` is the local variable name used inside the foreach representing a node in `contact.Node` object. Assuming `c` stands for contact in this case. | |
Re: You can use the same DLL's as in the windows forms with the web based solution :) If i remember rightly (not used in about 5 months) its simply a matter of referncing the DLL's and you can use their contents within the c# side of the webpages, therefore allowing … | |
Re: ChrisHunter is right here, we cannot provide help to a problem which we cannot even see let alone understand. If you give us the input (you have) and the output desired (lacking) we can find the solution. | |
Re: Could try a message box displaying a datetime down to milliseconds to see which executes first? Should be a slightly noticeable difference in the millisecond portion of the time? | |
Re: Edit: Mitja Bonca beat me to it! An alternate way to carry out ChrisHunter's suggestion, including handling for non-numeric input would be a TryParse. int guessedNumber; bool parseSucceeded = Int32.TryParse(textBox1.Text, guessedNumber); This will set the bool `parseSucceeded` to true if the text in `textBox1.Text` was numeric and could be converted, … | |
Re: Hi Trady, I got the result layout you wanted using the following XSLT stylesheet: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:cs="urn:cs" exclude-result-prefixes="cs msxsl" > <xsl:output method="text" omit-xml-declaration="yes" indent="no"/> <xsl:template match="order"> <xsl:apply-templates select="workflows"/> </xsl:template> <xsl:template match="workflows"> <xsl:for-each select="workflow/items/orderitem"> <xsl:value-of select="@id"/> <xsl:text> </xsl:text> <xsl:for-each select="jobs/job"> <xsl:value-of select="@id"/> <xsl:text> </xsl:text> </xsl:for-each> <xsl:text>
</xsl:text> </xsl:for-each> </xsl:template> </xsl:stylesheet> Hope this … | |
Re: Tried forcing the application to run as an administrator? | |
Re: A quick google found this. [Link](http://www.ibm.com/developerworks/xml/library/x-tipcombxslt/) | |
Re: Could you put the CDATA credit card number value into a variable and then use that instead of trying to read the node? | |
Re: Could you explain the 2nd post as your "output" code is the same as input with the namespace declaration shown twice. Which namespace (if any) are your nodes in? Im assuming none in which case will get back to you with the XSLT shortly. My XSLT: <xsl:stylesheet version="1.0" xmlns:x="http://something.com" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" … | |
Does anyone know if this is possible and if so how I would go about it, as it has currently got me stumped completely! Thanks in Advance, Mike | |
Firstly I will say im a complete and total novice when it comes to XSLT and XML so this could be a very obvious mistake on my behalf. [CODE] <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="node()"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="TestNode"> <RenamedNode> <xsl:copy-of select="."/> </RenamedNode> </xsl:template> </xsl:stylesheet> [/CODE] When … | |
Re: Could you clarify your issue a bit more? Am i understanding you right in the fact your issue is that the browser hangs while the database operation is run? | |
Re: Trin, You would need to use the same switch concept but store the numbers in an array and loop through each number in the array running the switch statement. This would allow all numbers to be processed :) So 238947864 would be processed as: 2 - 3 - 8 - … | |
Re: Skata is right, look into WPF for decent UI's :) | |
Just wondering if it is possible to see the applications running within ApplicationPools on IIS7. Im able to access all the pools and see their settings yet cant seem to work out how to see what applications are running in each :( Regards, | |
Re: [CODE]MessageBox.Show("MessageGoesHere");[/CODE] This, when running a windows forms application, will display a popup message box on screen displaying the information you have passed it within the brackets. [CODE]return x;[/CODE] Return is used to send a variable back from a method to the block of code that called the method. It is … | |
Re: Could try running it with a sleep of (500), equivalent of half a second. Thread.Sleep() Is safe as it literally pauses execution of the thread and so therefore just makes the computer wait before running your next line of code, might give it the time to close the connection properly … | |
Re: [URL="http://www.daniweb.com/software-development/csharp/threads/408555"]Duplicate?[/URL] | |
I currently need to be able to read through an XML document, find certain nodes and either delete them (and child nodes) or edit the nodes name and possibly value. What would be the best way of going about this? XPath? XSLT? XMLReader/XMLWriter? My Code/XML contents cannot be posted though. | |
Hi all, I am looking to have a long process running in the background to my main form with a timer ticking on the main form animating the elipsis on the end of some text. Was looking for some insight into the best way to go about this and any … | |
Re: What do you mean by set case sensitivity? If you are comparing within c# the strings that you pull from the password field of the database will be compared case sensitive by default. | |
Re: Could try something like: [CODE] while (totality <= 50000) { if (!(totality + job[i]) >= 50000) totality = totality + job[i]; i++; } [/CODE] | |
Re: As a matter of good practice I would manually dispose of the elements after each use, not relying on a garbage collection then and should hopefully resolve the error. | |
Re: Surely there is just a lack of rows in whatever you are pulling as you are looking for the row (2) so the third row in. Run a debug and use a break point to see what is contained within the schedule and see if that helps to solve the … | |
Re: As its not running in an AJAX panel from what I can see, would the page also need a postback to apply the colour change? Admittedly I lack experience within ASP.Net but that would be my first idea :) | |
Re: So what exactly are you trying to do? Move the label around so that the text always appears in the middle? Could you not just make the label the maximum size it could be and set the text align to middle? | |
Just a quick suggestion but it would be useful to be able to filter down all the threads in a section to the ones you have replied too, using the tabs at the top. As there is definately space for another tab :D Implementing it could not be so easy … | |
Re: Wheater, Do you wish to use your own database for this or the built in ASP.Net database? As this can very easily be done using the built in one however I've had issues in the past trying to then link the ASP.Net DB to a custom one for the other … | |
Re: Have a look at [URL="http://www.codeproject.com/KB/recipes/StoringPasswords.aspx"]this[/URL]. | |
Re: Have you considered using the MouseClick property of the form instead? | |
Re: So the issue is that when you click on a non-visible picture box it doesnt become visible? I would assume you cant click on a picture box you cannot see therefore may have to consider setting the picture to a placeholder picture and store the assigned images in an array … | |
Re: You need to bind the method to the form's KeyUp method available in the properties. I don't think it can be done using KeyPress instead. The following should work. Assuming your using a WinForm of course.. [CODE] private void Form1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F2) { //Enter … | |
Re: Stuck in the for loop im assuming? From a quick glance over may this be your issue? [CODE] for (int i = 1; i <= MAX_COURSES; i++) // ## Increments i by one here everytime loop occurs ## { try { { if (IsValidData()) { // Gets user input from … | |
Hi there, I have two tables in my data entity model accessed by StaffDB. Staffs contains: StaffID FirstName LastName Address Town County Postcode YearJoined CurrentGrade Role Ratings contains: RatingID StaffID Date Rating1 (automatic to avoid conflict with table name also of rating) Comments These are linked by StaffID. I am … | |
Hi all, The project I am currently working on is an Address Book which works off a csv (specification takes the mick as a database would be so much easier), the method to write the lines of information into the CSV is in the class DataLayer and takes a String: … | |
Hi all, My program is proving Kaprekar's Constant - 6174. To do this I will need to store values exactly how they come out without losing any preceding 0's which int has a habit of cutting off. For example: Number to store exactly: 0147 Int stores: 147 A googling session … | |
Re: Have you tried using the length function in VB.Net? [code=VB.Net] If isNumeric(myDouble) = True Then '// Checks to see that string entered is numbers If Len(myDouble) = 5 Then '// Checks length of the entered string is 5 lblmessage.Text = "this is a five digit code" Else lblmessage.Text = "Not … ![]() | |
Re: Do you mean generate a random number between those boundaries? | |
Re: Try this: [Code=VB.NET] If password.text <> confirmpassword.text Then Msgbox("Password not the same") End If [/Code] | |
The code for this is: [CODE=VB.NET]'IMAGE HANDLING Dim bytes() As Byte = DS.Tables("Location").Rows(0).Item(4) Dim ProductImage As Image = Image.FromStream(New System.IO.MemoryStream(bytes)) pic_ProductImageDisplay.Image = ProductImage pic_ProductImageDisplay.Load()[/CODE] The error occurs line 3 stating "ArgumentException was unhandled: Parameter is not valid." Any idea on a solution to this problem? ![]() | |
Re: Have a look at [URL="http://www.stellarpc.com/articles/board.aspx?id=37"][B]THIS[/B][/URL] webpage. Can apply the same technique of date/time measurement possibly? Not entirely sure though. |
The End.