/usr/bin/find /path/to/cache/* -mtime +7 -delete
Никаким.
.. что уникальный идентификатор..
если надо поменять порядок вывода, то и циферки надо перевесить
The current session is in Legacy mode. Please reboot the computer, and use this software in an EFI session. This will enable this feature. For example, use a live-USB of Boot-Repair-Disk-64bit (www.sourceforge.net/p/boot-repair-cd), after making sure your BIOS is set up to boot USB in EFI mode.
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-a249b125-35b9-4a5f-b722-b9a18f318441' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a249b125-35b9-4a5f-b722-b9a18f318441
else
search --no-floppy --fs-uuid --set=root a249b125-35b9-4a5f-b722-b9a18f318441
fi
linux /boot/vmlinuz-4.4.0-116-generic.efi.signed root=UUID=a249b125-35b9-4a5f-b722-b9a18f318441 ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.4.0-116-generic
}
menuentry "Windows UEFI bootmgfw.efi" {
search --fs-uuid --no-floppy --set=root B420-3CF8
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
menuentry "Windows Boot UEFI loader" {
search --fs-uuid --no-floppy --set=root B420-3CF8
chainloader (${root})/EFI/Boot/bkpbootx64.efi
}
menuentry "EFI/ubuntu/mmx64.efi" {
search --fs-uuid --no-floppy --set=root B420-3CF8
chainloader (${root})/EFI/ubuntu/mmx64.efi
}
menuentry 'Windows Boot Manager (on /dev/sdb2)' --class windows --class os $menuentry_id_option 'osprober-efi-B420-3CF8' {
insmod part_gpt
insmod fat
set root='hd1,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2 B420-3CF8
else
search --no-floppy --fs-uuid --set=root B420-3CF8
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
sudo cp /etc/fstab /etc/fstab.bak
sudo cp /etc/resolv.conf /etc/resolv.conf.bak
sudo cp /etc/default/grub /etc/default/grub.bak
Why
To have a unified type system and allow value types to have a completely different representation of their underlying data from the way that reference types represent their underlying data (e.g., an int is just a bucket of thirty-two bits which is completely different than a reference type).
Think of it like this. You have a variable "o" of type object. And now you have an int and you want to put it into "o". "o" is a reference to something somewhere, and the int is emphatically not a reference to something somewhere (after all, it's just a number). So, what you do is this: you make a new object that can store the int and then you assign a reference to that object to "o". We call this process "boxing."
So, if you don't care about having a unified type system (i.e., reference types and value types have very different representations and you don't want a common way to "represent" the two) then you don't need boxing. If you don't care about having int represent their underlying value (i.e., instead have int be reference types too and just store a reference to their underlying value) then you don't need boxing.
Where should I use it.
For example, the old collection type ArrayList only eats objects. That is, it only stores references to somethings that live somewhere. Without boxing you cannot put an int into such a collection. But with boxing, you can.
Now, in the days of generics you don't really need this and can generally go merrily along without thinking about the issue.
The Java Pet Store 2.0 Reference Application is a sample application brought to you by the Java BluePrints program at Sun Microsystems. This application is designed to illustrate how the Java Enterprise Edition 5 Platform can be used to develop an AJAX-enabled Web 2.0 application. The application comes with full source-code available under a BSD-style license, so you can experiment with it and use it in your own applications.
The Java Pet Store 2.0 is the reference application for building Ajax web applications on Java Enterprise Edition 5 platform. It illustrates BluePrints for using Ajax with Java, building AJAX-enabled JSF component libraries, using Java Persistence APIs, applying MVC and other design patterns in an Ajax web app, using Mashups such as Google Maps service for location specific searches of pets and PayPal service for purchases, using an RSS feed as a data source, and lots more.
With real, working code illustrating the BluePrints guidelines, the Java Pet Store 2.0 reduces the learning curve of the Java EE 5 platform, enabling you to deliver complete end-to-end solutions with faster time-to-market.
WP_Post Object (
[ID] => 35
[menu_item_parent] => 0
)
<?php
$items = [
(object) ['ID'=>35, 'menu_item_parent'=>0],
(object) ['ID'=>38, 'menu_item_parent'=>35],
(object) ['ID'=>36, 'menu_item_parent'=>35],
(object) ['ID'=>37, 'menu_item_parent'=>0],
];
function getTree($items){
$tree = [];
foreach ($items as $id=>$node) {
if ($node->menu_item_parent == 0)
$tree[$node->ID] = ['node'=>$node, 'childs'=>[]];
else
$tree[$node->menu_item_parent]['childs'][$node->ID] = ['node'=>$node, 'childs'=>[]];
}
return $tree;
}
$tree = getTree($items);
echo '<pre>';
print_r($tree);
echo '</pre>';
echo '<hr>';
function printer($treeItem, $level) {
if ($level) echo str_repeat('--', $level);
echo $treeItem['node']->ID.'<br>';
foreach($treeItem['childs'] as $subItem) {
printer($subItem, $level+1);
}
}
foreach($tree as $treeItem) printer($treeItem, 0);
1) Не у всех есть MySQL 8
2) Не выдаст корректный результат на наборе данных где id идут не по порядку, например
или еще интересней