|
Hi,
I want to convert a number from exponential form to decimal format , ie in [dot] "." notation. For example I wish to compute 0.5 ^ 100 I desire the answer to be "0.0000000000000000000000000000007888609052210118054117285652827862296732064351090230047702789306640625" instead of 7.88860905221012E-31.
I tried using
string temp=Math.Pow(0.5,100).ToString();
decimal d = Decimal.Parse(temp, System.Globalization.NumberStyles.Float);
but this did not help. Please suggest.
|
|
|
|
|
I suggest you read up on the decimal specification[^] as you are using the wrong tool for that job!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i used this code but my picturebox is changing value but my image in not fitting in that picturebox.. it comes half or first quadrant etc.
so please help me in this
private void Calculate_btn_Click(object sender, EventArgs e)
{
Bitmap sourceimage = (Bitmap)pictureBox2.Image.Clone();
int height = sourceimage.Size.Height;
int width = sourceimage.Size.Width;
float nPercent = 0;
float nPercentW = 0;
float nPercentH = 0;
int newheight = Convert.ToInt32(height_txt.Text);
int newwidth = Convert.ToInt32(width_txt.Text);
nPercentW = ((float)newheight / (float)height);
nPercentH = ((float)newwidth / (float)width);
if (nPercentH < nPercentW)
nPercent = nPercentH;
else
nPercent = nPercentW;
int destWidth = (int)(width * nPercent);
int destHeight = (int)(height * nPercent);
Bitmap b = new Bitmap(destWidth, destHeight);
Graphics g = Graphics.FromImage((Image)b);
g.DrawImage(sourceimage, 0, 0, destWidth, destHeight);
pictureBox3.Image = sourceimage;
pictureBox3.SizeMode = PictureBoxSizeMode.StretchImage;
|
|
|
|
|
how to load a partition/ drive in text box?
|
|
|
|
|
It's not even a 'Good morning'! It's maybe a 'Go' - go and improve the question so we can help you!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
|
Hi, I am looking for a way to insert a part or a whole file(tried with an excel sheet and a word doc to not much success) into a win word doc through microsoft word interop using VC#. I stumbled across the the range.insertfile() method but resources and information seem quite scarce however I googled it. I Has anyone been regularly using this and having success? Just curious.
|
|
|
|
|
Hello, I need some help.
Currently, I have a gridview that will update with the timer and also a button when clicked, will update the gridview.
So now, I am currently facing a problem regarding when scrolling the updatepanel/gridview, I would like it to remain at scrollbar position. But when I click on the button, I will like the updatepanel/gridview to return to bottom (already have the javascript).
Thanks in advance!
<div id="scrollChat" style="overflow: auto; width: 80%; height: 250px; margin-left: auto;
margin-right: auto;">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Timer ID="timer" runat="server" OnTick="timer_Tick" Interval="2000">
</asp:Timer>
<asp:UpdatePanel ID="upChat" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="timer" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:GridView ID="gvChat" runat="server" Style="width: 100%;" Font-Names="Verdana"
AutoGenerateColumns="True" ShowHeader="False" GridLines="None">
<RowStyle Height="25" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div id="chat" style="height: 1px;">
</div>
</div>
<div style="width: 100%; height: 100px; text-align: center; margin-bottom: 30px;">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:TextBox ID="tbMsg" Rows="3" Height="60px" Width="80%" TextMode="multiline" runat="server"
Style="margin-bottom: 15px;" Font-Names="Verdana" placeholder="Type your message here..."></asp:TextBox>
<br />
<asp:Button ID="btnSend" class="btn btn-primary btn-lg" runat="server" Text="Send"
OnClick="btnSend_Click" Width="200px" Font-Bold="true" Font-Names="Verdana" OnClientClick="btnSend_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
<br />
<br />
<script type="text/javascript">
Sys.Application.add_load(function () {
var t = document.getElementById('scrollChat');
t.scrollTop = t.scrollHeight;
});
</script>
|
|
|
|
|
Don't post the same thing in multiple places - it duplicates work and that annoys people.
Either post it in the forums, or QA - but not both.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
hi every one i make program it insert textBox in Word Document Using spire.dll
and it worked but when i use code for gradient fill effect to textbox it not worked so any one can help me by see my code and program and if can edit i will be thankful for him
my small project here and fill effect not work
http://www.4shared.com/rar/jkZqHHdqce/WindowsFormsApplication5.html[^]
|
|
|
|
|
|
Hello Guys,
Am facing an issue with namespace regarding WindowsInstaller
My code is to Read a MSI file and to write, other operations etc.
OS: Windows 7, 64 BIT
VS: VS2013
(I have WiX Toolset v3.8 installed on my machine, which will assist in windows installer funstions)
My Code starts like this:
using System;
using System.Linq;
using WindowsInstaller;
using Microsoft.Deployment.WindowsInstaller;
using Microsoft.Deployment.WindowsInstaller.Linq;
namespace ReadMSI
{
Error: "the type or namespace name 'deployment' does not exist in the namespace 'microsoft'"
I have related .dll installed to the below location.
"C:\Program Files (x86)\WiX Toolset v3.8\bin\Microsoft.Deployment.WindowsInstaller.dll"
Not sure what am missing.
Is this any issue with installing WiX Toolset v3.8
Please assist.
|
|
|
|
|
You have to add a reference in your project to the DLL. Right-click the project, and choose "Add Reference". Then select the DLL.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
i am making a program to resize image according to measurement is given in textbox. and that should display in picturebox.
but my picturebox is changing dimension which is good, but my image is not fitting in that picturebox.
i tried image size mode function but it didnt work
|
|
|
|
|
megha_p wrote: i tried image size mode function but it didnt work It is unlikely that anyone can guess from that exactly what your code does, or what is meant by "it didnt work". Please edit your question, explain exactly what you are trying to do, show the code that tries to do it, and give full details of what results you expect and what you actually see.
[edit]
I notice that this is the third time you have posted on this subject. Please try and follow the advice you have been given, and explain your problem clearly.
[/edit]
|
|
|
|
|
program of image processing using c#
|
|
|
|
|
It doesn't quite work like that.
We do not do your work for you.
If you want someone to write your code, you have to pay - I suggest you go to VWorker.com and ask there.
But be aware: you get what you pay for. Pay peanuts, get monkeys.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
In addition to what the others have said, remember that a question needs a ? mark.
And you need to be specific, as no one can tell what you are looking for exactly, so what would be a good answer to this?
|
|
|
|
|
Yes, this is possible.
|
|
|
|
|
|
I gave it a try for a password-manager I was writing; add a character every time that the user presses a key, to prevent it from becoming a string. Dropped it at that point, and followed below advice.
The Old New Thing[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
this is my best bet for securing the connection string.
fetch the encrypted connection string from app.config then store it in the securestring. so at-least the connectionstring is protected.
|
|
|
|
|
If they could read a normal string object straight from memory, then why can't they read from app.config?
|
|
|
|
|
Simply because the app.config is also encrypted.
|
|
|
|