function findDupes(arr) { for (let i = 0; i < arr.length; i++){ if (hash[arr[i]] === "true"){ dupes.push(arr[i]); } hash[arr[i]] = "true" ; } console.log(dupes); } let arr = [1, 5, 6, 6, 6, 5 ,6 ,7 ,3, 2, 1, 3]; let dupes = []; let hash = {}; findDupes(arr);
iOS Deprecated API Usage Warning Ionic using UIWebView
Apple will no longer support web apps that use UIWebView. The apps and libraries need to be migrated to use WkWebView.
The latest Ionic already uses WkWebView, but several Cordova plugins still rely on UIWebView which is a problem.
https://ionicframework.com/docs/v3/wkwebview/
If you’re using Ionic you need to upgrade to iOS Cordova 5
cordova platform remove ios cordova platform add ios@5.0.0
Also you might need to remove additional plugins that use UIWebView such as inappbrowser.
cordova plugin rm cordova-plugin-inappbrowser
More information about the breaking changes can be found here:
https://cordova.apache.org/news/2018/08/01/future-cordova-ios-webview.html
CORS error when reading remote .json file
The easy fix to allow your Web App to read remote json files from the server is to create the .htaccess file.
Create an `.htaccess` file and place it in the directory of the json files.
<Files "*.json"> Header set Access-Control-Allow-Origin "*" </Files>
Simply reload your app and it should work! good luck!
Raspberry PI used to hack NASA Secrets
NASA’s Jet Propulsion Laboratory (JPL) suffers from multiple cybersecurity weaknesses despite the advances it has achieved in space technology, according to the agency’s Office of Inspector General (PDF). Investigators looked into the research center’s network security controls after an April 2018 security breach, wherein a Raspberry Pi that was not authorized to be linked to the JPL network was targeted by hackers. The attackers were able to steal 500 megabytes of data from one of its major mission systems, and they also used that chance to find a gateway that allowed them to go deeper into JPL’s network.
Probably happens all the time.
What Happened at The WWDC19 Keynote Presentation
Who has time to watch the entire thing? Here’s a good summary:
How to turn off System Integrity Protection in macOS
How to turn off System Integrity Protection in macOS
1. Restart your mac
2. Hold down Command-R to reboot into Recovery Mode
3. Click Utilities
4. In Terminal enter `csrutil disable`
5. Restart
All The Things Game of Thrones Left Hanging in the Air
A few of my favorites:
Where did the Dothraki go?
Unclear. There’s a clear shot of some Dothraki just chilling by the docks in King’s Landing while Jon makes his sad walk to his boat, but while there’s some clear information about why the Unsullied didn’t riot, kill Jon Snow, and take the city themselves, the same courtesy isn’t given the Dothraki, who were apparently pretty chill about their queen being murdered.
Given that they only came to Westeros to serve Dany and help her kill the men in metal suits and break their stone houses, it’s not clear what they have to do now, especially with their Khaleesi dead. Still, for a Dothraki fighter, the whole Westeros trip was probably a pretty successful vacation, given those goals.
What about the Unsullied?
While Tyrion does offer them land in the Reach and the chance to become a house of Westeros, we see Grey Worm captaining a ship of Unsullied later in the episode, alongside a fleet of similarly black-sailed ships. It’s not entirely clear whether the entire band of Unsullied is joining Grey Worm as he sails to Naath, presumably to liberate Missandei’s people. But it does seem likely that they’re going collectively.
It seems that with or without Daenerys to lead them, the Unsullied will continue to fight to liberate people — a fitting ending for the freed slaves.
Why does the North just get to stay independent?
It’s a little strange that Sansa casually breaks the North away from the rest of the Seven (now Six) Kingdoms in accordance with the North’s well-established independent streak, and the lords of the Vale, the Riverlands, Casterly Rock, Storm’s End, the Reach, and Dorne don’t have the faintest word to say about their own status.
Honestly, there’s no real reason why the North should get its independence — especially since, say, Dorne is a far more independent kingdom, which joined the Seven Kingdoms two centuries after Aegon conquered the others. Dorne has historically been far more independently minded than the North, even though the North’s rebellion against the Iron Throne got a lot more air time on the show.
What’s Daario up to?
Daario Naharis was part of the Mereen subplot on the show. He eventually led the Second Sons, a mercenary company, and was one of Daenerys’ paramours, as well as part of her inner circle when she led the city. But when Daenerys leaves for Westeros at the end of the sixth season, she leaves Daario behind in Meereen alongside the Second Sons, and we haven’t seen him since.
Given his importance to Daenerys and the large military force he commands, it’s possible that the show could have brought him back for the war against Cersei, but it seems like Daario is still stuck in Mereen.
A Retro Adventure Game Creator for Your Favorite Handheld Video Game System
John Gruber via Daring Fireball:
GB Studio is “A free and easy to use retro adventure game creator for your favourite handheld video game system”, by which they mean, but don’t want to name specifically, Nintendo’s GameBoy.
What a fun idea from developer Chris Maltby. You can output ROMs for emulators, play them on actual GameBoy hardware with a flash cartridge, or even export them for the web (which will even work on phones). It’s a remarkably polished IDE.
Get it here.