|
Som Shekhar wrote:
"I have added my comments to the question itself. There are some more areas to look at."
Hi Som,
Have edited the first code example to make the internal list<int?> of "current values to replace with if incoming item# is null" private and not static.
Will be able to review your comments later tonight (I live at GMT +7 by the way) to try to understand what you mean by "retrieving them back" : isn't the test example I show in the code ... where the keys and list values are being read out in a foreach loop ... and printed to the console ... an example of retrieving back the values ?
If I want the 3rd. item in the List<int?> in the dictionary t1 which is accessed by the key #4 : and I access it via :
t1[4][2]
Isn't that retrieving ?
Namaste, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
I guess you sent me a message. I didn't see it here though..
What I was looking for was a framework implementation to sort my issue. I have done something on my own already and it works currently. Just a speed improvement was needed.
I have already worked on multithreading and some decent work is already done... so only thing better would be a root level work.
|
|
|
|
|
in my c# app i have a socket communicating with a socket that is developed using java. i make a connection with it (long term)and stay idle for more than 3 hrs. but suddenly my connection goes down with out noticing any of the apps.
in java side it has set the connection timeout, in c# side it is not set(i didn't find an easy way to set it).both sides have set the "sokeepalive" to true.
any idea why this happens,
and also like to know when the "sokeepalive" is set is sends probes to check if the client is up, at that time if the timeout is set does this reset the timeout.
|
|
|
|
|
The TcpClient and the Socket classes both have the SendTimeout. Setting these will let you specify the timeouts you want to use.
I am really not surce how the sokeepalive works, so I can't help you on this, but I will at least try to create a keep-alive command as part of my communication protocol and call it manually.
|
|
|
|
|
Hello Everyone,
I have created a desktop application in VisualStudio2008 using C#. Now I am creating setup project for this application.
I am really very new for the setup and deployment project so I googled few documents and got some idea about it, but still I am unable to fix my issue.
Basically I want this application should install on users profile on stratup programs, so whenever users logs in application should start automatically.
I really appreciate if you guys can provide me solution for my small problem.
I am creating setup in VS2008.
Thanks.
|
|
|
|
|
- Right click the installer project in Solution View, select View --> File System
- Right Click "File System on Target Machine" --> Add Special Folder --> User's Startup Folder
- Select the Application Folder, Right click the Primary output & Create Shortcut.
- Move the shortcut to the Startup folder created in Step 2.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
maybe instead of installer feature make it an application setting..
using registry for example:
RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);
key.SetValue("%app_name%", Application.ExecutablePath);
key.Close();
life is study!!!
|
|
|
|
|
|
In what sense is it not solved yet? You are going to have to give us all a clue!
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
My setup should create a copy of "exe" here..
"Users\Guest\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\startup\My.exe"
so when users logon to his system then it will run automatically...
If there are anyother way to do that please let me know.
|
|
|
|
|
in the directory you pointed should be only a shortcut..
and it's done in a way keefb described
life is study!!!
|
|
|
|
|
Yes worked!!
Thanks guys...
|
|
|
|
|
Hi,
I was writing a validation function. Which is as follows
private void IsFolderValid1()
{
return false;
}
and somebody suggested me to write it in following way.
private void IsFolderValid1()
{
Get
{
return false;
}
}
Can u please explain me the reason. Whether it is right or wrong ?
Thanks
|
|
|
|
|
Your first version is right. Getters and Setters should be used for properties.
|
|
|
|
|
Hi,
none of that is correct, for several reasons:
1. if a property or method returns "false" its type should be boolean, not void.
2. property and method names normally shouldn't contain digits
3. method names normally contain a verb, and property names may or may not (preferably not, although IsValid would be acceptable)
4. private members use pascalCase, public ones CamelCase.
5. properties should always be public (protected could be OK, private is a bit strange).
6. properties don't take parentheses.
So choose one of these:
public boolean IsFolderValid() { ... return false;}
public boolean FolderValid {
get { ... return false; }
}
|
|
|
|
|
Hi there
I am building some database layer code and trying to be as database independent as possible.
One peeve is datetimes.
Does it make sense to avoid the use of the datetime objects provided by the database provider altogether and use a double field? Then use persist the dates to the double field using the DateTime.ToOADate method?
It seems to me then that I could easily do date comparisons such as "retrieve rows where date > <date>" where the <date> is converted to OA?
|
|
|
|
|
Why not just store the dates as ISO-8801 format?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
peh. store dates as strings? what's wrong with the existing date and datetime types, they have sufficient support.
IMO strings should be avoided for anything that isn't really a string, i.e. numbers, dates, ..., with a possible exception for small binary data encoded with say base64 (when BLOB isn't available or too expensive).
and then of course one should use SQLparameters to provide data, not string literals, when querying with e.g. a WHERE clause.
|
|
|
|
|
Luc Pattyn wrote: what's wrong with the existing date and datetime types,
For one, MS SQL Server only supports a subset of DateTime values, so your business layer needs to work around this before you store them in the db. Note, I'm not advocating store timestamps as strings.
/ravi
|
|
|
|
|
Except that bubba there wanted to make it db agnostic, and I've worked with a couple of databases in the past that have crap date and time support (hello Ingres, yes I'm talking about you, you malformed piece of relational dataloss crapturd).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
we could agree on Ingres not being a database then, hence no need to dumb down the whole world and turn agnostic into stupid. Next someone will find a "database" that can't handle real numbers; or strings of more than 6 characters; or Unicode...
When he asks "Does it make sense to avoid the use of the datetime objects..." my answer is NO.
|
|
|
|
|
Or one that doesn't have operator precedence?
|
|
|
|
|
Luc Pattyn wrote: When he asks "Does it make sense to avoid the use of the datetime objects..." my answer is NO.
I'd agree with that
Luc Pattyn wrote: agree on Ingres not being a database
and that.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Pete O'Hanlon wrote: I'd agree with that and that.
I'm glad to see you're back to normal; I suggest you keep ignoring the toaster.
|
|
|
|
|
Luc Pattyn wrote: I suggest you keep ignoring the toaster.
I've kicked the hussy out. I only have eyes for the microwave now.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|