w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
difference between STRONG typing and STATIC typing
Static typed programming languages are those in which variables need not be defined before they’re used. Programming languages in which variables have specific data types are strong typed variables are necessarily bound to a particular data type in strong typed source :http://www.sitepoint.com/typing-versus-dynamic-typing/ hope it helps

Categories : Misc

Parsing iOS 6 emoji with regex
The Java regular expression engine behaves like a good Unicode regular expression engine should in that it matches Unicode codepoints, not UTF-16 chars. You appear to be writing your pattern expecting the latter behavior. Don't do this - instead, when specifying astral-plane characters in a Java regex, use hexadecimal notation for the full codepoint value. For example, to match CLAPPING HANDS SIGN, use x{1f44f}. So your last regex (which would match the BMP Private Use Area, the Miscellaneous Symbols and Pictographs block, the Emoticons block, the Transport and Map Symbols block, the Alchemical Symbols block, and a fair bit of unallocated space in the SMP besides - are you sure you need to match all of those?) should be rendered as: "[ue000-uf8ff]|[\x{1f300}-\x{1f7ff}]"

Categories : Android

Emoji Support for iOS and Android
I managed to figure it out. We are no longer encoding or decoding the string. Instead, I modified the TextView in Android to re-format the string so that both the text and the emojis display. I made a very simple library based on my solution. https://github.com/will5/EMOJITextView

Categories : Android

Php mysql emoji double character
Your new server has magic quotes enabled. This can either be fixed by disabling magic quotes, or a better solution is to find a more competent hosting company that doesn't have this bad feature enabled by default.

Categories : PHP

how to create custom keyboard like emoji in iOS
you d't create emoji keyboard in ios,simply enable emoji key board in your device ( Enable emoji keyboard ) //only user manually enable emoji keyboard in device

Categories : Iphone

TTTAttributedLabel not displaying the last line when having Emoji symbols
I had a same situation when making auto-height label according to the contents of the label. Everything seems fine, except when there are emojis in label content. It was because I did't use the correct setText method for AttributedString. [label setText:text afterInheritingLabelAttributesAndConfiguringWithBlock:^ return mutableAttributedString; }]; This is the correct way to set AttributedString, but what I did is [label setAttributedText:text]; So it was getting wrong label heights when it includes emojis in it. I solved this problem by changing this set method with the correct one as described in Github manual.

Categories : IOS

Emoji regression in ActiveSupport json output
I spoke with the author of the change to which I linked. He said while they are aware they have regressed emoji with this change, they are not considering a fix, and to upgrade to 4.0. Thus, I will not be upgrading to 3.2.14, or if I do, I will have to monkeypatch.

Categories : Ruby

Python write (iPhone) Emoji to a file
The most likely problem here is that json_obj["description"] is actually a UTF-8-encoded str, not a unicode. So, when you try to write it to a codecs-wrapped file, Python has to decode it from str to unicode so it can re-encode it. And that's the part that fails, because that automatic decoding uses sys.getdefaultencoding(), which is 'ascii'. For example: >>> f = codecs.open('emoji.txt', 'w+', encoding='utf-8') >>> e = u'U0001f1ef' >>> print e

Categories : Python

Replace iPhone Emoji in HTML page
You could create an array with the list of these particular strings along with another array containing their replacements (e.g. images), then use the PHP command preg_replace in this way: <?php $originalString = 'testing ud83dude04 my ud83dudc0e Emoji ud83cudf85 hureee u260e hai ud83dudeb2'; $patterns = array(); $patterns[0] = '/\\ud83d\\ude04/'; $patterns[1] = '/\\ud83d\\udc0e/'; $patterns[2] = '/\\ud83c\\udf85/'; $patterns[3] = '/\\ud83c\\udf85/'; $patterns[4] = '/\\u260e/'; $patterns[5] = '/\\ud83d\\udeb2/'; $replacements = array(); $replacements[5] = '<img src="image6URL" alt="alternative text" />'; $replacements[4] = '<img src="image5URL" alt="alternative text" />'; $replacements[3] = '<img src="image4URL" alt="alt

Categories : PHP

SublimeClang OSX Mountain Lion C++11
It may be too late, but I found how to do it. This matter is because clang uses headers for gcc-4.2, which is quite old and doesn't support C++11. To complete C++11 code, you have to get newer gcc and copy the include path it uses. If you have homebrew, open terminal and type brew tap homebrew/versions brew install gcc48 You can install gcc-4.8 and new libstdc++ with these two lines. Now, create some c++ file and try to use g++-4.8 with -v option. g++-4.8 -v example.cpp -v option tell gcc to show detailed log. In the output, there should be some lines like this. #include <...> search starts here: /usr/local/Cellar/gcc48/4.8.1/gcc/lib/gcc/x86_64-apple-darwin12.4.1/4.8.1/../../../../include/c++/4.8.1 /usr/local/Cellar/gcc48/4.8.1/gcc/lib/gcc/x86_64-apple-darwin12.4.1/4.8.1/

