|
Coder problem
|
View this Thread in Original format
| Orbax |
I realllllly need to stop using INT instead of DEC
rofl! |
|
|
| UWM |
You realllly need to spend less time playing with computers
lol |
|
|
| Orbax |
| quote: | Originally posted by UWM
You realllly need to spend less time playing with computers
lol |
This is 88 reasons about 44 l33t aspects (Of me)
 |
|
|
| getfoul |
private void saveXml()
{
XmlDocument document = new XmlDocument();
XmlDeclaration declariation = document.CreateXmlDeclaration("1.0", "utf-8", null);
document.AppendChild(declariation);
XmlElement quiz = document.CreateElement("quiz");
document.AppendChild(quiz);
quiz.SetAttribute("xmlns", "TiSD Module 4 Lab 2");
quiz.SetAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
int xmlCount = 0;
foreach (bool correct in correctArray)
{
//give quiz attributes
XmlElement question = document.CreateElement("Question");
question.SetAttribute("Correct", correct == true ? "True" : "False");
XmlText correctText = document.CreateTextNode(answerGiven[xmlCount++]);
question.AppendChild(correctText);
quiz.AppendChild(question);
}
//write XML to console.
Console.WriteLine("**********************");
XmlTextWriter writer = new XmlTextWriter("results.xml", Encoding.UTF8);
writer.Formatting = Formatting.Indented;
document.WriteTo(writer);
writer.Flush();
Console.WriteLine();
Console.WriteLine("**********************");
} |
|
|
| Orbax |
whats this w3 schools bullll :p
you using dreamweaver?!?!?!?!?!
edit: Also Im happy because Im starting to utilize direct MSSQL queries :*) |
|
|
| getfoul |
| I use Microsoft Visual Studio for C# and SQL |
|
|
| tephillim908 |
UGH...
I worked in the following languages today... C#, Perl (the same site that was using C#), PHP4 (and 5, dif projects), Javascript, oh and a lovely little language called VBscript.
I also worked in MySQL, PostgreSQL and MSQL as well...
Also none of this was my code except for the PHP stuff and the idiot who coded it (actually he isnt an idiot) didnt know how to work with any of them. |
|
|
| tephillim908 |
| Why were you using float/double/dec/whatever instead of int anyways? |
|
|
| Orbax |
I code Remedy. I was creating Integer fields instead of decimal fields because I was throwing it all together just to see if it would work...
I was setting a schedule of monday-friday; 8am-5pm as a workday and no sat/sun.
Then was saying well...if I set it for next Tuesday and want a warning when im 90% there...OR if I say 12 hours before due date...I want it to give me the time I have left in hours/ time it will warn me in %.
its for project managers to set SLAs for projects , requests, and tasks,
so once I finally got my business days going, I was like...lolololol I need decimals because the database handles them differently and it will only return rounded numbers (less than 1 = 0) and I cant divide by that !
Anyway...it was gay and Im still rebuilding all the fields and fixing all the workflow. |
|
|
| tephillim908 |
| quote: | Originally posted by Orbax
I code Remedy. I was creating Integer fields instead of decimal fields because I was throwing it all together just to see if it would work...
I was setting a schedule of monday-friday; 8am-5pm as a workday and no sat/sun.
Then was saying well...if I set it for next Tuesday and want a warning when im 90% there...OR if I say 12 hours before due date...I want it to give me the time I have left in hours/ time it will warn me in %.
its for project managers to set SLAs for projects , requests, and tasks,
so once I finally got my business days going, I was like...lolololol I need decimals because the database handles them differently and it will only return rounded numbers (less than 1 = 0) and I cant divide by that !
Anyway...it was gay and Im still rebuilding all the fields and fixing all the workflow. |
Oh, LOL I read it backwards, yea... I had to switch a couple different little aps to use decimals (they record distances) and one field has to be a int for a whole number distance and the other a float to hold larger numbers (miles).
It was a PITA because of the way I had set stuff up the first time. |
|
|
|
|