|
|
I'm working with this library AsteriskIaxClient and i wan't to develop a function of conference.
Please if you have an idea about this API help me to implemant this function on my project.
And thank you for your help.
|
|
|
|
|
I create a list view and add icons to all the listviewItems , i can see icon when they are list, and small but when i enable large icon there is only text shown not icon. How can i see icon plz help me out.
|
|
|
|
|
Are you providing large icons for the items ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I dont know how to create a trigger inside a stored procedure
|
|
|
|
|
What does this have to do with C# ?
A trigger and a stored proc are two different things, do you mean you want a stored proc to fire a trigger ? A trigger is fired on a specific action, such a deleting or adding a row. You can't make a trigger just fire from one proc, instead write a function or proc that your first proc calls.
Try asking in the SQL forum in future, when your question is about SQL, please. It really does help you get better answers.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I've been constructing an ASP.Net application using the 2.0framework,
I wanted to see if I can set up my pages for access directly via localhost
. My login page loads, and any validation controls on the page
work fine, so I know it's recognizing the ASP.Net code there, however,
when I try to log on, the page just refresh not go to next means
response.redirect can not work properly how can i solve this problem
,
|
|
|
|
|
Didnt quite get you, the header ssays you want to run ASP.NET on IIS and you are asking about running it locally..
As for running it on IIS, please specify the OS you are running..
is it a WIN XP or WIN Server 2003?
|
|
|
|
|
Member 4432086 wrote: I've been constructing an ASP.Net application using the 2.0framework,
WE have an ASP.NET forum.
Member 4432086 wrote: means
response.redirect can not work
no WAY does it mean that.
Member 4432086 wrote: how can i solve this problem
1 - ask in the right forum
2 - debug your application to see what's really going on
3 - post code if you want help, your code is obviously broken. Perhaps you changed the server and you used absolute URLs in code that are now invalid ? No WAY ASP.NET works but response.redirect is broken. Your code is broken.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I added some files in my projects resources and made them as a embedded resources. I want to get all the file names.
Plz help...
thanx in advance...
|
|
|
|
|
Hi Guru,
Here is the code snipet:
System.Reflection.Assembly ass = System.Reflection.Assembly.GetExecutingAssembly();
string[] files = ass.GetManifestResourceNames();
for(int i=0;i<files.Length;i++)
MessageBox.Show(files[i]);
Thanks,
Gopal.S
|
|
|
|
|
Hi,
I'm sure most of us have seen movies where there is a computer wizz hacking away at a computer, as he does, there is a window on the screen that seems to be showing all of the compiling code.
I know this is for dramatic effect, but is there a way (using C#) to reflect the compiled code (or better, the non-compiled code) as it is run onto a label or something?
Cheers,
Mark.
|
|
|
|
|
You could use reflection, but as for showing the actual code being run, I doubt that. I mean, you'd have to write code that executes after every statement, and shows it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You can use .NET Profiling API to rewrite the IL code when it is about to JIT.
So you can add such statements with that..
but you have to know a bit or two about IL.
|
|
|
|
|
Good Day,
I am working in an encryption utility as a school project. I'm all done with the byte manipulations and stuffs and just need to write the data as a file. I have already conceptualized the File Structure and is coded as:
[StructLayout(LayoutKind.Sequential)]<br />
struct LockFile<br />
{<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]<br />
public string MagicNumber;<br />
public Hashtable IncrementalMappingArray;<br />
}
I need to Serialize that structure using this function I found somewhere:
private static byte[] RawSerialize(object anything)<br />
{<br />
int rawsize = Marshal.SizeOf(anything);<br />
IntPtr buffer = Marshal.AllocHGlobal(rawsize);<br />
Marshal.StructureToPtr(anything, buffer, false);<br />
byte[] rawdatas = new byte[rawsize];<br />
Marshal.Copy(buffer, rawdatas, 0, rawsize);<br />
Marshal.FreeHGlobal(buffer);<br />
return rawdatas;<br />
}
Then I write it as file:
LockFile theLockFile = new LockFile();<br />
theLockFile.MagicNumber = "myLock";<br />
theLockFile.IncrementalMappingArray = IMA;<br />
<br />
byte[] LockFileStream = RawSerialize(theLockFile);<br />
<br />
MessageBox.Show(LockFileStream.Length.ToString());<br />
<br />
<br />
string Filename = Path.GetFileNameWithoutExtension(txtPath.Text);<br />
<br />
string LockFilePath = Path.GetDirectoryName(txtPath.Text);<br />
<br />
File.WriteAllBytes(LockFilePath + "\\" + Filename + ".flk", LockFileStream);
But it always write the same value with 4 bytes in it. But the IMA (Hashtables) contains a lot of key-value pair. (Like 5mb).
Do I need to convert the hashtable to a byte[] first?
Thanks!
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
I have a couple of questions.
1) What are you encrypting, and why a Hashtable?
2) Why did you choose a struct?
3) Have you checked the post-RawSerialize() byte arrays to verify sizes?
4) Are you using unmanaged code in your project?
And recommendations.
1) Go back on the Net and study up on the difference between ValueTypes and ReferenceTypes.
2) Use caution when you snag some code, you'll have to understand what's going on.
What I think is going on here is a boxing issue. You're using a struct to hold data, however your serialization routines are calling for Object. So, when you pass in your struct it is boxed, turning it into a reference type. Then you're calling Marshal.StructureToPtr passing in the boxed value. In essence you're serializing the address of your struct. That's why it's writing the 4 characters (8 bytes) to the file.
Scott P
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
carbon_golem wrote: What are you encrypting, and why a Hashtable?
Long Long Discussion.
carbon_golem wrote: 2) Why did you choose a struct?
Is there any other option?
carbon_golem wrote: 3) Have you checked the post-RawSerialize() byte arrays to verify sizes?
Yes, the output byte lenght is correct.
carbon_golem wrote: 4) Are you using unmanaged code in your project?
I'm not sure...
carbon_golem wrote: Go back on the Net and study up on the difference between ValueTypes and ReferenceTypes.
I'm sure I know the difference between the two.
carbon_golem wrote: Use caution when you snag some code, you'll have to understand what's going on.
I've already analyzed that piece of code and found out that I don't really need it.
So what I did is a simpler approach:
[Serializable]<br />
struct LockFile<br />
{<br />
public string MagicNumber;<br />
public Hashtable IncrementalMappingArray;<br />
}
<br />
private byte[] RawSerialize(object anything)<br />
{<br />
MemoryStream Stream = new MemoryStream();<br />
BinaryFormatter BF = new BinaryFormatter();<br />
BF.Serialize(Stream, anything);<br />
byte[] Data = Stream.ToArray();<br />
return Data;<br />
}<br />
<br />
private object RawDeserialize(byte[] byteStream)<br />
{<br />
MemoryStream Stream = new MemoryStream(byteStream);<br />
BinaryFormatter BF = new BinaryFormatter();<br />
object thisObject = BF.Deserialize(Stream);<br />
return thisObject;<br />
}
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
Ian Uy wrote: carbon_golem wrote:
2) Why did you choose a struct?
Is there any other option?
Yes.
Ian Uy wrote: carbon_golem wrote:
3) Have you checked the post-RawSerialize() byte arrays to verify sizes?
Yes, the output byte lenght is correct.
Hmmm... I checked, and I didn't think they were.
Ian Uy wrote: carbon_golem wrote:
Use caution when you snag some code, you'll have to understand what's going on.
I've already analyzed that piece of code and found out that I don't really need it.
Because it didn't work?
Your new approach is better. Does it work for you now?
Scott P
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
carbon_golem wrote: Your new approach is better. Does it work for you now?
Yes sir it did.
But when I use the same method on other application to deserialize the file, I get an "Assembly cannot be loaded" error.
It does work on the same application though.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
Ahhh... If you're putting your objects into the Hashtable for serialization, you'll need to have the Assembly that those objects are in available to the Deserializing program/assembly.
Scott P
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
<>Hi,
This is ravindra ,I created the following function and able to execute the followed query
successfully in sql plus but when i try to execute the same query through code,getting error like
Unspecified error
Oracle error occurred, but error message could not be retrieved from Oracle.
Data type is not supported.
Create or Replace Function convert_time(datetime in timestamp, tz1 in varchar2, tz2
in varchar2)
Return timestamp with time zone
as
retval timestamp with time zone;
Begin
retval := from_tz(datetime, tz1) at time zone tz2;
return retval;
End;
select convert_time(to_timestamp('01/01/2006 23:45','mm/dd/yyyy
hh24:mi'),'US/Eastern','Turkey') from dual;
the .net code as follows
string conn = "Provider=MSDAORA.1;Password=;User ID=;Data Source=naradaon;Extended
Properties=Server=naradaon";
OleDbConnection con = new OleDbConnection(conn);
con.Open();
DataSet ds = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter("select from_tz(to_timestamp('01/01/2006
23:45','mm/dd/yyyy hh24:mi'),'-05:00') as hio from dual", con);
da.Fill(ds);
Please help me
thank you
<>
|
|
|
|
|
Try writing a parameterised query. I'm surprised this SQL works, I thought you needed select *, not just select. Could be an Oraclism tho.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Use OracleDataAdapter instead.
(using Oracle.DataAccess.Client)
string conn = @"...."; // make sure you use the correct one
string strSel = @"select from_tz(to_timestamp('01/01/2006 23:45','mm/dd/yyyy hh24:mi'),'-05:00') as hio from dual";
OracleDataAdapter da = new OracleDataAdapter(strSel, conn);
DataSet ds = new DataSet();
da.Fill(ds);
SkyWalker
modified on Thursday, May 1, 2008 10:52 AM
|
|
|
|
|
Hi,
For those who don't know, in Windows Vista when you hold shift down and right click a folder a few hidden options (Copy as Path, Command Wind Here)
I was wanting to implement a similar feature in my program - mainly for debugging purposes.
For example on my grids when you right click on the Header it displays all column names and lets you show and hide them. I would like it so if shift was pressed it would put the width of the column after it.
Any ideas?
|
|
|
|
|
Figured it out - ModifierKeys == Keys.Shift
|
|
|
|