Skip to content

Instantly share code, notes, and snippets.

View Deleplace's full-sized avatar

Valentin Deleplace Deleplace

View GitHub Profile
@Deleplace
Deleplace / main.dart
Created December 5, 2023 17:51
fluttering-midnight-6937
void main() {
final s = "L'été";
final c = s[s.length - 1];
print("The last character of \"$s\" is '$c'");
}
@Deleplace
Deleplace / main.dart
Created December 5, 2023 17:35
fluttering-midnight-6937
void main() {
final s = "Cat";
final c = s[s.length - 1];
print("The last character of \"$s\" is '$c'");
}
@Deleplace
Deleplace / main.dart
Created October 30, 2023 22:34
oval-arc-0625
void main() {
print('Test permalink');
}
@Deleplace
Deleplace / main.dart
Created September 14, 2023 09:32
fluttering-midnight-6937
class Person {
String id;
String firstName, lastName;
Person(this.id, this.firstName, this.lastName);
@override
String toString() {
return "$firstName $lastName";
}
}
@Deleplace
Deleplace / main.dart
Created September 12, 2023 15:31
fluttering-midnight-6937
import 'dart:convert';
void main() {
const x = {'text': 'foo', 'value': '2'};
var encoded = const JsonEncoder.withIndent(' ').convert(x);
print(encoded);
}
@Deleplace
Deleplace / foo_test.go
Created July 26, 2023 16:19
Which of these 2 functions is fastest?
package bench
import "testing"
var fooMap = map[string]int{"a": 1, "b": 2}
func Foo1(s string) int {
return fooMap[s]
}
@Deleplace
Deleplace / main.dart
Created July 22, 2023 12:46
poetic-neutron-6668
void main() {
var m = {
"one": 1,
"two": 2
};
final k = m.keys;
print(k);
}
def items = ["bleen", "fuligin", "garrow", "grue", "hooloovoo"]
def x = items.last()
println x
def x = ["bleen", "fuligin", "garrow", "grue", "hooloovoo"]
def a = x.shuffled().first()
println a