GGshow reloaded GGshow reloaded

January 15, 2012

Call to undefined function token_get_all()

Issue:

  • Unable to create action using Zend Framework Command Line Tool.
    Fatal error: Call to undefined function token_get_all() in C:Program FilesZend
    ZendServershareZendFrameworklibraryZendReflectionFile.php on line 301

Reason:

  • PHP tokenizer extention has not been enabled.

Solution:

  • If PHP compiled without tokenizer (–disable-tokenizer), recompile it with tokenizer (–enable-tokenizer).
  • If PHP configuration has not enabling tokenizer, edit php.ini, add or uncomment the tokenizer extension.
    extension=tokenizer.so

    or

    extension=php_tokenizer.dll
Filed under: PHP,Web,Zend Framework — Tags: , , , — GG @ 1:21 am

Zend Framework Command Line Tool with administrator rights

Issue:

  • Problem using Zend Framework zf.bat in Windows.
  • Unable to create project using zf Command Line Tool.
    C:\Program Files\Zend\ZendServer\share\ZendFramework\bin>zf create project mypro
    ject
    Warning: mkdir(): Permission denied in C:\Program Files\Zend\ZendServer\share\Ze
    ndFramework\library\Zend\Tool\Project\Provider\Project.php on line 55
                              An Error Has Occurred
     Could not create requested project directory 'myproject'
    
    Zend Framework Command Line Console Tool v1.11.11
    Details for action "Create" and provider "Project"
      Project
        zf create project path name-of-profile file-of-profile

Reason:

  • Administrator rights are required to create folders and files into specified location.

Solution:

  • Run the command as administrator To start command prompt as administrator, right click on the its shortcut, and choose run as administrator. You can also select the command prompt shortcut and press Ctrl + Shift + Enter.
    C:\Program Files\Zend\ZendServer\share\ZendFramework\bin>zf create project mypro
    ject
    Creating project at C:/Program Files/Zend/ZendServer/share/ZendFramework/bin/myp
    roject
    Note: This command created a web project, for more information setting up your V
    HOST, please see docs/README
  • For Zend Framework CLI in Linux, use sudo to execute zf.sh
    sudo zf.sh create project myproject
Filed under: Linux,PHP,Windows,Zend Framework — Tags: , , , — GG @ 1:12 am

December 31, 2011

Compact, not vacuum…

Issue:

  • Unable to execute a SQLite VACUUM command from actionscript.

Reason:

  • flash.events.SQLErrorEvent
    
    SQLError
    detailID : 2037
    details : VACUUM is not allowed from SQL.

Solution:

  • use method compact() to reclaims all unused space in the database.
    compact(responder:Responder = null):void
Filed under: ActionScript,Flash Platform,SQLite — Tags: , , , , — GG @ 4:36 pm

ROWID messed up by VACUUM

Issue:

  • ROWIDs in a SQLite table has been changed after executed a VACUUM command.

Reason:

  • VACUUM command rebuilds the entire database, and recreates rowid for all tables.

Solution:

  • Although query by ROWID could be fast, but it should not be used as an external key.
  • Use an explicits integer primary key in the tables.
    CREATE TABLE t(x INTEGER PRIMARY KEY ASC, y, z);
Filed under: Database,SQLite — Tags: , , — GG @ 4:29 pm

VACUUMing SQLite

Issue:

  • SQLite database file size keep increasing.
  • SQLite database file size not reduced after deleted tables or rows.

Reason:

  • In SQLite, when an object (table, index, or trigger) is dropped from the database, it leaves behind empty space. This makes the database file larger than it needs to be, but can speed up INSERT operations. Over time, INSERT and DELETE operations can leave the database file structure fragmented, which slows down disk access to the database contents.

Solution:

  • Use VACUUM command rebuilds the entire database; or
  • enable auto vacuum in the database, use command pragma auto_vacuum.
Filed under: Database,SQLite — Tags: , — GG @ 4:17 pm

May 2, 2011

Embedded Visual C++ under Windows Vista or Windows 7

Issue: If you are using Embedded Visual C++ 4 in Windows Vista or Windows 7, you may face problem cannot create a new project.

  • Cannot cannot select CPUs from the list.
  • Get an error message “You must select a platform.”

CPUs is not selectable
CPUs is not selectable.

Error message
Error message when creating new project.

Reason:

  • Compatibility issue between Embedded Visual C++ and Windows Vista/7.

Solution:

  • Try run the EVC4 program in compatibility mode for Windows XP.

Edit compatibility mode
Edit compatibility mode.

CPUs is now selectable
CPUs is now selectable.

Filed under: eMbedded — Tags: , , , , — GG @ 11:40 pm

January 19, 2011

Incompatible or damaged Adobe AIR.dll

Issue:

  • Unable to create an New Flex Project with Application Type = Desktop (runs in Adobe AIR).
  • Flash Builder program stop responding.
  • Found error below in Windows Event Viewer Application Logs.
    • Event 1000, Application Error
      Faulting application name: adl.exe, version: 1.5.3.9120, time stamp: 0x4b06f734
      Faulting module name: Adobe AIR.dll, version: 1.5.3.9120, time stamp: 0x4b06f6c8
      Exception code: 0xc0000005
      Fault offset: 0x000bf36a
      Faulting process id: 0x15f4
      Faulting application start time: 0x01cba0d1d86cb249
      Faulting application path: C:\Program Files\Adobe\Adobe Flash Builder 4\sdks4.0.0\bin\adl.exe
      Faulting module path: C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\runtimes\air\win\Adobe AIR\Versions\1.0\Adobe AIR.dll
      Report Id: 168bbf5f-0cc5-11e0-8667-80b5c7eac2c5

