Chuyển đến nội dung chính

Bài đăng nổi bật

Stardock DeskScapes Full

DeskScapes gives you the capability to animate and customize the wallpaper on your Windows desktop. Choose from the massive integrated library or use your own images or video files to personalize your desktop. Animate your Windows desktop wallpaper Use video and Dream files with DeskScapes to apply animated wallpaper to your desktop. The .Dream format, which DeskScapes uses, has been specially designed to contain content used to animate wallpaper. You can also apply any dream as your PC screensaver! Easily customize and create your own backgrounds DeskScapes includes over 60 special effects plus colorization options to make any image or video into a fantastic, custom background. Want to create a .Dream to share? Use the included Dream Maker app to package your own animated or video creations. System Requirements Requires a 64-bit processor and operating system Windows® 7 / 8 / 10 64-bit Microsoft DirectX™ Minimum screen resolution: 1280 x 720 Download  - DeskScapes Full  How ...

The Secret

SQLite first setup

   SQLite is not directly comparable to client/server SQL database engines such as MySQL, Oracle, PostgreSQL, or SQL Server since SQLite is trying to solve a different problem.

Client/server SQL database engines strive to implement a shared repository of enterprise data. They emphasis scalability, concurrency, centralization, and control. SQLite strives to provide local data storage for individual applications and devices. SQLite emphasizes economy, efficiency, reliability, independence, and simplicity.

SQLite does not compete with client/server databases.


First configuration for SQLite
     You have to write three js files they are
1) database_startup.js
2) database_query.js
3) database_debug.js

     database_startup.js file helps you to initialize the database, create tables and if you want to insert any default values.


var CreateTb1 = "CREATE TABLE IF NOT EXISTS tbl1(ID INTEGER PRIMARY KEY AUTOINCREMENT, CreatedDate TEXT,LastModifiedDate TEXT, Name TEXT)";
var CreateTb2 = "CREATE TABLE IF NOT EXISTS tbl2(ID INTEGER PRIMARY KEY AUTOINCREMENT, CreatedDate TEXT,LastModifiedDate TEXT,Mark INTEGER)";

var DefaultInsert = "INSERT INTO tbl1(CreatedDate,Name) select '" + new Date() + "','Merbin Joe'  WHERE NOT EXISTS(select * from tbl1)";

var db = openDatabase("TestDB", "1.0", "Testing Purpose", 200000); // Open SQLite Database

$(window).load(function()
{
  initDatabase();
});

function createTable() // Function for Create Table in SQLite.
{

  db.transaction(function(tx)
  {
    tx.executeSql(CreateTb1, [], tblonsucc, tblonError);
    tx.executeSql(CreateTb2, [], tblonsucc, tblonError);

    insertquery(DefaultSettingInsert, defaultsuccess);

  }, tranonError, tranonSucc);
}

function initDatabase() // Function Call When Page is ready.
{
  try
  {
    if (!window.openDatabase) // Check browser is supported SQLite or not.
    {
      alert('Databases are not supported in your device');
    }
    else
    {
      createTable(); // If supported then call Function for create table in SQLite
    }
  }
  catch (e)
  {
    if (e == 2)
    {
      // Version number mismatch.
      console.log("Invalid database version.");
    }
    else
    {
      console.log("Unknown error " + e + ".");
    }
    return;
  }
}
     database_query.js this file is used to control all the insert, delete and update query's and finally it will call the given success function.

function insertquery(query, succ_fun)
{
  db.transaction(function(tx)
  {
    tx.executeSql(query, [], eval(succ_fun), insertonError);
  });
}

function deletedata(query, succ_fun)
{
  db.transaction(function(tx)
  {
    tx.executeSql(query, [], eval(succ_fun), deleteonError);
  });
}

function updatedata(query, succ_fun)
{
  db.transaction(function(tx)
  {
    tx.executeSql(query, [], eval(succ_fun), updateonError);
  });
}

function selectitems(query, succ_fun) // Function For Retrive data from Database Display records as list
{
  db.transaction(function(tx)
  {
    tx.executeSql(query, [], function(tx, result)
    {
      eval(succ_fun)(result.rows);
    });
  });
}
     database_debug.js if any error occur on the transaction or insert or delete or update time the error will through to this files

