|
You have posted this question in the question answer section too.
Could you please refrain from cross-posting?
Thanks.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
According to VB.NET
-1 Mod 2 = -1
Is this a WTF moment or has maths changed since I did my degree in it?
|
|
|
|
|
It's certainly very incongruous.
|
|
|
|
|
is it?
would you prefer the integer quotient of -1 and 2 to be -1 and the remainder +1? making sure the remainder has the sign of the dividend makes a lot of sense to me.
PS: don't ask about negative divisors!
|
|
|
|
|
I was making a pun. A play on words. Modulus operations are part of congruence relations.
|
|
|
|
|
you've had me there.
but still, I'd rather call it congruous, as I got used to a slightly counter-intuitive but perfectly rational behavior of integer division and modulo (which text books and school classes mostly fail to deal with).
|
|
|
|
|
the behavior of division and modulo is always tricky when dealing with negative numbers; each language can make its own choice, as long as one invariant remains true:
a = b * (a DIV b) + (a MOD b)
for all values of a and b
If it doesn't fit your expectation, avoid negative numbers, or write your own little method (or create your own integer type and use operator overloading).
|
|
|
|
|
Well, it's easy to work around once one knows, of course... but it took me a while to figure out why I wasn't getting the expected results (out of my function of which this was but one line.)
It certainly isn't what I was taught about modulo.
|
|
|
|
|
I need rule engine in my application. I want to use Microsoft.Ruleengine.dll from BizTalk.
Is it true that the biztalk rules engine class used?
Sorry if this was discussed here.
|
|
|
|
|
You would still need to buy a licenese to Biz talk server to use this dll.
If you dont have that, try and consider Windows Workflow Foundation[^].
This could help you build your own rules.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
You could always look at the rule engine here[^].
|
|
|
|
|
Hi Guys, i want to write may value type(structure) in binary format, in BinaryWriter class, overloading is available for all CTS primitive types.But no overload for Object type.
Is there facility is available for writing my value type....
<br />
struct MyData<br />
{<br />
string _name;<br />
string _fathername;<br />
string _address;<br />
};<br />
using(BinaryWriter bn = new BinaryWriter(File.Open("File Path"), FileMode.OpenOrCreate)))<br />
{<br />
MyData d;<br />
d._name = nameTextbox.Text;<br />
d._fathername = fatherTextbox.Text;<br />
d._address = addressTextbox.Text;<br />
bn.Write(d)
}<br />
Thanks in Advance
|
|
|
|
|
Effectively, you need to convert the struct into a byte array and write it out that way. Have a look at this[^] page for some examples.
|
|
|
|
|
Or you can try serialization. Have a look at this.
|
|
|
|
|
Hi everybody,
(First, sorry if my english is not very good)
I have a small problem : I've created an WorkflowDesigner for my application with a custom Activity and a custom ActivityDesigner.
Until now, non problem, but if I want to put my custom Activity and custom ActivityDesigner, the WorkflowDesigner shows "Unable to generate the display for MyActivity1" (and before, when my custom activity and activitydesigner was in my application, it ran).
Can you help me please?
If it lacks information, please ask =)
Thanks
|
|
|
|
|
In early days VC++ and MFC was famous because they was fast and mostly come with all dependency prepacked with exe. So executing one exe will work fine. But after the evolution of .NET, .net exe require dotnet framework so it should be there at client side.
So can we create an exe using C# (not asking about VC++.NET) in dot net which will not require dot net framework at client-side?
|
|
|
|
|
rahul.kulshreshtha wrote: So can we create an exe using C# (not asking about VC++.NET) in dot net which will not require dot net framework at client-side?
IMO, you cannot. At least, I have never heard of anyone running an exe without the framework.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
There are some commercial packages that support this, yes. They are expensive, and the resulting EXE would be huge. The problem isn't C#, the problem is the Framework's classes.
|
|
|
|
|
Thanks Luc,
exctly what I wanted. Obviously exe size will be large because exe will be packed with all dependencies and required classes. .NET framework is really a huge library. Sometimes we require only few classes from there but we have to depend on a large framework at client side and mostly clients get confuse with framework stuff.
Can you suggest any name from those commercial packages?
|
|
|
|
|
Nope. I'd Google.
BTW: modern Windows editions (Vista+) have most .NET versions pre-installed, so the problem is getting smaller all the time.
|
|
|
|
|
Luc your signature link "Why QA sucks" is not working
|
|
|
|
|
Ok it's working if I click from inside the codeproject forum. I had clicked from my GMail account (from inside GMAIL notification mail)
|
|
|
|
|
I know my CP messages don't look and work the way they should inside the e-mail notification, it is due to the 500 character limitation imposed on signatures. I had to tweak things quite a bit to make them fit at all.
|
|
|
|
|
Hi all,
I am using Microsoft Visual Studio .NET 2003 with C# and asp.net 1.1 version.
i can't access a function inside a ascx.cs page from a aspx.cs page.
i registered the user control in my .aspx page and create an instance of this in my .aspx page.
but i can't access the functions declared as public in ascx.cs from aspx.cs by using the 'id' of that particular user control.
if anyone can, please help me.
thanks in advance...
|
|
|
|
|
firstly erm why 1.1? secondly have you made a property in the code yourself using get set values (in the controls class)? if i remember rightly that should do it.
Three types of people in this world, those that can count and those that can't
www.casserlyprogramming.com
|
|
|
|