https://media.notthebee.com/articles/62b7022d5e47b62b7022d5e47c.jpg
FLAMETHROWER LEVEL 100 š„
Not the Bee
Just another WordPress site
https://media.notthebee.com/articles/62b7022d5e47b62b7022d5e47c.jpg
FLAMETHROWER LEVEL 100 š„
Not the Bee
https://theawesomer.com/photos/2022/06/double_half_wheel_bike_t.jpg
If you split a wheel in half, you shouldnāt still be able to ride on it, right? Well, watch this video from The Q, in which he cut two bike wheels and tires down the middle, connected them with a long chain and positioned them so one half is always touching the ground. Miraculously, the bike rides just fine.
The Awesomer
Are they really tricks or simply basic techniques combined to create a solution. Before writing these mechanics for using native MySQL to create a compound JSON object, let me point out that the easiest way to get one is to use the MySQL Node.js library, as shown recently in my āIs SQL Programmingā blog post.
Moving data from a relational model output to a JSON structure isnāt as simple as a delimited list of columns in a SQL query. Letās look at it in stages based on the MySQL Server 12.18.2 Functions that create JSON values.
Hereās how you return single row as a JSON object, which is quite straightforward:
SELECT JSON_OBJECT('first_name',c.first_name,'last_name',c.last_name) AS json_result
FROM contact c
WHERE first_name = 'Harry'
AND last_name = 'Potter';
It returns:
+------------------------------------------------+
| json_result |
+------------------------------------------------+
| {"last_name": "Potter", "first_name": "Harry"} |
+------------------------------------------------+
1 row in set (0.00 sec)
With a GROUP_CONCAT function, letās capture a JSON array of all three Potter family members:
SELECT CONCAT('['
, GROUP_CONCAT(
JSON_OBJECT('first_name',first_name
,'last_name',last_name ) SEPARATOR ',')
,']') AS json_result
FROM contact c
WHERE c.last_name = 'Potter';
It returns an array of JSON objects:
+-----------------------------------------------------------------------------------------------------------------------------------------------+
| [{"last_name": "Potter", "first_name": "Harry"},{"last_name": "Potter", "first_name": "Ginny"},{"last_name": "Potter", "first_name": "Lily"}] |
+-----------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
Next, letās put a 1:many relationship between the member and contact table into a JSON structure with a single account number and an array of contact. It requires a second call to the JSON_OBJECT function and the addition of a GROUP BY clause in the query.
SELECT JSON_OBJECT(
'account_number', account_number
,'contact', CONCAT('['
, GROUP_CONCAT(
JSON_OBJECT('first_name',first_name
,'last_name',last_name ) SEPARATOR ',')
,']')
) AS json_result
FROM member m INNER JOIN contact c
ON m.member_id = c.member_id
WHERE c.last_name = 'Potter'
GROUP BY m.account_number;
It returns the following string with an annoying set of backslashes. It also inverts the column order, which appears unavoidable but it shouldnāt matter because the order of name-value pairs in JSON is immaterial.
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {"contact": "[{\"last_name\": \"Potter\", \"first_name\": \"Harry\"},{\"last_name\": \"Potter\", \"first_name\": \"Ginny\"},{\"last_name\": \"Potter\", \"first_name\": \"Lily\"}]", "account_number": "US00011"} |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
The following quick little Python code cleans up the JSON string by removing the backslashes and extraneous quotes around the array of contacts.
# Import the library.
import mysql.connector
from mysql.connector import errorcode
try:
# Open connection.
cnx = mysql.connector.connect(user='student', password='student',
host='127.0.0.1',
database='studentdb')
# Create cursor.
cursor = cnx.cursor()
# Set the query statement.
query = ("SELECT JSON_OBJECT( "
"'account_number', m.account_number "
",'contact', CONCAT('[' "
" , GROUP_CONCAT( "
" JSON_OBJECT('first_name', c.first_name "
" ,'last_name', c.last_name ) SEPARATOR ',') "
" ,']')) AS json_result "
"FROM contact c INNER JOIN member m "
"ON c.member_id = m.member_id "
"WHERE c.last_name = %s "
"GROUP BY account_number")
# Execute cursor.
cursor.execute(query,["Potter"])
# Display the column returned by the query stripped of backslashes and
# extraneous quotes.
for (row) in cursor:
for column in range(len(row)):
print(row[column].replace("\\","").replace("\"[","[").replace("]\"","]"))
# Close cursor.
cursor.close()
# ------------------------------------------------------------
# Handle exception and close connection.
except mysql.connector.Error as e:
if e.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif e.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print("Error code:", e.errno) # error number
print("SQLSTATE value:", e.sqlstate) # SQLSTATE value
print("Error message:", e.msg) # error message
# Close the connection when the try block completes.
else:
cnx.close()
It returns:
{"contact": [{"last_name": "Potter", "first_name": "Harry"},{"last_name": "Potter", "first_name": "Ginny"},{"last_name": "Potter", "first_name": "Lily"}], "account_number": "US00011"}
I hope this helps exhibit less well known MySQL syntax.
Planet MySQL
https://media.notthebee.com/articles/62b4823cf0b5362b4823cf0b54.jpg
However else your Thursday is going, you can be happy knowing that the Supreme Court just hand-delivered the country a magnificent win for the Second Amendment on a silver platter:
Not the Bee
https://www.louderwithcrowder.com/media-library/image.png?id=30017091&width=980
Kyle Rittenhouse, our favorite rapscallion, surveyed the land and thought about how next to trigger the left and the media (but I repeat myself). They are still upset he was found not guilty of first-degree murder by acting in self-defense against a pedophile. If he comments on gas prices, they can’t calm down. But this new venture? Young Kyle is getting into the video game industry. It’s a shooting game. A turkey shooting game. And someone wrote the words "fake news" on the side of the turkeys.
You hunt fake news turkeys. Kyle Rittenhouse developed a video game that allows you to hunt fake news turkeys as Kyle Rittenhouse.
Kyle Rittenhouseās Turkey Shoot OFFICIAL GAME
youtu.be
"The media is nothing but a bunch of turkeys with nothing better to do than push their lying agenda and destroy innocent people’s lives. […] Help me fund the lawsuits to stop these fake news turkeys."
You can preorder at RittenhouseGame.com. It’s to raise money for his Media Accountability Project so the defamation lawsuit can finally begin.
Kyle is working with Mint Studios. CEO Mint Chip — I’m trusting the Washington Examiner that’s his real name — felt the need step in after he saw what the media did to Rittenhouse. "Before the trial, you couldnāt even mention his name in a positive manner on social media without getting banned. The truth literally got you suspended. We fight for the truth."
Unfortunately, it does not look like the turkeys are named after our favorite fake news personalities. No Gobbles Stelter or Whoopi Goldfowl. Also, due to Kyle’s young age, he wouldn’t know to recreate the WKRP Turkey Drop. Only, where you need to stop the White House from bombarding a MAGA rally with Iive turkeys.
Kyle Rittenhouse is hunting fake news in a video game. The kids got some stones. I’ll give him that.
The Louder with Crowder Dot Com Website is on Instagram now! Follow us at @lwcnewswire and tell a friend!
Kyle Rittenhouse’s Rifle Gets Shredded: A Tribute | Louder With Crowder
youtu.be
Louder With Crowder
https://theawesomer.com/photos/2022/06/the_minions_the_office_t.jpg
In a way, the staff on The Office are kind of like the Minions from Despicable Me. They each have a quirky personality, and they all work for an annoying boss played by Steve Carrell. To celebrate the release of the new movie Minions: Rise of Gru, Illumination Entertainment released this special remake of The Officeās opening credits.
The Awesomer
https://s3files.core77.com/blog/images/1293113_81_116067_fqwJmYsHR.jpg
There’s a thrilling scene in one of the Captain America movies where a heavily-armored SUV driven by Nick Fury comes under attack. The vehicle withstands an incredible amount of damage.
There’s a terrifying scene from last year, where a failed heist in South Africa yielded real-life footage of an armored 70 Series Toyota Land Cruiser coming under fire. It, too, withstood an incredible amount of damage, though not the Marvel-movie level.
Just how much punishment could a real-world armored SUV take? Canadian firm Inkas Armored Vehicle Manufacturing should know, as they specialize in the design and production of armored vehicles for embassies, paramilitary groups, law enforcement agencies, executive protection companies, security companies and civilians.
This month Inkas released footage of the insane testing done to certify one of their modified Land Cruiser 300s. To design effective ballistic and blast protection, this is what their test mules are subjected toāa grenade on the roof, a grenade beneath the car, land mines, 15kg of dynamite, nearly 800 rounds fired by assault rifles:
"In order to obtain the certification, the armored Land Cruiser 300 endured extensive ballistic testing, which specifically targeted the potential points of failure where the vehicle would be most susceptible to penetration during an attack. The INKAS Armored Land Cruiser successfully proved its reliability in the field ā withstanding over 780 rounds of ammunition from various calibre firearms, 6 roof-level hand grenades (DM51), 4 underbody hand grenades (DM51), 2 land mines (DM31) as well as a 15kg TNT (equivalent) explosion from a 2 meter distance."
Core77
https://i.kinja-img.com/gawker-media/image/upload/c_fill,f_auto,fl_progressive,g_center,h_675,pg_1,q_80,w_1200/a92238ead9a658e78843c448b18f84eb.jpg
With Thor: Love and Thunder just two weeks away, you might have a strong desire to stop watching new footage. You’re going to see the film. Maybe you already have tickets. Do you really want to see more clips that could spoil the action, jokes, and story writer-director Taika Waititi has in store?
For some of us, the answer is “No.” For others though, the answer is “Oh hell yes, give me everything.” This post is for those people. A brand new mini-trailer has just dropped for the fourth Thor film, starring Chris Hemsworth, Natalie Portman, Tessa Thompson, and Christian Bale, and it reveals that Love and Thunder shares some important DNA with the previous Thor film, Ragnarok. Take a look.
You might remember in Ragnarok, Thor puts together “The Revengers,” a team he hopes can band together to defeat his sister, Hela. It was Thor, Hulk, Valkyrie, and Loki, with Korg and his friends joining up soon after. Well, in Love and Thunder, we now know that he’s building a new team. Korg and Valkyrie remain but now there’s also Jane Foster as the Mighty Thor, the Guardians of the Galaxy, and some mythical goats.
Knowing Waititi though, you get the sense this is a bit of a fake-out. Would he really go back and do the same type of thing two times in a row? Thor might, which is probably the driving force here, but Waititi will almost certainly subvert it in some way. We’re anxious to find out if we’re right.
This clip also makes us wonder just how much are the Guardians of the Galaxy in this film? They’re at the beginning, we’re guessing, because that’s the last time we saw Thor, but do they come back for the final act to face Gorr? Seems plausible. In fact, and I’m just riffing here, but one would guess if Thor: Love and Thunder has any credit scenes, the journey of the Guardians is likely to be a focus. Maybe even a Gamora or Adam Warlock tease?
G/O Media may get a commission
Oh, and yes, that is a badass Jean Claude Van-Damme homage there with Thor doing the splits. It fits in perfectly with the bright, ‘80s vibe Thor: Love and Thunder is going for. It’s out July 8.
Want more io9 news? Check out when to expect the latest Marvel and Star Wars releases, what’s next for the DC Universe on film and TV, and everything you need to know about House of the Dragon and Lord of the Rings: The Rings of Power.
Gizmodo
https://i.kinja-img.com/gawker-media/image/upload/c_fill,f_auto,fl_progressive,g_center,h_675,pg_1,q_80,w_1200/01c099a19c9db4043a65d220b17a1679.jpg
G Suite (formerly Google Workspace) has shut down its free plans—you can no longer pay for a domain name and use Google’s business email for free. This move isn’t really going to bother big organizations much, as they’re all on paid tiers already, but small business owners or individuals using G Suite will be forced to pay or look for free alternatives.
For most people, the smoothest transition will be to a paid G Suite account. You won’t have to migrate your data anywhere as long as you can spend a minimum of $6 per user per month. For this price, you can use 30GB of cloud storage, Gmail with your own domain, and have video meetings with up to 100 participants. If nothing else, you can consider paying for G Suite as a stopgap measure until you figure out a better alternative.
Microsoft’s suite of business apps is a direct replacement for G Suite. Its plans start at $6 per user per month, but you’ll have to spend about twice that much if you want both email and Office apps on desktop. Microsoft offers 50GB of space per inbox and 1TB of OneDrive storage, which is more than G Suite’s 30GB. Having said that, Microsoft 365 for Business is still a fairly pricey offering overall. Google Docs, Sheets, and other G Suite apps are included for free in Google’s plan, which makes Microsoft 365 look a lot more expensive.
G/O Media may get a commission
Zoho Workplace offers most of G Suite’s features at a much lower price. It lets you use your own domain for emails with 5GB of space for free with no advertising. You can set up an organization on Zoho and invite up to five users to this organization at no cost. There’s a 25MB limit on attachments, but the pricing makes that feel bearable.
If you’re looking for a free alternative to G Suite, it doesn’t get much better than this. You can visit the Zoho Mail pricing page and scroll down to the Forever Free Plan. If you add more than five users, Zoho Mail’s plans start at $1 per user per month (paid annually). The 50GB inbox plan costs $4 per user per month, so it’s cheaper than G Suite and Microsoft 365 for Business.
For those who want a complete office suite to go with their business email, Zoho Workplace is a decent alternative. It has email, cloud storage, video meetings, a Slack alternative, and office apps, at a starting price of $3 per user per month.
If your G Suite organization consists of one person, you may consider using a custom domain with iCloud’s email service. The iCloud+ plan costs $1 per month for up to 50GB of cloud storage, and it allows you to use a custom domain for your emails.
iCloud+ is not targeted at businesses, so you shouldn’t use this service to manage multiple users in an organization. For individuals, you have access to both iCloud email, as well as Apple’s already-free office apps, such as Pages, Numbers, and Keynote. Document collaboration works well in Apple’s office apps, too.
Having said that, it’s best to note the quirks of iCloud+. You ideally don’t want to use this if you have non-Apple devices in your workflow because Apple’s support for Windows and Android devices is flaky at best. Also, iCloud’s email is serviceable, but we’ve heard several complaints about emails not showing up in the inbox and an overly aggressive spam filter.
ProtonMail offers end-to-end encryption on your emails, which means the contents of your emails cannot be read by the email service provider. If you’re looking for a more private alternative to G Suite, ProtonMail’s free tier could be worth trying out.
Its paid plans start at about $4 per month, which gives you 15GB of space, support for your own domain for emails, and up to 10 email addresses. ProtonMail doesn’t have an office suite built in, but you can use its cloud storage service called Proton Drive if you opt for the most expensive plan at about $10 per month.
You should be aware that even if you use an end-to-end encrypted email service, the encryption is valid only if you send email to others who use a similar level of protection. If you email a Gmail user from ProtonMail, the encryption falters because Gmail doesn’t encrypt emails on its service.
If you are looking for a Google Docs alternative with better security, look no further than CryptPad, an end-to-end encrypted collaborative office suite. The free tier lets you use up to 1GB of storage space and it has alternatives to Google Docs and Sheets, along with a few other tools. As long as you don’t plan to store large files here, the free tier should be good enough to store tons of documents. If you’re ready to start paying, plans start at about $5 per month for 5GB of storage.
There are several decent options for those who want an email service that isn’t owned by Google. Here’s a quick list of the best options:
Lifehacker
https://4.img-dpreview.com/files/p/E~C0x0S1180x885T1200x900~articles/8028608882/nasa-planets-june-2022-lead-image.jpeg
![]() |
The rest of June is looking great for stargazers. On the morning of June 23, the gathering of four planets, visible with the naked eye, will be joined by the crescent moon. The four planets, Venus, Mars, Jupiter and Saturn, are becoming a bit more spread out but should stay visible for most observers until September.
If you observe closer to sunrise, you will even be able to see a fifth planet, Mercury, join in on the celestial fun. According to Sky & Telescope, ‘All five bright planets fan out in order of their distance from the Sun across the dawn sky now through early July. One of the prettiest mornings to view them will be June 24th, when a striking crescent Moon joins the crew. You can start earlier ā 60 to 90 minutes before sunrise ā to spot Mars, Jupiter and Saturn. To add Venus and Mercury, which nestle low in the solar glow, you’ll need to observe closer to sunrise. Use this sunrise calculator to plan your outing. As the Moon passes through, we’ll see successive conjunctions or appulses. The Moon appears near Jupiter on June 21st; Mars on June 22nd, Venus on June 26th, and Mercury on June 27th.’
Even more amazing than being able to see all five of these bright planets in the sky simultaneously, they’ll be in the correct order outward from the Sun, starting with Mercury and ending with Saturn. The event last occurred in December 2004, but it was only visible in certain tropical areas. For US sky watchers, you must go back to July 1957 to find a similar event. If you miss it this time, you’ll be waiting until March 2041.
Allyson Bieryla, manager of Science Center Astronomy Lab and Telescope at Harvard University, told the Boston Globe that Venus will appear the brightest, but all the planets will be visible to the naked eye. ‘These objects are much brighter than stars, so it should be fairly obvious even to a novice observer,’ Bieryla said.
‘If you have a pair of binoculars or a telescope, point them at the planets and moon,’ Bieryla wrote. ‘With even a small telescope, or binoculars on a tripod, you can see Jupiter’s largest 4 moons (called the Galilean moons) and Saturn’s rings. If you are in a dark enough location with a small telescope, you might also be able to see the atmospheric bands in Jupiter’s atmosphere!’
![]() |
Image credit: NASA/JPL-Caltech |
The display will be visible until early July, so unless you experience an unbelievable string of bad weather, you should be able to view the amazing display. Light pollution is a potential, although likely minor issue, so if you need help finding a dark sky, visit Dark Site Finder. However, Bieryla adds, ‘As with all observing, the best conditions are clear, dark skies but luckily these are all bright, naked-eye objects so you should be able to see the lineup even from the city!’
If you’re looking for optimal photo conditions, you want to photograph just before dawn. ‘You should be able to spot Saturn, Jupiter, Mars, and even Venus for several more weeks in a similar lineup,’ Bieryla added. ‘Mercury is only visible for brief periods of time and only fairly low in the horizon because of its orbit, but if you miss all 5 planets, I encourage you to look up in the early morning anytime over the next several weeks to see how many planets you can spot. The moon will only appear in this lineup for the next few days, and then not again until next month.’ For more photo tips, visit Sky & Telescope.
Articles: Digital Photography Review (dpreview.com)