Monthly Archives: March 2015

Fixing Slow App Launches on an iPhone 5 with IOS 8

Recently, my iPhone 5 started bogging down in an epic way–it would take forever to launch apps, often stalling out entirely and requiring multiple tries to even get apps to launch. I tried restarting, shutting down other apps, etc. and nothing worked.

I started seriously wondering whether this was an evil plan that Apple had slipped into later versions of iOS 8 to punish folks who’d declined to drop a couple hundred bucks to upgrade to an iPhone 6.

As it turns out, the culprit was a newish setting under Settings > General called “Background App Refresh”. The purpose of this setting is to allow apps to pull down new content when you’re on a wi-fi network, and is no doubt a lovely thing on some level. But, between Dropbox, Chrome, FaceBook, Instagram, Mailbox, Messenger, and a dozen other apps, it was murdering my phone.

I turned it off, and my phone was instantly back to normal. You can control this setting on an individual app level, so perhaps later I’ll experiment with turning off various apps to figure out the biggest culprits. But for now, I’m just happy to have a reasonably working phone again.

Using Bootstrap Modal Dialogs with ASP.Net and Master Pages

This is a short blog about solving a nasty problem with using Bootstrap’s Modal Dialogs with ASP.NET and Master Pages.

Most examples for using Bootstrap’s very robust dialog support go something like this:

Page Code:

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link rel="stylesheet" 
  href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" />
<link rel="stylesheet" 
  href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" />
<script type="text/javascript" src="/includes/js/jquery-min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js">
</script>
</head>

<body>
    <form id="form1" runat="server">
        <asp:Button ID="btnShowModal" runat="server" 
            Text="Show Modal" 
            CssClass="btn btn-primary btn-info" 
            data-target="#pnlModal"
            data-toggle="modal" 
            OnClientClick="javascript:return false;" />
        <asp:Panel ID="pnlModal" runat="server" role="dialog" 
           CssClass="modal fade">
            <div class="modal-dialog">
                <div class="modal-content" runat="server">
                    <div class="modal-header">
                        <button type="button" class="close" 
                            data-dismiss="modal">
                            <span aria-hidden="true">&times;</span>
                            <span class="sr-only">Close</span>
                        </button>
                        <h4 class="modal-title">
                          Bootstrap Modal Dialog in ASP.NET</h4>
                    </div>
                    <div class="modal-body">
                        <p>
                            This is the body text
                        </p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" 
                         class="btn btn-default" 
                        data-dismiss="modal">Close</button>
                    </div>
                </div>
            </div>
        </asp:Panel>
    </form>
</body>
</html>

Pushing the button shows the dialog, and everything’s ducky. But try the same thing in an ASP.Net app with a master page and nothing happens.

Why? The answer comes down to the “data-target” attribute of the invoking button, which is meant to tell Bootstrap the panel to activate:

<asp:Button ID="btnShowModal" runat="server" Text="Show Modal"
 CssClass="btn btn-primary btn-info" data-target="#pnlModal"
 data-toggle="modal" OnClientClick="javascript:return false;" />

The problem is that in an application with master pages, the actual rendered name of the pnlModal div will likely become something like “ctl00_ContentPlaceHolder1_pnlModal” and Bootstrap won’t be able to associate it with the necessary JavaScript to show the dialog so the button does nothing.

To solve this, you just need to set the data-target to pnlModal’s clientID (the rendered name). Since data-target isn’t a standard, supported HTML attribute, you can use the Attributes.Add method to set it via the Page_Load event of your code-behind as follows:

Code-behind Code (VB)

Protected Sub Page_Load(sender As Object, e As EventArgs) 
   Handles Me.Load
  If Not Page.IsPostBack Then
    Me.btnShowModal.Attributes.Add("data-target", "#" & pnlModal.ClientID)
  End If
End Sub

…and you’re good to go!


Credit: This post builds upon KHComputers’ excellent contribution about Bootstrap Modal Dialogs in ASP.NET at VBForums

You Can’t Say that on Google Shopping (ctd.)

As per my previous post, I’ve been devoting an inordinate amount of time to trying get Atomic Avenue‘s vast list of comic titles to be accepted for Google’s shopping listings. The chief impediment to this has been Google’s automated content filters, which ban outright any product containing certain words.

In the hopes of (a) helping anyone else who’s treading down this path and (b) embarrassing Google into revising, or at least not placing so much blind faith in their automated filters, I’m presenting this as an ongoing list of words that will apparently get your item banned from Google Shopping.

Note: The speculation as to cause is my own; Google will not disclose the reasons, although attempting to place individual keyword ads gives different error messages as to why they were rejected which offers some help in narrowing in the probably causes.

Animax (for us, a ThunderCats clone comic series, or the name of a Japanese animation company; for Google, apparently restricted because it’s the name of a pet medication).

Archer [& Armstrong] – Best guess: they don’t have an issue with the inoffensive Valiant title, but that the word “Archer” sounds like a weapon to them.

Antabuse  For us, an indie comic featuring, well, ants. For Google, apparently restricted as a medicine name.

Belladonna As in Brian Pulido’s Belladonna. Also the name of a deadly poison, which best guess is causing it to be banned as a medicine name.