function tblonsucc()
{
  console.info("Your table created successfully");
}

function tblonError()
{
  console.error("Error while creating the tables");
}

function tranonError(err)
{
  console.error("Error processing SQL: " + err.code);
}

function tranonSucc()
{
  console.info("Transaction Success");
}

function insertonError()
{
  console.error("Error on Insert");
}

function deleteonError()
{
  console.error("Error on delete");
}

function defaultsuccess()
{
  console.info("Default Insert Success");
}

function updateonError()
{
  console.error("Error on update");
}
     You can use the pass the values by following methods.
Select from Table

var query="select Name,CreatedDate  from tbl1 where ID=1";
selectitems(query,getval_success);
-----
-----
function getval_success(result)
{
  if(result.length>0)
 {
  for(var i = 0, item = null; i < result.length; i++)
  {
     item = result.item(i);
     alert(item['Name']);
  }
 }
}
Update values to Table

   var query="update Ex_tb_InExType set IsActive=0 where TypeID="+DelID;
   updatedata(query,select_function);
Insert Value to Table

   var query="insert into tbl1(CreatedDate,Name) values('"+new Date()+"','Joe')";
   insertquery(query,select_function);



Nhận xét

Bài đăng phổ biến từ blog này

kmspico download

KMSpico 8. 5 is an Small Tool. By Applying KMSpico You can Stimulate Your Office 2013 Item and Windows 8 Most Version. 1st name was KMSnano, now has converted into KMSpico. Its purpose is the very same as KMSnano, is an Activator of Windows 8 and Office 2013. So it is a very usefull tool. So Download and Enjoy. KMSpico v8. 5 Setup Edition: - Requirements:. NET 4. 0 or Windows 8/2012. - Trigger: Windows Vista Business/N/Enterprise/N House windows 7 Professional/N/E/Enterprise/N/E Windows almost 8 Core/N/Professional/N/ProWMC Windows (8. one particular Preview) Office 2010/2013 House windows Server 2008/Standard/Datacenter/Enterprise/2008R2/Standard/Datacenter/Enterprise/2012/Standard/Datacenter Instruction: Work KMSpico_Install_v8. 5. exe Mount it. 1 (Optional) Produce a tokens backup with the buttom: Create. Press the Red Buttom. Performed. to download KMSpico click the download button below: DOWNLOAD

download adobe flash player 11

Adobe Flash Player is a key module for your program that permits you to see everything from video to diversions and movement on the web Convenient elements  Adobe Flash Player incorporates a scope of fascinating increases and upgrades when contrasted with past forms. Top of that rundown is the incorporation of support for the H.264 video codec and the HE-AAC sound codec, which together offer a much wealthier, better quality picture alongside perfectly clear stable. Presenting these abilities in Adobe Flash Player with just somewhat lessened execution looks set to trigger another unrest in web video, as HD motion pictures are as of now a critical component on YouTube - and they look and sound incredible! It's showing signs of improvement and better  Adobe Flash Player resolves a portion of the issues that past adaptations have experienced (like security and steadiness issues), also including support for ActionScript 3.0. It likewise makes awesome 3D illustrations conceivable. T...

Download OBS Full ( Gaming Screen recorder)

The most capable free screen recorder and gushing instrument accessible for gamers, with all that you have to accomplish proficient outcomes. It may take a short time to acquaint yourself with its interface, however the exertion will pay off. YouTube gives anybody the chance to end up plainly a supporter, however keeping in mind the end goal to begin you will require a type of programming to combine your substance. It might be that you're simply recording a straight piece to camera, however it's more probable that you'll need to make something somewhat more confounded that includes the utilization of numerous sources. Utilizing OBS Studio you can not just record straightforwardly from your webcam and receiver, you can likewise join film from amusements, include existing recordings and still pictures, catch a window or part of your screen, and substantially more. As you may figure from the name, OBS Studio is a product studio. It empowers you to work with these different sou...

Free $100