Recent Notes

Displaying keyword search results 1 - 9
Created by freyo on June 30, 2011 11:15:48    Last update: June 30, 2011 11:15:48
Install APK with adb : $ platform-tools/adb install out/target/product/ge... Error message in logcat: D/PackageParser( 60): Scanning package: /data/ap... The error was created by android.content.pm.PackageParser , which compares the android:minSdkVersion and android:targetSdkVersion attributes of the uses-sdk element of AndroidManifest.xml in the APK file against the SDK version of the device or emulator. The SDK version on the device has to be greater than that required by android:minSdkVersion . In my case, since I built the package with AOSP, the target emulator has to be AOSP also. This is the relavant section in AndroidManifest.xml : <uses-sdk android:minSdkVersion="AOSP" ... And the relevant section in android.content.pm.PackageParser : if (minCode != null) { if (!minCode.equals(...
Created by jinx on May 03, 2011 09:42:12    Last update: May 03, 2011 09:42:12
The @ operator suppresses error messages. A usual example is: <?php $v = @$a['non-existing-key']; ?> which suppresses the "undefined index" PHP notice. Another example is: <?php @include('non_existent_file'); ?> In this case, @ not only suppresses error messages for non-existing file, it also suppresses any error messages coming from the included file when it does exist. Create file test.php : <?php @include('test.inc'); ?> Create test.inc : <?php <?php garbage ?> The "undefined constant" PHP notice message is suppressed by @ .
Created by jinx on May 03, 2011 08:56:55    Last update: May 03, 2011 08:57:54
These error level constants are defined in PHP : Constant Value Description E_ERROR 1 Fatal run-time errors. Execution of the script is halted. E_WARNING 2 (1<<1) Run-time warnings (non-fatal errors). Execution of the script is not halted. E_PARSE 4 (1<<2) Compile-time parse errors. Parse errors should only be generated by the parser. E_NOTICE 8 (1<<3) Notices. Indicate that the script encountered something that could indicate an error, but could also happen in the normal course of running a script. E_CORE_ERROR 16 (1<<4) Fatal errors that occur during PHP's initial startup. This is like an E_ERROR, except it is generated by the core of PHP. E_CORE_WARNING 32 (1<<5) Warnings (non-fatal errors) that occur during PHP's initial startup. This is like an E_WARNING, except it is generated...
Created by jinx on May 02, 2011 20:48:49    Last update: May 02, 2011 20:58:01
A PHP try catch block looks like this: <?php try { throw new MyException('foo!'... Normally, no exceptions are thrown from internal function errors. For example: <?php $a = 1; $b = 0; try { $v = $... The division by zero error is never caught as an exception. However , you can translate errors into exceptions with an error handler and ErrorException : <?php function exception_error_handler($errno, ... which prints: Exception: exception 'ErrorException' with message... PHP does not support finally clause.
Created by freyo on April 12, 2011 13:16:00    Last update: April 12, 2011 13:16:00
You get this error message when you try to install an Android APK. Most likely, the APK you are trying to install declared sharedUserId , but there's an existing package with the same sharedUserId , which was signed with a different key than the package being installed.
Created by jinx on April 10, 2011 21:15:46    Last update: April 10, 2011 21:23:04
When developing in PHP, it's frustrating to have errors in the code but no error message displays. According to the PHP manual, the display_errors setting controls whether errors are displayed. You can either change it in php.ini : ; This directive controls whether or not and where... or set it in your code: <?php ini_set('display_errors', 'On'); fsdlf... But when you have syntax errors in your code, the ini_set function may not even get a chance to execute. So the only reliable way is to set it in php.ini : <?php // nothing gets displayed when display_er...
Created by nogeek on February 03, 2011 13:08:38    Last update: February 03, 2011 13:14:10
The log line was like this: 2011-01-19 15:16:34,842 INFO [STDOUT] (HDScanne... Note that INFO and timestamp were printed twice. Based on my configuration, I was expecting something like this: 2011-01-19 15:16:34,842 INFO [XmlWebApplicationC... i.e., the logger name should have been XmlWebApplicationContext , not STDOUT ! What was the problem? I found this error message in server.log : 2011-01-19 14:34:38,107 ERROR [STDERR] (main) lo... It turned out that org.apache.log4j.Appender was loaded by my web application class loader, whereas org.jboss.logging.appender.FileAppender was loaded by the JBoss bootstrap class loader. Removing the log4j jar from my web application archive fixed the problem (sine log4j is already available in JBoss). Why was the logger changed to STDOUT? JBoss detects that there's a problem with the log4j configuration and routes all...
Created by magnum on August 19, 2010 22:42:26    Last update: August 19, 2010 22:43:59
Lyx wasn't able to open DVI files with the error message MIME type application/x-dvi not supported. I looked at Lyx preferences and it's using xdg-open to open the file. The following query shows that the default application for the DVI mime type is Evince. So I updated that to xdvi , which I do have. $ xdg-mime query default application/x-dvi ... But it didn't work! I checked that the file ~/.local/share/applications/defaults.list did get updated. I even logged out and logged back in! I had to update the system wide configuration file /usr/share/applications/defaults.list to make it work: #application/x-dvi=evince.desktop applicati...
Created by Dr. Xi on September 19, 2008 22:24:44    Last update: September 19, 2008 22:24:44
I've always known that IE lies about error messages. When I get a generic error page from IE, I would test the same page in Firefox, which would faithfully show me the error sent from the server. Never, even in my wildest dreams, would it occur to me that the blurring of error messages is actually called "user friendly". Until I stumbled upon it. Anyway, here's how to turn it off. Thanks to MS, which apparently thought that most people are dumb but seemed like they still acknowledged there are some out there not so dumb as they think, for offering the option to turn it off! Select "Internet Options" from the "Tools" menu Click the "Advanced" tab Scroll to the "Browsing" section and deselect...