This file contains hidden or 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
// represent the full date w/ 16 bits (2 bytes) | |
// | |
// d - day | |
// m - month | |
// y - year | |
// | |
/// format: | |
// d d d d d | m m m m | y y y y y y y | |
// | |
// 5 bits to represent the day - 2^5 = 32 |
This file contains hidden or 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
/** | |
* @class Ext.grid.MultiCellSelectionModel | |
* @extends Ext.grid.CellSelectionModel | |
* @cfg {Boolean} enableDrag Enable cell drag | |
* @cfg {String} dragGroup The name of the drag group, the drag group will only interact with the corresponding drop group | |
* @cfg {Boolean} enableDrop Enable cell drop | |
* @cfg {String} dropGroup The name of the drop group, the drop group will only interact with the corresponding drag group | |
*/ | |
Ext.grid.MultiCellSelectionModel = Ext.extend(Ext.grid.CellSelectionModel, { | |
constructor: function (config) { |
This file contains hidden or 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
<?php | |
// app/routes.php | |
Route::get('/{controller}/{action?}/{params?}', function($controller, $action = 'index', $params = '') | |
{ | |
// controller | |
$controller = strtolower($controller); | |
$controller = ucfirst($controller); | |
$controller .= 'Controller'; |
This file contains hidden or 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
<?php | |
namespace COMPANY\Core\Vendor\Doctrine\DBAL\Driver\OCI8; | |
use Doctrine\DBAL\Driver\OCI8\Driver as OCIDriver; | |
class Driver extends OCIDriver | |
{ | |
public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) |
This file contains hidden or 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
# resize | |
# 25600 = 25 * 1024MB | |
VBoxManage clonehd "NAME.vmdk" "NAME_CLONE.vdi" --format vdi | |
VBoxManage modifyhd "NAME_CLONE.vdi" --resize 25600 | |
VBoxManage clonehd "NAME_CLONE.vdi" "NAME1.vmdk" --format vmdk | |
# download gparted iso and mount it in virtualbox | |
# extend the partition in gparted, apply changes | |
# unmount the iso |
This file contains hidden or 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
<CodeSnippet Format="1.1.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<Header> | |
<Title>ext3_object</Title> | |
<Author>Bostjan Rihter</Author> | |
<Shortcut>ext3_object</Shortcut> | |
<Description>ExtJS object snippet</Description> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
</Header> |
This file contains hidden or 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
use information_schema; | |
select | |
concat('alter table `', c.table_name, '` add index `ix_', c.column_name, '` (`',c.column_name,'`);') | |
from columns c | |
where c.table_schema = 'SCHEMA_NAME' | |
and lower(c.column_name) like '%_id%' | |
and c.column_key = ''; |
This file contains hidden or 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
-- create a partitioned table | |
-- use a default (unused) value for a dummy initial partition when dynamically adding more | |
create table `TABLE` ( | |
`id` int(10) not null, | |
... | |
) | |
collate='utf8_general_ci' | |
engine=MyISAM | |
partition by list (id) | |
( |
This file contains hidden or 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
-- create table | |
create table "TABLE_NAME" | |
( | |
"ID" NUMBER(9, 0) NOT NULL, | |
"COL_1" VARCHAR2(32) NULL, | |
"COL_2" DATE NULL, | |
"COL_3" NVARCHAR2(2000) NULL, | |
"COL_4" NUMBER(9, 0) NOT NULL, | |
constraint "PK_TABLE_NAME" PRIMARY KEY ("ID") | |
); |
This file contains hidden or 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
-- backup table | |
create table TABLE_NAME_BACKUP as select * from TABLE_NAME; | |
create table user_20130809 as select * from user; | |
create table role_20130809 as select * from role; | |
create table function_20130809 as select * from function; | |
-- disable constraints | |
-- disable all constraints | |
begin |