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
// v2: add Gesture detector | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Perspective', |
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 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Perspective', | |
theme: ThemeData(primarySwatch: Colors.blue), |
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
-1- edit ~/.composer/vendor/laravel/valet/cli/stubs/openssl.conf | |
Change: | |
basicConstraints = CA:FALSE | |
To: | |
basicConstraints = CA:TRUE,pathlen:0 | |
save file. |
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 'dart:math'; | |
import 'package:flutter/material.dart'; | |
import 'package:meta/meta.dart'; | |
void main() { | |
runApp(new AppContainer()); | |
} | |
class AppContextData { |
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 | |
public function foos() { | |
$relation = $this->hasMany('App\Bar'); | |
return $relation; // default behaviour | |
// modify the query builder | |
$relation->where('foo','bar'); | |
return $relation; |
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 Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Auth; | |
use Illuminate\Support\Facades\Cookie; | |
use Illuminate\Support\Facades\Mail; | |
use Illuminate\Support\Facades\Session; | |
use Ratchet\WebSocket\Version\RFC6455\Connection; |
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
library debounce; | |
Map timeouts = {}; | |
void debounce(int timeoutMS, Function target, List arguments) { | |
if(timeouts.containsKey(target)) { | |
timeouts[target].cancel(); | |
} | |
Timer timer = new Timer(new Duration(milliseconds: timeoutMS), () { |
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
// setup | |
- (void)viewDidLoad | |
{ | |
... | |
self.locationManager = [[CLLocationManager alloc] init]; | |
locationManager.delegate = self; | |
locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation; | |
locationManager.distanceFilter = 250; | |
self.desiredLocationFreshness = 15.0; // desired freshness in s | |
self.desiredLocationAccuracy = 100.0; // desired location accuracy in m |
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
# Interface to Australia Post's DRC rate calculator | |
# | |
# Merchant’s web site must display statements re DRC | |
# It is a condition of use of the DRC that certain statements are prominently displayed on the Merchant’s web site. | |
# These statements can be found at web site http://www.edeliver.com.au/Templates/ifs/IFS_DRC_Terms.htm in the section headed "Your representations". | |
class AusPost | |
AUSPOST_DRC_URL = "http://drc.edeliver.com.au/ratecalc.asp" |