Xcode type number in the power - ios

How can I type a number in the power (exponentiation) in Xcode. I am creating a calculator in Xcode, but cannot make it out, how to type such functions into the buttons like x^2, x^3, x^y. The only way I can use to solve this problem is to copy-paste such symbols from google (x², xʸ etc.) But it does not seem right. In "emoji and symbols" cannot find them either. Maybe there is some hot key in Mac, Xcode, the analog to ctrl-shift-+ in MS Word?

thanks for your help! ) Indeed, by typing "superscript" in emoji and symbols' search box did help. Some symbols printed above the line really popped up, now I can easily type into my buttons something like x², x³, xʸ, sin⁻¹ etc. But after all it's a pity that there is no hot key for that in xCode, Swift like ctrl-shift-+ in MS Word.

You should not use x^2, x^3, x^y, instead use pow(x, 2), pow(x,3), pow(x, y) function to calculate powers.
And the objective-c and Swift is the same function name.

Related

Adding T9 text input in KaiOS

I'm trying to build a simple KaiOS app with a text input but I can only insert numbers (numbers of the phone keyboard). Is there a way to write characters (like a specific input type)?
For example : if the 2 is pressed twice it prints B, or even better having the T9 feature and write hello with 43556 pressed).
I don't know if you're still on this issue (I doubt but it can help others). I had the same problem and actually, the emulator doesn't work very well and doesn't really trigger keys. So just use your own keyboard or test directly on the device.
Have you tried to switch to a different input mode?
If I remember correctly, that could be done by pressing the # button.

How can these strings be different?

I am facing a weird problem.
I have extracted data from an Excel file. It should contain an IBAN account number.
Then I tried to analyze the set of account numbers (which the source guarantees to be good) with a Java library.
To keep the scope of the question narrow, I can't explain the following. The below strings are different
030​69
03069
The first is a copy & paste from the Excel file, the second is handwritten. Google returns different results for abi [above number] and in fact in the second case I can find that it is the bank code for Intesa Sanpaolo bank (exact page displaying the ABI code, localized, here).
So, to keep the scope narrow: how is that possible? Is it something to do with the encoding?
Try it yourself: do CTRL+F and try type "030", it will select both lines. Now type 6, it will match only the 2nd line.
Same happened in Notepad++
There's an U+200B ZERO WIDTH SPACE in between 030 and 69 in the first text.
Paste the text in https://www.branah.com/unicode-converter for example, or edit in a hexadecimal capable editor.
The solution for cleaning such strings could be for example to whitelist characters, so replace everything that isn't A-Z0-9 will be scrubbed.

Calculate list of first derivative of function in Maxima for selected interval

I am facing a simple problem in Maxima: I want to calculate list of first derivatives of function / expression in various points. I know how to calculate list of "points" for normal expression:
float(makelist((x^2/sin(x-x/2),x,1,1000))
but when I run the expression through diff it changes expression to function and I don't know how to work with functions. I tried:
float(makelist(diff(x^2/sin(x-x/2)),x,1,1000))
which "zeroed" on me. Then I tried this:
float(makelist(''(diff(x^2)),x,1,1000))
which gives you right answer, but the result is not a number anymore. It's a list of something like:
[2.0 del(1.0), 4.0 del(2.0), 6.0 del(3.0), 8.0 del(4.0), ...
Would someone care to enlighten me about Maxima functions and numeric evaluation?
I know that this is a silly beginner's question, but I have never worked with Maxima before.
I think you want float(makelist(''(diff(x^2, x)),x,1,1000)) i.e. you need to write diff(expression, variable) instead of just diff(expression).

Understanding Textmate help

I am trying to become familiar with Textmate shortcut keys.
However when I open my "Demo Help" for the Ruby on Rails Bundle it shows keymappings with characters like "& # x21E5"
When I paste them in here they often display correctly as they appear to be HTML escape codes but in the Textmate window they are unreadable. I cant keep referring to a list of HTML escape codes!
How am I supposed to translate those key mappings. Have I got something set up wrongly that they show like this rather than with the normal symbols?
Cheers
George
⇥ appears to be a "normal" key symbol, meaning tab (forward tab, specifically). A quick googling led me to this page, which seems to have a number of such mappings. For reference, the phrase I googled was "key symbols mac".
Using symbols not on the key to represent a key is fairly common when describing mac shortcuts, you have probably not done anything wrong.
For some reason the help file is showing you the unicode hex symbol instead of the actual glyph in the font. If you have Unicode text enabled, inside TextMate you can hold down the Option key and type the four digit code to get a quick translation. Kind of a pain while you're reading a help file but they probably only use a few.
From the Ruby on Rails Bundle Help the ones I see (my version is also showing the codes not the glyphs) are:
2303 is the Control Key
2318 is the Command Key
2325 the option key
21e5 is the Tab key
232b is Delete
2193 Down arrow
21e7 up arrow
21a9 return
BTW, You enter unicode here in SO by entereing &# followed by the decimal code and then a semi-colon, So x21e5 is 8677 decimal so ⇥ yields ⇥

DES_KEY_SZ delphi

i am coding opera recovery tool in my delphi
i am using c++ which is already exist
http://pastebin.com/ViPf0yn6
but i didnt get whats DES_KEY_SZ in that code .
i think they are present in des.h ,but i couldnt found same des.pas :(
can any one help me please
regards
Here we go: http://freebsd.active-venture.com/FreeBSD-srctree/newsrc/crypto/des/des.h.html
Apparently,
#define DES_KEY_SZ (sizeof(des_cblock))
where
typedef unsigned char des_cblock[8];
I am not a C programmer, but I think that this means that DES_KEY_SZ has the value 8.
Google Code Search finds many copies of des.h, where the DES_KEY_SZ macro is defined. It's the size of a des_cblock, which happens to be an array of eight unsigned chars.
In other words, DES_KEY_SZ = 8.
You're going to run into other problems beyond just that missing identifier, though. The code you showed calls a handful of DES functions, too. To unencrypt the data, try using DCPCrypt.

Resources