|
Thank you! Plug-in was the term I was looking for.
Also, thank you for the link, I'm off to some happy coding.
|
|
|
|
|
|
Hi,
since:
- you can get synchronous exceptions, e.g. when the disk is full, the file locked, whatever;
- you can modify or Dispose the image right after the Save statement, without affecting the file content.
- the documentation tends to explicitly say so whenever something is asynchronous, and say nothing for everything synchronous.
Image.Save() to me looks like a blocking call.
If there is anything that makes you doubt that, why don't you provide your observations?
|
|
|
|
|
AFAIK, both Save methods are synchronous ('blocking' in your jargon).
|
|
|
|
|
Hi everyone
I have an XML file which I can read from using XmlDocument, XPath and XmlTextReader and all is well this far.
But is there a way that I can write data to an XML file, lets say entered from textboxes using the XmlDocument class?
Please I will appreciate any kind of help..
|
|
|
|
|
XmlDocument , or (surprise, surprise) XmlTextWriter
|
|
|
|
|
XmlDocument has a Write method, doesn't it?
|
|
|
|
|
XmlDocument xmlDoc;
.......
change xmldoc
.......
xmlDoc.Save(filePath);
|
|
|
|
|
Hi
I am trying to convert a 2D rectangular array (type [,]) to Image.... I saw examples for 1D array to Image and 2D array of type[][] to Image. I am new to C#. Please some one direct me to a site or code snapshot that shows me how to do it.
Thanks a lot
umesh
|
|
|
|
|
Try like the following:
<pre>
e.Graphics.DrawImage(New Bitmap(tile(TilePos.X, TilePos.Y)), TilePos.X * 30, TilePos.Y * 30)
</pre>
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Dear Sirs,
Who is the pro at creating Visual Studio addins? I don't want to use one of those canning programs, but rather I would like to write one from scratch. There seems to be a lack of examples and the documentation is `so-so.' Specifically I'm trying to change the background color in a code window, but only a certain portion of the code window. Let me know if you know anything about this, or provide a link to some good documentation or a tutorial. Thanks!
In Christ,
Aaron Laws
http://ProCure.com
|
|
|
|
|
I have developed a POS system. I am having problem opening the cash drawer that is attached with receipt printer. I have searched alot but i am not been able to find the right code that can work for me. I am using CBM 1000 receipt printer. Is there any one who has done such app, please help/assist me.
Thanks
|
|
|
|
|
i have an off topic question and want to know your advise..
I am using C$ and i want to know what's recmonnaded in order to have the best result?
should I save the debit and credit in a table in the same field (trxn_amount with + or - sign? or save them in separate fields (trx_amount_debit and trxn_amount_credit?
|
|
|
|
|
jrahma wrote: should I save the debit and credit in a table in the same field (trxn_amount with + or - sign? or save them in separate fields (trx_amount_debit and trxn_amount_credit?
What do you mean with "best result"? From a developers' perspective, things that are the same go into the same table. Splitting them into separate tables gives no advantages that I can think of.
--edit--
I'd simply derive the credit/debit type from the amount, e.g., everything positive is credit. Developers don't store the same information twice. So, from a dev's view, storing the credit/debit type is redundant if it's value can be derived from the stored information.
Now, I have been told that this is inconvenient for reporting, and that it's rather convenient to have a flag in the database that indicates the direction of the transaction. The thing I missed, is that I could be credited $-1, and that would be something completely different from being debited a dollar.
I are Troll
modified on Monday, December 7, 2009 11:38 AM
|
|
|
|
|
You should seperate field to store debit/credit type.
Value should be either Dr or Cr
|
|
|
|
|
save it in a same table with +ve and -ve sign
|
|
|
|
|
Use separate columns to store debit and credit values.
If you are asked to get totals of debits and credits, you just do a SUM() without a need for WHERE clause.
Since the values have a wide distribution of data, indexes created on these columns tend to be larger. The separate column solution avoids creation of indexes on these columns.
|
|
|
|
|
"Classic" bookkeeping / accounting reports and forms always show the Debits and Credits in separate columns.
While your calculations for figuring out "account balances" may require a bit more work, your reporting requirements, GUI / Forms design, and batch balancing are greatly simplified.
(The DBA types will shriek in horror, however)
|
|
|
|
|
Hi Guys. I need to know how to determine the least significan't digits from a number. Now, I'm calculating a bunch of numbers and the total comes to say 17 digits in total. I need to only use ythe last significant 12 digits from the 13 digits. HOw do I determine what the least significant digits are?
As an example:
The calulated value is: 865807311427710
From this number I want to only obtain 807311427710.
The problem I am having is that the calculated value can be any amount of digits long.
Any help will be greatly appreciated.
Thanks
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Brute force and ingnorance approach: Convert to a string, use substring to get the right hand end.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"
|
|
|
|
|
Sounds easy enough but the problem is that I have no idea how long the string will be. It could be 20 digits, 30 digits, 15 digits or 12 digits.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
So? Why would you care?
number.ToString() doesn't care how long it is.
string.Length tells you how long the other one is.
You know how many digits you want to keep...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"
|
|
|
|
|
Aye, I got it. Below is what I have done.
FinalHash = homingTotal + OverFlow + ContraHash;
string hashfinal = Convert.ToString(FinalHash);
int length = hashfinal.Length;
int remove = length - 12;
outhash = hashfinal.Substring(remove, 12);
finalhashtotal = Convert.ToInt64(outhash);
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
How about
long lDigits = lCalulatedVal % 1000000000000;
this should do the trick.
Greetings
Covean
|
|
|
|
|
Hello
Could you please help me to make a convertion from a structure to byte array?
Is there any function to do that?
I would appreciate if you could give a short sample of code
Thanks
|
|
|
|