Laravel Str Generate a more truly "random" alpha-numeric string.
public static function random($length = 16)
{
$string = '';
while (($len = strlen($string)) < $length) {
$size = $length - $len;
class ViewPage extends StatefulWidget { | |
@override | |
State<StatefulWidget> createState() => _ViewPageState(); | |
} | |
class _ViewPageState extends State<ViewPage> { | |
var imgList = [ | |
'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2877516247,37083492&fm=26&gp=0.jpg', | |
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582796218195&di=04ce93c4ac826e19067e71f916cec5d8&imgtype=0&src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F344fda8b47808261c946c81645bff489c008326f15140-koiNr3_fw658' | |
]; |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
class SingleSlideAnimation extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
color: Colors.white, | |
child: SafeArea(child: Scaffold(body: buildBody())), | |
); |
import 'package:flutter/material.dart'; | |
void main() => runApp(HomePage()); | |
const red = Colors.red; | |
const green = Colors.green; | |
const blue = Colors.blue; | |
const big = const TextStyle(fontSize: 30); | |
////////////////////////////////////////////////// |
export interface IUser { | |
id?: number; | |
email: string; | |
first_name: string; | |
last_name: string; | |
avatar: string; | |
} | |
export class UserDTO implements IUser{ | |
id?: number; |
// /src/ui/shims-provider.d.ts | |
/* eslint-disable @typescript-eslint/interface-name-prefix */ | |
import { IProvider } from '@/services' | |
declare module 'vue/types/options' { | |
interface ComponentOptions<V extends Vue> { | |
services?: IProvider | |
} | |
} |
// https://laravel-news.com/using-sanctum-to-authenticate-a-react-spa | |
// The tap command is a short-hand way of saying “create the guard, then pass it to the closure in the second argument; | |
// then return the guard”. Let’s look at createGuard: | |
$auth->extend('sanctum', function ($app, $name, array $config) use ($auth) { | |
return tap($this->createGuard($auth, $config), function ($guard) { | |
$this->app->refresh('request', $guard, 'setRequest'); | |
}); | |
}); |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png"> | |
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png"> |
Laravel Str Generate a more truly "random" alpha-numeric string.
public static function random($length = 16)
{
$string = '';
while (($len = strlen($string)) < $length) {
$size = $length - $len;
// https://gist.github.com/addyosmani/fd3999ea7fce242756b1 | |
window.iwShowOutline = !!!window.iwShowOutline; | |
[].forEach.call(document.querySelectorAll("*"),function(a){ | |
if (window.iwShowOutline) a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16) | |
else a.style.outline='initial' | |
}) |
#! /usr/bin/env python3 | |
"""Fixing bluetooth stereo headphone/headset problem in debian distros. | |
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197 | |
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone. | |
This will be only fixes the bluez5 problem mentioned above . | |
Licence: Freeware |