background preloader

Getting Started with HTML5 Local Databases « Dark Crimson Blog

Getting Started with HTML5 Local Databases « Dark Crimson Blog
Please note: This article was written in May 2010 and as of November 18, 2010, the Web Applications Working Group has reached an impasse and does not intend to maintain the Web SQL Database any longer. Read more here. Starting with Safari 4, iOS OS3, Chrome 5, and Opera 10.5 (Desktop), HTML5 Local Databases (AKA Web SQL Databases) are now supported. Setting up the Database First we check if the browser supports the openDatabase method, is so we continue and define the database parameters: shortName is the DB name as it will be referred to by the browser and SQLversion openDatabase version. 1.0 for this (more on that here) displayName The full display name / description of the databasemaxSize This is max size in bytes is the size you expect the database to reach. Next, we call the createTables(); function where the table is defined and pre-populated with initial data (optional). Building the Table This basic function executes the executeSql method which runs as the CREATE TABLE query.

How to access Google Chrome browser history programmatically on local machine jbrennan/Safari-History-Merger JavaScript Tip of the Week for October 7, 1996: History Tracker for October 7, 1996: History Tracker Maybe its just me but I don't like the way Netscape keeps track of the history of pages you visited, so I created an alternative for JavaScript Tip of the Week. It's logically named the History Tracker, and it will track every page on your web site. Modifiying this to work on your own site is very simple, it takes only the changing of three variables. bmDomain = "C|/"; <-- domain where tracker works bmReal = new Array(); bmName = "jtotw"; <-- name of history object bmTotal = 0; bmTotalallow = 20; <-- the total number of pages allowed bmReplayIP = false; urlLast = ""; The first variable, bmDomain, is used by the tracker to determine whether or not the browser is on a page in your site. This whole app is based on an aspect of JavaScript called user-defined objects. In the case of the History Tracker, the main object is the page object, which is reffered to in the code as bmReal[x]. myvalue = objectname.propertyname;

How to Write a Chrome Extension in Three Easy Steps I just installed a “hello world” Chrome extension from this Chrome Extension tutorial page. When you surf to www.google.com, the Google logo is replaced with a Lolcat: Here’s how to write your own Google Chrome extension in three steps: 1. Install the developer-channel version of Google Chrome. I don’t know if this is 100% necessary, but new support for plugins will probably show up in the developer version first. 2. I like several things about the extension framework: - Your plugin has to have a unique identifier (40 digit hexadecimal number). The Chrome extension manifest, which has metadata about your extension such as name, version, etc., looks much simpler to me than how Firefox wants extensions to be packaged. 3. Once you see how it works, just start hacking around and see what happens. One more nice thing: it looks like installing extensions doesn’t require you to restart the browser. And a hat-tip to Google OS for pointing out this document.

How to create a browser plug in extensions developer workflow By Andreas Bovens From Opera 15 onward, Opera 11 & 12’s extension format is no longer supported, and instead, we’ve switched to Chromium’s extension model. Check out our new documentation for developing extensions for Opera 15 and higher and start building your own extensions. Contents Introduction In this short article, we’ll look at the developer workflow to create extensions, give some tips for extension development, and point out a couple of caveats. For this guide, we start with the Hello World example introduced in Saying hello world to Opera extensions! If you have gone through all steps except packaging, you should have something similar to the folder structure in Figure 1. Developer mode You can simply drag and drop the config.xml onto an open Opera window or its application icon, and the extension will be activated in the so-called “developer mode”. You’ll also notice that each extension running in developer mode gets two extra buttons: “Reload” and “Open containing folder”.

How To View a Google Chrome Extension’s Full Source Code - Oren Yomtov's Website Home » Blog » How To View a Google Chrome Extension’s Full Source Code You can extract and view any Google Chrome extension’s full source code following the following easy steps. Every Google Chrome extension is basically a CRX file. When you click the “Install” button on the Google Chrome extension gallery you are basically clicking a link of the extension’s CRX file. The first step is downloading the extension’s CRX file. Now that you have the CRX file on your computer, rename it’s extension from CRX to ZIP. All there is left to do is extract the ZIP archive to the desired destination. Have fun exploring other peoples code! Search terms:chrome extension source codeview chrome extension sourcegoogle chrome extension source codegoogle chrome extensions source codechrome extension view sourcechrome extensions source codechrome extension codeview source code of chrome extensionchrome extension sourceextract chrome extension

espinozaulises/jquery-history-plugin Apache Lucene - Indexing a Database and Searching the Content | kalani's Tech blog Here is a Java code sample of using Apache Lucene to create the index from a database. (I am using Lucene version 2.3.2 and MySQL) I assumed that there is a table named pet in the "test" database with the fields "id" "name" and "color". After running this a folder named index is created in the working directory including indexed content. The following code (lucene searcher) shows how to search a record containing a particular keyword using the created lucene index. Searcher searcher = new IndexSearcher(IndexReader.open("index")); Query query = new QueryParser("color",analyzer).parse("white"); Hits hits = searcher.search(query); String sql = "select * from pet where id = ?" Searcher searcher = new IndexSearcher(IndexReader.open("index")); Query query = new QueryParser("color",analyzer).parse("white"); Hits hits = searcher.search(query); String sql = "select * from pet where id = ?"

Related: