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 SwiftUI | |
import SwiftData | |
struct ItemView: View { | |
var parent: Parent | |
var body: some View { | |
VStack { | |
Text(parent.id) | |
List(parent.children) { child in | |
Text("Child \"\(child.id)\" of parent \"\(child.parent!.id)\"") |
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
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.mysql', | |
'HOST': 'localhost', | |
'NAME': 'db', | |
'USER': 'root', | |
'PASSWORD': '', | |
'OPTIONS': { | |
'charset': 'utf8mb4', | |
'init_command': 'set collation_connection=utf8mb4_unicode_ci', |
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
#[derive(Debug)] | |
struct Point { | |
x: f32, | |
y: f32, | |
} | |
#[derive(Debug)] | |
struct Rectangle { | |
p1: Point, | |
p2: Point, |
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
$ brew update | |
warning: unable to unlink CONTRIBUTING.md: Permission denied | |
warning: unable to unlink SUPPORTERS.md: Permission denied | |
fatal: cannot create directory at '.github': Permission denied | |
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master | |
$ brew update | |
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError) | |
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' | |
from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>' |
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
Uncaught Error: Invariant Violation: Relay.QL: Expected query `viewer` to be empty. For example, use `node(id: $id)`, not `node(id: $id) { ... }`. |
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
fragment on Viewer { | |
files(first: 10) { | |
edges { | |
node { | |
id, | |
url, | |
}, | |
}, | |
}, | |
} |
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
{ | |
"errors": [ | |
{ | |
"message": "Argument \"input\" expected type \"UploadFileByUrlInput!\" but got: {url: foo}.", | |
"locations": [ | |
{ | |
"line": 1, | |
"column": 35 | |
} | |
] |
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
curl 'http://localhost:4000/graphql' -X POST -H 'Pragma: no-cache' -H 'Origin: http://localhost:4000' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36' -H 'content-type: application/json' -H 'Accept: */*' -H 'Cache-Control: no-cache' -H 'Referer: http://localhost:4000/?' -H 'Connection: keep-alive' -H 'Content-Length: 280' --compressed |
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 'babel/polyfill'; | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
class FileUploadPage extends React.Component { | |
handleSubmit(event) { | |
event.preventDefault(); | |
console.log(this.refs.url.value.trim()) | |
} |
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
let Users = [] | |
function getUser(name) { | |
return Users.find(user => user.name == name) | |
} | |
function upsertUser(name) { | |
let user = getUser(name) | |
if (!user) { | |
user = { |
NewerOlder