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
<?php namespace App\Http\Controllers; | |
class HomeController extends Controller { | |
} |
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
<?php namespace App\Http\Controllers; | |
use App\Http\Requests; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\Request; | |
abstract class CrudController extends Controller { | |
protected $model = null; |
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
import sys | |
def cross(X,Y): | |
l = sum = 0 | |
for i in reversed(X): | |
sum = sum + i | |
if sum > l: | |
l = sum | |
r = sum = 0 | |
for i in Y: |
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
/********************************************* | |
* OPL 12.7.0.0 Model | |
* Author: Bernd | |
* Creation Date: 26.11.2016 at 18:12:32 | |
*********************************************/ | |
range warehouses = 1..3; | |
range retailers = 1..4; | |
int cost[warehouses][retailers] = [[35,30,40,32],[37,40,42,25],[40,15,20,28]]; | |
int stock[warehouses] = [1200,1000,800]; |
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
/********************************************* | |
* OPL 12.5.1.0 Model | |
* Author: BAT4769 | |
* Creation Date: Dec 5, 2016 at 11:14:35 AM | |
*********************************************/ | |
int n=4; // cargos | |
int m=3; // compartments | |
range cargos = 1..n; |
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
/********************************************* | |
* OPL 12.5.1.0 Model | |
* Author: BAT4769 | |
* Creation Date: Dec 5, 2016 at 11:14:35 AM | |
*********************************************/ | |
int n=4; // cargos | |
int m=3; // compartments | |
int a=2; // aircrafts | |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Voronoi</title> | |
</head> |
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
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
const Voronoi = require( 'voronoi' ); | |
const _ = require( 'lodash' ); | |
const canvas = document.getElementById( "canvas" ); | |
const ctx = canvas.getContext( "2d" ); | |
const v = new Voronoi(); | |
const max = { | |
x: 800, | |
y: 800 | |
}; |
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
const Voronoi = require( 'voronoi' ); | |
const _ = require( 'lodash' ); | |
const canvas = document.getElementById( "canvas" ); | |
const ctx = canvas.getContext( "2d" ); | |
const v = new Voronoi(); | |
const max = { | |
x: 800, | |
y: 800 | |
}; | |
const bbox = { |
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
pragma solidity ^0.4.24; | |
import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; | |
contract AdvertMarket is Ownable{ | |
event NewAdvert(uint id, bytes32 meta, uint price, address sender); | |
event AdvertChangedOwner(uint id, uint price, address newOwner, uint newPrice); | |
event AdvertDataChanged(uint id, bytes32 data); | |
uint maxPriceFactor = 2; // max factor the price can increase at owner change |
OlderNewer