Tu masz stronę która to fajnie wyjaśnia, zaprezentowane są 2 style old i new. Obu stylów się wciąż używa, wybierz sobie który chcesz - jak już zrozumiesz idee to opanowanie drugiego stylu nie będzie problematyczne.
I hereby claim:
- I am dzejkop on github.
- I am dzejkop (https://keybase.io/dzejkop) on keybase.
- I have a public key ASAMzXGhyRYVOrTLhYfx2HHJmF9QKUnDvAFqPdRS8yqI2go
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
// Texture creation | |
let mut texture: *mut ID3D11Texture2D = null_mut(); | |
let mut texture_desc: D3D11_TEXTURE2D_DESC = std::mem::zeroed(); | |
texture_desc.Width = width; // usually 1280 | |
texture_desc.Height = height; // usually 720 | |
texture_desc.MipLevels = 1; | |
texture_desc.ArraySize = 1; | |
texture_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; | |
texture_desc.SampleDesc.Count = 1; | |
texture_desc.Usage = D3D11_USAGE_DYNAMIC; |
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
pub fn levenshtein_distance(a: &str, b: &str) -> usize { | |
let a: Vec<char> = a.chars().collect(); | |
let b: Vec<char> = b.chars().collect(); | |
levenshtein_distance_inner(&a, &b) | |
} | |
fn levenshtein_distance_inner(a: &[char], b: &[char]) -> usize { | |
if a.len() == 0 { | |
return b.len(); |
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
|
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
# In your dependencies add the following | |
syn = "1.0" | |
quote = "1.0" | |
proc_macro2 = "1.0" | |
heck = "0.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
use std::collections::HashMap; | |
use serde::{Deserialize, Serialize}; | |
#[derive(Debug, Clone, Serialize, Deserialize)] | |
struct Response { | |
pub elements: Vec<Element>, | |
} | |
#[derive(Debug, Clone, Serialize, Deserialize)] |
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
[package] | |
name = "canvas_time_test" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
bevy = "0.9.1" |
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
def findMod [path: path] { | |
ls -a $path | where type == 'file' | where name =~ 'mod.rs' | select name | each {|e| handleModFile $e.name } | |
if ($path | path exists) { | |
ls -a $path | where type == 'dir' | select name | each {|e| findMod ($path | path join $e.name) } | |
} | |
} | |
def handleModFile [path: path] { | |
let d = ($path | path dirname) | |
let f = ([$d ".rs"] | str join) |
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
{ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract IBridge", | |
"name": "newStateBridge", | |
"type": "address" | |
} | |
], | |
"name": "setStateBridge", |
OlderNewer