Categories : C++

MAC OSX LION: gcc on mac not compiling wget
Honestly, even though it appears that gcc exists; but does it point to a valid install? It still sounds like it is not installed properly and with an upgrade to Mountain Lion, all your open source tools have been scrubbed away and pushed to Xcode and must be manually installed if necessary.

Categories : C++

TideSDK Notifications in OSX Lion 10.7.5
Harry, I'm not too familiar with CoffeeScript, but the following code works for me in 10.7.5 and 10.8.4 - it seems similar to what you have: function showNotify(title, message) { var notification = Ti.Notification.createNotification({ 'title': title || 'No Title', 'message': message || 'No Message', 'timeout': 10 }); notification.show(); } showNotify("The Title", "The Message"); Hope it helps.

Categories : Misc

Will it be possible to upload to App Store from Lion?
Your Lion will be just fine as stated here: https://developer.apple.com/support/ios/ios-dev-center.html "To develop with the iOS SDK and Xcode, you must have an Intel-based Mac running Mac OS X Snow Leopard or later and you must be registered as an Apple Developer." Update July 2015 https://developer.apple.com/support/enrollment/ You must have an Intel-based Mac running OS X Yosemite (v10.10) or later.

Categories : IOS

R - OSX Mountain Lion and CPU Limit
Tried ulimit... Appears I do not have access, even via sudo. I get the same output from ulimit -a -H before and after giving ulimit -t 12000 # sets cputime limit to 12000 seconds from 600 seconds SOLVED via Debian Virtual Machine. If someone has a Mountain Lionic solution, please let us know.

Categories : R

Installing JDK on OSX Lion for Scala
Scala is a popular enough of a language for there to be plenty of information on how to get started from scratch. For example, googling for "scala installation" gave me (amongst other stuff) http://www.tutorialspoint.com/scala/scala_environment_setup.htm —they talk about JVM versions, how to install Scala, etc; i.e. all you need. If that page won't do, I'm sure you'll find many more.

Categories : Scala

Mac OSX Lion/X11/CImg Library
The header file Xlib.h is in /opt/X11/include, so add that path to the Header Search Paths in Xcode: You'll probably need to add libraries from /opt/X11/lib as well...

Categories : Xcode

Two versions of PHP - Mountain Lion
Your Apache is including libphp5.so of the wrong/the other installation. Option 1: See if you can find a libphp5.so file for your other PHP installation and point the Apache config to it (just put the whole path in the LoadModule line and restart Apache). If you cannot find such a file, the Apache module wasn't compiled for that PHP version. Compiling that may be a bit complicated, so in that case: Option 2: Figure out which PHP you're executing on the command line using which php and then just use the other one using the full path, e.g. instead of $ php ... use $ /usr/bin/php .... Note that you may still have different PHP configuration files for Apache and the CLI.

Categories : PHP

How to restrict Emoji range u2600-u26FF for a text box
Because .NET doesn't support surrogated pairs in Regexes. You have to decompose them manually. To make it clear, a char in .NET is 16 bits, but 1F600 needs two char. So the solution is to decompose them "manually". private static readonly Regex regexEmoji = new Regex(@"uD83D[uDE00-uDEFF]|[u2600-u26FF]"); I hope I have decomposed them correctly. I used this site: http://www.trigeminal.com/16to32AndBack.asp to decompose the low and the high range u1F600 == uD83D uDE00, u1F6FF == uD83D uDEFF. The first part of the surrogate pair is "fixed": uD83D, the other is a range. Example code (http://ideone.com/0o6qbt) string str = "Hello world

Categories : C#

How to insert Emoji (UTF8 4 Byte characters) into MySQL < 5.5
I have searched the web for many hours and I came to this solution which I want to share for other people: Use BLOB instead of text/varchar in the database fields. Like this, you can continue to use the database tables as you did before and the Emojis are shown properly. As soon as the hoster updates the MySQL version, I will continue with using UTF8MB4 as encoding.

Categories : HTML

How to use custom emoji view from iPhone default keyboard?
When using a custom keyboard in your app, just use the inputView attribute of a UITextField. You can do this in the following fashion: @interface SCAViewController () @property (weak, nonatomic) IBOutlet UITextField *textField; @property ( nonatomic) UIView *labelView; @end @implementation SCAViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. // here we set the keyboard to become the first responder // this is optional... //[_textField becomeFirstResponder]; // creating the custom label keyboard _labelView = [[UIView alloc] initWithFrame:CGRectMake(0, 568, 320, 568/3)]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 100, 100)]; label.text = @"Label View!"; [_labelView addSubview:label]

