|
i have a programm that it should have in it's output a file with .url suffix ...
when double click on file , browser open and go to that adress in the URL property in .url properties files ...
but i don,t know haw i can set this file property with coding in c# ...
plz help me
|
|
|
|
|
|
Hello ,
I am read File and I want to get information from each 256 byte and from each 256 byte I want to divided each 16 byte in order and get my Info?
Here's Sample of Converted 256 Byte
------------------------------------------
01 1C 09 0A 0A 0B 1C 09 0A 0A 0C 00 01 00 00 01 01 1C 09 0A 0A 0C 1C 09 0A 0A 0D 80 01 00 00 02 02 1C 09 0A 0A 0D 1C 09 0A 0A 0E 00 02 00 00 03 03 1C 09 0A 0A 0E 1C 09 0A 0A 0F 80 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Here's My Logic but I can not do it using code.
I want to Read All bytes and if Number of Byte equal to 256 I will go to Nested loop to Read 16 byte from previous 256 byte and Get Info
|
|
|
|
|
Sorry, but you need to explain this.
You tell us, you´re reading 256 byte (I assume you use a byte array ...). Where is the problem with access to the last 16 byte you read?
|
|
|
|
|
Honeyboy_20 wrote: I want to divided each 16 byte in order
you mean dividing each 256 Bytes set into 16 Byte in some order?
Honeyboy_20 wrote: and get my Info?
??? not clearly explained.
First and the Foremost: FIGHT TO WIN
|
|
|
|
|
Honeyboy_20 wrote: I want to Read All bytes
FileStream fs = File.OpenRead(filename);
byte[] data = new byte[fs.Length];
fs.Read (data, 0, data.Length)
Honeyboy_20 wrote: if Number of Byte equal to 256 I will go to Nested loop to Read 16 byte from previous 256 byte
byte[] set256=new byte[256];
int p=0;
for(int i=0;i < data.Length;i++)
{
set256[p++]=data[i];
if(p==256)
{
byte[] set16=new byte[16];
int k=0;
for(int j=0;j < 256;j++)
{
set16[k++]=set256[j];
if(k==16)
{
k=0;
}
}
p=0;
}
}
First and the Foremost: FIGHT TO WIN
modified on Thursday, December 16, 2010 10:35 AM
|
|
|
|
|
A few comments:
1. if you want to read all bytes at once, just use File.ReadAllBytes()
2. why are you copying bytes all the time, from data to set256, then from set256 to set16. That is a complete waste of bytes and cycles.
3. "is less then" is < (use the little widget above the text edit field for special characters).
|
|
|
|
|
your are right! i was just going to proof the concept thru coding.
Luc Pattyn wrote: 3. "is less then" is < (use the little widget above the text edit field for special characters).
i dont know why "<" is not to be printed
First and the Foremost: FIGHT TO WIN
|
|
|
|
|
by default the message gets HTML decoded, so any < could be the beginning of a tag; and unrecognized tags are ignored.
Officially you must escape the special characters ( < > & ); in practice, there seems to be no problem when followed by a digit or a space.
|
|
|
|
|
corrected! i think initially that was not properly decoded. i used pre tags also. now thats ok.
First and the Foremost: FIGHT TO WIN
|
|
|
|
|
|
Hi!
I have a report which has report header, Page header, details and report footer. The problem is that Page header is appearing on every page even if there is no details data remaining i.e. only report footer is there
|
|
|
|
|
Create a boolean formula. Set formula based on number of detail records. 0 recs = true, 1 or more recs = false.
Use formula in suppress option under page header (section).
Possibly do the same for footer, and detail as well if you want to completely eliminate blank page.
|
|
|
|
|
Thanks!
The code,
if PageNumber = TotalPageCount then true else false
worked on the suppress event of the page header
I haven't worked on crystal reports a great deal so I was thinking that there might be some issues in my report design but after your reply, googling made me know that one has to do this manually through code
|
|
|
|
|
Hello,
I need to show my pdf in a part of my page, how i can this, the web browser in Asp don't exist ?
Thank you verry mutch.
|
|
|
|
|
I think the question is suitable for ASP.NET forum to get better response.
And for the solution of your problem I think PDF Viewer Custom control[^] or This Thread[^] may help you.
|
|
|
|
|
Navigate the Given Link
This Link[^]
Hope it will works for you.
|
|
|
|
|
As was mentioned since this question is regarding ASP.NET it should be in that forum. However, since you started here we'll continue here
Of course there is no browser control for ASP.NET; its browser based to begin with. If you want to show two different pages in the same browser window you need to use iframes[^].
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi, does any one have a good solution for reading Belgian eID's (Smart card identities) in .NET? i have a code written for it but it has many errors when trying to read the card.
Thanks
|
|
|
|
|
Loads here[^] - docs, open source software, tools, the lot really
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Thanks. i have googled this a million times. but don net seems like it has 1 or 2 DLLs that dont work perfect. so if anyone has a good experience please...
|
|
|
|
|
I allocate and fill byte[] array with some pixels and then create Bitmap object with it Bitmap(Int32, Int32, Int32, PixelFormat, IntPtr) .
How to guarantee that allocated byte[] array will not be garbage collected?
In extreme conditions with application consuming all its available memory the allocated image becomes invalid with the only reason that byte[] array got collected as exception is 0xc0000005. When I try to copy some portion of that image with Graphics.DrawImage() to another one the AccessVialation exception happen in gdiplus assembly. The exception that even can not be catched.
Module name: gdiplus.dll, version: 6.1.7600.16385
Exception code: 0xc0000005
Application path: C:\soft\MyApplication.exe
Module path: C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7600.16385_none_72fc7cbf861225ca\gdiplus.dll
Application: MyApplication.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
at System.Drawing.SafeNativeMethods+Gdip.GdipDrawImagePointRectI(System.Runtime.InteropServices.HandleRef, System.Runtime.InteropServices.HandleRef, Int32, Int32, Int32, Int32, Int32, Int32, Int32)
at System.Drawing.Graphics.DrawImage(System.Drawing.Image, Int32, Int32, System.Drawing.Rectangle, System.Drawing.GraphicsUnit)
at ...
Чесноков
|
|
|
|
|
It seems unlikely that that is your problem, but you can check by keeping a permanent reference to your byte array within a class scope variable. For testing, this could be a static if it is difficult to get access to a globally available class instance.
I say unlikely, because I haven't heard of it before! It's the kind of things people have done for a long time, so I would expect a problem of this size to appear sooner than this. Could be though...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
My application performs some data collection and store it in mem for display in detailed view e.g.
I use the Bitmap object with byte[] array filled with some pixels to store some image during data collection.
Only when my application consumes to the limits of available memory that gdiplus exception appear.
It means that byte[] array is released by GC.
If I allocate bitmap without external byte[] array that exception does not appear.
Чесноков
|
|
|
|
|
1.
If you don't mind temporarily having the data in memory twice, I would suggest you immediately create a second bitmap from the first, then delete the first and the byte array.
2.
You could also try and use a stream, however filling a MemoryStream with BMP data, then creating a Bitmap from the stream, isn't any better than the first approach.
3.
If you do mind the increased memory footprint and the copying cycles, I'm afraid you need explicit memory management for both the image and the array. The easiest would be to derive from Bitmap and keep the byte array pointer inside the derivative; unfortunately Bitmap is sealed. The next best approach IMO would be to have a static Dictionary<Bitmap, byte[]> where you keep the mapping alive for as long as (you think) the image lives. This of course would be a cooperative approach, as removing an image that is still in use somewhere would still be open to failure.
|
|
|
|