https://media.notthebee.com/articles/62c2e6671aa2162c2e6671aa22.jpg
Because the freedom to make fun of tyrants was secured by Americans, one could argue that memes themselves were made possible by the signing of the Declaration in 1776.
Not the Bee
Just another WordPress site
https://media.notthebee.com/articles/62c2e6671aa2162c2e6671aa22.jpg
Because the freedom to make fun of tyrants was secured by Americans, one could argue that memes themselves were made possible by the signing of the Declaration in 1776.
Not the Bee
https://bearingarms.com/wp-content/uploads/media/2022/05/Screen-Shot-2022-05-31-at-3.42.36-PM-1200×630.png
http://zelmanpartisans.com/wp-content/uploads/2022/07/Xiden-turkey.jpg
Yep, no doubt about it, this year I keep thinking about the words of Benjamin Franklin “A Republic if you can keep it” in response to being asked what kind of government had been established for the new formed United States.
So, since I have veggie hot dogs to grill I’ve just got a few thoughts for today. Some snarky, some serious, some funny. Sort of like a family potluck.
First, encouraging words from President Puddin’ Head
Let’s try that again
The founding of our nation wasn’t a joke though, men and women of valor fought very hard to give us the freedom that people are squandering and taking for granted.
And because of their vision, hard work and sacrifice we, have a chance to strive to be uncommon.
But the signers knew what they were doing, they knew the formula that would be needed in the future to preserve the freedom that tyrants always seek to snatch away.
And I will leave you with this video of the history of the Star Spangled Banner. I didn’t get a Puffs warning, but I’m saying it might be good to have one close by.
Happy Birthday beloved America
https://media.notthebee.com/articles/62bf26455015b62bf26455015c.jpg
Here’s a fun thread to brighten your day.
Not the Bee
https://media.notthebee.com/articles/62bee5e15bdca62bee5e15bdcb.jpg
Just absolutely A+. What a beautiful video.
Not the Bee
https://www.recoilweb.com/wp-content/uploads/2022/06/hidden-safe-scaled-1.jpg
Keeping your guns hidden is one of the best forms of keeping them safe. Find a gun safe that keeps them hidden and secured!Recoil
https://laravelnews.imgix.net/images/laravel-onboard.png?ixlib=php-3.3.1
Laravel Onboard is a Laravel package to help track user onboarding steps created by Spatie:
Here’s a quick example taken from the project readme on using this package to create onboarding steps:
1use App\User;
2use Spatie\Onboard\Facades\Onboard;
3
4// You can add onboarding steps in a `boot()` method within a service provider
5Onboard::addStep('Complete Profile')
6 ->link('/profile')
7 ->cta('Complete')
8 ->completeIf(function (User $user) {
9 return $user->profile->isComplete();
10 });
11
12Onboard::addStep('Create Your First Post')
13 ->link('/post/create')
14 ->cta('Create Post')
15 ->completeIf(function (User $user) {
16 return $user->posts->count() > 0;
17 });
To get a user’s onboarding status—among other things—the package has a nice API for accessing things like percentage complete, in progress, finished, and details about individual steps:
1/** @var \Spatie\Onboard\OnboardingManager $onboarding **/
2$onboarding = Auth::user()->onboarding();
3
4$onboarding->inProgress();
5
6$onboarding->percentageCompleted();
7
8$onboarding->finished();
9
10$onboarding->steps()->each(function($step) {
11 $step->title;
12 $step->cta;
13 $step->link;
14 $step->complete();
15 $step->incomplete();
16});
Additionally, this package supports features such as:
You can get started with this package by checking it out on GitHub at spatie/laravel-onboard. Their blog post can also give you some examples and further details on how you can use this package.
Laravel News
https://www.percona.com/blog/wp-content/uploads/2022/06/Screenshot-2022-06-27-at-7.01.31-PM-300×166.png
Though I am writing this post being a PostgreSQL DBA, this page can be read by anyone because the concept of corruption is the same in every database.
After reading this blog post, one should understand what database corruption is and how it may occur.
Being DBAs, corruption is something we do not want to ever see in our system; however, there are a number of systems where corruption revisits very frequently. Whenever it occurs in big databases, it becomes challenging for us to detect and repair it as we may see no sign of it. In my 15 years of experience as a DBA, I saw corruption as the toughest nut to crack because ostensible reasons for any corruption are not actually predictable. In other words, we may not know the actual cause of the issue; hence, it is quite difficult to get the RCA.
In this series of blogs, I am going to cover various types of corruption and methods to find and fix them.
This blog post will throw some light on the basics of database corruption.
To explain it in a simple manner, I will take an example of the Spanish language. There is text in the image below.
Here, the above text is in Spanish. For anyone who does not understand Spanish, is it possible for them to read it? The straightforward answer is “No”.
Anyone would ask “How may a person without having knowledge of Spanish read it?”. To end the curiosity, the image reads “Goodbye” in English.
The same thing happens with software products as well. All software is programmed to read and write in its own pre-defined format, and it may not be able to do so in any other format that is supported by any other software product. For example, Python code can not be compiled or read, or executed, in C, Java, or Perl.
In the case of databases, it is about the format of data being stored on a disk. When a database product, such as PostgreSQL, MySQL, or MongoDB, writes on a disk, it performs the operation by using some format.
While reading from a disk, the database product expects the same format there; any portion of data on disk that is not in an appropriate format is CORRUPTION.
To summarize this, corruption is nothing but an improper format or a sequence of data.
As mentioned in the last section, corruption is a result of an unreadable data format. As we know, data is stored in the form of bits on a disk. Now, in the case of integer or numeric, the conversion is simple. But for characters, every machine is designed to convert data in the form of bytes, which is a group of eight bits, in such a way that every byte represents a character. There are 256 different combinations of every byte, from 00000000(0) to 11111111(255).
To read bytes in the form of characters, some formats are designed, such as ASCII, EBCDIC, BCD, and so on. They are also known as encoding schemes. Out of all these schemes, ASCII (American Standard Code for Information Interchange) is more popular. In this format, every byte (all 256 combinations) is assigned a particular character.
Like,
01000001(65) – A
00101100(44) – ,
Below is the link to view all the ASCII codes.
https://www.rapidtables.com/code/text/ascii-table.html
Here, if any byte is stored with an unexpected sequence of bits, the machine will read a different character.
For example,
Let’s say character A(65) is stored as 11000001(193) instead of 01000001(65), which is “Á“(not the English letter A).
Now, in these mentioned encoding schemes, some characters are human-readable and the rest are not. But, another point to note is that all the software products are not built to decipher all the characters. So, in any case, if a byte at any position gets changed, it is possible that the database may not be able to read the character, and hence data. Those unreadable or non-parsable data are deemed as corrupted data.
For example,
In case How are you? is stored as How are you¿, character “¿” is not available in English, hence those character sets that can only parse English may not be able to recognize that character. So, it will not be able to read that text and throws an error by marking it unreadable. Here, only one character is unrecognizable, but the whole text will be marked as corrupted data.
It is truly mysterious because we may never know the actual reason for any kind of corruption. As I mentioned above, the corruption is attributed to changes of bits/bytes, but it is really difficult to make it certain what process/thread leads to that change. This is why any test case related to corruption is not actually reproducible. The only thing we can do is explore possible causes.
Some of the possible causes are as below.
When RAID disks are not designed properly or controllers are faulty, it may not be able to write data correctly on disks. In non-RAID disks, mechanical devices should work properly because bits are not stored properly due to faulty disks as well.
Corruption may also occur due to heavy I/Os.
On occasions, due to a buggy kernel or code, OS encodes data wrongly, and it is later written to the disk. On occasions, OS produces corrupted data while it is inefficient to stem I/Os.
In many cases, the product itself sometimes stores wrong data on the disk, or due to inefficient algorithms, it saves data in the wrong format.
Every database comprises different types of files, such as data files, WAL files, commit logs, and so on. These files contain data for various database objects e.g. tables, indexes, materialized views, WAL records, etc. When these database files go corrupt, some queries retrieve wrong data or return errors, or some operations(e.g. recovery, replay) may not work as expected. As a DBA, one needs to identify what particular objects are affected due to that corruption. For ease of understanding, corruption is categorized into different types; some of them are as below.
In general, an index keeps a pointer(s) for a particular value(or a value set) in a column. Whenever an index is asked to return pointers (ctid in PostgreSQL, rowid in Oracle), it fetches those pointers and returns them to the requestor.
In the case of corruption, a wrong pointer to any value is saved on the disk due to faulty bits on the disk. Consequently, it returns a wrong record.
When data/toast pages store faulty data(in terms of format), it may become unrecognizable while reading the same data. Hence, they get errored out by the database.
WAL/Redo/Transaction log files store data in a particular format, and while reading them, WAL entries are parsed and applied. In the case of WAL corruption, WAL entries are not parsable, which affects the WAL reply operation.
The lowest unit of storage in databases is block/page, which actually stores the actual records. To maintain data integrity, some information is stored in a separate section that is called the page header. Any improper information in a page header is header corruption. This affects the data integrity.
Corruption results from changes in bits/bytes while storing data on the disk. When a database product (e.g. MySQL, PostgreSQL) does not get the data in an expected format, it is corruption.
The data in the database may get corrupted due to various reasons, such as faulty hardware and buggy OS/kernel/database products. Owing to this, the data is accidentally changed before it is stored on the disk. While it is wrongly stored on a disk, and hence files, it affects various functions of the software product; to easily understand what particular areas are affected, the corruption is classified into various types, such as index corruption, data corruption, and so on.
This is the first post in the series of database corruption blogs; other blogs will be posted soon. Stay tuned!
Percona Database Performance Blog
https://media.babylonbee.com/articles/62bdea0ca552b62bdea0ca552c.jpg
GENEVA — The World Economic Forum experienced a major blunder during a recent symposium when the institution’s banner slipped, revealing the tentacled HYDRA logo. The blooper occurred during a symposium in which a small number of elite intellectuals discussed enslaving and depopulating the earth as a humane method for reducing climate change.
Attendees initially felt shock after seeing the six-tentacled HYDRA logo floating above the heads of Professor Klaus Schwab and his associates. But after seeing Schwab continue to drone on about the imperative to control world governments as a means to achieve the group’s agenda, the attendees realized the unnerving logo made perfect sense.
“I gotta say, that tentacled skull glaring down at me from the HYDRA logo really matches the words coming out of that Shwab fella’s mouth,” said one forum attendee, “Including the time he laughed maniacally about how many young people in the US think communism works.”
At publishing time, witnesses reported seeing Klaus Shwab’s human skin mask slip off to reveal a red skull.
Satan held a press conference today responding to the big loss of Roe v. Wade. He’s doing his best to keep his chin up.
Babylon Bee
https://www.thefirearmblog.com/blog/wp-content/uploads/2022/06/Cover-photo-180×180.png
If you have been reading some of my articles this past year, you must have noticed I have been using a Chronos 1.4 slow-motion camera. I have been looking up different ways to use my slow-motion camera in the context of studying firearms. I have helped to film weapon malfunctions that happen too fast for […]
The post DIY Schlieren Imaging of Bullets In Slow Motion appeared first on The Firearm Blog.
The Firearm Blog