|
Roger Alsing wrote: Pheonix
Is the one you are referring to?
http://research.microsoft.com/phoenix/[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Yes
There is an interesting clip about it here:
http://channel9.msdn.com/Showpost.aspx?postid=396461
|
|
|
|
|
Wajeeha wrote: Can't any other less space-taking program/environment take its place?
I suggest you upgrade your 120MB hard drive.
|
|
|
|
|
Their are open-source 'wrappers' for the .NET framework that allow .NET applications (up to 2.0 as of right now) on other OSs such as linux, mac, and unix.
A few to mention:
Mono
Portable .NET
Read about them at: Wiki article on .NET Framework[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
I am creating assembley named Comp1.Comp1 contains a public method.The Global Cache contains a sencond assembley named comp2.here I must ensure that the public method in only from comp2..which permission we have to take GacIdentity or Strongnameidentity...anybody know plz reply me..
Rajendran.AL
|
|
|
|
|
If you'r requiement ment is to call only the function of Comp 2 then only add the reference of comp2 to your application. It is not a issue of assembly security.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
r aa j wrote: assembley
You ought to learn spelling assembly correctly.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Thanks guru ji....thanks for ur answere...I will cm to meet U for learning English.....thanks
Rajendran.AL
|
|
|
|
|
Hey, gang. I believe I have a question that ought to be easy to answer and not be stupid this time. I've Googled around and dug around MSDN, but haven't found anything addressing this issue, and I'd sure appreciate a tip.
I've constructed a nifty little form that contains a DataGridView for displaying some information. It is formatted just the way I want it, and everything was great until I decided that the DGV and related controls would be more pleasing to the eye in a GroupBox. When I dropped them in, the DGV immediately took on the font size and color attributes from the GroupBox, so I changed them back manually to the previous settings
Everything looks great during design time, but during run time the DGV takes on the font attributes from the GroupBox again, and looks awful. I've never run across this with other controls, which listen to me when I change their properties, even when they're in a GroupBox with differing properties. Does anyone have some insight into what is happening behind the scenes? Is there a way to prevent this behavior?
Thanks very much for the help!
|
|
|
|
|
Hi,
Below is my class that has its Type converter implemented.
TypeDesciptor.GetConverter(typeof(MyPoint)) doesn't return the converter for MyPoint but returns System.ComponentModel.TypeConverter.
if I implement a ICustomTypeDescriptor for MyPoint, then it works fine.
Does anyone have idea why it is not working?
[TypeConverter(typeof(MyPointTypeConverter))]
public class MyPoint
{
public int x;
public int y;
public MyPoint(int x, int y)
{
this.x = x;
this.y = y;
}
}
/// <summary>
/// Class that implements TypeConverter for MyPoint type.
/// </summary>
public class MyPointTypeConverter : TypeConverter
{
// Overrides the CanConvertFrom method of TypeConverter.
public override bool CanConvertFrom(ITypeDescriptorContext context,
Type sourceType)
{
// some code
return base.CanConvertFrom(context, sourceType);
}
// Overrides the ConvertFrom method of TypeConverter.
public override object ConvertFrom(ITypeDescriptorContext context,
CultureInfo culture, object value)
{
// some code
return base.ConvertFrom(context, culture, value);
}
// Overrides the CanConvertFrom method of TypeConverter.
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
{
// some code
return base.CanConvertTo(context, destinationType);
}
public override object ConvertTo(ITypeDescriptorContext context,
CultureInfo culture, object value, Type destinationType)
{
// some code
return base.ConvertTo(context, culture, value, destinationType);
}
}
Thanks,
Sowjanya.
|
|
|
|
|
sowjanya_mudimala wrote: TypeDesciptor.GetConverter(typeof(MyPoint)) doesn't return the converter for MyPoint but returns System.ComponentModel.TypeConverter.
I just tested it:
class Program
{
static void Main(string[] args)
{
var tc = TypeDescriptor.GetConverter(typeof(MyPoint));
Console.WriteLine(tc.GetType());
Console.ReadLine();
}
}
Result:
MyPointTypeConverter
|
|
|
|
|
This seems to be a problem only on Vista with a certain set of pictues.
For instance, here is a picture...
http://tinyurl.com/55psg9[^]
Here is an excerpt of the code I am using to display the thumbnail (special code because height > width in the particular picture).
<br />
float _scale = (float)_orig.Width / (float)_orig.Height * __DesiredSize.Width;<br />
Image _image = _orig.GetThumbnailImage ((int)_scale, (int)__DesiredSize.Height, tnCallBack, IntPtr.Zero);<br />
<br />
Bitmap _backgroundImage = new Bitmap (__DesiredSize.Width, __DesiredSize.Height);<br />
Graphics _graphics = Graphics.FromImage (_backgroundImage);<br />
<br />
Rectangle _toPut = new Rectangle ((__DesiredSize.Width - _image.Width) / 2, 0, _image.Width, _image.Height);<br />
_graphics.DrawImage (_image, _toPut, new Rectangle (0, 0, _image.Width, _image.Height), GraphicsUnit.Pixel);<br />
Displaying the thumbnail in the a listview shows black bars on the side. Same thing happens with the landscape pics.
Any help would be greatly appreciated.
|
|
|
|
|
I have a threading problem and I'd like to ask your opinions about it. I have an array of objects I need to process one by one. I need to do two operations on each object. The problem is, both of those operations run on separate BackgroundWorkers. I need a solution to do operation 1 first and then operation 2 and when operation 2 completes continue to the other object in list. I couldn't figure out how to such a thing. Any ideas? I appreciate any ideas on this.
|
|
|
|
|
May be you ca keep a flag variable to keep track of what operation is going on currently so that both threads can use it as a look up to determine when to proceed with the next
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Well I tried this:
start process 1 worker
process 1 worker do work
process 1 worker complete: call for process 2 worker
start process 2 worker
process 2 worker do work
process 2 worker complete: call for check next
check next:
----index++
----if index > array.count then complete()
----else start process 1 worker
Well this does work fine for the first iteration but then all breaks loose. I logged the process and after second iteration and beyond, saw weird things like process 1 do work and process 2 do work working twice sometimes
I'm truly lost. God I hate threading
Here's the work log:
process1() - index: 0
process1 run.
process1 dowork.
process1 completed.
process2 run.
process2 dowork.
process2 completed.
nextitem().
process1() - index: 1
process1 run.
process1 dowork.
process1 dowork. (??)
process1 completed.
process2 run.
process1 completed.
process2 dowork.
process2 dowork.
process2 completed.
nextitem().
process1() - index: 2
process1 run.
process2 completed.
nextitem().
finished().
process1 dowork.
modified on Wednesday, May 21, 2008 11:32 AM
|
|
|
|
|
So you want to know how to do Synchronous operations Asynchronously? Perhaps you might want to rethink that?
led mike
|
|
|
|
|
I think the exact opposite. I need to do two async operations synchronous. That or I know definitions wrong
Either way I know it's weird but it's not my call, it's a component so I can't change the way it works..
|
|
|
|
|
From your problem description it sounds like led mike is right...
You say that you want to:
1. Run operation 1 on the next item in the array.
2. Wait for it to complete.
3. Run operation 2 on the same item.
4. Wait for it to complete.
5. Advance to the next item and start over at 1.
If we understand you correctly, there is no point whatsoever in running the operations on separate threads. If you need to run all of it on another thread than the main thread (so as not to block the UI), why not place the entire loop (for (i == 0; i < MyList.Length; i++) { Op1(i); Op2(i) } in a background thread?
If you instead want both operation 1 and 2 to be done on all elements in a list and the operations can be done in any order (2 before 1 or 1 before 2) on each element, run one (background) loop for operation 1 and one for operation 2. Don't bother letting them try to wait for eachother.
If you instead mean that both operations are lengthy and shouldn't block eachother (you want operation 1 to be able to proceed to the next element while operation 2 is working with the last one), but operation 1 has to happen before operation 2 on each element, try something like this:
private volatile int worker1index = 0;
private volatile int worker2index = 0;
private void Worker1()
{
for (worker1index = 0; worker1index < MyList.Length; worker1index++)
{
Op1(worker1index)
}
}
private void Worker2()
{
for (worker2index = 0; worker2index < MyList.Length; worker2index++)
{
while (worker1index <= worker2index)
{
Sleep(100);
}
Op2(worker2index);
}
}
Declaring the index variables volatile tells the compiler not to optimize away any memory accesses, and that is enough here. No need for "Interlocked" stuff (an int read or write is always required to be atomic, and even though the increment isn't it doesn't matter in this case). Sleeping in a loop is a bit crude, but it works...
Just fire up each worker on its own background thread to get the job done. Use BackgroundWorkers and their events to get signaled when they are done.
Be aware that you of course cannot add or remove items in the List while the workers are running. That is not threadsafe and will crash you.
--
Peter
|
|
|
|
|
I'm not quite clear on why you're using two threads, unless you want to overlap the first object's operation 2 with the second object's operation 1 (if the second thread finishes first, it would have to wait for the first thread; if the first thread finishes first, it could go on to object 3).
If that is your goal, and if you can guarantee that both threads will be operating on the same list of objects (nothing is going to appear or disappear), one approach would be to use a semaphore. The first thread should signal the semaphore after processing each object; the second should semaphore-wait before processing each object. The second thread would thus not process any object until the first thread was done with it, and each thread would (naturally) only process one object at once.
If you use this approach, you must take care that things don't get out of sync. If the first thread processes all the objects, signaling after each one, and the second thread waits before each object, and if both threads act upon the same objects in the same order, everything will work beautifully and efficiently. If an exception prevents the first thread from signaling after a particular object, however, the second thread may find itself waiting forever. Further, if objects appear or disappear at the wrong times, the second thread could get stuck waiting forever or it could process objects in advance of when the first thread does.
Provided the issues that would break synchronization are dealt with (by using suitable try/finally blocks and by requiring that nobody monkey with the list) the semaphore should provide a good approach.
|
|
|
|
|
How do I know an assembly was created under which version of .net framework ?
|
|
|
|
|
Run ILDasm > Open the assembly > double click the manifest node
The first line shows the .net version it was compiled.
// Metadata version: v1.1.4322
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Thanks. But I can't find such information here, Is there anything am I missing?
|
|
|
|
|
You mean to say you are not able to find the ILDASM tool or you are not able to find the manifest node ?
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
When I use ildasm to open assembly, there is no such information you provided in manifest node.
|
|
|
|
|
You should double click the manifest node to open in a text viewer to see it
optionally you can go to the view menu > header
In the text find out the section called clr header it will be someting like this
----- CLR Header:
Header size: 0x00000048
Major runtime version: 0x0002
Minor runtime version: 0x0005
Which will give you the major and minor version of runtime required.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|