nsexpression Questions
3
I'm trying to do math from a string.
When I turn a string into a math problem with NSExpression, and then get the result with expressionValue, Swift assumes I want an Integer. Consider these two P...
Goldfarb asked 3/10, 2017 at 17:59
5
Solved
I want to calculate a string, which I'm doing by this:
NSExpression *expression = [NSExpression expressionWithFormat:calculationString];
float result = [[expression expressionValueWithObject:nil c...
Sieracki asked 15/1, 2013 at 20:14
2
Solved
I'm trying to write a SUBQUERY for an NSPredicate. My problem is I don't have the query on hand for the predicate portion of the SUBQUERY. Is there a way to nest an NSPredicate inside the SUBQUERY?...
Reinke asked 19/4, 2016 at 13:49
1
Solved
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'Unable to parse the format
string "12+6+ == 1"'
I want to validate expression is valid or not. And I am trying...
Dissipate asked 4/3, 2019 at 6:42
4
Solved
I have a predicate editor, which the template was generate via the following:
NSArray * test = [NSArray arrayWithObjects:
[NSExpression expressionForKeyPath: @"Abc"],
[NSExpression expressionFo...
Dulse asked 6/12, 2012 at 18:2
2
I want to validate user created expressions (like "2+2", "5+7" or more complex). I use NSExpression class to parse and calculate this expressions. This is my Playground code:
import UIKit
l...
Linders asked 24/4, 2017 at 10:19
3
Solved
For reference, the problem I'm trying to solve is efficiently finding and removing duplicates in a table that could have a lot of entries.
The table I am working with is called PersistedDay with a...
Puiia asked 16/4, 2014 at 17:51
3
Solved
I am trying this code that is a calculator. How can I handle input from the user that is not valid?
//ANSWER: Bridging header to Objective-C// https://github.com/kongtomorrow/TryCatchFinally-Swift...
Chamade asked 12/7, 2014 at 6:47
1
Solved
I have already implemented a custom calculator where I am using following code to evaluate the arithmetic expression something like 5+3*5-3.
- (NSNumber *)evaluateArithmeticStringExpression:(NSStr...
Belted asked 27/5, 2014 at 14:28
2
Solved
In my code I am evaluating strings as mathematical expressions for example:
NSString *formula=@"9*7";
NSExpression *expr =[NSExpression expressionWithFormat:formula];
NSLog(@"%@", [[expr expressio...
Ward asked 24/6, 2013 at 23:59
1
Solved
I'm new in Core Data, so i want to write simple fetch request to group result by some field and also a count of another field in that group.
so for example i have products table i want to retrieve ...
Pleasance asked 4/6, 2013 at 12:22
1
© 2022 - 2024 — McMap. All rights reserved.