|
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
|
|
|
|
|
I usually find that the most obvious solutions are the right ones...
I know that this may be obvious, but we all need to reminded of the "easy" fixes sometimes.
Check your code for the following:
1) If you're registered correctly and the control renders when you debug, then you've done that correctly.
2) Make sure the control definition in the .cs file is using the correct class definition.
3) The methods you want to access... Ensure they are public and not protected or private.
|
|
|
|
|
i am developing a web site in asp.net but i dont khow how to use and implement three tire architecture so please give me guidline.
deepak
|
|
|
|
|
Strictly speaking, you want to be looking at n-tier architecture because you may not end up limiting yourself to 3 physical tiers. If you want to implement a multi-tier system, then I would recommend reading up on the subject first - possibly starting with Rocky Lhotka's excellent work on CSLA.
|
|
|
|
|
Rocky's Website[^].
I'd blame it on the Brain farts.. But let's be honest, it really is more like a Methane factory between my ears some days then it is anything else...
-"The conversations he was having with himself were becoming ominous."-.. On the radio...
|
|
|
|
|
Shouldn't you post this where the OP gets notified of it?
|
|
|
|
|
I'm a big fan of structured data...
ohh and Rocky is in the office today...
I'd blame it on the Brain farts.. But let's be honest, it really is more like a Methane factory between my ears some days then it is anything else...
-"The conversations he was having with himself were becoming ominous."-.. On the radio...
modified on Thursday, October 7, 2010 12:10 PM
|
|
|
|