Skip to content

Instantly share code, notes, and snippets.

diff --git a/scarb/src/bin/scarb/args.rs b/scarb/src/bin/scarb/args.rs
index 4fb488f7..c8d28473 100644
--- a/scarb/src/bin/scarb/args.rs
+++ b/scarb/src/bin/scarb/args.rs
@@ -8,7 +8,7 @@ use std::ffi::OsString;
use anyhow::Result;
use camino::Utf8PathBuf;
use clap::{CommandFactory, Parser, Subcommand};
-use scarb::ops::EmitTarget;
+use scarb::ops::{EmitTarget, FeaturesOpts};
error[E0308]: mismatched types
--> scarb/src/core/lockfile.rs:41:53
|
41 | #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)]
| ^^^^^^^^^ expected `SourceId`, found `&SourceId`
...
47 | #[serde(skip_serializing_if = "SourceId::is_path")]
| ------------------- arguments to this function are incorrect
|
note: method defined here
use anyhow::Result;
use clap::{Parser, Subcommand};
#[derive(Parser, Clone, Debug)]
struct Args {
/// Subcommand and its arguments.
#[command(subcommand)]
pub command: Command,
}

Keybase proof

I hereby claim:

  • I am maciektr on github.
  • I am mtratnowiecki (https://keybase.io/mtratnowiecki) on keybase.
  • I have a public key ASB_BVgztw6yOa9NGFI-MzjmTcgEdHOFy0gxgYE_2h4IJgo

To claim this, I am signing this object:

https://f003.backblazeb2.com/file/maciektr-public/metody_stochastyczne.pdf
https://f003.backblazeb2.com/file/maciektr-public/stochastic_training.pdf
https://docs.google.com/presentation/d/1VUs4zdrJvRKNh3Ynur0Ysh5B9kQjZgKa3d7pH5MgixM/edit#slide=id.p
@maciektr
maciektr / from_file.js
Last active April 11, 2021 09:37
Apollo client query example
import apollo_client from "./components/ApolloClient";
import meQuery from './queries/me.graphql';
apollo_client
.query({query: meQuery})
.then(result => console.log(result));

Keybase proof

I hereby claim:

  • I am maciektr on github.
  • I am mtratnow (https://keybase.io/mtratnow) on keybase.
  • I have a public key ASCC0EqQXPjqbDSL6DrRPg4YOGkm4_WMqBiABU4IDw_lMAo

To claim this, I am signing this object:

; Ascii characters
; Char 'a' can be accessed as:
; ascii + 8 * 'a'
rend_char segment
ascii db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h ; U+0000 (nul)
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h ; U+0001
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h ; U+0002
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h ; U+0003
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h ; U+0004
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h ; U+0005
@maciektr
maciektr / RandomNIP.py
Last active January 11, 2020 10:44
Generating random, valid, polish tax payer identification number with simple Python snippet
def random_nip(self):
res = ''
sum = 0
weights = [6, 5, 7, 2, 3, 4, 5, 6, 7]
for i in range(8):
k = self.rand.randint(1 if i < 3 else 0, 9)
sum += weights[i] * k
res += str(k)
k = self.rand.randint(0, 9)
if (sum + (k * weights[8])) % 11 == 10:
#include <bits/stdc++.h>
using namespace std;
// #define local 0
// #define DEBUG if(local)
// #define VAR(v) #v << "= " << v << " "
// #define COUT cout << "\e[36m" <<
// #define ENDL "\e[39m" << endl
const int inf = 2000000;