|
Thanks.
I always plan to post cool stuffs but never do due to having to go through all that publishing a web-page for it.. Never been much of a writer and am not a native English speaker so I always find out afterward that I written something funny too.
I'll go look where the tips&tricks area is.
Yours,
<><<br mode="hold" />Itai
|
|
|
|
|
And about remembering the password - no worries - since I need it to download sources.
Anyway - I posted as top/trick. now I need to change the awkward signature since it's got html symbols in it and looks weird after it's posted
Yours,
<><<br mode="hold" />Itai
|
|
|
|
|
I'm just glad you weren't discouraged by a grumpy old bugger on a Sunday morning!
There is a definite warm, fuzzy feeling when you see your contribution put to use by others, it's the main reason why this site works I think, people actually do want to help.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I second it as a tip/trick, or at least as a blog entry.
|
|
|
|
|
Agree with others. Based on length better post it as a blog post. If possible attach download for the source code.
Off Topic:
I found broken text in your signature.
thatraja
My Tip/Tricks My Dad had a Heart Attack on this day so don't...
All these are my opinions. Different people. different way of thinking. I am no one to judge others - Chandru
|
|
|
|
|
hi all
I have uploaded a picture into table but i am stuck, that how may I show the picture in Crystal Reports from table.
I used following codes to upload the picture it works fine
fileStream = new System.IO.FileStream(strFile, System.IO.FileMode.Open, System.IO.FileAccess.Read);
reader = new System.IO.BinaryReader(fileStream);
data = reader.ReadBytes((int)fileStream.Length);
cmd = new OleDbCommand();
cmd.Connection = Module.objConnection;
string strQuery =
"SELECT * FROM PICTURES WHERE " +
"STCODE="+ textBox1.Text +" AND " +
"STSEQ="+ dataGridView1["STSEQ",dataGridView1.CurrentCell.RowIndex].Value.ToString() +" ";
cmd.CommandText = strQuery;
dr = cmd.ExecuteReader();
if (dr.HasRows == false)
{
dr.Close();
cmd.CommandText = "INSERT INTO PICTURES (STCODE,STRNO,STSEQ,FILENAME,FILESIZE,FILETYPE) " +
"VALUES(" + textBox1.Text + ", " +
"" + dataGridView1["STRNO", dataGridView1.CurrentCell.RowIndex].Value.ToString() + ", " +
"" + dataGridView1["STSEQ", dataGridView1.CurrentCell.RowIndex].Value.ToString() + ", " +
"'" + fileName + "'," + data.Length + ",'" + type + "') ";
cmd.ExecuteNonQuery();
(Riaz)
|
|
|
|
|
|
I need to decode CSR message (pkcs#10) to solve different kind of broblems in it.
The following piece of code works fine, but unfortunately only in vista and windows7, which uses Certenroll.lib. My code will be used also in XP, why I have included Xenroll.lib into my code as well. But what is the respective piece of code using xenroll to decode pkcs#10 request?
if (Environment.OSVersion.Version.Major >= 6)
{
CX509CertificateRequestPkcs10 request = new CX509CertificateRequestPkcs10();
request.InitializeDecode(txtP10.Text, EncodingType.XCN_CRYPT_STRING_BASE64_ANY); request.CheckSignature(Pkcs10AllowedSignatureTypes.AllowedKeySignature);
lblSubject.Text = "Subject:" + (((CX500DistinguishedName)request.Subject).Name);
lblKeyLenght.Text = "Key length:" + (request.PublicKey.Length);
lblAlgorithm.Text = "Algorithm:" + (request.HashAlgorithm.FriendlyName);
}
else
{
}
Thanks for any help!
modified on Wednesday, August 24, 2011 1:44 PM
|
|
|
|
|
Hello I have the "following" code:
controller = Controller.BuildSingleRow(_sheet);
_animator = Animator
.WithStartupInfo(_controller, PlayMode.Normal, 1f);
I have used a static method in the Controller class to setup some method of build pattern, I was going to use a constructor but a static instantiation won it for me.
Is this bad to do this?
Thanks
|
|
|
|
|
Seems OK, depends on the usage.
|
|
|
|
|
Read up on static constructors [^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I read through it and I can see how that would be useful however "perform a particular action that needs performed once only", I intended those methods to be used more than once and to increase the usability of the code.
So when people see:
Controller.BuildSingleRow(_sheet);
They realise that it constructs the object set to a single row sprite sheet...
It seems ok to me but im sure there is someone out there who would slap me in the face...
|
|
|
|
|
It seems related to the Abstract Factory and Factory Method Design Patterns, but not as complex.
|
|
|
|
|
It is not bad if there is a good reason why the 'constructor' shouldn't actually be a constructor in language terms. For example, if Controller is a pseudo-factory class that can actually build several different final classes in these methods, or the build methods need differentiation by name for clarity.
If this is the only 'BuildXxx' method and it returns an instance of Controller, it should be a constructor (and the class should probably be named with the 'single row' aspect) – after all, that's what a constructor is, a static method that returns a new instance of the class, and people expect to instantiate classes that way.
One small point to bear in mind is that any sort of reflection-based instantiation is not likely to find your static method. You may well not be doing any of that though.
|
|
|
|
|
hi
This is kind of desparate - Is it possible to call Excel XLA function from .NET via Microsoft.Office.Interop?
Many thanks!
dev
|
|
|
|
|
I am creating a window application that need to use sql server database. I want to install this application to client machine without installing sql server or sql express so that my application can still connect to a database on server that i will be providing at client system.
How can i connect to a database(mdf) on client machine through my window application without installing sql server. ? I dont know is it possible or not.
is this software sifficient :
ADONETDataServices_v15_CTP1.exe
|
|
|
|
|
Edit it your message and take the text out of the code block, it doesn't look good.
|
|
|
|
|
Just develop the application as normal, and use the System.Data namepsace which include SQL client classes for working with an existing SQL database. Then all you need to ensure is the relevant version of the .Net framework is installed on the client machine you are installing the application on.
Going by the question, I would take it you are new to all this, and will have some interesting challenges ahead.
Search the articles on CodeProject for SQL and C#.
|
|
|
|
|
As Dave has already answered, develop your application as if it was intended for a local instance of SQL Server, but put your connection string into a app.config file to make it easier to change later. You can test most of the functionality on a local copy of SQL Server Express, then change the connection string before you install it on a client to point to the SQL Server instance located on the network server.
For lack of time, I haven't yet completed the app I've been working on to accomplish much the same. But I have managed to get some major bits working. I've got some code around here that allows the user to browse for SQL Server instances on the network, select one and connect to it. I've also got some unfinished, but mostly working stuff to check for the existence of the target database on the selected server, or create the database if it doesn't yet exist. The pieces all work great, but I haven't got around to integrating them all together into a completed application. It has been extremely challenging, but everything needed is available either here at CodeProject, or on MSDN (via Google). Get started on a client-only version, and when you have it working, post again about this remote connection aspect. Maybe I'll be done with it and be able to send you specifics...
Good luck, learn lots, and have fun!
Will Rogers never met me.
|
|
|
|
|
hello everyone,
I must make an application to send commands from one company to another B transmission. I really do not know where to start so thank you for help.
|
|
|
|
|
vanjier wrote: I really do not know where to start
You could start by explaining what type of commands you want to send and how you wish to send them; telephone, fax, email, sockets, HTML etc.
|
|
|
|
|
Hi,
It is a list of grugs from a grug store to a distributor and I must use the telephon line to cummunicate with the distributor's store modem in order to send the list to him so that he will deliver the goods to the drug store !!
-Excuse my english I dont speak english very well -
thanks
|
|
|
|
|
You will need a program at each end to handle both sending and receiving the data. You will probably need to talk to your distributor in the first instance to see what facilities they have for receiving the lists. If you are writing both parts of the program then you probably need to investigate some of these links[^] for possible code samples.
|
|
|
|
|
^the links you give to me are very helpful thank you very much
|
|
|
|
|
Does your distributor not have an Internet connection? Doing this with an IP level tool is far, far easier than doing direct dial telephony – even something as simple as sending emails to a designated mailbox that you write a cron job to pick up at the other end.
|
|
|
|