|
|
nice find Mia - I'll remember that
|
|
|
|
|
Like very wow, great link. Thanks much Gonna take a while to digest it all, but I found some great tips I can use now.
The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.
|
|
|
|
|
Hi,
if the data initially are numbers, not strings, then don't use strings.
if the first numbers of all pairs have different values, you have two choices:
- the generic Dictionary < int, int > since it stores pairs of numbers, be warned it does not preserve order.
- or, since the range is very limited, have a 10-element array and choose a special value to indicate absence of a pair.
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
|
|
|
|
|
I thought of those, that's why I was asking if someone had more info on their performance. If I use an array, I have to add in code to check what the last used element was, in order to add new values on to the end. If I use a collection (ordering isn't important for the data) then I have the overhead of a linked list. With the string being essentially an array of char[] I was pretty sure it would come down to either the string or just an array if there was enough overhead removal to warrant the code change.
From the link I was given, it looks like that fastest way to go is going to be a 48 element array. Since I'm only dealing with at most 4 of them at a time, they should stay in cache. I only have to keep track of how many elements are there during the adding process to prevent having to scan the array before every addition. For reading I have an easy cheat, since 0 isn't a valid value, I'll know when I hit the last element.
What I think will also help out a lot is some restructuring of the class that's being worked with to produce the number lists in the first place. It's a small class to begin with and I think I can reduce it down to a value type struct, by moving the functions into the container class. If all goes well, the whole mess should fold up into cache with a bit of room to spare. Then it should just come down to figuring out how many sets I can queue up from the database at a time.
The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.
|
|
|
|
|
when i Start to create the Project first i did little mess and try some experiment with MS SQL.
Now I working with MYSQL... any way when i publish the project the set file looking for this:
The following prerequisites are required:
* Windows Installer 3.1
* .NET Framework 3.5 SP1
* SQL Server Compact 3.5
* Windows Installer 4.5
* SQL Server 2008 Express Edition
How can i remove the relationship with the these SQL components that i really don't need???
|
|
|
|
|
clean out your references and check your prerequisites in the project properties.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello,
I'm having a very strange problem within c# that when I attempt to
query for the list of ReplicationGroupName in DFS, I do not receive
any information; however when I run the same query using WMIC, I get
results.
Here is my c# code ("TargetMachine" being a DFS member server)
System.Management.ManagementScope oMs = new
System.Management.ManagementScope("\\\\" + TargetMachine + "\\root\\microsoftdfs");
oMs.Connect();
System.Management.ObjectQuery oQuery = newSystem.Management.ObjectQuery("SELECT ReplicationGroupName FROM DfsrReplicationGroupConfig");
ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oMs, oQuery);
foreach (var item in oSearcher.Get())
{
MessageBox.Show(item.ToString());
}
The following works:
WMIC /node:"dynamic-dc01" /namespace:\\root\microsoftdfs path DfsrReplicationGroupConfig get ReplicationGroupName
Why would the C# code not work?
Thanks very much,
Matt Brown
|
|
|
|
|
bump
|
|
|
|
|
hi
how to carry textbox pointer forward or back ?
thanks
|
|
|
|
|
If you're referring to the cursor, you can use the arrow keys. If you want to do it programmatically, then set the SelectionStart and SelectionLength properties
|
|
|
|
|
thanks a lot
i forgot arrow keys i think only selectionstart and selectionlength
|
|
|
|
|
how a dataset can transfer from server to client using socket programming in C#. Is it possible?
|
|
|
|
|
Create a NetworkStream between the two computers and serialise the DataSet across it. Use a CryptoStream if you need security
|
|
|
|
|
Please send some example code related to this.
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.aspx
|
|
|
|
|
If I do that, you won't learn from it. The most that you will get out of me is some pseudo-code
Client
Start listening on port x
Set up a background thread. When you receive data, use TcpClient.GetStream to get the NetworkStream
Deserialise the NetworkStream into a DataSet
Close the NetworkStream and TcpClient
Server
Accept an IP address
Try to connect to the IP address, on port x (this is the same port as the client)
When you have connected, simply use the same TcpClient.GetStream method as a data sink. Serialise the DataSet into this Stream
Close the NetworkStream and TcpClient
If you really wanted to, you could make this more complex (status codes, etc), but that's the basic gist of it. If you need code, then search Google for a simple chat application (this gets you the basic infrastructure) and serialisation (this will cover the transfer of the DataSet)
|
|
|
|
|
hi friends....plz help me that how to group set of rectangles...
txs in advance..
|
|
|
|
|
use a System.String...
to tie them together!!!!
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
hilarious
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
that was pretty good... have not thought of a string like that in some time...
|
|
|
|
|
In an array Rectangle[] or a list List<Rectangle> possibly?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Use an IEnumerable. If you want the grouping done for you, then look into LINQ - specifically, the group clause
|
|
|
|
|
how can I struct the 8 queen tree for FIFO searching and putting 8 queen in their correct position?
|
|
|
|
|
By knowing the answer and then doing it.
... if this post has been as helpful as your question then please vote it 5.
Thanks for your time
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|