-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By nacerbaaziz
Hi dears
How are you?
I have a question, to you please.
How do I create an edit box for numbers only and does not accept letters? using autoit
greetings to all
I hope you help ME
Thanks to all in advance
-
By coffeeturtle
Hello. I need to perform a specific string replace, but not sure how to go about it.
The scenario is this: I have a large block of text. Within the text colons appear ":", Sometimes the colons are used in a sentence appearing after a word. Other times they appear in between numbers like a ratio or a sport score (e.g. "6:8").
I want to replace the colons appearing between numeric values like 6:8 with the word "to", but not the ones appearing at the end of a sentence.
Is there a way that I can have StringReplace (or any other method) differentiate when to replace the colon based on it appearing between numbers?
I did try searching for a similar scenario.
Thank you for any help.
-
By ur
I was wondering if there is an efficient premade algorithm for determining if the sum/difference of a group of numbers can equal a different number. Example:
5, 8, 10, 2, using + or -, to equal 9. 5 - 8 = -3 + 10 = 7 + 2 = 9
It is somewhere nearer to Knapsack problem.
Thanks in Advance.
-
By PCI
Hi everyone
I've read all yesterday forums , i think it's me , but i could not find a clue for this :
I need to generate large numbers and output into csv format or excel format
- Range between 3000000 and 9000000
- Need 5000000 numbers
- Numbers should not be in series ( Mixed and Random )
- I would prefere to have a check digits at the end
Anyone could help please ?
Thank you
-
By TheAutomator
hi everyone!
I need some help with my rpn calculator.
I first translated it from vbscript to autoitscript and that's when i stumbled on problem one:
(46) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$Stack[ubound($Stack)] = $Item
^ ERROR
After that (and i know this from testing it as a vbscript) it can't work with negative numbers:
"1 - - 2" to Reverse Polish notation = "1 - 2 -" gives me the build in error...
Can you guy's help me with my code pleas?
Func Print($what,$er = 0) $t = '' if $err <> 0 then $t = 'ERROR!' MsgBox($er,$st,$what) EndFunc Func RPN($Tokenarray) Local $Stack = [] Local $Result Local $Operator_B Local $Operator_A For $Token = 0 To Ubound($Tokenarray) If Isoperator($Tokenarray[$Token]) Then $Operator_B = Pop($Stack) $Operator_A = Pop($Stack) If $Operator_A = "" Then Print("The user has not input sufficient values in the expression.",16) exit EndIf Switch $Tokenarray[$Token] Case "+" $Result = Number($Operator_A,3) + Number($Operator_B,3) Case "-" $Result = Number($Operator_A,3) - Number($Operator_B,3) Case "*" $Result = Number($Operator_A,3) * Number($Operator_B,3) Case "/" $Result = Number($Operator_A,3) / Number($Operator_B,3) Case "^" $Result = Number($Operator_A,3) ^ Number($Operator_B,3) EndSwitch Push($Result,$Stack) Else Push($Tokenarray[$Token],$Stack) EndIf Next If Ubound($Stack) > 1 Then Print("The user input has too many values.",16) Exit EndIf Return pop($Stack) EndFunc Func Push($Item, Byref $Stack) If Ubound($Stack) > -1 Then Redim $Stack[Ubound($Stack) + 1] $Stack[Ubound($Stack)] = $Item Else Local $Stack = [$Item] EndIf EndFunc Func Pop($Stack) $pop = "" If Ubound($Stack) > -1 Then $Pop = $Stack[Ubound($Stack)] Redim $Stack[Ubound($Stack) - 1] EndIf Return $pop EndFunc Func Peek($Stack) $peek = "" If Ubound($Stack) > -1 Then $Peek = $Stack(Ubound($Stack)) EndIf Return $peek EndFunc Func Isoperator($Operator) Return StringInstr("+-*/^&<=>", $Operator) <> 0 And StringLen($Operator) = 1 EndFunc Func Precedence($Operator) If Isoperator($Operator) Then Switch $Operator case "^" Return 4 case "*","/" Return 3 case "+","-" Return 2 case "&" Return 1 case "<","=",">" Return 0 EndSwitch EndIf EndFunc ;################################################################################################## ; (4 - -5) = (4|-|-|5) = (4|-|5|-) ; input tokens rpn Global $calculate_this = ["4","-","5","-"] Print(rpn($calculate_this)) thanks in advance ,
TheAutomator
-
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now