This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <sqlext.h> | |
#include <sql.h> | |
... | |
HENV hEnv = NULL; // for allocating memory usingSQLAllocEnv | |
HDBC hDBC = NULL; // connection handler | |
HSTMT hStmt = NULL; // statement handler | |
UCHAR szDSN[SQL_MAX_DSN_LENGTH] = "myDSN"; // DataSourceName (config in windows control panel) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int retcode = 0; | |
retcode = SQLAllocStmt (hDBC, &hStmt); | |
retcode = SQLPrepare (hStmt, (UCHAR *)sql, SQL_NTS); | |
retcode = SQLExecute (hStmt); | |
//SQLBindCol(hStmt, no+1, SQL_C_CHAR, szModel1, sizeof(szModel1), &cbModel1); | |
retcode = SQLFetch (hStmt); | |
if (retcode == SQL_ERROR) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
retcode = SQLAllocStmt (hDBC, &hStmt); | |
retcode = SQLPrepare (hStmt, (UCHAR *)sqls, SQL_NTS); | |
retcode = SQLExecute (hStmt); | |
SQLBindCol(hStmt, 3, SQL_C_SLONG, &szModel, 5, &ic); | |
SQLBindCol(hStmt, 2, SQL_C_CHAR, szModel1, sizeof(szModel1), &cbModel); | |
SQLBindCol(hStmt, 4, SQL_C_FLOAT, &szModel2, 5, &cbModel); | |
SQLBindCol(hStmt, 5, SQL_C_FLOAT, &szModel3, 5, &cbModel); | |
SQLBindCol(hStmt, 6, SQL_C_SLONG, &szModel4, 5, &ic); | |
SQLBindCol(hStmt, 7, SQL_C_CHAR, szModel5, sizeof(szModel5), &cbModel); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by IntelliJ IDEA. | |
* User: sergio | |
* Date: 7/12/12 | |
* Time: 05:31 PM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
import java.io.*; | |
import java.net.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by IntelliJ IDEA. | |
* User: sergio | |
* Date: 7/12/12 | |
* Time: 05:31 PM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
import java.io.*; | |
import java.net.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (e.getClickCount() == 2) { | |
JTable target = (JTable) e.getSource(); | |
int row = target.getSelectedRow(); | |
Object value = target.getModel().getValueAt(row, 0); | |
for (ItemListener il : listeners) { | |
il.onItemDoubleClick(this, value, row); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.$watchCollection( 'myCollection', function( oldCollection, newCollection ) { | |
if( oldCollection === newCollection ) return; | |
// Gives the time to destroy dataTable, which is immediately | |
$( '#dataTable' ).dataTable().fnDestroy(); | |
$timeout(function () { | |
// After a few time, create the dataTable when DOM render is complete | |
$( '#dataTable' ).dataTable(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance. | |
# | |
# Must be run with root privileges | |
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5) | |
# | |
export BUILD_DIR="$PWD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<String> list = new ArrayList<String>() { | |
{ | |
add("String A"); | |
add("String B"); | |
add("String C"); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nohup command & |
OlderNewer