|
|
I am working on a small project in which i need to get the info about other users that i would like to see the profile of who come under the criteria i want.
so lets say i want come one slim and from height 5-6 and between the age of 18 21.. i have the xml file of people.. so should i convert xml into array first and then do something with it.. or should i find the stuff i need take it out of xml and then put it in the array and then show it out.. either way how can i do it good and best without alot of headache.. thanks alot
<Clients>
<Username>Username</Username>
<Password>Password</Password>
<Alias>MyAlias</Alias>
<BodyType>Athletic</BodyType>
<Height>5</Height>
<DisplayHeight>5'9''</DisplayHeight>
<Age>19</Age>
<Gender>Male</Gender>
<Income>$45,000 to $ 60,000</Income>
<CriteriaBodyType>Slim / Selender</CriteriaBodyType>
<CriteriaHeightfrom>5</CriteriaHeightfrom>
<CriteriaHeightto>6</CriteriaHeightto>
<CriteriaAgesfrom>18</CriteriaAgesfrom>
<CriteriaAgesto>20</CriteriaAgesto>
</Clients>
<Clients>
<Username>User2</Username>
<Password>sheepy</Password>
<Alias>TJ</Alias>
<BodyType>Athletic</BodyType>
<Height>5</Height>
<DisplayHeight>5'9''</DisplayHeight>
<Age>20</Age>
<Gender>Male</Gender>
<Income>$45,000 to $ 60,000</Income>
<CriteriaBodyType>Slim / Selender</CriteriaBodyType>
<CriteriaHeightfrom>5</CriteriaHeightfrom>
<CriteriaHeightto>6</CriteriaHeightto>
<CriteriaAgesfrom>18</CriteriaAgesfrom>
<CriteriaAgesto>20</CriteriaAgesto>
</Clients>
<Clients>
<Username>Claudia</Username>
<Password>pass</Password>
<Alias>ALIASCLAUDIA</Alias>
<BodyType>Body Builder</BodyType>
<Height>5</Height>
<DisplayHeight>5'</DisplayHeight>
<Age>20</Age>
<Gender>Female</Gender>
<Income>$30,000 to $45,000</Income>
<CriteriaBodyType>Some Extra Baggage</CriteriaBodyType>
<CriteriaHeightfrom>5</CriteriaHeightfrom>
<CriteriaHeightto>5</CriteriaHeightto>
<CriteriaAgesfrom>18</CriteriaAgesfrom>
<CriteriaAgesto>25</CriteriaAgesto>
</Clients>
</ClientData>
|
|
|
|
|
faizych wrote: so lets say i want come one slim
You want "come one slim"? Really? You think we know what that means?
faizych wrote: how can i do it good and best without alot of headache
That depends on what all that means. If it means no headache for you because someone here does it for you then good luck, not me. I help people that do the work themselves. Part of doing the work of software development is learning the technologies you need to use so that you can understand how they work. The reason we want to know how they work is because when we know that, we know how to proceed with our work using them. See how that all comes together?
|
|
|
|
|
lol sorry about that what i was trying to do was give the situation. That let's say i am looking for someone with a body type: slim and height: from 5 to 6.. and age from: 18 to 20.. so should i go into xml and filter all that out and then put it in the array or should i convert to whole xml into array and then filter the data out.. of the people who come under all those criterias. because what i am trying to do is that i need a control or whatever i can do to make it into a box which shows the info about one of my match.. and then i can click the next button to show me the next match.. so i thought the easiest way to do that is put all the results in array and then go through them and that control will work easier..
and what i mean by how can i do it good and best without alot of headache is not that i want someone else to do it for me.. i just want the way so i don't end up doing something totally wrong and end up no where.. i just want the directions.
thanks
|
|
|
|
|
faizych wrote: so i thought the easiest way to do that is put all the results in array and then go through them and that control will work easier
Sure, that sounds fine, unless of course you have 100 million of them, or maybe even other considerations that we have no way of knowing they exist. But otherwise, all things being, um, something that sounds so peachy.
|
|
|
|
|
If you can use .NET 3.5, I suggest you to give a try to LinqToXml[^]
|
|
|
|
|
Helo,
I need to create a dynamical organization chart using visio from C# code.
Currently im using the following code only to test nothing special.
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
axViewer1.SRC = openFileDialog1.FileName;
Microsoft.Office.Interop.Visio.Application app = new Microsoft.Office.Interop.Visio.Application();
Microsoft.Office.Interop.Visio.Page currentpage = app.Documents.Open(openFileDialog1.FileName).Pages[1];
Microsoft.Office.Interop.Visio.Document stencil = app.Documents.OpenEx("Basic_U.vss", (short)Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visOpenDocked);
Microsoft.Office.Interop.Visio.Shape shape2 = currentpage.Drop(stencil.Masters["Square"], 10, 7.50);
Microsoft.Office.Interop.Visio.Shape connector = currentpage.Drop(stencil.Masters["Dynamic connector"], 4.50, 4.50);
}
now the problem is here. On my computer the application is working fine because i have Visio 2007 installed and shapes are added etc.. but when the application is going to be used by the clients and they dont have visio installed the whole applicaiton wont work. Is there a way which i can create the charts dynamicaly at runtime without visio being installed??
|
|
|
|
|
I don't think so, it's like getting on a train where you didn't buy a trainticket.
If the app doesn't work, try the 'try-catch' method around the area's where you are trying to do something with the visio files.
edit: wtf... I wrote around with a T, I'm soo ashamed of myself
|
|
|
|
|
No the application works fine on my computer where i have visio installed but it dosent work on the other computer im testing it on that dosen't have visio installed. Is there some other librariy that i can use to draw charts. Because to be honest the main reason im using this is to create a family tree.
|
|
|
|
|
If you just want to draw charts you can
1. make your own library
2. use an external library.
You could use Dundas Charting (you've got to pay for this)
or you can use something like this: charts[^]
|
|
|
|
|
Unfortunately you need visio installed to use the Visio COM Interop Objects.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
hi
I have a simple XML file with few nodes
in the file I store values for fields in my DB
how can I send the file to my DB and update my tables ?
|
|
|
|
|
Start by posting in the correct forum.
|
|
|
|
|
Does anyone know a way how to deserialise and edit the acl values represented here?
|
|
|
|
|
From time to time I would like to have the ability to copy a file through the network to some of our remote locations but control the bandwidth because they have much slower connections. I've used nullsoft's nscopy before, but figured this would be a good learning expierence if I could create my own app to be more fine tuned to my environment. I have a general idea of what I need to do, but am not sure where to start. Looking at the system.IO.file.copy method it doesn't look like there's an overload that controls bandwidth. Then I started to think maybe I need to take the file and create a file stream and pass that through the network somehow, but that's where I get stuck. Has anyone tried doing something like this before? I'm just looking for a nudge in the right direction.
Thanks!
"You're damned if you do, and you're damned if you dont" - Bart Simpson
|
|
|
|
|
You're already moving in the right direction
You'd indeed start out with a streamreader and a streamwriter. Instead of filling the stream at once, fill it block by block of data. This will result in a read/write loop that you can throttle if desired.
There's a handy sheet-cheat here[^].
I are troll
|
|
|
|
|
AH! Thank you very much for the help and the sheet-cheat eddy! I continued to get stuck because I was aproaching the task thinking I could handle the bandwidth speed from the network side and not the stream reader!
"You're damned if you do, and you're damned if you dont" - Bart Simpson
|
|
|
|
|
You're welcome
I are troll
|
|
|
|
|
Ill try keep it short, Usually when I write networking applications, I spawn a new thread every time a client connects to the server. This works fine for my small time applications, but how do people who deploy large scale servers handle client communications? If you have thousands of users, for example a simple busy irc server, surely you cant spawn threads for all the users, what other methods are there?
Andy
|
|
|
|
|
If I remember correctly IRC uses UDP, so there's only a few inbound connections, and a big list that it broadcasts out to with all the clients. Usually with an upstream server in that list so the other server can handle it's list of clients as well. I do know several online games use something similar to handle their loads. Login servers redirect each connection to a different communication server, the communication servers have a private link between them to relay data, while each one broadcasts data out to it's list of clients. Leaving just a few connections from the comm servers going back to the application servers.
The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.
|
|
|
|
|
Hello all
I deploy my application using clickonce; When upgarde a new version, it is installed to client pc.
I want to know if the click once downloads each time all files existing for this version on the server on only the modified files; I mean if a dll didn't changed and i publish the application and put it on the server; is this dll re downloaded from the server or it it is copied from the previous version existing on client machine.
if this isn't the case; Can anyone help me to avoid downloading files not modified to client machine.
Best Regards
|
|
|
|
|
|
The code shown below is with which im messed up............
The problem is 'thread1' and 'thread2' are working simultaneously but the output is not in the correct format. Please check this out and please help with proper solution. I want both load_1() and load_2() to be shown properly. it is very urgent. Waiting for your reply!!!
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
namespace Loading
{
class loading
{
public static void load_1()
{
Console.SetCursorPosition(0, 2);
for (int l = 1; l <= 50; l++)
{
Console.Write("\\\b");
Thread.Sleep(50);
Console.Write("|\b");
Thread.Sleep(50);
Console.Write("/ \b");
Thread.Sleep(50);
Console.Write("\b");
Console.Write("|");
}
}
public static void load_2()
{
for (int load = 0; load <= 100; load++)
{
Thread.Sleep(10);
Console.SetCursorPosition(25, 4);
Console.Write("{0}%", load);
}
}
static void Main(string[] args)
{
Console.SetCursorPosition(16, 4);
Console.Write("LOADING:");
Thread thread1 = new Thread(new ThreadStart(load_1));
Thread thread2 = new Thread(new ThreadStart(load_2));
thread1.Start();
thread2.Start();
thread1.Join();
thread2.Join();
}
}
}
LINTO
|
|
|
|
|
linto_11 wrote: it is very urgent.
really? trying to fake an exam? snatching a job?
If noone else does I'll answer tomorrow.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Mr. Luc Pattyn, actually im searching answer for that code since 2 days. If u can give me the answer it would be very nice of you!!
LINTO
|
|
|
|