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 2019 The MediaPipe Authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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
// | |
// ContentView.swift | |
// SwiftUI Chat | |
// | |
// Created by Nick Halavins on 6/7/19. Updated 10/11/19 | |
// Copyright © 2019 AntiLand. All rights reserved. | |
// | |
import SwiftUI |
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
# -*- coding: utf-8 -*- | |
# python | |
# script for multiple find/replace old android package with the ones of AndroidX new packaging. | |
import os,sys | |
from os import walk | |
inputDir = "../app/src/" | |
fileExtension = [".xml",".java",".kt"] |
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
SSE3=1 SSSE3=1 SSE4_1=1 SAHF=1 AVX=1 FMA3=1 BMI1=1 BMI2=1 LZCNT=1 POPCNT=1 ATOM=0 | |
Synopsis: | |
shell [options] [--shell] [<file>...] | |
d8 [options] [-e <string>] [--shell] [[--module] <file>...] | |
-e execute a string in V8 | |
--shell run an interactive JavaScript shell | |
--module execute a file as a JavaScript module | |
Options: |
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
func downloadAndSaveAudioFile(_ audioFile: String, completion: @escaping (String) -> Void) { | |
//Create directory if not present | |
let paths = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.libraryDirectory, FileManager.SearchPathDomainMask.userDomainMask, true) | |
let documentDirectory = paths.first! as NSString | |
let soundDirPathString = documentDirectory.appendingPathComponent("Sounds") | |
do { | |
try FileManager.default.createDirectory(atPath: soundDirPathString, withIntermediateDirectories: true, attributes:nil) | |
print("directory created at \(soundDirPathString)") |
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
编译 v8 core.deltaBaseCacheLimit=2g 错误 | |
修改 depot_tools/gclient_utils.py | |
return '512m' |
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
public class MaxHeightLinearLayout extends LinearLayout { | |
private int maxHeightDp; | |
public MaxHeightLinearLayout(Context context) { | |
super(context); | |
} | |
public MaxHeightLinearLayout(Context context, AttributeSet attrs) { | |
super(context, attrs); |
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
from openpyxl import load_workbook | |
wb = load_workbook('template.xlsx') | |
# grab the active worksheet | |
ws = wb.active | |
# Data can be assigned directly to cells | |
ws['A2'] = 'Tom' | |
ws['B2'] = 30 |
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
// | |
// WKWebViewPanelManager.h | |
// | |
// A few helpers to easily show WKWebView alerts, confirms, and prompts. | |
// | |
// Created by Joshua Wright<@bendytree> on 11/4/15. | |
// | |
// License: MIT | |
// | |
// Inspired by: https://github.com/ShingoFukuyama/WKWebViewTips |
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 | |
# check for where the latest version of IDEA is installed | |
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1` | |
wd=`pwd` | |
# Setup your working directory. Edit 'work' to your working directory. | |
working_dir=`ls -1d ~/work/$1 | head -n1` | |
# were we given a directory? | |
if [ -d "$1" ]; then |
NewerOlder