Skip to content

Instantly share code, notes, and snippets.

https://github.com/rnavarro/CakePHP-cPanel-API-Component/
https://github.com/mleibman/SlickGrid/wiki
http://www.openfaces.org/demo/treetable/TreeTable_basicFeatures.jsf
@codeyash
codeyash / gist:950259
Created May 1, 2011 04:48
QSqlTableModel to query db
// Qt: Use QSqlTableModel to query db
model = new QSqlTableModel(this);
model->setTable("properties");
model->setFilter (QString("property LIKE \'%1%\'").arg(searchedString));
model->setSort (1,Qt::AscendingOrder);
model->select();
model->removeColumn (0);
qDebug ()<< model->query ().lastQuery ();
qDebug () << customQueryModel->query ().lastQuery (); //grab last query
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QString source="34895pc";
// if(!$this->isDisabled){
// $this->from->setAttrib('disabled', 'disabled' );
// $this->to->setAttrib('disabled', 'disabled' );
//
// }
//
@codeyash
codeyash / gist:984513
Created May 21, 2011 13:19
autorepeat
//execute for single event of cursor position movable keys
e->isAutoRepeat()
//execute for single event of cursor position movable keys
if (e->isAutoRepeat()==false) {
cursorState(e);
}
for (var i in data)
{
alert('theStatus[\''+i+'\'] is ' + data[i])
}
// Usage : less2stylusDir('../src/css/');
var fs = require('fs');
// this less 2 stylus conversion script make a stylus easy to read syntax
// - let the braces
// - replace the @ for var as $
// - let semicolons
function less2stylus(less)
# A class-based template for jQuery plugins in Coffeescript
#
# $('.target').myPlugin({ paramA: 'not-foo' });
# $('.target').myPlugin('myMethod', 'Hello, world');
#
# Check out Alan Hogan's original jQuery plugin template:
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template
#
(($, window) ->
<!-- Example on how to set class="active" on active navigation links -->
<!-- These links will always be visible -->
<li class="{{ URI::is( 'home') ? 'active' : '' }}">
<a href="{{ URL::to( 'home') }}">
Home
</a>
</li>
<li class="{{ URI::is( 'gallery') ? 'active' : '' }}">
<?php
Quota::with(
array(
'codes' => function($query) {
$query->where('number', '=', 11);
}
)
)
->where('label', '=', 'foo')