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
#!/bin/bash | |
loop=1 | |
host="172.31.42." | |
while(( $loop<=254 )) | |
do | |
ip="$host$loop" | |
# echo $ip | |
let "loop++" |
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
//查找单个字段 | |
db.users.find({_id:ObjectId("5c25b4fdc32ea0b85da2a3bc")}, {"address":1}) | |
//更新数组 | |
db.users.update({_id:ObjectId("5c25b504c32ea0b85da2a3bd")}, {$push:{address:ObjectId("5c25cf01c32ea0b85da2a3c8")}}) | |
//一对多关系查询 | |
var result = db.users.findOne({_id:ObjectId("5c25b504c32ea0b85da2a3bd")}, {"address":1}) | |
db.address.find({_id:{$in:result["address"]}}) |
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
// async function helloAsync(){ | |
// return "helloAsync"; | |
// } | |
// console.log(helloAsync()) // Promise {<resolved>: "helloAsync"} | |
// helloAsync().then(v=>{ | |
// console.log(v); // helloAsync | |
// }) |
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
// | |
// main.swift | |
// find | |
// | |
// Created by jackyshan on 2018/8/13. | |
// Copyright © 2018年 jackyshan. All rights reserved. | |
// | |
import Foundation |
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
// | |
// main.swift | |
// SortDemo | |
// | |
// Created by jackyshan on 2018/8/7. | |
// Copyright © 2018年 GCI. All rights reserved. | |
// | |
import Foundation |
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
package com.baitrading.bes.ui; | |
import android.os.Bundle; | |
import android.text.InputType; | |
import android.util.Log; | |
import android.view.View; | |
import android.view.animation.Animation; | |
import android.view.animation.AnimationUtils; | |
import android.view.animation.LinearInterpolator; | |
import android.widget.ImageView; |
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
// | |
// DZLuggageGuardViewController.swift | |
// DianZiCheng | |
// | |
// Created by jackyshan on 2018/3/10. | |
// Copyright © 2018年 jackyshan. All rights reserved. | |
// | |
import UIKit |
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 UIKit | |
import AudioToolbox | |
open class GciSound: NSObject { | |
fileprivate var mSoundId = kSystemSoundID_Vibrate | |
var mAction:() -> Void = {} | |
public init(SystemFile sysfile:String) { | |
super.init() | |
let path = "/System/Library/Audio/UISounds/\(sysfile).caf" |
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
// | |
// CheckWselfHelper.swift | |
// alliance | |
// | |
// Created by jackyshan on 2018/1/19. | |
// Copyright © 2018年 GCI. All rights reserved. | |
// | |
import Foundation |
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
给 iTerm 终端设置代理 | |
1.设置代理 | |
使用 curl,wget,brew等http应用程序会调用http_proxy和https_proxy这两环境变量进行代理,通过下面方式设置: | |
export http_proxy=http://127.0.0.1:8087 | |
export https_proxy=$http_proxy | |
2.取消设置 | |
unset http_proxy https_proxy |
NewerOlder