|
Thanks, But I could not found your suggestions
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
|
Hi,
Thanks for your response; well I go thru that before and my opinion something like a general approach nothing but using ssl and data encryption cause when you transmit over the wire data could be readable. What do you think on that.
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Md. Marufuzzaman wrote: something like a general approach nothing but using ssl and data encryption cause when you transmit over the wire data could be readable. What do you think on that.
SSL is always a good starting-point, prevents people from eavesdropping by encrypting anything that's communicated.
|
|
|
|
|
Hello everyone,
I'm currently working on a calculator and in order to challenge myself, I decided not to use any loops (while, for, ...) but only use recursive methods (if ... then ... return else return).
So basically what I'm trying to do is create a function that checks if the 2 numbers I've entered are primes numbers and if so, it subtract number A with number B. If the result is 6 then true, else false. A and B may not be greater than 1,000.
Here goes my code:
static bool prime_6(int a, int B)/>/>
{
int x;
x = 2;
if (a < 1000 && b < 1000)
{
if (a % x != 0 && x < a)
{
}
if (b % x != 0 && x < B)/>/>
{
x++;
return is_sexy(a, B)/>/>;
}
return (a - b == 6);
}
else
{
return false;
}
}
Now, I know some things I've done wrong: setting the "x=2" at the begining will always set my x to 2 and thus never ending the function but I don't see where to place it... any ideas ? Or improvement ? Or other mistakes ?
Thanks in advance.
|
|
|
|
|
A recursive function is one that calls itself; this one does not call itself, but another function called is_sexy . If you want the "2" to be set once, add it as a parameter.
|
|
|
|
|
Yeah, what Eddy said.
In a case like this you'd have two functions, one that sets x and calls the other which is the recursive function.
public Outer ( a , b )
{
Inner ( a , b , 2 )
}
private Inner ( a , b , x )
{
tests and such
{
Inner ( a , b , x + 1 )
}
}
Also, to test for prime you only need to check up to the square root of a number.
|
|
|
|
|
Edit: Solved, Thank you 
modified 26-Nov-12 3:56am.
|
|
|
|
|
Joni_78 wrote: Am I missing something that is required to launch executables?
Yes, something called permissions, I guess. Imagine a website launching applications; I'd be launching a download, than a silent install of that download.
Have the COM-control log the username it's running under, and see the security-restrictions in the settings of IE.
|
|
|
|
|
Where can I find the com-control log?
|
|
|
|
|
There is none, you'd have to write it; you have a COM-class, simply write the username to a textfile.
|
|
|
|
|
I have a html page and com ActiveX.dll from one well known video software. It's javascript has function launch(), it accesses a method from dll and launches exe (dll outputs 1234.exe -flags X:\.
Their dll doesn't give any security warnings on IE when ran and the exe loads, with mine, IE says the ActiveX object might not be safe, do I want to run it and if I select yes, nothing happens. I guess it's about permissions, how do I sign my dll to be safe to run like theirs?
|
|
|
|
|
Joni_78 wrote: Their dll doesn't give any security warnings on IE when ran and the exe loads, with mine, IE says the ActiveX object might not be safe, do I want to run it and if I select yes, nothing happens. I guess it's about permissions, how do I sign my dll to be safe to run like theirs?
Dunno, you'd have to research the subject; I know one can sign assemblies, and there's people selling "trusted" keys - but I cannot guarantee that it'll work that way.
|
|
|
|
|
how to do a program that will generate the possible combination that you had input in the textfield. and those input will appear on the listbox. for example: as i type ace in the textfield, possible combination of those letter will be cea, eac, eca, cae. those combination will be displayed in the listbox. all of it.
|
|
|
|
|
Well, the simplest way would be to use some loops and variables, and some listbox Add stuff. What more were you expecting?
|
|
|
|
|
how can i perform those codes
?
|
|
|
|
|
By typing them in at the keyboard. Are you expecting us to actually give you the answer to your homework? That's not the way it works here - you try something and, if it doesn't work, you post a section of relevant code and we help you sort that out. We don't help you cheat.
|
|
|
|
|
Voted 1 for blatant homework question. I'm sure that writing the algorithm to do permutations is the entire point of this exercise. Getting someone else to write it for you will teach you nothing, and if you keep that approach through your education you'll end up as one of the terrible developers that make our lives hell.
All of the pieces of an exercise are available to you, and you are supposed to be learning how to but those thoughts together. Breaking down a problem description into the pieces you need to use is one of those skills and you aren't helping anyone by asking CP to do that for you.
|
|
|
|
|
You're not really flamed for having a homework question, but for not showing you did something yourself and not being specific.
We're all professionals here doing real paid work. We're willing to help, but not at our own expense.
- have you googled? If you don't know the keywords to look for, that would be a specific question.
- have you tried? What did you do? What is the problem? You can't get the text as input? You can't shuffle the characters?
So google first, try a little (open your book, your teacher will not give an assignment of which the answer can't be found in lecture notes) and if you get stuck on specific problem, come back here.
(PS: would be nice to see another nickname than Member 9454563 )
|
|
|
|
|
V. wrote: would be nice to see another nickname than Member 9454563 I agree, something like V. is so much more descriptive.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Richard MacCutchan wrote: I agree, something like V. is so much more descriptive.
How do you know his name isn't V?
|
|
|
|
|
Yes, it is actually, it distinguishes me from being member 123456.
|
|
|
|
|
But you are Member 1008736!
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hi everybody,
I need to create a beep in 20 ms. But when i use this code:
Console.Beep(1000,20);
The sound seems can not hear, I think because it's too fast.
Does anybody have idea to solve this problem? Could u help me please?
Thanks so much,
|
|
|
|
|
Adjust the frequency. (First Param)
To know what it does, try the below one. [Are you in Office ? ]
for (int i=0; i<100000; i++)
Console.Beep(i, 30);
The second param is duration. 20 Millisecond is very less. Increase that to 200 and above to hear something. But in the above example 30 is OK. You know why when you execute...
|
|
|
|