This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Objective-C style formatter
I'm very picky about the formatting of my Objective C code. Lately I've been obliged to work with quite a bit of Objective C code that wasn't written by me, and I would like to format it according my own customary code formatting standards (e.g. ANSI bracket style, spacing between method name and first argument, etc, etc.
Of course, I know I can throw together something in Perl to automate this for me, but I was hoping there was a tool out there which could do the job for me. So, is there some free tool available for formatting Objective C files?
For quick but not complete formatting (mainly indenting) select the code and control-I. THis is about the same formatting as obtained by pasting code.
OK, found Uncrustify, which does the trick:
http://uncrustify.sourceforge.net/
And a sample config file for Objective C here:
http://blog.carbonfive.com/2009/08/07/code-formatting-in-xcode/
There's even an XCode plugin available:
https://github.com/benoitsan/BBUncrustifyPlugin-Xcode
Related
I hope you're doing well
I am working with NaturalDoc version 2.1.1, to generate documentation for VBA Module
The problem is when I use accented character in VBA comments, the result is some wierd character, like question mark in black small lozenge
I think the problem is in encoding, between VBA module (having the extension .bas) and NaturalDoc
How can I fix the problem ?
This question already has an answer here:
In Karate Scenario Outline test, how to pass param values in the Examples table through a variable
(1 answer)
Closed 1 year ago.
I want to run my scenario with all the images that i have in my resource folder. meaning every time hitting same api with different image(converting them to base64encoding first) .But as this images already are in resource folder than it does not make sense to save with some name or records in csv for scenario outline purpose. Can i call a my own function (having code to take the image from resource folder and convert it into base64) in Examples section , So that for every image it will hits the same api again.
Yes. First write some java code to get a list of the image files. You can refer this code for ideas: https://stackoverflow.com/a/65035825/143475
If that is too hard, then just create a CSV file with a list of paths. Let me say that Karate is designed for testing, but you seem to be expecting something else. Karate is not a "general purpose" programming language. But it can be made to do extreme things by Java interop.
One you have a JSON array, then it can be used as the data-source for the Examples: section: https://github.com/intuit/karate#json-array-data-source
You can refer other answers for Base64 conversion: https://stackoverflow.com/a/46452864/143475
All the things you want to do is possible, but please do some research and try. And the next time you ask a question, please show what you tried and give examples instead of just a broad question, thanks.
This question already has answers here:
What is the exact definition of a Metacircular Interpreter?
(4 answers)
Closed 5 years ago.
Can samebody explain it to me what is meta-circular interpreter? Definition on wikipedia is:
A meta-circular evaluator is a special case of a self-interpreter in which
the existing facilities of the parent interpreter are directly applied to the
source code being interpreted, without any need for additional implementation.
But I don't know how to understand sentence: "self-interpreter in which
the existing facilities of the parent interpreter are directly applied to the
source code being interpreted".
Here on stackoverflow I found answer that says meta-circular interpreter is self-interpreter without any additional features so I'm pretty confused.
Thanks in advance
What is unclear to you? The stackoverflow post you mentioned is as clear as possible. Let's say you invent your own, very basic language, call it Tiny ML for tiny meta language (actually don't, that name is taken, the ML part).
Then you program an interpreter, let's say in C, for that tiny ml language. Once that interpreter is up and running, you take this interpreter which can run Tiny ML-code and write another interpreter in Tiny ML which can process a much more sophisticated version of Tiny ML, let's call that language Hyper ML. There you have it, your last interpreter should be the illusive meta-circular interpreter.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Struggling with currency in Cocoa
Re-Apply currency formatting to a UITextField on a change event
I have been all over the web and either examples are no longer valid or people didn't really know what they were doing.
So i have come to you guys for help,
I need to get a a textbox(TextField) to Display when they click into it a "$"...that was Easy lol
but i also need from the dollar sign to $0.00 then $0.01, $0.10 and so on.
And save an instance of it without the Symbols.
I am very new to Objective C and would like maybe a simple explanation or even a good blog to read about it. "only if you just recently read it and its not outdated"
You want to use NSNumberFormatter to accomplish this. The NSNumberFormatter documention from Apple is very good (I've just re-read it and it's not outdated). Specifically, look at the section on Configuring the Format of Currency. This should be enough to get you started.
Another good place to look if you prefer examples to documentation, is to read through the section on Number Formatters from Apple's Data Formatting Guide. This goes through examples of how to set up currency formatters to your specifications with concrete examples.
Finally, in order to integrate this with a UITextField, you will want to use the delegate method
– textField:shouldChangeCharactersInRange:replacementString:
This allows you to validate and update characters as the user types them in.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Looking for Java spell checker library
Is there any method for checking spelling of english words.
I have word game where I have to select letters to form a word and then check it for spelling, if correct then show on the panel.
the methods and the use of these methods, please.
thanks.
You need a dictionary of accepted words, and compare against that. If you want to recognize similar words then you'll want to start with prefixes and suffixes and move on to levenstein(?) distances
... Or you can use String.equals()