Reason:

  • Incompatible or damaged Adobe AIR.dll in Flex SDK bin folder.

Solution:

  1. Install the latest version of AIR runtime.
  2. Backup the old version of the Adobe AIR.dll file in Flex SDK bin folder.
    Usually the Flex SDK bin folder located in path below.
    %ProgramFiles%\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin
    e.g:

    • C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin
    • C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin
  3. Copy Adobe AIR.dll from
    C:\Program Files\Common Files\Adobe AIR\Versions\1.0
    and paste into
    C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin
Filed under: AIR,Flash Buider — Tags: , , — GG @ 1:13 pm

January 18, 2011

AIR 2 Namespace

Issue:
Error message below appear when running an AIR 2 application.
An ActionScript error has occurred:

  • VerifyError: Error #1014: Class IIMEClient could not be found.
    at flash.display::MovieClip/nextFrame()
    at mx.managers::SystemManager/deferredNextFrame()[E:dev4.0.0frameworksprojectsframeworksrcmxmanagersSystemManager.as:267]
    at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:dev4.0.0frameworksprojectsframeworksrcmxmanagersSystemManager.as:2460]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/timerHandler()[E:dev4.0.0frameworksprojectsframeworksrcmxpreloadersPreloader.as:488]
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
    

Reason:
You must update your application descriptor file to the 2.0 namespace in order to access the new AIR 2 APIs and behavior. If your application does not require the new AIR 2 APIs and behavior, you are not required to update the namespace from 1.x based namespace.

Solution:
To update the namespace, change the xmlns attribute in your application descriptor to: http://ns.adobe.com/air/application/2.0

Open your application descriptor file (-app.xml), edit the 2nd line.

  • <application xmlns="http://ns.adobe.com/air/application/1.5.3">

Change the value for xmlns to http://ns.adobe.com/air/application/2.0

  • <application xmlns="http://ns.adobe.com/air/application/2.0">

Additional Information:
Adobe AIR 2 – Release notes for Adobe AIR developers

Filed under: AIR,Flash Buider — Tags: , — GG @ 7:41 pm

October 23, 2010

Roots in dynamic and input text field

This is a solution for using Square root (SQRT), cube root, nth root, and other roots formula in dynamic and input text field, extended from the article How to use subscript & superscript in dynamic and input text field.

  1. Download & install GG Root Sans N, GG Root Sans Radical, GG Root Sans Radicand fonts.
  2. Create a dynamic text field with Arial font embeded. Set the HTML property to true.
  3. Create a dynamic text field with GG Root Sans N font embeded.
  4. Create a dynamic text field with GG Root Sans Radical font embeded.
  5. Create a dynamic text field with GG Root Sans Radicand font embeded.
  6. Use HTML tag to set text to roots formula like below:
    my_txt.html = true;
    my_txt.htmlText = "GG Root Sans<br>";
    my_txt.htmlText += "<font face="GG Root Sans Radical"> </font><font face="GG Root Sans Radicand">2</font>";
    my_txt.htmlText += "<font face="GG Root Sans Radical">n</font><font face="GG Root Sans Radicand">x</font>";
    my_txt.htmlText += "<font face="GG Root Sans Radical">2</font><font face="GG Root Sans Radicand">3</font>";
    my_txt.htmlText += "g = <font face="GG Root Sans N">f(d+e</font><font face="GG Root Sans Radical">)</font><font face="GG Root Sans Radicand">(ax+by)(ax-by)</font>";

Demo:

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Download:

Filed under: ActionScript,Flash Platform,HTML — Tags: , , , — GG @ 3:37 pm

December 9, 2009

Hello, Google Chrome World! Log for my first Google Chrome extension test.

Google Chrome now has extensions, and GG now want to have create some Google Chrome extensions ^^

By referring to the Getting Started tutorial and samples on Google Code Labs, I’ve created my first Google Chrome “Hello, World!” extension. It was much easier than expected.

Steps:

  1. Create a folder called mygc_ext01.
  2. Create a text file called manifest.json inside mygc_ext01 folder, contains code:
    {
      "name": "My First Extension",
      "version": "1.0",
      "description": "The first extension that I made.",
      "browser_action": {
        "default_icon": "icon.png"
      },
      "permissions": [
        "http://api.flickr.com/"
      ]
    }
  3. Prepare an PNG icon called icon.png put into the same folder.
    I’ve tested it with .ico file in my Windows 7, it works.
    If we use a .ico icon, we should also change the value for default_icon to our .ico filename (e.g. filename.ico).
  4. Now load the extension into Google Chrome.
    Click on Tools Google Chrome Tools menu and choose Extensions.
    Enable Developer Mode.
    Click Load unpacked extension…
    Browse for the mygc_ext01 folder, and press OK.
    My icon successfully displayed as an extension button on Google Chrome Google Chrome Extension.
  5. Edit manifest.json, add popup parameter below default_icon
    ...
      "browser_action": {
        "default_icon": "icon.png",
        "popup": "mypage.html"
      },
    ...
  6. Create a new file called “mypage.html” put into the same folder.
    Display something in the html page body.
  7. On Google Chrome Extensions Developer Mode, press the Reload link behind My First Extension. And now if I click on my extension button, mypage.html will be displayed in a popup.

I’m planning to create some Google Chrome extension, but for now still need to sort my bunch of idea.

Below is an working example mygc_ext01 where mypage.html contains code to retrieve and display some picture from flickr.

Download:
Google Chrome extension sample code

Reference:
Getting Started: Building a Chrome Extension

Filed under: Web,Web Browsers — Tags: , — GG @ 5:51 pm
« Newer PostsOlder Posts »

© 2025 GGSHOW | Powered by WordPress