Map [1]
Operation | Time Complexity |
---|---|
Access | O(log n) |
Search | O(log n) |
Insertion | O(n) for <= 32 elements, O(log n) for > 32 elements [2] |
Deletion | O(n) for <= 32 elements, O(log n) for > 32 elements |
// MIT License | |
// | |
// Copyright (c) 2023 Lee Kah Seng | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
## In no particular order. I'm pulling these from a bookmark folder, I'll work on labeling as I have time. Hope these help. Will be mixing in Linux reference as well. | |
Sidenote: the macOS Internals series is amazing, although might be out of reach for some. However if having a hard time deciding (I definitely way) and in budget, In my opinion, they are worth the price. I've worked through Volume II, waiting on Volume III. | |
As always, most of what we need in our world can be found open sourced and provided by some of the brightest, but it can be a frustrating journey finding material. | |
https://www.intezer.com/blog/malware-analysis/elf-malware-analysis-101-linux-threats-no-longer-an-afterthought/ | |
http://timetobleed.com/dynamic-linking-elf-vs-mach-o/ | |
https://github.com/apple/darwin-xnu | |
https://opensource.apple.com/source/xnu/ | |
https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/Architecture/Architecture.html |
There are a ton of different ways to split up a string in Zsh. This gist attempts to show them with examples to help you build your own. I write Zsh scripts all the time, and still reference back to this gist, so there you go.
From the Zsh docs on Parameter Expansion Flags (yeah - I know... how would anyone ever find that if they didn't know where to look!?)
j:string: Join the words of arrays together using string as a separator.
s:string: Force field splitting at the separator string.
You can also read more by running man zshexpn
. (Again, I know, right!? How would anyone know to look there!?)
package main | |
import ( | |
"crypto/tls" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"net/textproto" |
#include <jvmti.h> | |
#include <cstring> | |
#include <iostream> | |
void debug(char* msg...){ | |
// printf(msg); | |
} | |
int loadJar(JNIEnv *jni){ |
from django.db.models import Field | |
from django.conf import settings | |
from django.utils.decorators import cached_property | |
class VirtualField(object): | |
""" | |
A virtual field, mainly used for caching and seamless computed field retrieval. | |
This acts both like a (cached) property and a virtual field if supported. | |
""" |
Today I wanted to move existing APFS-resident macOS Catalina installation to a new disk. I upgraded my late 2014 Mac Mini with a shiny new 1TB SSD. This took way too many hours of my life I will never get back. Hope this saves some time to you.
Good news:
This information is relevant for Catalina (I'm currently running macOS 10.15.1).
Researched by Robert Quattlebaum [email protected].
Last updated 2020-02-03.
This gist will show how to setup a generic SBC Debian / Ubuntu install as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.
This is forked from another gist specific to the Raspberry Pi on Stretch. A required package isn't in Ubuntu's repos, so in this gist we build it from scratch.
Tested to be working on Armbian/Ubuntu/Debian images of the Orange Pi Zero, ODROID XU4, ODROID N2, and Atomic Pi.