Column | Type | Nullable | Default |
---|---|---|---|
id | integer | not null | nextval('requests_id_seq'::regclass) |
user | text | not null | |
request | text | not null | |
status | text | not null | 'to-do'::text |
Indexes:
"requests_pkey" PRIMARY KEY, btree (id)
extension UIApplication { | |
func endEditing() { | |
sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) | |
} | |
} | |
extension View { | |
func endEditing() { | |
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) | |
} |
import UserNotifications | |
let center = UNUserNotificationCenter.current() | |
center.getDeliveredNotifications { notifications in | |
let identifiers = notifications.map(\.request.identifier) | |
center.removeDeliveredNotifications(withIdentifiers: identifiers) | |
} |
import SwiftUI | |
struct ScrollCeption: View { | |
var body: some View { | |
ScrollView { | |
VStack { | |
ForEach(0..<10) { _ in | |
ScrollView(.horizontal) { | |
HStack { | |
ForEach(0..<5) { _ in |
subpull() { | |
BASEPWD="${PWD}" | |
for d in `find . -type d -depth 1`; do | |
cd "${BASEPWD}" | |
cd "${d}" | |
GIT_STATUS="$(git status 2>&1)" | |
if [[ $GIT_STATUS == *"not a git repository"* ]] | |
then | |
echo "${d} is not under git control. Skipping" | |
continue |
import SceneKit | |
// Part 1: Distance | |
extension SCNVector3 { | |
func distance(to vector: SCNVector3) -> Float { | |
return simd_distance(simd_float3(self), simd_float3(vector)) | |
} | |
} |
import SwiftUI | |
func > (_ lhs: CGSize, _ rhs: CGSize) -> Bool { | |
return lhs.width > rhs.width && lhs.height > rhs.height | |
} | |
struct MyView: View { | |
@State var biggestSize: CGSize = .zero | |
@staticmethod | |
def log(f=None): | |
def deco(f): | |
@functools.wraps(f) | |
def func(*args, **kwargs): | |
audit = AuditModel() | |
user = request.headers.get("X-Auth-User") | |
if user is None: | |
return 'UNAUTHORIZED. Please provide X-Auth-User header.', 403 | |
audit.user = user |
import functools | |
from datetime import datetime | |
from flask import request | |
from peewee import * | |
from playhouse.postgres_ext import * | |
class AuditModel(Model): | |
id = AutoField() | |
user = TextField() |
Column | Type | Nullable | Default |
---|---|---|---|
id | integer | not null | nextval('requests_id_seq'::regclass) |
user | text | not null | |
request | text | not null | |
status | text | not null | 'to-do'::text |
Indexes:
"requests_pkey" PRIMARY KEY, btree (id)
import discord | |
############################################################################################################################# | |
# USAGE: # | |
# 0. Make sure you have python 3.5 + installed and have discord.py installed (pip3 install discord) # | |
# 1. Download the python file # | |
# 2. Change the token variable to hold your bots token and the pfp variable to hold the path to your desired pfp # | |
# 3. Run your file using `python3 path/to/file.py # | |
# 3. That's it, you can keep the file or delete it again! # | |
############################################################################################################################# |