Following Setting up password-less connection with GitHub in TortoiseGit article, here are tips on how to setup password-less connection between your GitHub account and your local repository operated under Netbeans. The easiest way to setup password-less connection, is to do this on initial GitHub repo clone or pulling. And it will be presented this way, in following article.
Remember, that every HTML 5 tag can have
id and can be used as reference. Every one!
So, if you want to display some bolded value, then instead of writing:
<span>Cars: <span id="carsValue" style="font-weight: bold"></span></span>
you can use much simpler approach of:
<span>Cars: <strong id="carsValue"></strong></span>
Zepto.js is great alternative to jQuery. With greatly reduced (in compare it jQuery) source code base, it still offers about 80-90% of key jQuery functionalities. Unfortunately to me, among these missing 10-20% there were some animations and some nifty fadeIn and fadeOut effects. Had to find some solution to this problem.
If your PhoneGap application loads some external content (either local files or any server-side data) using AJAX, keep an eye on the fact, that on very slow mobile devices, it may end up with error message saying, that connection to given URL failed. Which means a typical timeout.
You may experience the very same issue, if you’re building apps in debug mode and debug server (either yours or default
weinre one) is down or responds to slowly.
There is a bug in HTML 5 Canvas object exposed on Android platforms, in versions 4.1.1 till 4.3 (newest, as of writing it, though not yet fixed). It causes that, when hardware acceleration is turned on, any drawings on canvas will be doubled at top of the page. At first, I thought, that this is caused only in Segment Display — a fabulous JS library, that I use. This is why, you’ll find a lot of references to it in this article. But then it turned out to be general Android problem, that appears not only in PhoneGap applications (which uses webview), but also in all pages served on Android 4.1.x+ platform. So, you’ll also find some ideas, how to work around this problem, if you’re not using Segment Display.
If your PhoneGap application loads some external content via AJAX, keep in mind that you have to include domain whitelisting in your
PhoneGap is very strange about this, from version to version and from platform to platform, and sometimes allows you to access external resources without domain whitelisting (I had that issue, that this worked on Android 2.x, but failed on 4.x). So, to be sure, add it to every new project.
If you’ll ever get some cheap Chinese crap, called tablet, you may face up a strange issue. Though device is most likely equipped with Android 4.0 or newer, it still has old Android Market (not Google Play) installed. Opening Android Market does not perform automatic update to Google Play. And attempt to install any application ends with hang-up. If you’re experiencing this or similar problems, you may find solution here.
As of writing this, Ripple Emulator itself is old, long-time not updated. But, what is much more wrong, it has very, very old version of PhoneGap behind. Currently it is based on version 2.0.0, while we already have version 3.0.0 in local PhoneGap building and 2.9.0 in PhoneGap Build. If you compare PhoneGap API reference from version 2.9.0 with the one inside Ripple Emulator, you’ll see that changes are dramatic. That’s why being able to detect, when your application is running in debug mode (i.e. under Ripple Emulator) is essential.
For one of my PhoneGap project’s I needed a function that will convert local (native) language name into international (English) language name. And another one that will return correct two-letter language code (ISO 639-1), again, based on native language name. This was required because PhoneGap applications are returning local name for currently selected language (so, you’ll get
polski instead of
Tiếng Việt instead of
Vietnamese and so on).
Here are these functions for future reference and for others, who could possible find them useful.
I wrote as simple PhoneGap multi-language demo, which:
- detects (using PhoneGap’s Globalization object) current user language and
- uses i18next library to translate application into that language (if proper locale files are found).
You can get sources of this demo application from GitHub.
Both mysysgit and TortoiseGit are password-less in the meaning, that they don’t store any passwords. If you want to avoid typing your GitHub login password and over and over again, the only option is to setup password-less login using SSH keys. This article is my personal check-list on how to configure each computer as painlessly as possible.
There are several ways to get rid of
Shared Folders Synchronization item from context menu (right-click menu) in Windows. They all depends on version of your Windows or Microsoft Office (responsible for adding this) and level of your computers skills. This post started as a quick example of removing this nasty context menu item, but ended up as a list of solutions, that you can use to remove many things that may slow down your computer. Consider reading this, even if you don’t have Microsoft Office, but your computer seems to be too slow.
You won’t find proper option (in Microsoft Security Essentials configuration) for removing
Scan with Microsoft Security Essentials... menu item, that is added after each Microsoft Security Essentials installation. So, you have to help yourself.
According to PHP team, common hashing functions such as
sha1() are unsuitable for passwords. Why? They’re to fast and by this, not so secure and open to brute-force decrypt. No matter, what you think about this, we must admit, that
md5() function is listed among “Text Functions” in PHP’s docs, so it doesn’t even touch “Encryption” or “Security” parts in documentation.
Mcrypt seems to be good alternative to those. And
mcrypt-module-open function contains good example on both crypting and decrypting with mcrypt. See mentioned article for more details and other alternatives.
As you search the Internet, you’ll find many sources (like BinaryTides blog) with many useful (or not) tips on how to serialize or encode variables and data in PHP.
The problem is, that not all of these methods are useful, when we’re dealing with URLs.