|
Thanks so much brothers!
Notice : Where can i rate the article?
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
|
Thanks so much for the answer.
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
|
How to deal with "OutOfMemoryExceptoin" in my C# code based on WinCE5.0 in Arm9
I Load many images in order to make my Project looks well and .exe file in debug and release run well in my PC.but if i copy my exe and image file to Arm based on WinCE5.0, my exe file can not run and show "OutOfMemoryExceptoin".
1.this is my way to initial images array:
private Bitmap[] bitmaps = new Bitmap[20];
public FormMain()
{
InitializeComponent();
bitmaps[0] = new Bitmap(".\\buttons\\bt1_on.bmp");
...
...
...
bitmaps[19] = new Bitmap(".\\buttons\\bt20_on.bmp");
}
2.all of my pictures files is about 993k
3.my device memory64M SDRAM
- 32bit databus
4.and when i exe file in my PC,it need 32M memory
thanks!!!!!!!!!
|
|
|
|
|
put a try catch block into your code and then you can see where the error is occurring and maybe make the images smaller
|
|
|
|
|
thank you. it's real a good idea. i 'll try to do it following your commnet.
|
|
|
|
|
How can i get the loaded images' path in WinCE.
i tried a lot and can't finished it.
|
|
|
|
|
WinCE has a max of 32Mb available to a single exe and you are using how much?
zh.again wrote: when i exe file in my PC,it need 32M memory
Who would have guessed!
Do you need to load ALL the bitmaps at start-up? If they are not all in use then don't load them all. You have limited resources available for a mobile device, so code accordingly.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
thank you for your help.
i've load all the bitmaps at start-up.i 've copied them to the same file path as exe files and i run exe file in my PC, no error happened.even if i deleted all images form my project,it need no less than 20M memory.
i am so puzzled....
|
|
|
|
|
I can use Session on login.aspx.cs.
so I used like this.
// Session["Id"]= id;
and I can see components of Session, when I type "Session".
but I can't use that another aspx.cs. page, for example, board.aspx.cs.
There are only two values. SessionPageStatePersister and SessionParameter.
That is all;;
I don't know why...
please let me know..
|
|
|
|
|
1. Post in the correct forum.
2. Do NOT start a new thread because a few minutes passed and you didn't get a reply.
3. Use the code formatting tags properly.
Cheers,
Vikram. Current activities:
Films: The classic Pink Panther series
TV series: Friends, season 3
Books: Liar's Poker, by Michael Lewis. Carpe Diem.
|
|
|
|
|
HI,
Use type casting to assign value to session variable.
Session["ID"]=id;
To extract value on another page from session.
string ID=Session["ID"].ToString();
Base on DataType And ensure
|
|
|
|
|
Dear Friends.
I need to convert Byte value into integer.
ie. for example
Input =7
1. Mark 7th Bit as 1
7 6 5 4 3 2 1 0 (8 Bit)
1 0 0 0 0 0 0 0
2. Split into 2 by 4 bit
7 6 5 4 | 3 2 1 0 (8 Bit)
1 0 0 0 | 0 0 0 0
part 1 | part 2
3. Use 8 4 2 1 logic and apply it
4. part 1 = 8
Part 2 =0
5. Output is 80
|
|
|
|
|
velkumar_in wrote: I need to convert Byte value into integer.
From what you have described it would seem you want to convert a byte to its hex value not an int (here[^])...
and a byte value of 7 would not equal 10000000 it would be 00000111 which is 07 surprisingly
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
simple - use <<
private int ToBin(int bitNo)
{
if (bitNo >= 32)
{
throw new Exception("Too big for int32");
}
return 1 << bitNo;
}
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
|
|
|
|
|
(1<<input).ToString("X2")
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
|
|
damn, accidentally deleted my initial message...
Thanks. Do you have any idea where I can find older interops? Such as for office 2000 (i.e. version 9). They don't seem to be available anywhere - I guess there is a reason for that though.
|
|
|
|
|
aastudent wrote: office 2000
As far as I am aware there aren't any. You have to make your own. PIA's are just imported COM type libraries with nice .net friendly wrappers around the ugly interop code.
There's some discussion on it here[^]. Also, check the links at the bottom of the page for some more discussion.
Simon
|
|
|
|
|
I'm making a login page with ASP.NET with C#.
and I know that it needs to use Session for saving information of loggined user.
so I used Session like this on "login.aspx.cs" with Login View Control.
[login.aspx.cs]
// Database query.
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Join"].ConnectionString);
SqlCommand cmd = new SqlCommand("SELECT * From User WHERE id = @ID", con);
cmd.Parameters.AddWithValue("@ID", ((TextBox)LoginView1.FindControl("TextBox1")).Text);
string name = rd["name"].ToString();
string pw = rd["password"].ToString();
string pw1 = ((TextBox)LoginView1.FindControl("TextBox2")).Text;
string id = rd["id"].ToString();
// Save to Session variables. There are a lot of components about Session. Keys, Item, Add,
//and so on..
Session["memberid"] = id;
Session["membername"] = name;
if ((string.Equals(pw, pw1)) == true)
{
FormsAuthentication.RedirectFromLoginPage(name, false);
}
....
And I made codes like this whether lggined user is same with Writer on board or not.
[Board.aspx]
public static bool IsWriter(string pdsId, string Writer)
{
string sql = "Select id From t_Pds Where boardId = @boardId And writer = @writer";
SqlCommand cmd = new SqlCommand(sql, DbConn.GetConn());
cmd.Parameters.AddWithValue("@boardId", pdsId);
cmd.Parameters.AddWithValue("@writer", Writer);
cmd.Connection.Open();
string result = (string)cmd.ExecuteScalar(); // result = ID of writer value.
cmd.Connection.Close();
// I can't use Session. When I use "Session", there are no components of Session.
// There are only two values of Session. ( SessionPageStatePersister , SessionParameter)
if (Session["memberid"] == result) //ERROR.
{
return true;
}
else
return false;
}
}
|
|
|
|
|
Hi guys
I have the code to get the directory list of the xml files in an folder but the problem is that i want to get the files in the creation date order. in other words each file has got an date it was created.
now i want to load all these xml files into an list array and in the creation date order.
is this possible?
my code sofar:
private String[] GetDirectory(String XmlFilePath)
{
List<String> strList = new List<string>();
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(XmlFilePath);
request.Credentials = new NetworkCredential(Username, Password);
request.Method = WebRequestMethods.Ftp.ListDirectory;
StreamReader sr = new StreamReader(request.GetResponse().GetResponseStream());
while (!(sr.EndOfStream))
{
strList.Add(sr.ReadLine());
}
sr.Close();
sr = null;
return strList.ToArray();
}
|
|
|
|
|
|
Hi,
Anybody knows how to convert postscript file of ghostscript printer to dictionary using itextsharp or programatically by any other tool I had tried this command : -
gswin32c -q -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=test.pdf -fc:\\output.ps
But the pdf generated gives the error %%EOF not found
|
|
|
|