|
I am. Is spend over 70% of my development time on whiteboard or LibreOffice...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
I am working on asp.net web application. I have a code which display data to the user in table format through Repeater Control. There is one column which has two signs plus and minus. I have to display data of n records, so there could be maximum n no. of rows. Initally there will be textboxs User will fill details in that if he wants, When user clicks on plus sign, one row will be added to repeater.if he clicks minus in a row that particular row will be deleted.This process handled on client side not on server side.
So i have yet done plus button code through datatable...Now i want to remove the row on client side through minus button ..
Any One help......plz
protected void btnAdd_Click(object sender, EventArgs e)
{
if (!dt.Columns.Contains("Sno"))
{
dt.Columns.Add("Sno");
}
if (!dt.Columns.Contains("ItemName"))
{
dt.Columns.Add("ItemName");
}
if (!dt.Columns.Contains("ItemQuantity"))
{
dt.Columns.Add("Quantity");
}
if (!dt.Columns.Contains("Price"))
{
dt.Columns.Add("Price");
}
if (Session["datatable"] != null)
{
dt = (DataTable)Session["datatable"];
}
dr = dt.NewRow();
dr[0] = txtSno.Text;
dr[1] = txtItemName.Text;
dr[2] = txtQuantity.Text;
dr[3] = txtPrice.Text;
repeater1.DataSource = dt;
repeater1.DataBind();
}
|
|
|
|
|
|
Thanx .........thats work..
|
|
|
|
|
Hello,
I need to convert US7ASCII data to UTF8 or binary without changing the character set.
I just can search the broken data becasue the stored data is not English.
I tried like this :
Select convert(column_name, 'US7ASCII', 'UTF8') From table_name
But that didn't work at all.
Did I try wrong?
Please give me some ideas..
Thanks!
|
|
|
|
|
Do we talk about Oracle? You are in the wrong place, mt friend!
But! If I remember well the encoding called AL32UTF8 and not UTF8 - that may be your problem...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
I tried AL32UTF8. But It didn't work..
Thanks, though.
|
|
|
|
|
Ehm, you show us a SQL query here in the C# forum...
Let me assume that you use a .Net application written in C#, and retrieve the data from the database. You could use the System.Text.Encoding namespace, with the GetBytes function for the encoding used in your db, and the GetString function for the target encoding.
|
|
|
|
|
Hello,
I am trying to code the expression 9*10^18 which evaluates to 9000000000000000000. I am using a 64 bit machine, so I am within limits. Math.Pow only allows for Math.Pow(9,18) and that gives me the wrong number. Can someone please show me how to implement the whole expression using the Math.Pow.
Thank You.
New Guy
|
|
|
|
|
Math.Pow(9,18) is 9^18, not 9*10^18.
if you have the general case of:
A*B^P
then you want
A * Math.Pow(B, P)
|
|
|
|
|
In addition to my answer above, if you really just have constants of the form A*10^P (e.g., 9*10^18) then the compiler is totally fine with exponential notation:
AeP (e.g., 9e18)
|
|
|
|
|
If you really want #90 raised to the 18th. power, you are going to need to use a "big integer:"
1. assuming you are using .NET >= 4.0
2. add a reference to your project to the System.Numerics library.
using System.Numerics;
public BigInteger ToBigPower(BigInteger value, int power)
{
return BigInteger.Pow(value, power);
}
BigInteger x = ToBigPower(9*10, 18); If you inspect the value of 'x above in the Command window of Visual Studio:
> ? x
{150094635296999121000000000000000000}
IsEven: true
IsOne: false
IsPowerOfTwo: false
IsZero: false
Sign: 1
If you are using .NET < 4.0, see this for links to alternate strategies: [^]
“Use the word 'cybernetics,' Norbert, because nobody knows what it means. This will always put you at an advantage in arguments.” Claude Shannon (Information Theory scientist): letter to Norbert Weiner of M.I.T., circa 1940
|
|
|
|
|
BillWoodruff wrote: If you really want #90 raised to the 18th. power, I think he wants 9 × (10<sup>18</sup>) , not (9 × 10)<sup>18</sup> .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am looking for a zip compression library that supports pausing/aborting the compression and then resuming the compression. I know this is a bit unorthodox when it comes to zip compression but currently I have an issue with my software especially when compressing large files > 100GB in size. I am not sure if it is possible at all to implement this kind of functionality taking into account the archive checksum and all.
Currently I am using DotNetZip and it does not support this functionality.
Actually I don't mind switching from Zip format to some other format if it supports aborting/resuming compression.
EDIT:
Just to be clear what I meant by pausing is that the application is terminated and once it is restarted it continues the compression operation from where it left off or from the last successfully compressed index.
|
|
|
|
|
I don't know of a single library that allows for "pausing" the operation.
I think the only way you're going to get that is if you implemented such a compression scheme yourself.
|
|
|
|
|
REDSERPENT7 wrote: the application is terminated Voluntarily (with a chance to make some kind of "save point") or abruptly?
|
|
|
|
|
|
The ability to resume after abrupt termination is also quite sought-after though
But ok, that simplifies things. All you have to do is save enough of the state of the compressor so that you can load it again - basically, dump the data structures it's using in a file (or wherever you want to leave it). While the compression libraries I know up don't immediately support that, it should be possible to modify them (the ones that come with source, anyway) so that they do.
What you'd actually have to save depends on the compressor, but it might include:
- the index you were at (for input and output)
- the current block type (stored, dynamic tree, static tree), not all of the following will exist for stored blocks
- a chained hash table, used to find back-references (saving is optional, skipping it means worse compression ratio's if you pause/resume)
- a small buffer used to write bits to an underlying system that deals in bytes. May contain more than 7 bits, depends on the implementation
- a table of symbol lengths and symbol patterns, something like 286 entries or so. Doesn't necessarily exist all the time (for example at the start of a block when the compressor doesn't know enough about the symbol frequencies yet)
- misc stuff, and things I've forgotten to mention. And anyway, this covers just the Deflate end of the business, for full ZIP there's more to worry about.
|
|
|
|
|
Theoretically, the naive solution would be to use a library that supports adding to an existing zip. You can do this[^] with SharpZipLib[^].
|
|
|
|
|
REDSERPENT7 wrote: EDIT:
Just to be clear what I meant by pausing is that the application is terminated and once it is restarted it continues the compression operation from where it left off or from the last successfully compressed index.
Imagine you closing your app, and one of the libraries deciding to run on it's own after the PC restarts.
..so, no go. When you write a byte to your stream, increase a counter, write that counter to a file. When restarting, fast-forward the stream to the last known position.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
i want to remove specific row from datatable means every row has a remove button.. through click i want to remove that row.. Datatable record is yet not saved to database.....??
plz help........?
modified 2-Apr-14 4:04am.
|
|
|
|
|
|
I think he's looking for some help on one of them weird ASP.NET grids; not the datatable itself.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I agree, but like so many people here these days, he/she does not seem to know what control he is actually using to start with.
|
|
|
|
|
i want to shutdown a computer on Lan using C#
plzzzz help me...
|
|
|
|