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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Image</title> | |
<link href="http://cdn.sencha.com/ext/gpl/4.2.0/resources/css/ext-all.css" rel="stylesheet" /> | |
<script src="http://cdn.sencha.com/ext/gpl/4.2.0/ext-all.js"></script> | |
</head> | |
<body> | |
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 Program | |
{ | |
static void Main(string[] args) | |
{ | |
Matrix m1 = new Matrix(); | |
Matrix m2 = new Matrix(); | |
Task<bool> result = m1 == m2; | |
Console.WriteLine("Alguma operação para ser executada enquanto a comparação acontece"); |
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
// equals | |
class A : IComparable<A> | |
{ | |
public int Value { get; set; } | |
public override bool Equals(object obj) | |
{ | |
A other = obj as A; | |
return Value == other.Value; | |
} | |
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
// dados compactados | |
var localStorage = Ext.create('Ext.ux.webstorage.Storage', { | |
storage: window.localStorage, | |
textCompactor: true // pode ser um objeto com dois métodos (compress e decompress) | |
}); | |
// dados não compactados e keys com namespaces | |
var sessionStorage = Ext.create('Ext.ux.webstorage.Storage', { | |
storage: window.sessionStorage, | |
namespace: 'app' |
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
window.addEventListener('DOMContentLoaded', function() | |
{ | |
DragDrop.init(document.body); | |
}); | |
var DragDrop = { | |
element: undefined, | |
isOver: false, | |
init: function(element) | |
{ |
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
var Calculator = { | |
setExpression: function () { return this; }, | |
calculate: function () { return 0; } | |
}; |
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
Ext.define('MinhaApi.Error', { | |
statics: { | |
raise: function(message) | |
{ | |
if (Ext.Error) // pode-se fazer uma verificação do tipo: Api.isDesktop | |
{ | |
Ext.Error.raise(message); | |
} | |
else | |
{ |
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
Ext.define('MinhaApi.Observable', { | |
extend: Ext.novopackage.Observable || Ext.novopackagemobile.Observable | |
}); |
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
Ext.define('MinhaApi.Observable', { | |
extend: Ext.util.Observable || Ext.mixins.Observable | |
}); | |
Ext.define('MinhaClasse', { | |
extend: 'MinhaApi.Observable' | |
}); |
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
Ext.define('ClasseTouch', { | |
extend: 'Ext.mixins.Observable' | |
}); | |
Ext.define('ClasseExt', { | |
extend: 'Ext.util.Observable' | |
}); | |
// É possível melhorar o código para | |
Ext.define('MinhaClasse', { |