Software / Technology Tips

Access data from remote database server using FEDERATED Storage Engine in MySQL 5.0 and up

Syntax: CREATE TABLE table_name ( id     INT(20) NOT NULL AUTO_INCREMENT, name   VARCHAR(32) NOT NULL DEFAULT ”, other  INT(20) NOT NULL DEFAULT ‘0’, PRIMARY KEY  (id), INDEX name (name) ) ENGINE=FEDERATED DEFAULT CHARSET=charset_name CONNECTION=’scheme://user_name @host_name/db_name/tbl_name’; Sample connection strings: CONNECTION=’mysql://username:password@hostname:port/database/tablename’ CONNECTION=’mysql://username@hostname/database/tablename’ CONNECTION=’mysql://username:password@hostname/database/tablename’ Example: Suppose we need to access a table “audit_log”, which is located in a different…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Implementing Multi-Threading In Android Plugin For PhoneGap 2.6.0

In PhoneGap, JavaScript in the Android WebView runs on the main thread along with where the Java execute method runs. This sometimes causes blocking issues in the application. PhoneGap has some options for running on a separate thread. We just need to choose the best way to implement the multi-threading based on the way our…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

How to use “List View” component in Wicket Framework ?

List View is just a way to show your data in a table like structure with as many as rows and columns. In Wicket framework its very easy to use. Now we see how we use it in Wicket Framework:- For using ListView first you will have to create a bean(POJO) file with all fields…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

How to delete duplicate rows in a table using CTE

The “ROW_NUMBER()” in the above query returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition. The “ORDER BY” clause determines the order in which the ROW_NUMBER value is assigned to the rows in a partition. The “PARTITION BY” clause used…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

How to check session timeout through AJAX call?

Now a day most of the applications are running on AJAX. We are making huge use of AJAX to provide rich internet experience. Think of a situation, where your application is password protected. For each http request we make to server, it is being checked against session existence. If session has been expired then the…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Sending Multiple Records As XML To SQL Server Stored Procedure

We may need to send multiple records to database from code behind, at that situation we will make multiple requests to db. If the number of records increased than it may take performance penalty. If we send all the records at once to database then performance will be increased. One of the method to send…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Dynamically Adding/Deleting Rows To Table

We can add/delete rows to asp.net table component dynamically with preservation of input data. AddNewRow.aspx Page: function LinkButtonClick(lbID) { var ind = lbID.split("Row_"); ind = ind.split("Col_"); document.getElementById("").value = ind; document.getElementById("").click(); } .lblmouse { font-size:70%; color:Red; cursor:pointer; text-transform:uppercase; } AddNewRow.aspx.cs Page: using System; using System.Data; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Java Serialization and need for a no-arg constructor

Before coming to the topic let us discuss some basics of serialization. What is ‘Serialization’? Serialization is a procees of saving the state of an object by converting it into a stream of bytes. This stream of bytes can be sent over a network, stored in a file or simply can be used to manipulate…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Render Prev & Next Record From Show Page in Rails

Scenario: In Rails we can click individual record and open it from index page but to open the next record we need to go back to index & click another link.  But we can have a Prev / Next Navigation options in our show page to render our previous/next records without clicking individual links. We…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

How to make System Calls from Java

System call is a mechanism to execute command line commands from an application. When can we make System calls? From a Java application we can make system calls in such situations as to copy a file/shortcut from one location to another, delete a file, to hide a folder to save it from accidental delete, to…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!