Categories : Iphone

How to show iOS style Emoji characters in Android's EditText?
You need to download all Emoji images, keep it local in your application and replace the unicodes of smileys with Emoji images in your EditText/TextView. This link shows one of the ways to add images inline with text in an EditText/TextView.

Categories : Android

How to send IOS Push Notifications with Emoji in message in a NodeJS server?
You keep saying different things. You first said: If I write ue48d , for a cloud character, server see it as a string 'ue48d'. Now you're saying I write "e415 Hello!" to the message field. At the risk of pointing out the obvious ue48d != e415 UTF8 characters in JSON are encoded like with u and then the character code i.e. ue48d is a valid character to send to the phone in JSON. e415 is not, which is why your phone is not displaying it as an emoji character. So, what does your phone see when you send 'ue48d' to it? i.e. what does it see when you send it the original correctly encoded string. Edit If it works when you send a properly encoded string from the server, then you probably just need to decode the message sent to the server, before sending it back out i.e. messag

Categories : Node Js

Installing jpype in Mountain Lion
This is on a system running OSX 10.8.5. I modified the setup.py for JPype-0.5.4.2 and added an element to the end of the self.includeDirs list which is created in the function setupInclusion. This function is declared at line 61 for this particular version of JPype. def setupInclusion(self): self.includeDirs = [ self.javaHome+"/include", self.javaHome+"/include/"+self.jdkInclude, "src/native/common/include", "src/native/python/include", #I added this line below. The folder contains a jni.h "/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/" ] Finally I ran pip install ~/Path/To/JPype-folder/ and the installation was successful.

Categories : Java

How do I create a .conf file in Mac osx Lion?
Open TextEdit's Preferences, and switch to the Open and Save section. Under the When Saving a File panel, uncheck the Add '.txt' extension to plain text files option.

Categories : Osx

Does anybody know how to sniff in promiscuous mode on OS X Lion?
I recall having to setup a script on terminal to "tweak the permissions" of some files / drivers That's probably referring to the permissions on the /dev/bpf* devices. That's not something necessary to sniff in promiscuous mode, it's something necessary to sniff at all unless you're running as root. Recent versions of Wireshark, going back at least to Wireshark 1.8.0, install a script to do that automatically. Open up a Terminal window and do ls -l /dev/bpf*; it should report the /dev/bpf* devices, e.g. /dev/bpf0, /dev/bpf1, etc. as having permissions rw-rw---- and as being owned by root and group access_bpf. In addition, the id command should report you as being a member of group access_bpf. If that's all the case, Wireshark should show an en0 device and possibly an en1 device.

Categories : Osx

Tesseract and dylib on OSX Mountain Lion
Done by cleaning my installation of both the softwares and re-installing them through brew. Mind that if there is some linking problem, you have to execute brew link --overwrite tesseract to solve them.

Categories : Misc

Can't Uninstall Java 7 JDK on Mac OS X (Mountain Lion 10.8.4)
If you can't find the Java Home, open up terminal and enter: env look for or SOMETHING LIKE THIS Mine might not be the same as yours JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.7/Home This is where your Java is installed If you want to see it in Finder then open up Finder and press Command + Shift + G and enter in the path to java home. to uninstall simply remove the java version from : /System/Library/Java/JavaVirtualMachines with cd /System/Library/Java/JavaVirtualMachines rm -r some.version.java.jdk Note: Sometimes Java is install in /System/Library but sometimes it's installed on /Library, so that's why you couldn't find Java in /Library which the Oracle document suggested.

Categories : Osx

Where are the files generated with Xcode 4.5 in Lion?
This has nothing to do with Lion. Xcode puts generated files in: ~/Library/Developer/Xcode/DerivedData where ~ is your home directory. Keep in mind that the ~/Library directory is hidden by default in Lion (and later).

Categories : Xcode

Installing Cloudera Hue on mac os x mountain lion
You need to delete desktop/core/ext-py/Twisted and retry. Also Hue 2.5 release (which contains this fix) is around the corner (this Monday/Tuesday).

Categories : Osx

Mono Program Crashes on OSX Lion
This might be a problem of where you built it: try building it in Lion instead to see if that makes a difference. I've seen problems before when trying to execute a program on an older OS than where it was built.

Categories : C#

Which Python architecture provided on Mac (Lion)?
Use platform.architecture(): >>> import platform >>> platform.architecture() ('64bit', '') Run on my Mac OS X 10.8.4. Note that your Python executable may be a universal binary, in which case you could get the wrong architecture quoted: Note: On Mac OS X (and perhaps other platforms), executable files may be universal files containing multiple architectures. You can also test sys.maxsize: >>> sys.maxsize > 2**32 True The above would return False if you were running a 32-bit platform.

Categories : Python

How can I install pybrain on Mac OS X Mountain Lion?
Try using the Python package manager pip with the correct permissions: pip install pybrain or clone the repo and build the package git clone git://github.com/pybrain/pybrain.git python setup.py install

Categories : Python

Mac Lion: Issue with opencv and python 2.7.5
This is how I configured it in the end for the official python 2.7.5 from http://www.python.org First we need to install opencv via brew: brew tap homebrew/science brew install opencv now add /usr/local/Cellar/opencv/2.4.5/lib/python2.7/site-packages to your PYTHONPATH . I did it by editing bash_profile: open ~/.bash_profile add this line in TextEditor: export PYTHONPATH=/usr/local/Cellar/opencv/2.4.5/lib/python2.7/site-packages:$PYTHONPATH #Check the version in your directory Save the file and do: source ~/.bash_profile Now everything should be ready.

Categories : Python

RabbitMQ not working on OS X Mountain Lion
I've managed to fix this issue by completely removing brew from my system and reinstalling it again. I've used the following instructions (adapted from the official brew documentation) to completely remove brew from my system: cd `brew --prefix` rm -rf Cellar brew prune rm -r Library/Homebrew rm -rf .git rm -rf ~/Library/Caches/Homebrew I simply reinstalled RabbitMQ afterwards: brew install rabbitmq .. and everything worked like a charm!

Categories : Osx

Mac OS X Lion - mysql: command not found
In the past I've had problems installing the mysql2 gem, so I wrote a little shell script to make my life easier: #!/bin/sh -x env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config Try updating that with the path to your mysql_config: /usr/local/Cellar/mysql/5.5.28/bin/mysql_config and change mysql to mysql2.

Categories : Mysql

How to enable 32 bit Java in safari on Mac OS X 10.8 [Mountain Lion]
As far as I know, there has been an update from Apple made to disable Java plug-in and remove Java Preferences.app from the Utilities folder. You may need to re-enable the Java plugin. And since Java 7 only runs 64-bit apps, the only solution you have is to follow these steps written by Apple to reinstall Java 6 : http://support.apple.com/kb/HT5559?viewlocale=en_US EDIT : Or, try to run Safari in 32-bit mode : steps here.

Categories : Java

Fail Installation: OpenCV 2.4.6.1 on Mac OS X Mountain Lion
you could just skip the performance tests for now. (you can always build them later, once this got solved) add: -D BUILD_PERF_TESTS=OFF to your cmake cmdline [edit] looks you're having issues #3191 and 3179 both of them are fixed in 2.4 now https://github.com/Itseez/opencv/pull/1228 , https://github.com/Itseez/opencv/pull/1244 when did you download the code ? might consider getting a fresh copy ?

Categories : Osx

Setting PHP path in Mac OS X Mountain Lion Server
Came across this discussion under apple support. Apple recommends not to upgrade inbuilt PHP, Since its used by other applications running inside server. PHP upgrade will be done along with Apple updates after apple test next version of PHP. They do provide steps to update after recommending not to ,And to upgrade sudo mv /usr/bin/php /usr/bin/php.orig sudo ln -s /usr/local/php5/bin/php /usr/bin/php and update apache conf file with LoadModule php5_module /usr/local/php5/libphp5.so

Categories : PHP

Running Python locally on Mountain Lion
Try this (or possibly switch WebServer to webserver (what I changed was make the pathnames all be WebServer; you had some Webserver (lowercase S) and some WebServer <VirtualHost *:80> DocumentRoot "/Library/WebServer/Documents/python-mn" ServerName python.local ServerAlias www.python.local WSGIScriptAlias / /Library/WebServer/Documents/python-mn/wsgi.py <Directory /Library/WebServer/Documents/python-mn> #Options Indexes FollowSymLinks MultiViews Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> Per Apple's mod_hfs_guide, your error message is due to

Categories : Python

Boost 1.54 build error under OS X 10.8.4 Mountain Lion
With the hint from Igor R, I tried gcc 4.8.1 on linux which works well. Then I think c++11 might play a role in the errors and tried to find how to get c++11. So eventually I got it to work. XCode comes with two sets of tool. gcc front-end + llvm backend and clang front-end + llvm backend. The gcc version is old as on my machine ( 4.2 ), the clang supports c++11, so once I use "toolset=clang", I can compile everything successfully.

Categories : Xcode



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.