Link - The Definitive Guide to Angular on Mobile
Bookmarked for further reading.
The Definitive Guide to Angular on Mobile
Read more: Link - The Definitive Guide to Angular on Mobile | ng-newsletter
Bookmarked for further reading.
The Definitive Guide to Angular on Mobile
Read more: Link - The Definitive Guide to Angular on Mobile | ng-newsletter
It can be a boon to post on Facebook from your Android phonegap/cordova app. You can actually use the https scheme to post through the user's browser, but then he needs to login there. It is also possible to communicate with the Facebook app via the fb:// protocol, but you cannot post stories or any other kind of updates that way (anymore).
There is however a plugin for Phonegap to use Facebook, and it seems to work, and you can post from the app to Facebook. The instructions for it worked out A ok for me, just follow it step by step, but with the following caveats:
In Phonegap 2.7 they removed some deprecated interfaces, that the Facebook plugin for Phonegap uses. They then put those deprecated interfaces back in 2.8.1. So if you - like me - were on 2.8.0 or if you are on 2.7, you are on the versions that do not work. (Disclaimer, I have not tested the 3.x series or anything pre 2.8). it is possible to use the new interfaces as outlined in the blog post linked above, but when it came down to lines in the plugin as:
this.fba.success(new PluginResult(PluginResult.Status.OK), this.fba.callbackId);
...it started to become a bit hairy, and not clear to me what that actually does, or how to replace it. With 2.8.1 you don't need to worry about that.
It is "facebook-js-sdk.js", not "facebook_js_sdk.js" as it is written in the index.html file currently.
In the Facebook documentation, they only give examples for OSX and Windows. On Linux you need to write:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
After these changes, I was able to post on my wall from an Android emulator. I have not tried with an exported apk yet, for that you need to make a hash as above but from the keystore you use to sign your apks with.
This blog post will be amended and expanded later.
Basic level
I want a graphical overview of what files are unknown to git, which are known and has changed, and which ones are staged. I also want to be able to add (stage) files, commit files, and also unstage files.
Advanced level
I have a cheat sheet with the following stuff in it, but would like to have it supported in the GUI:
Feature | git-cola | smartgit | |
Separate staged, unstaged, unedited and unknown files | Y | Y | |
Stage files | Y | Y | |
Commit files | Y | Y | |
Advanced features | |||
track a new remote branch | |||
see what would be merged in, before doing a pull (i.e. a git fetch followed by git diff HEAD...origin |
N | ||
initialize a remote repository with my stuff and make my local repository track the remote | |||
push to a fresh remote repository | |||
push tags | Y | ||
I made a new branch locally, and I want to push it to remote | |||
undo my last commit | |||
Aborting a merge when you are in the middle of it | |||
revert a changed or deleted file to its last commit | |||
handle submodules as they are defined in recent versions of git (1.8.2 and higher) | N | Y | |
Offerings
Found a page that details some of the offerings:
http://askubuntu.com/questions/227554/best-gui-client-for-git
So a quick test for the basic level:
git-cola - seems to do a lot of the things I want. Distinguishes between tracked and untracked files, shows which files have edits in them. double click to stage file, the best one so far
giggle - does not seem to do much, it does not distinguish between files with changes in them and not, has a context menu for committing any file, wheter changed or not. May be more for inspecting and analyzing.
git-gui - Lumps all files into a long messy list, with no distinction between tracked and untracked files
Looks really nice, but in a way text lines in a table would be more compact and succinct. Lots of javascript libraries for jQuery.
© 2013 Unheap.
Read more: Link - Unheap - A tidy repository of jQuery plugins
I'm thinking of adding some levels and achievements to a javascript based game. Since the points scoring is already there, it would be really nice if I could just have the scoring emit some kind of event that can be caught by the level and achievements code. In this way there would be a reasonably clean and simple interface between the code sections.
So I went to the Microjs site and found a dozen or so libraries that handled events. They seemed to fall into three categories:
Candidates in group 3 so far are:
A light utility class to help implement the Mediator pattern
Read more: Link - Mediator.js
In a defalt setup in Phonegap 2.8.1, localstorage is marked for backup to iCloud. This may get your app rejected by Apple, depending on the size.
To disable backups, set BackupWebStorage
to "none"
or "local"
in the "config.xml"
file. The config.xml
file is located in your <project folder>/<appname>
directory.
<preference name="BackupWebStorage" value="none" />
BackupWebStorage
(string, defaults to cloud
): valid values are none
, cloud
and local
.
To check that it works, Apple recommends this way to check how much data you have put under the auspices of iCloud:
- Install and launch your app
- Go to Settings > iCloud > Storage & Backup > Manage Storage
- If necessary, tap "Show all apps"
- Check your app's storage
Do note, that this cannot be done in a simulator. You need a real device.
On some computers, you may get massive black borders around panels in cairo-dock. On my laptop they obscured the desktop and when taking screen shots. On my desktop machine it obscured everything not in the center of screen. The standard solution, compiz, did not seem to cut it.
Installing and running xcompmgr solved the problem on both computers:
First create the autostart folder if it doesnt already exist: mkdir -p ~/.config/autostart Then create a xcompmgr desktop file lxshortcut -o ~/.config/autostart/xcompmgr.desktop
On my laptop, the screen capture program shutter hanged whenever xcompmgr was running. By adding the "-c" switch to xcompmgr, this seems to be resolved.
Read more: Link - lubuntu - How to start applications such as xcompmgr at start up? - Ask Ubuntu
Let's say you have a bunch of web pages you need to print out as PDFs, to send as receipts to the bookkeeping department. If you use the "Print to file" in the Ubuntu print dialog, you will need to manually change the name for each file.
Instead, install cups-pdf, "sudo apt-get install cups-pdf". It will be a new printer in your printer list and will save the PDFs in the ~/PDF directory, with file names based on the titles of the documents.
Should you have the same title on several documents you can even make all PDF printouts unique by adding a print job number to each. Set this in the /etc/cups/cups-pdf.conf file.
Update 2017-02-12: For Ubuntu 16.04 I had to reinstall the cups-pdf.conf file. I took it from https://launchpad.net/ubuntu/xenial/+source/cups-pdf
This software is designed to produce PDF files in a heterogeneous network by providing a PDF printer on the central fileserver. It is available under the GPL and is packaged for many different distributions or can be built directly out of the source files.
Read more: Link - CUPS-PDF
I've covered Intel's massive speedup with KVM on Linux, and now there is this (untested by me at this point in time):
The fastest Android emulator for app testing and presentation
I've read somewhere that Google Play is included, haven't cecked that one though.
Read more: Link - Genymotion
About a month ago, I found Wikipedia's page on the concept "Thought-terminating cliché". I really liked it and it put a (new) name for me on to something that I - in my own little mental world - had previously called "mental roadblocks". Unfortunately the page has been deleted now recently in August 2013, so I retrieved the last copy of it. It is below and under the same license as the articles on Wikipedia. I have no idea if the contents meet the standards of Wikipedia, but I find the thoughts presented interesting:
A thought-terminating cliché is a commonly used phrase, sometimes passing as folk wisdom, used to propagate cognitive dissonance (discomfort experienced when one simultaneously holds two or more conflicting cognitions, e.g. ideas, beliefs, values or emotional reactions). Though the phrase in and of itself may be valid in certain contexts, its application as a means of dismissing dissent or justifying fallacious logic is what makes it thought-terminating.
The term was popularized by Robert Jay Lifton in his 1956 book Thought Reform and the Psychology of Totalism. Lifton said, “The language of the totalist environment is characterized by the thought-terminating cliché. The most far-reaching and complex of human problems are compressed into brief, highly reductive, definitive-sounding phrases, easily memorized and easily expressed. These become the start and finish of any ideological analysis.” [1][2]
In George Orwell’s novel Nineteen Eighty-Four, the fictional constructed language Newspeak is designed to reduce language entirely to a set of thought-terminating clichés. Aldous Huxley’s Brave New World society uses thought-terminating clichés in a more conventional manner, most notably in regard to the drug soma as well as modified versions of real-life platitudes, such as, “A doctor a day keeps the jim-jams away.”
|
|
Thought-terminating clichés are sometimes used during political discourse to enhance appeal or to shut down debate. In this setting, their usage can usually be classified as a logical fallacy.[citation needed]]]
Thought-terminating clichés are also present in religious discourse in order to define a clear border between good and evil, holiness and sacrilege, and other polar opposites.[citation needed] These are especially present in religious literature.[citation needed]
The religious or semi-religious ideas of cults, heretics, and infidels are also often used as thought-terminating clichés, e.g. "Do not listen to him, he is an infidel," (a guilt by association fallacy) or "That line of thought sounds like a cult" (also a guilt by association fallacy).
The statement "that is a thought-terminating cliché" can itself function as a thought-terminating cliché. Once the stator has identified a first statement as a thought-terminating cliché, they may feel absolved of needing to determine whether that first statement is indeed a thought-terminating cliché, or provides useful insight, in the context under discussion.
Update 2019-06-17: A recent thread on reddittalks about "Gish galloping" which is another strategy for shortcutting reasoned arguments:
The opposite is gish galloping, where you make an argument by throwing out a large number of individually easily countered false arguments and knowing that it requires the person more effort to disprove each than it takes you to keep throwing them out. So you will appear to win as they fail to logically address each individual argument and you can say "THought Terminating Cliche!" if they just accuse you of generally lying.
An exchange of opinions is happening on twitter, between J. Craig Venter and Nassim Nicholas Taleb, about whether genetically modified crops are good or not. I tried to summarize the case for why GMOs are dangerous like this:
Ok, this is how I understand why GMOs are dangerous:
Nature has a certain tolerance (hysteres, non linearity) for shenanigans, if you go outside that envelope you may end up in a wasteland. This is potentially lethal if you do it on a global scale
GMOs are modification of small self-replicating things, hence have the potential to go global, and out of control. Even if that was not your intention.
It's not about the *probability* of this happening but about the *pay-off* (consequences) if it happens
So self-replicating things can be dangerous, but I started thinking, how small does something need to be, to be out of control?
If you look at land based organisms: If we should get, say genetically modified evil elephants, it would really not be a a huge problem. We can simply locate all those elephants and kill them. With smaller things it gets harder.
Size | Locate and kill all | Stow away capacity |
Elephant (10 meters) | Easy | They are conspicuous, you know |
Dog (1 meter) | Hard, but maybe doable | None |
Rat, snake (1 decimeter) | Probably impossible | Some |
Insects (1 centimeter) | Forget it | Carried by winds, in little spaces on ships and airplanes |
Seeds (1 millimeter) | Forget it | ditto + on fur, clothes, some UV protection often |
Bacteria, fungi, viruses (many in micrometer to nanometer range) | Forget it | Immune systems can fight them actually, which is good since they are everywhere |
I have tinkered with this previously with pickle, jart/redisbayes and jamesls/fakeredis (real redis slows down redisbayes a lot, pickle used for saving the net) in python, but this TextBlob module seems to have it too. Untested by me.
Yesterday, TextBlob 0.6.0 was released (changelog), which introduces Naive Bayes classification. This tutorial shows how to use TextBlob to create your own text classification systems.
Read more: Link - Steven Loria | Tutorial: Simple Text Classification with Python and TextBlob
Untested by me:
You have almost certainly seen the kind of problem ftfy fixes. Here’s a shoutout from a developer who found that her database was full of place names such as “BucureÅŸti, Romania” because of someone else’s bug. That’s easy enough to fix:
Read more: Link - ftfy (fixes text for you) version 3.0 | Luminoso Blog
Photos from digital cameras nowadays may contain metadata about which side is actually up on the photo. All image viewers I have tried on Ubuntu heeds this and auto rotates the photos for you. But Imagemagick does not understand this auto-rotation stuff and will put your text in the wrong place on some pictured because from Imagemagick's point of view the image is not rotated.
So how do you rotate them so Imagemagick gets it right? The image viewers won't help you since they "lie" to you and will show the image corrected rotationally. One of my image viewers has a setting for disabling this auto rotate behavior, but the setting does not work.
Update 2013-10-30:
Use exiftran
It will rotate the pictures based on the exif orientation information, and update that information.
exiftran -ai *.JPG
Old solution:
What you need to do is strip the metadata from the photos, and then use the image viewer of your choice (e.g. Gwenview), to see which pictures in fact aren't correctly rotated and rotate them.
Then use Imagemagick. This command will strip all metadata from your photos:
exiftool -all= *.JPG
It can probably be configured to just strip some of it it, if need be.
Mathematics is high status, probably due to its success in physics, and because of this it is used in fields and applied to problems that are too unstructured and messy for it to make any sense.
In fact sometimes it is used to obscure: You simply take some maths that is really hard to understand and rely on people not being able to follow your train of thought through it and accept your conclusions at face value. It's like HC Andersen's story about the Emperor's new clothes.
One example is complex mathematic functions applied to finance, but now we can read about another case applied to psychology. I think this quote from the linked article speaks all by itself (my boldface):
Upon reading a 1963 paper on Lorenz equations “with some difficulty,” Brown realized that the equation Fredrickson and Losada used to calculate the critical positivity ratio had no connection to their emotion data: Regardless of the volunteers’ data points, the equation would simply generate the same, meaningless number.
And this was a paper that gained quite some status:
“What’s shocking is not just that this piece of pseudomathematical nonsense received 322 scholarly citations and 164,000 web mentions, but that no one criticized it publicly for eight years, not even supposed experts in the field,” Sokal says.
Read more: Link - Ratio for a good life exposed as 'nonsense' | Psychology | Science News
There is a lot of talk, especially in the U.S., of the middle-class squeeze. I wonder if it could be explained by increased unpredictability. It is said that the middle class is doing worse and worse, and that the differences within the middle class is growing too: Between the upper crust of it and the rest.
Nicholas Nassim Taleb talks about Mediocristan and Extremistan, two imaginary places where in one case your income is predictable and proportional to the amount of work you put in, while in Extremistan rags and riches are decided much more by chance. An example of a Mediocristan job that Taleb gives is a dentist.
Examples of Extremistan jobs could be I guess anything connected with speculation: Building an app for the Iphone app store, making bets on the stock market, relasing a video game, developing a new pharmaceutical and so on. If you do ten, or even a hundred of these projects it is not clear which one will make money, if any. At the same time there may be huge profits, somewhere, sometime.
Let's assume that the world has moved in the direction of Extremistan, and that the actual financial gain from work is much harder to predict. Let's then simplify a lot and say we can divide people into three groups, let's call them
The squeezed middle class are people who toil away in projects where it is unclear if they will give any profit and in that case how much. Because of this there is a risk premium associated with each project, and this is reflected in the salaries paid. The squeezed middle class are doing just as good work as a couple of decades ago, but it is much harder to predicted the actual value of their work, so salaries get depressed as a risk premium.
The upper middle class in this simplified model are then people that simply got lucky by doing a couple of successful projects.
The upper class has enough money to spread the risks and reap the rewards of a high risk/high reward environment
Untested by me at this point in time;
jQuery Combinators adds five very useful methods to every jQuery selection: tap, into, select, ergo and when. These allow you to use your own functions as if they were built-in jQuery methods, which makes your code cleaner and more "jQuery-like."
Read more: Link - jQuery Combinators by raganwald
There can be a lot of callbacks when handling web sql. These libraries aim to make it easier. Web SQL is important on mobile platforms such as IOS and Android.