-
What does
well-connected
mean? -
Construct a directed-acyclic-graph (DAG) with approximately 100,000 randomly generated vertices and 99,999 randomly generated edges.
Which means:
100k vertices and 99,999 edges are randomly generated beforehand.
Then we will use these 100k vertices and 99,999 edges to construct a complete DAG.
This can lead to a complete DAG which has <= 100k vertices and <= 99,999 edges.
Because when we generate edges, there might be a couple of edges which cause a cycle.
For example: Vertex (4) and Vertex (7). We random generated 2 edges (4)-->(7) and (7)-->(4). And if this happens, it will leave a vertex which has no edge to connect to another vertex because we only have N vertices and N-1 edges.
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/sh | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
# make sure the output directory exists | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
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
openssl genrsa -out privkey.pem 768 | |
openssl pkcs8 -topk8 -nocrypt -in privkey.pem -out privkey2.pem |
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/sh | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
# make sure the output directory exists | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
# Step 2. Copy the framework structure (from iphoneos build) to the universal folder | |
cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework" "${UNIVERSAL_OUTPUTFOLDER}/" | |
# Step 3. Copy Swift modules from iphonesimulator build (if it exists) to the copied framework directory |
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
/** | |
* Copyright (c) 2017 Razeware LLC | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
I hereby claim:
- I am hieuphq on github.
- I am hieutieutu (https://keybase.io/hieutieutu) on keybase.
- I have a public key ASC7GkLEFU73-M4MDi1zCTIAvHf7pIqEJO9VJ8_IZ5RxTgo
To claim this, I am signing this object:
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
{"lastUpload":"2020-01-08T03:49:39.595Z","extensionVersion":"v3.4.3"} |
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
Name: Flash | |
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc= | |
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676 | |
Thank you! |
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
#### Build a directory for the website | |
- For front-end dev who using static files to host your web. | |
As usually, when you work with react lib, you use bundler(webpack, parcel, browser) to compile your project, you'll get a folder with static file. | |
What next will we do with those thing? Is it run stand alone locally by open index.html? | |
Nope, some reason for that is reference files in html follow format '/xxx.js'.It's an absolute path point to: | |
- public folder for php server | |
- uri | |
It should be './xxx.js' | |
So, you can use dockerfile to build an image with static files. You make a container to run that image. | |
Finally, you map a machine port to port 80 and enjoy your product at locally |
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 Foundation | |
open class EventBus { | |
struct Static { | |
static let instance = EventBus() | |
static let queue = DispatchQueue(label: "EventBus", attributes: []) | |
} |
OlderNewer