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
package Model; | |
import java.sql.*; | |
import java.util.ArrayList; | |
/** | |
* DATA ACCESS OBJECT (Objeto de Acesso a Arquivo) | |
* classe prove acesso simplificado ao banco de dados | |
* e retorna um Objetct[][] (array) ou uma excessão | |
* caso não consiga executar a operação |
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 if not exists corretora ( | |
`codigo` integer auto_increment, | |
`nome` varchar(50) not null, | |
`usuario` varchar(50) not null unique key, | |
`senha` varchar(50) not null, | |
constraint `pk_corretora` primary key(`codigo`) | |
); | |
create table if not exists `cliente` ( | |
`codigo` integer auto_increment not null, |
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 Fibonacci { | |
/** | |
* @param {number} value | |
* @returns {number} | |
*/ | |
sequence (value) { | |
return (value < 2) ? value : this.sequence(value - 1) + this.sequence(value - 2) | |
} | |
/** |
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
function factorial(number) { | |
var result = 1 | |
do { | |
result = result * number | |
number-- | |
} while (number > 0) | |
return result | |
} | |
console.log(factorial(7)) |
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 colors = { | |
"black": "#000000", | |
"white": "#ffffff", | |
"blue": { | |
"50": "#e3f2fd", | |
"100": "#bbdefb", | |
"200": "#90caf9", | |
"300": "#64b5f6", | |
"400": "#42a5f5", |
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
export default { | |
bindings: { | |
colors: '<', | |
selector: '@' | |
}, | |
templateUrl: 'views/color-picker.html', | |
controller: class { | |
//@ngInject | |
constructor($window, $timeout) { |
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
//https://facebook.github.io/react/docs/web-components.html#using-react-in-your-web-components | |
const proto = Object.create(HTMLElement.prototype, { | |
attachedCallback: { | |
value: function() { | |
const mountPoint = document.createElement('span'); | |
this.createShadowRoot().appendChild(mountPoint); | |
const name = this.getAttribute('name'); | |
const url = 'https://www.google.com/search?q=' + encodeURIComponent(name); | |
ReactDOM.render(<a href={url}>{name}</a>, mountPoint); |
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
import preact, { h, render, Component } from 'preact' | |
class Page extends Component { | |
componentDidMount() { | |
$('.btn').draggable({ iframeFix: true, iframeScroll: true }) | |
$('.render').on('load', () => { | |
$('.render').contents().find('[wf-droppable]').droppable({ | |
over: ({ target, toElement }) => $(target).css({ border: '2px solid #000000' }), | |
out: ({ target, toElement }) => $(target).css({ border: 'none' }), |
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
@import url(https://fonts.googleapis.com/css?family=Montserrat:400,700);html{height:100%;}body{height:100%;margin:0;padding:0;background-color:#fafafa;direction:ltr;}body.fixed-header .header{position:fixed;left:0;top:0;}body.mobile .sidebar-menu{overflow:scroll;-webkit-overflow-scrolling:touch;}body.mobile .sidebar-menu>ul{height:auto!important;overflow:visible!important;-webkit-overflow-scrolling:touch!important;}body.mobile .page-sidebar .sidebar-menu .menu-items li:hover a{color:#788195;}body.mobile .page-sidebar .sidebar-menu .menu-items li:hover .icon-thumbnail{color:#788195!important;}body.mobile .page-sidebar .sidebar-menu .menu-items li.active>a,body.mobile .page-sidebar .sidebar-menu .menu-items li.open>a{color:#fff;}body.mobile .page-sidebar .sidebar-menu .menu-items li.active>.icon-thumbnail,body.mobile .page-sidebar .sidebar-menu .menu-items li.open>.icon-thumbnail{color:#fff;}body.mobile .drager{overflow:auto;-webkit-overflow-scrolling:touch;}body.sidebar-visible .page-sidebar .scroll-element{vi |
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
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8) | |
return v.toString(16) | |
}) |
OlderNewer