Skip to content

Instantly share code, notes, and snippets.

//
// lang6Tests.swift
// lang6Tests
//
// Created by lcj on 2017/11/15.
// Copyright © 2017年 lcj. All rights reserved.
//
import XCTest
@testable import lang6
import XCTest
@testable import lang6
class lang6Tests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
@1000copy
1000copy / factory3.js
Last active December 13, 2017 10:24
工厂三姐妹的介绍,for humans
// Simple Factory:把创建方法放到单独的类(工厂类),此方法根据传入的参数来决定实例化哪一个类。
class Shape{draw(){}}
class Rect extends Shape{draw(){}}
class Circle extends Shape{draw(){}}
class ShapeFactory{
createShape(type){
if (shape == "rect"){
return new Rect()
}else{
return new Circle()
var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost",
user: "root",
password: "root1234",
database:"pph"
});
con.connect(function(err) {
if (err) throw err;
https://press.one/p/v?s=bb5688b9bf55dd5e25b5eb7b212577c82592125d6539f78e1f69972290040cb84e7a5b03557d6f3353f765f894fed90df8fe61527b891076aa463e5a38de374600&h=fc66fe9721db4c3d8c7af84b4beff5d9cac23865c55660877c43025d32b73645&a=8da525c3716bf5abecab7b8c2bf5c341f9cdebe8&f=P1&v=3
//add image https://stackoverflow.com/questions/50903106/how-to-add-image-in-flutter
// add button:FlatButton
// layout column
// color
// button radius rect
// set button width
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
Widget b(BuildContext context) {
return Center(
child:Column(
crossAxisAlignment: CrossAxisAlignment.center,
var ref = require('ref')
var ffi = require('ffi');
var gdi32 = ffi.Library('gdi32', {
'GetDeviceCaps': [ 'int', ['int32', 'int' ] ]
});
var user32 = new ffi.Library("user32", {
"GetDC": ["int32", ["int32"]],
"ReleaseDC": ["int32", ["int32", "int32"]],
});

note from :

https://wiki.freeradius.org/guide/Getting%20Started

What is FreeRadius Server?

FreeRADIUS is a modular, high performance and highly customizable open source RADIUS server.

We will now install freeRADIUS on CentOS 7 Linux Server. We will install freeRADIUS from YUM repository. So, before going to start freeRADIUS installation, you should have CentOS 7 ready so that it can access CentOS Yum repository.

note from :

https://wiki.freeradius.org/guide/Getting%20Started

What is FreeRadius Server?

FreeRADIUS is a modular, high performance and highly customizable open source RADIUS server.

We will now install freeRADIUS on CentOS 7 Linux Server. We will install freeRADIUS from YUM repository. So, before going to start freeRADIUS installation, you should have CentOS 7 ready so that it can access CentOS Yum repository.