December 2010 archive

How to avoid Conflict in jQuery

Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery’s case, $ is just an alias for jQuery, so all functionality is available without using $. If we need to use another JavaScript library alongside jQuery, we can return control of $ back to the other library with …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/how-to-avoid-conflict-in-jquery/

404 Page on a Static Site

Here’s a very quick, but very useful trick. You can catch 404 errors (page not found) on a static site and serve up a custom 404 page with a one-liner in your .htaccess file: ErrorDocument 404 /404.php The “/404.php” part is the path to whatever file you want to serve up as the error page. …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/404-page-on-a-static-site/

create windowed applications with no system chrome

To  build a AIR application with custom window(which has your own shape), try the fallowing: In the <project_root>/src folder, open the XML file named “<your_project_name>-app.xml” and modify the two lines: <!–<systemChrome>none</systemChrome>–> to <systemChrome>none</systemChrome> and <!–<transparent></transparent>–> to <transparent>true</transparent> Then in your main page, <mx:WindowedApplication xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” showFlexChrome=”false”> <mx:Script> <![CDATA[ public function startMove(event:MouseEvent):void { stage.nativeWindow.startMove(); } ]]> …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/create-windowed-applications-with-no-system-chrome/

Data Storage and Data flow

Data Storage and Data Flow  SAP NetWeaver BI offers a number of options for data storage. These include the implementation of a data warehouse or an operational data store as well as the creation of the data stores used for the analysis. Architecture A multi-layer architecture serves to integrate data from heterogeneous sources, transform, consolidate, …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/data-storage-and-data-flow/

Fixing libmysql.dll issue in Rails

While working on rails with mysql as database you may got error like this “This application has failed to start because libmysql.dll was not found. Re-installing the application may fix this problem” while executing the code ‘rake db:create’. If that so, then fallow the fallowing steps: 1. type the command in the console gem install …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/fixing-libmysql-dll-issue-in-rails/

Importing data from CSV File

Here is an example to importing data from csv file into MySQL table. LOAD DATA INFILE “/home/mysql/data/file_name.csv” INTO TABLE table_name FIELDS TERMINATED BY ‘,’ LINES TERMINATED BY ‘\\n’;

Permanent link to this article: https://blog.openshell.in/2010/12/importing-data-from-csv-file/

Find duplicate repords in Table

Here is an example to find duplicate records from the table. select address, count(address) as cnt from mailing_list group by address having cnt > 1 order by cnt;

Permanent link to this article: https://blog.openshell.in/2010/12/find-duplicate-repords-in-table/

Export a table into csv format

Here is an example to export data from MySQL into CSV File Format. SELECT * INTO OUTFILE ‘/tmp/file_name.csv’ FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘n’ FROM table_name;

Permanent link to this article: https://blog.openshell.in/2010/12/export-a-table-into-csv-format/

Fields Other than the PK Need to be Indexed

The Table Primary Key (PK) is automatically an index. Indexes should be used whenever a relationship needs to be established between two tables using a field other than the PK E.g. both fields included in the ON table1.field1=table2.field3 clause. Making both fields indexes allows MySQL to JOIN the two tables much more efficiently and much …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/fields-other-than-the-pk-need-to-be-indexed/

ETL Concepts

Extraction, Transformation and Loading (ETL) SAP NetWeaver BI offers flexible means for integrating data from various sources. Depending on the data warehousing strategy for your application scenario, you can extract the data from the source and load it into the SAP NetWeaver BI system or directly access the data in the source without storing it …

Continue reading

Permanent link to this article: https://blog.openshell.in/2010/12/etl-concepts/