Black – Unbelievable. For us, this bans innumerable comics, including Black Widow , Black Ops, The Black Knight, and even Batman: Blackgate. What Google has against the word “Black” is anyone’s guess.

Muse As in 10th Muse or any number of Liefeld-esque spin-offs. Apparently also the name of an ED treatment.

Pandora – For us, another bad-ass female with her own comic book. Not banned because it’s the name of a streaming music service, apparently, but because it’s the street name of some sort of herbal mixture that you can smoke as a “legal high” in Britain under the name, “Pandora’s Box”

Rage – As in Beneath the Valley of the Rage, or the onetime Avengers character.

Revenge – As in Revenge of the Sinister Six or Dracula’s Revenge

Sentinel – As in Captain America: Sentinel of Liberty. Best guess: because it’s also the name of a pet anti-tick collar.

Spawn (and any variants, including Curse of the Spawn). I’m lost on this one.

Sword(s) – Interestingly, there seems to be a strange line drawn here. Titles involving “Sword” are banned utterly; Titles with “Swords” are disapproved as well, but occasionally offer the option of requesting a manual review.

Annals of Bad Customer Relations: Comcast Edition

Try this one on for size: Slip a 3-year (!) contract into a single sentence in the middle of a business internet service install agreement. When customer tries to drop that service after 2-1/2 years, threaten them with massive penalties for cancelling early. Offer to waive those fees if the customer extends the service they’ve had for several years at the customer’s second location, by signing a new 3-year contract there.

But it turns out there’s one the final “gotcha” — the service extension has to be from the same business division (“Comcast Business Internet”) — not just the same company (Comcast). Oh, and did we mention that the business internet group’s starter plans cost twice as much money for a third of the speed as the plans offered by their residential division.

After weeks spent talking with their many tiers of customer support, including liaising with their special group set up by the “VP of Customer Satisfaction”, Comcast was apparently unable to work a deal by which a longtime customer of their business division–trying to become a longtime customer of their residential division–didn’t get punished in the process.

Got the bill today: $964.43. Right below:

“Thank you for being a valued Comcast customer!”

Selling Revolution? Not on Google!

I’ve spent large portions of the past few weeks working with Google’s product feeds–the big data files which provide them with the various items that appear under Google Shopping.

(Fun Fact: Everything you see under both Google Shopping and Bing’s Product listings are paid ads–neither service will show items which don’t directly kick back money for the click to the search company in question. This is why the shopping results seem much more limited in their results than the corresponding web searches).

A less fun fact is that Google has extensive algorithms for blocking content that “violates their system policies”. Since I’ve been attempting to upload simple lists of all the comics for sale on Atomic Avenue, it’s been interesting to say the least to discover what title names qualify instantly for blocking (in most cases, apparently immune to any sort of human review–not that we haven’t spent numerous hours begging for just that. The repeated answer is always that we have no choice but to remove the “offensive” material”).

Google refuses to explicitly confirm their algorithms for filtering, but after hand-reconciling the banned items from the more than 1.6 million comics we are attempting to list, I can say with some confidence that these are some of the low-lights of their often ludicrously broad–I’d go so far as to say “utterly defective”) algorithm:

  • Ridiculously, Google treats as offensive any comic title containing the word “Black“. (E.g. “The Black Knight“, “Black Ops“, “Black Panther“, “Black Widow“, “Batman: Blackgate“, etc.)
  • Same story for a variety of miscellaneous “angry” nouns: “Rage“, “Malice“, etc. Several issues of The Avengers, for instance, have been rejected since they include appearances by a character named “Rage“.
  • Sword and sorcery titles may be huge, but they’ll apparently have to get by on the sorcery alone. Any title containing the word “Sword” (e.g. “Savage Sword of Conan“), “Dagger” (e.g. “Cloak & Dagger“) is denied. Same thing goes with “Gun” and “Rifle“–even “Mace” (Sorry Mace Windu!).
  • Google seems to have a fear of books or products which mention armed combat. “Revolution” is consistently banned, as is “Uprising“. (Goodbye Marvel crossover events, as well as science-fiction titles). “Frontline Combat“, the classic E.C. war series also can’t be posted.
  • Muse” and “Pandora“? They’re not just bitchin’ female comic characters–apparently they’re also now the names of prescription meds and are automatically banned from posting (although apparently you can file an appeal to have these reconsidered).
  • Mental issues seem to be a touchy subject: Bedlam is banned, as is all mention of the Watchmen character Rorshach.
  • And then there are the weird, and strangely ominous ones. for instance, “Sentinel” is an automatic disapproval, whether it refers to the Marvel robots, the English sci-fi mag, or Captain America: Sentinel of Liberty. All banned.

It’s too early to say whether Microsoft (Bing/Yahoo) shares this similar–and rather odd, to say the least–set of exclusionary rules. I’ll update the post once I know how I do going through their catalog process.

As a postscript, Google has recently floated the idea of changing search rankings of news sites based on their deemed “truthfulness”.

It’s worth noting that this proposal for filtering the world’s news sites comes from the same folks who are currently banning the word “Black” from product names.