-
在多个 Finder 窗口间,直接
拖拽
文件 -
使用快捷键
Option
+Command
+V
剪切文件
Discover gists
class MainActivity : ComponentActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
WindowCompat.setDecorFitsSystemWindows(window, false) | |
super.onCreate(savedInstanceState) | |
setContent { | |
RubberBandSliderTheme { | |
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) { | |
Box(contentAlignment = Alignment.Center) { | |
RubberBandSlider(modifier = Modifier | |
.height(200.dp) |
TLDR: The cascade={"remove"}
is like a "software" onDelete="CASCADE"
, and will remove objects from the database only when an explicit call to $em->remove()
occurs. Thus, it could result in more than one object being deleted. orphanRemoval
can remove objects from the database even if there was no explicit call to ->remove()
.
I answered this question a few times to different people so I will try to sum things up in this Gist.
Let's take two entities A
and B
as an example. I will use a OneToOne relationship in this example but it works exactly the same with OneToMany relationships.
class A
** Step 1 **
Install ffmpeg with the vidstab plugin.
- OSX: Install via Homebrew -
brew install ffmpeg --with-libvidstab
- Linux: download binaries here (vidstab included)
- Windows: download binaries here (vidstab included)
I used a service called Censys Search to find them. There's some queries you can do:
services.http.response.html_title: "cobalt"
- This one can find web instances. Does lead to false positives, since any title can contain "cobalt."
services.http.response.body_hash="sha1:bf53b9ab96065ed263df9ebcd2b3b0c4d88242b5"
- This one can find API instances. This is the hash of the response that all instances use.
- You can probably also look for just port 9001/9000, but most of these ports are not default.
After I collected the list, I checked /api/serverInfo
on the API instances to see if it has a url
set. This can either be a subdomain or an IP. If it had a domain set, I tried to find the web instance by checking common subdomains (like co, cobalt, etc). If there were no connecting domains, I tried a look up the IP on SecurityTrails. Otherwise, it simply got listed as the IP.
<?php | |
/** | |
* All custom functions should be defined in this class | |
* and tied to WP hooks/filters w/in the constructor method | |
*/ | |
class Custom_Functions { | |
// Custom metaboxes and fields configuration |
for i in *.mp4; | |
do name=`echo "$i" | cut -d'.' -f1` | |
echo "$name" | |
ffmpeg -i "$i" -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 "${name}.webm" | |
done |
func encode<T>(var value: T) -> NSData { | |
return withUnsafePointer(&value) { p in | |
NSData(bytes: p, length: sizeofValue(value)) | |
} | |
} | |
func decode<T>(data: NSData) -> T { | |
let pointer = UnsafeMutablePointer<T>.alloc(sizeof(T.Type)) | |
data.getBytes(pointer) | |