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
Discord Conversation from network | |
==== | |
[10:50 PM]Evan Carroll: I recently was suspended for this comment, I would like to know why? | |
Just so you know the origin story there: AFAIK Codidact came out of the Monica affair on StackExchange. Which was basically a conservative Jew that pulled a Jordan Peterson and claimed that a CoC that prevented her from harassing others with pronouns they found offensive was limiting her free speech. It came out of a desire not to be limited by a CoC. I can't go for that, but I'm glad the people that went there left! @[email protected] | |
The reason was this, | |
Your posts were reported for providing false information. After looking into it, we've decided to freeze your account. Please read on for additional information about why and how you can reverse this. |
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 v5.36; | |
use Sub::Util (); | |
use Inline::Python (); | |
use File::Slurp (); | |
use File::Spec (); | |
use Exporter 'import'; | |
our @EXPORT = qw(convert); | |
use experimental "signatures"; |
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 mut res = config | |
.connect(tokio_postgres::NoTls) | |
.await; | |
let (dbh, connection); | |
loop { | |
match res { | |
Err(_) => { |
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
// 1. Must only say "ClientError::*" ONCE. | |
// 2. Must return Result<Vec<String>, ClientError::*> | |
// 3. No nesting blocks or nested closures | |
// 4. Can be no unwrap, or try macro | |
//use std::ops::Deref; | |
let services = document | |
.select("ul.info") | |
.ok() | |
.and_then( |mut select| select.nth(1) ) | |
.as_ref() |
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
// 1. Must only say "ClientError::*" ONCE. | |
// 2. Must return Result<usize, ClientError::IndexParseError> | |
// 3. No nesting blocks, according to RustFMT | |
// 4. Can be no unwrap, or try macro | |
//use std::ops::Deref; | |
let services = document | |
.select("ul.info") | |
.ok() | |
.and_then( |mut select| select.nth(1) ) | |
.as_ref() |
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
// 1. Must only say "ClientError::IndexParseError" ONCE. | |
// 2. Must return Result<usize, ClientError::IndexParseError> | |
// 3. No nesting blocks | |
let last_id = document.select("div.cart:nth-child(1)") | |
.ok() | |
.and_then(|mut x| x.next() ) | |
.and_then(|x| { | |
x.attributes | |
.borrow() | |
.get("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
Computer Information: | |
Manufacturer: Unknown | |
Model: Unknown | |
Form Factor: Laptop | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: GenuineIntel | |
CPU Brand: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz | |
CPU Family: 0x6 |
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
ecarroll=# explain SELECT j1.*, jsonb_typeof(j1.value) FROM jsonb_array_elements('[ 7,2, [6,7], 2,10 ]'::jsonb) AS j1 LEFT OUTER JOIN LATERAL jsonb_array_elements(j1."value") ON jsonb_typeof(j1.value) = 'array'; | |
QUERY PLAN | |
------------------------------------------------------------------------------------- | |
Nested Loop Left Join (cost=0.01..251.25 rows=100 width=64) | |
Join Filter: (jsonb_typeof(j1.value) = 'array'::text) | |
-> Function Scan on jsonb_array_elements j1 (cost=0.00..1.00 rows=100 width=32) | |
-> Function Scan on jsonb_array_elements (cost=0.00..1.00 rows=100 width=0) | |
(4 rows) |
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
#include <stdio.h> | |
int a[2][2] = {{1,2},{3,4}}; | |
int (*b)[2] = a; | |
int main () { | |
printf("%d\n", *b[1]); | |
printf("%d\n", (*b)[1]); | |
printf("%d\n", (*b+1)[1]); | |
printf("%d\n", (*(b+1))[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
function f() { | |
let counter = 0; | |
return function () { | |
counter = counter + 1; | |
return function () { return counter } | |
} | |
} | |
Explain what the above code does and how we can use it. |
NewerOlder