This library is now deprecated in favour of a more complete and SwiftUI friendly TextEditor
backport:
https://github.com/shaps80/SwiftUIBackports
See it in action here: https://twitter.com/shaps/status/1654972428286668800?s=20
This library is now deprecated in favour of a more complete and SwiftUI friendly TextEditor
backport:
https://github.com/shaps80/SwiftUIBackports
See it in action here: https://twitter.com/shaps/status/1654972428286668800?s=20
import SwiftUI | |
#if os(macOS) | |
public typealias Font = NSFont | |
public typealias FontDescriptor = NSFontDescriptor | |
#else | |
public typealias Font = UIFont | |
public typealias FontDescriptor = UIFontDescriptor | |
#endif |
// | |
// SnapCarousel.swift | |
// prototype5 | |
// | |
// Created by xtabbas on 5/7/20. | |
// Copyright © 2020 xtadevs. All rights reserved. | |
// | |
import SwiftUI |
//------------------------------------------------------------------------ | |
// The SwiftUI Lab: Advanced SwiftUI Animations | |
// https://swiftui-lab.com/swiftui-animations-part1 (Animating Paths) | |
// https://swiftui-lab.com/swiftui-animations-part2 (GeometryEffect) | |
// https://swiftui-lab.com/swiftui-animations-part3 (AnimatableModifier) | |
//------------------------------------------------------------------------ | |
import SwiftUI | |
struct ContentView: View { | |
local FUNC_TEMP=[[ | |
local $ARGS | |
return function(...) | |
$SOURCE | |
end, | |
function() | |
return {$LOCALS} | |
end | |
]] |
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。 | |
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能) | |
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考 | |
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks | |
1、 shadowsocks的timeout设置 | |
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。 | |
2、 检查操作系统的各种限制 | |
对于openvz的vps,特别需要检查一下 |
void displayText(const QString &text, const QColor &backgroundColor, const QColor &textColor, const Vec3D &pos) | |
{ | |
// some magic number (margin, spacing, font size, etc..) | |
int fontSize = 15; | |
int text_width=text.size()*(fontSize/1.5)+5, text_height=fontSize+20; | |
// create the QImage and draw txt into it | |
QImage textimg(text_width, text_height, QImage::Format_RGB888); | |
{ | |
QPainter painter(&textimg); |