#Roy–Floyd algorithm
Explore tagged Tumblr posts
blogsarmistha-blog · 8 years ago
Text
C# - Floyd–Warshall Algorithm
C# – Floyd–Warshall Algorithm
In this article, we will learn C# implementation of Floyd–Warshall Algorithm for determining the shortest paths in a weighted graph with positive or negative edge weights
  using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace FloydWarshallAlgorithm { class FloydWarshallAlgo { public const int cst = 9999; private static void…
View On WordPress
0 notes
bynkii · 7 years ago
Text
Apple Music
What it could be
I’m not a huge fan of “what they should have said at the keynote” things because often, they’re full of shit. I’ve done one or so in my life. Which was about Steve Jobs making everyone at a Macworld Keynote actually kiss his physical ass. Because that shit is funny.
But listening to the Apple Music part of the WWDC, it was just kind of…sterile. Like Jimmy Iovine and Drake are talking about this in the most flat way possible, and I’m not sure anyone saw the potential here.
But I did, because I’m old enough to remember when radio was different. When DJs actually decided what got played, and would play random shit like the Clash or Public Enemy. So I think about how it could have gone...
Music
Music…music is humanity. Music is a part of everyone. We all think about music, we all care about music. We all have those songs. The songs that bring us to our feet, to our knees, or both. The songs that bring us to laughter to tears or both. Sometimes both at the same time. The songs that are a part of the best and worst moments of our lives, and got us through those moments, and everything in between.
Once upon a time, radio was central to that. I know now, it’s almost a joke, but for me, for folks my age, radio was how we discovered new music. Radio stations like Zeta4, WEDR, WSHE, and Super Q in Miami were how I took my first musical steps from the classical and folk my parents loved. Through them I discovered people I’d never heard of. Led Zeppelin. Kiss. The Clash. Prince. Bob Marley. Tito Puente. A little group called the “Miami Sound Machine” whose singer was a local girl, Gloria Estefan.
When I was…eleven I think, one of my dad’s co-workers took me to what was my first ever concert. It was P-Funk. The Hollywood Sportatorium was packed and we were, the nine of us, like the only honkies in the building. It blew my mind. I don’t mean in the way most people do, that mundane, shallow thing they talk about. I’m not talking about the new quinoa dish or yet another bottle of Pinot Grigio.
For hours, I stood there, unable to process what I was seeing, hearing and feeling. I was an eleven-year-old white boy who knew more about Beethoven and The Kingston Trio than anything else. I was not ready for George Clinton, Bootsy, and all the rest. I had no idea what the hell was going on, but it dug into me, it carved out a place, and it stayed. The next morning, I was doing the slow crawl through the FM stations and I hit WEDR, the only real “black” station in Miami, and they were playing the stuff my soul was screaming for.
WEDR, and its DJs taught me things. Like what funk was. What soul was. Not the calm, whitewashed things you saw on TV when they trotted out Ray Charles for yet another rendering of “Georgia on My Mind” or “Hit The Road, Jack”. But the deep dirty funk. It’s where I first heard Prince, Earth, Wind, and Fire, and so many other artists.
But here’s the thing: WEDR and the DJs were the only way I was going to hear that. My friends were all into either Zeppelin & Pink Floyd, or Disco. From them, I’d have never heard this stuff.
A couple years later, stations like Zeta4 and WVUM showed me things like the Sex Pistols, The Clash, Siouxsie and the Banshees, and others.
Radio, in that brief moment of my life before the ClearChannels of the world turned it all to…whatever it became, was how I learned the things I’d have never learned, where I found the things that would have otherwise existed just out of my reach. And that was in a city like Miami. Had I lived in some small town in say, North Dakota? Jesus.
The online revolution in music has both democratized and stratified music. It gives the kid in Arvilla, N.D. access to the same catalog as the kid in New York City, Chicago, or Miami. All you need is an even sort of fast internet connection and it’s all there waiting for you to find it.
But how? How do you find it?
We rely on algorithms from online services to help us pick the next song we listen to. We rely on algorithms to help us find the next song to buy. We hope our friends happen to have wider tastes that we do. (As much as that was limited when I was in high school and into my 20s, it’s even worse now. People in their late 40s get kind of boring about music.) But it gets harder and harder to have that “Aha” experience, where you hear something you’d never have looked for, that isn’t like anything else you own or normally listen to. Had it not been for Zeta-4's Sunday Morning reggae show, I’d still probably know nothing about it.
Algorithms are only as good as their source data and they suck, they suck so hard at thinking “yeah, this might be cool, lets find out.”
You need people who deeply love music. People who live and breathe it, all of it. Who understand why a playlist should go from Weird Al to The Time to Ozzy to Bauhaus to Taylor Swift. Who can look at “Hee-Haw” reruns and still be amazed at how wickedly good Glenn Campbell and Roy Clark played:
https://www.youtube.com/watch?v=v_kbgjsuCec
There’s no algorithm that does that, because it’s not based on anything quantifiable. It’s based on someone sending you a song out of the blue, and the first 4 measures blow you away so hard that you have to share it with everyone. It’s watching Saturday Night Live on January 26th, 1980 in a hotel room on a Disney World trip, being almost 13 years old, and seeing this collection of weirdos called “The B-52s” and 3 minutes later, an entire hotel is dancing on the balconies and if you don’t tell everyone you know about this, you will burst. (And years later, having your first ‘52s concert not include “Rock Lobster” because the balcony you’re standing and dancing on is bouncing so much that the venue, and the band, are terrified it will collapse if that song is played.)
You need people to do that, and that is what Apple Music is. Radio the way it briefly once was. A way for people who love music to share that love with the world. Who can listen to the first handful of notes to any song they know and tell you what song it is, who wrote it, what version you’re listening to, and probably have 6 versions of it. People who can tell you how not only did Rihanna sample Michael Jackson and “Wanna be Startin’ Something” for “Don’t Stop the Music”, but if you listen to “Get On the Floor” from “Off the Wall”, Michael Jackson sampled Michael Jackson for “Wanna Be Startin’ Something” and that it is entirely rational to have elebenty bootleg Zeppelin concert albums.
People who know that genre is just a tool to sell music, and that what really matters is the flow and the feeling. That 4/4 is not always just 4/4, and that one of Prince’s best solos was when he destroyed “While My Guitar Gently Weeps”.
Algorithms can’t do that. They can’t know that, they certainly can’t feel that. But people can, and that’s what Apple Music is: people who love music so much that they will burst if they don’t tell you ALL THE THINGS about ALL THE MUSIC. It’ll only take you a lifetime to learn it all but really…
1 note · View note
martechadvisor-blog · 8 years ago
Text
What the Instagram Bug Bite Tells CTOs and Why CMOs Can’t Ignore It
An MTA-exclusive analysis of the recent Instagram hack
Leonardo DiCaprio, Emma Watson, Rihanna, Taylor Swift, Neymar, Zinedine Zidane, and many more. Hang on. This isn’t some lineup announcement of a celebrity gig or red-carpet entries!
After Twitter’s days of disarray in July last year with the hacking of Jack Dorsey’s Twitter and Vine accounts along with other users, this time, the hack hurricane (a bug, actually) has hit the popular photo-sharing social network – Instagram. Initially, the incident was said to have affected only verified accounts, but later, reports surfaced that the bug has hit accounts of non-verified users as well.
What went wrong!?!
The bug caused an exposure of contact information and email addresses as it allowed the scraping of these Instagram accounts for hackers. A database by the name of Doxagram was established by the hackers that had the contact information of the affected accounts for sale at $10 per account. The database offered information on thousands of accounts and included the top-50 accounts in terms of followers. The only positive (if any) to this hack is that only information has been scraped and not user passwords.
Instagram has above 700 million active users and the hackers claim information on 6 million of them (including Doxagram). The hack first came into the spotlight with the account of Selena Gomez and has affected the accounts of celebrities likes Zac Efron, Emilia Clarke, Channing Tatum (his Twitter account was also hacked last year), Floyd Mayweather, Ronaldinho, David Beckham, Snoop Dogg, Beyonce, Ellie Goulding, Lady Gaga, Katy Perry, Harry Styles, Adele, Victoria Beckham, and Britney Spears. These names were tracked as purported contact information by RepKnight, a cybersecurity firm.
Subsequently, the database (with information on sale) threat was subsided to a certain extent when Instagram, its owner Facebook, and some other celebrities bought Doxagram domains till they exhausted.
The repercussions and a retrospective
This means that the mentioned celebrities and other users (high-profile) will need to change their email IDs or/and phone numbers. The threat is that by leveraging social engineering, hackers can get an access to their accounts. That was the case with Selena (highest-followed user on Instagram) whose profile was literally hijacked briefly with some distasteful photographs posted through it.
This entire episode sets two alarms. Firstly, an average, non-verified Instagram account is prone to hacking. And secondly, Instagram not being aware of the accounts that were affected. This was quite clear from a company blog post, in which, Mike Krieger, CTO and Co-founder, Instagram, stated, “We quickly fixed the bug, and have been working with law enforcement on the matter. Although we cannot determine which specific accounts may have been impacted, we believe it was a low percentage of Instagram accounts.”
In the post, Krieger added, “We encourage you to be vigilant about the security of your account, and exercise caution if you observe any suspicious activity such as unrecognized incoming calls, texts, or emails. Additionally, we’re encouraging you to report any unusual activity through our reporting tools. You can access those tools by tapping the ‘…’ menu from your profile, selecting ‘Report a Problem’ and then ‘Spam or Abuse’.”
A blast from the recent past
The account or data threat looms large and goes beyond just social sites. In February this year, web security and content delivery network, Cloudflare, fell prey to a malicious bug that engulfed many major websites that the company serves as their sensitive data and private sessions got exposed. It included tokens, cookies, and passwords that are key to authentication of users. The bug was named Cloudbleed (after the infamous Heartbleed from 2014). The bug was so devious that not just the websites, but also the mobile apps on the network of Cloudflare were endangered.
A graphical representation of how Heartbleed worked (most bugs still work in a similar manner):
Source: 2.bp.blogspot
What’s bugging marketers
For marketers, these bugs can at times cause irreparable damages by making customers move away from them. After all, security lapses are the worst form of CX. The threat of bugs is clearly not restricted to just software. An API infrastructure, or let’s say, any functional system can come at a bug’s radar. Why? Because, if it’s a system or infrastructure, 100% efficiency is an ideal, dream-state world. Simply put, bugs deviate a system from its main course or purpose.
A bug attack is not confined to ‘codes’ or ‘coding’. And another hard pill to swallow is that a bug can be identified only after it has affected a system. There’s no prognosis. That leaves marketers or organizations with an only choice – once identified, take corrective actions so that the bug doesn’t show up again.
The best way to ensure that a bug doesn’t recur is simple yet complex. Simple - just like life’s bugs, the way to avoid a recurrence is to find the fundamental cause of the bug. Complex – a system’s bugs involve syntaxes, codes, algorithms, and more such tech-heavy terminologies and explanations. But the idea is to have robust teams of developers and programmers. Where there is a system, there will be a bug. Often, when there’s a bug attack (or even an outage – recall Marketo?), it’s the CTOs who face the gun. But this is where marketers should work closely with CTOs and API teams. A ‘this-is-a-CTO job’ approach can, in the long run, lead to hampered revenues and ROIs.
Prepare for the best, ready for the worst
The social networks will grow, the number of active users will grow, and so will the customers of businesses with adept strategies. Just like the buck doesn’t really stop, bugs don’t either. There are bound to be bad days just like Twitter, Cloudflare, and Instagram have had. The best foot forward is to ensure that the decision makers of all prominent functions of businesses work in tandem. At the same time, be ready to fall at some stage. When that happens, it’s all about standing up again as soon as possible.
This article was first appeared on MarTech Advisor
0 notes