.NET (295) administrative (41) Ajax (42) AngularJS (2) ASP.NET (144) bicycle (2) books (180) browser (8) C# (133) cars (1) chess (28) CodePlex (10) Coma (8) database (47) deployment (3) Entity Framework (2) essay (111) flash/shockwave (2) flex (1) food (3) friend (2) game (20) idea (5) IIS (8) javascript (82) LInQ (2) Linux (6) management (4) manga (42) misc (671) mobile (1) movies (91) MsAccess (1) murder (2) music (64) mysql (1) news (99) permanent (1) personal (68) PHP (1) physics (2) picture (307) places (12) politics (13) programming (503) rant (120) religion (3) science (43) Sharepoint (3) software (58) space (1) T4 (2) technology (11) Test Driven Development (4) translation (2) VB (2) video (97) Visual Studio (44) web design (46) Windows API (8) Windows Forms (3) Windows Server (5) WPF/Silverlight (63) XML (11)

Tuesday, September 09, 2014

TV Series I've Been Watching - part 20

The autumn season for TV shows is beginning, so I am here again to discuss the ones that I have been watching lately.

  • The Legend of Korra - This third season was better than others, but we still have to contend with Korra's helplessness. Also I have this nagging feeling that her not being able to do anything and having to be saved by her friends repeatedly has less to do with what people can accomplish together and more with the fact that she is female and therefore must be perceived as in distress. And before you ask me when did I become a feminist, just read on and see what are the shows with female lead characters and what happens to them. The magnificent four villains also were ridiculously strong for people living in solitary confinement for years.
  • The Good Wife - Interesting new dynamic of the show. I am quite fascinated by how they achieve this dynamic equilibrium: giving people what they want, but always changing things one way or another, moving characters around, keeping things interesting. If nothing else, this is a brilliantly constructed TV show.
  • Homeland - Homeland will have a fourth season, which is to begin soon. They released a sort of recap of what happened so far, but I believe you should skip it as I think it contains spoilers for the upcoming season. Also it conveys nothing of the quality of the first three seasons. This is a good show, you should watch it, even if the lead female character is bipolar and prone to do crazy things in the name of love. See what I mean?
  • Gotham - A new superhero series will being shortly. Hurray! This time is about Gotham where every supervillain and superhero is young, at the beginning of their "careers". Why are you throwing an adolescent tantrum, Bruce? Because I'm Batman!
  • Ressurection - I've decided not to watch it anymore. It is a pale copy of the original.
  • Vikings - I love this show, however it is beginning to change. It started with eager actors doing a cool project, so they all gave their best and the focus was on the way of the Viking. But now, after a while, the actors are acting more like themselves and the focus of the story shifted towards feudal intrigue.
  • Suits - The fourth season just ended with Mike back at the law firm and the comic relief guy, Louis Litt, leaving the company. I thought the actor got tired of playing a ridiculous man that doesn't seem to do anything right, but the ending of the season goes a different direction.
  • Black Box - As expected, the show was cancelled.
  • Halt and Catch Fire - A lot of emotion, a lot of tension, a lot of drama. Of course it got renewed for the second season, even if it doesn't make a whole lot of sense.
  • Under the Dome - I kept watching and watching and watching until I realized this is the new Lost! Every episode something happens that is completely implausible and unrelated to anything in the previous episodes. I will not watch it anymore.
  • Crossbones - This is a well done show, with good acting and high production values. However it relates to pirates and not even the fun ones. Imagine watching a TV show about drug lords and instead of high powered automatic rifle fights you would see the accountants doing the job of inventorying the proceeds. Black Sails is like that and then they insert some artificial personal drama to spice it up.
  • The Honourable Woman - Described as "The daughter of an assassinated Zionist arms dealer seeks to legitimise the family business while righting the wrongs done to them in the past.", it is a strange little show. I started watching it, but then I stopped. It is heavy, well acted, good production values. I wasn't in the mood for it for a long time, though. The premise is nothing if not brave.
  • The Leftovers - I just couldn't watch it anymore. The entire show was about people feeling depressed and/or suicidal because they were not among the 2% of people who magically vanished. Depressing and pointless.
  • The Witches of East End - I guess it's like The Originals with witches instead of vampires. I keep watching it, though, even if I don't know why. Probably someone placed a spell on me.
  • Tyrant - Speaking of brave TV show premises, this is a show about an Arab-American, who left his birth country because his father was an ass - and the country's tyrannical ruler - who returns there after his father dies. I like the acting and the premise. What I don't like is the condescending viewpoint of the script: the smart educated moral good looking American comes and teaches his older brother how to rule the country based on American principles. But the ending of the first season implies that this is not what it is going to happen at all. Could it be that it will be the series to show Americans that all tyrants are manufactured, more or less, by circumstances? Check out this quote: "CIA guy: The US is not in the business of regime change. Al Fayed: Say that again with a straight face"
  • Taxi Brooklyn - A weird premise for a show that doesn't know what it wants to be: a comedy, a car thing or a police procedural. The idea is that a police detective (female and hot, but with daddy issues, of course) loses her right to drive. Instead, she coopts a French immigrant taxi driver to move her around. He serves as the comic relief most of the time, but also, probably, as the male reason why anything gets done. Decided not to watch it anymore for several reason: the premise, the scripting and the acting being at least three of them.
  • Extant - Female astronaut returns after a solo mission of more than nine months. And she is pregnant. Wonderful premise, however it has several things that are not going for the show: the main actress is Halle Berry, who I completely dislike. Then there is the electronic boy story arch (her husband and she have an artificial son that the husband created) which is either a good subject for another series or completely out of place here. And finally, the "corporate conspiracy" arch, where the guy from Helix is the bad guy. I don't know, imagine Gothica in space, with a little of AI sprinkled over for fun. Ugh!
  • The Bridge - Haven't watched any of the second season episodes, waiting for the wife to see it with me. I will wait for a long time more, I believe.
  • Tokyo Ghoul - I usually make separate blog posts with anime, but this one was nothing that deserves too much attention. Hybrid man and ghoul (something like a vampire that also likes to eat the flesh), the main character is a whinny boy who gets stepped on by just about everybody. In the end he is captured and tortured a lot, which makes him more aggressive and less whinny. But still it's nothing too interesting.
  • Ghost in the Shell - Arise - the modern reboot of GITS, it is not bad. Unfortunately there are only four OVA episodes, each one released months from the previous one. Still waiting for the fourth one. I like the show a lot, but then I am biased, since I love anything related to the Ghost in the Shell universe.
  • The Strain - Guillermo del Toro wrote a horror book with vampires and now he is creating the TV show based on the book. So far I like the series, although I've already read the book and a lot of the surprise is gone. It's brutal, with vampires that are neither sexy nor romantic, but just want to drink all your blood and answer unconditionally to their Master. The Master is even scarier. It is not brilliant, but certainly beats The Living Dead.
  • Blood Lad - Horribly stupid anime. This guy who is a prince in the magical world of demons accidentally meets a human girl who then gets killed. He pledges his support to help her ghost find a body again. Just boring.
  • Longmire - The second season is a lot darker, but for all the wrong reasons, if you ask me. The things I liked in Longmire were to see him being uncompromisingly moral, even if he appears lonely and withdrawn to everybody around him. This season everybody connected to him has to face a metaphorical demon or ten, including Longmire himself. It felt pushed too far, I think.
  • The Lottery - Just like Extant, The Lottery is a sci-fi series centered around a woman. Naturally, the only things she can possibly do is worry about children. You see, for some reason no one is able to sire children anymore. A scientist manages to impregnate 100 embryos and there will be a lottery to give the children to 100 couples. Lots of government conspiracies and child protecting going around. I may watch the rest of the episodes, but the pilot didn't convince me at all.
  • Manhattan - A show about the development of the first atomic bomb. Its take is interesting, focusing on the personal quirks, on the politically incorrect, on the compromises and mistakes, on scientists, military and their spouses alike. What I found fascinating is showing how the obnoxious arrogance of someone truly driven and brilliant is almost forced, as a defense mechanism against getting pulled down by the mediocre. Don't get me wrong, it is not another show about brilliant assholes a la Dr House and does not apologize gratuitous arrogance. Instead it shows how vital it is in the way to success. Given that, the character of Winter is so bloody annoying that I wonder why anyone would put up with such a guy and not kick his ass or just shoot him directly. Perhaps that is another strength of the show: describing how close to failure for some many different reasons the Manhattan Project truly was. It was a government project after all.
  • The Assets - The series ended with episode 8. In that sense, it is actually a miniseries, as the entire premise of the show comes to an end with the final episode. I wrote before that it got cancelled really soon and I believe that the reason is that all characters are really unlikable. Also, since it is based on a book that describes a real event that a lot of Americans know how it went down, the interest was probably small. Also, at the end of the show you realise something: spies are really boring.
  • Legends - A TV series for the sole purpose of keeping Sean Bean alive! :) Sean Bean is this deep undercover agent with a lot of prefabricated "legends", or fake lives, that he uses to infiltrate criminal or terrorist organizations. This leads him to have identity crises, even questioning if any of his lives, including the real one, are actually real. Sexy Ali Larter is his "handler", which can't hurt.
  • Outlander - Is this an attempt at a romantic Yankee in King Arthur's Court? A 1945 nurse is thrown back in time in 1743 Scotland. Her healing skills are helping her join this band of rebellious Scots and experience the life there. The synopsis of the show didn't give me much hope for it, but after watching all the episodes so far it got me hooked. The acting is good and the script is well written. I hope it doesn't deteriorate on the way. It is also intriguing that she has 200 years of extra knowledge, but she doesn't suddenly share antibiotics with the world or try to improve muskets or whatever. Being a woman in a sort of prisoner situation serves to explain that, but how long can it go on like that?
  • The Divide - About a woman that works for an organization that tries to help the wrongly accused in the US justice system. There is a coverup, a conspiracy, White men wrongly accused of killing a Black family, politics, etc. It started as intriguing, but outside the twist that is probably looming, I don't think there is anything really interesting to me in the show. Too political, I guess.
  • The Knick - This is one of the good ones. A look at the professional and personal lives of the staff at New York's Knickerbocker Hospital during the early part of the twentieth century, it is directed by Soderbergh, starring Clive Owen and it is both brutal and truthful. A must see for all the new age assholes that like to think medicine was better at that time.
  • Doctor Who - Season 8 with Capaldi is both interesting and dull. It was supposed to be darker, more intense, but it isn't really. What it is is confusing, though. I didn't like the pilot, but I enjoyed the second and third episodes. I don't know, let's see.
  • Forever - Another "special" person helping the police. Why?! Oh, why?!! This time it's about a guy who cannot die. Every time he dies, he appears somewhere in water, naked. A single, sexy, female police detective partners with him in order to solve crime. I like the actor, though, even if the script is eerily similar to any of the shows in the genre out there. Let's see how it goes.
  • Intruders - "Jack Whelan is a former LAPD officer who is asked to investigate some strange occurrences. He tries to find answers, but he's stonewalled at every turn. Baffled, he continues until he starts to concentrate his search around a secret society that chases immortality by seeking refuge in the bodies of others." The cast seems good. I still have to actually watch it, though.
  • Hysteria - It concerns the idea that people can get afflictions from social media. A perfect reason for Internet control! :) Anyway, the title is perfect as it seems the cause of the problem is hysteria, while the reaction of the people is mass hysteria. The Hannibal Lecter beginning, though, may either be the sign of bad writing or of some ingenious plot device. Wait and see.
  • Hand of God - Ron Perlman? Sign me up! I've seen the pilot though and it's kind of weird. You get this judge who's son just killed himself. He did it because someone raped his wife and made him watch. And so the judge gets born again in a shady church by a preacher who is an ex actor and a con artist. Then the judge starts hearing the voice of God. Some things clearly get lost in translation, because He is always putting Ron Perlman in the situation to be a total ass who everybody thinks is insane. Oh, except the insane people, who think he is the new Solomon. But is he? Weird, huh?

Well, a la prossima!

Monday, September 01, 2014

@font-face not working! ... if you don't write the CSS rule correctly

Just a quick solution for a problem that seems to be @font-face not functioning at all. You define the @font-face CSS rule, you then add a font-family CSS rule for your element and nothing seems to be happening. The element has the correct family when you look in the browser inspection tool, but the font is never loaded. Nor is it displayed. What could be wrong?

The simple answer in my case is that the element I wanted to style had a rule like this: font-family: 'My Special Font, Verdana, Arial';. The correct rule should have been font-family: 'My Special Font', Verdana, Arial;. The quotes are just for escaping spaces and the like for the individual family names, not for encapsulating the "value" of the css rule. I know, stupid, but I wasted half an hour on it!

Thursday, August 28, 2014

Command line Windows Update

Update: If you are behind a proxy, here is some additional code to add right after creating the update session:
'updateSession.WebProxy.AutoDetect = true 'try this first. It doesn't work so well in some environments if no authentication windows appears (*cough* Windows 8 *cough*)

strProxy = "proxy name or address:proxy port"  'ex: 1234:999
strProxyUser = "your username"
strProxyPass = "your password" 


I am working behind a "secured" web proxy that sometimes skips a beat. As a result there are days in which I cannot install Window Updates, the normal Windows update application just fails (with Error Code: 0x80246002) and I am left angry and powerless. Well, there are options. First of all, none of the "solutions" offered by Microsoft seem to work. The most promising one (which may apply to you, but it did not apply to me) was that you may have corrupted files in the Download folder for Windows updates. As a result you need to:
  • Stop the Windows Update service issuing the command line command: net stop wuauserv or by going to Control Panel, Services and manually stopping it.
  • Go to the download folder parent found at %systemroot%\SoftwareDistribution (cd %systemroot%\SoftwareDistribution) and rename the Download folder (ren Download Download.old)
  • Start the Windows Update service issuing the command line command: net start wuauserv or by going to Control Panel, Services and manually starting it.

So my solution was to use a script that downloads and installs the Windows updates from the command line and I found this link: Searching, Downloading, and Installing Updates that pretty much provided the solution I was looking for. There are two issues with the script. The first is that it prompts you to accept any EULA that the updates may present. The second is that it downloads all updates, regardless of severity. So I am publishing here the script that I am using who fixes these two problems: EULA is automatically accepted and only Important and Critical updates are downloaded and installed:
Set updateSession = CreateObject("Microsoft.Update.Session")
updateSession.ClientApplicationID = "Siderite :) Sample Script"

Set updateSearcher = updateSession.CreateUpdateSearcher()

WScript.Echo "Searching for updates..." & vbCRLF

Set searchResult = _
updateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0")

WScript.Echo "List of applicable items on the machine:"

For I = 0 To searchResult.Updates.Count-1
    Set update = searchResult.Updates.Item(I)
    WScript.Echo I + 1 & "> " & update.Title

If searchResult.Updates.Count = 0 Then
    WScript.Echo "There are no applicable updates."
End If

WScript.Echo vbCRLF & "Creating collection of updates to download:"

Set updatesToDownload = CreateObject("Microsoft.Update.UpdateColl")

For I = 0 to searchResult.Updates.Count-1
    Set update = searchResult.Updates.Item(I)

    addThisUpdate = false
    If update.InstallationBehavior.CanRequestUserInput = true Then
        WScript.Echo I + 1 & "> skipping: " & update.Title & _
        " because it requires user input"
        If update.EulaAccepted = false Then
            WScript.Echo I + 1 & ">     Accept EULA " & update.Title 
            addThisUpdate = true
            'WScript.Echo I + 1 & "> note: " & update.Title & " has a license agreement that must be accepted:"
            'WScript.Echo update.EulaText
            'WScript.Echo "Do you accept this license agreement? (Y/N)"
            'strInput = WScript.StdIn.Readline
            'If (strInput = "Y" or strInput = "y") Then
            '    update.AcceptEula()
            '    addThisUpdate = true
            '    WScript.Echo I + 1 & "> skipping: " & update.Title & _
            '    " because the license agreement was declined"
            'End If
            addThisUpdate = true
        End If
    End If

    If addThisUpdate AND (update.MsrcSeverity = "Important" OR update.MsrcSeverity = "Critical") Then
        'wscript.echo ("This item is " & update.MsrcSeverity & " and will be processed!")
        'comment these lines to make it download everything
        wscript.echo (update.Title & " has severity [" & update.MsrcSeverity & "] and will NOT be processed!")
    End If

    If addThisUpdate = true Then
        wscript.echo(I + 1 & "> adding: (" & update.MsrcSeverity & ") " & update.Title)
    End If

If updatesToDownload.Count = 0 Then
    WScript.Echo "All applicable updates were skipped."
End If
WScript.Echo vbCRLF & "Downloading updates..."

Set downloader = updateSession.CreateUpdateDownloader() 
downloader.Updates = updatesToDownload

Set updatesToInstall = CreateObject("Microsoft.Update.UpdateColl")

rebootMayBeRequired = false

WScript.Echo vbCRLF & "Successfully downloaded updates:"

For I = 0 To searchResult.Updates.Count-1
    set update = searchResult.Updates.Item(I)
    If update.IsDownloaded = true Then
        WScript.Echo I + 1 & "> " & update.Title 
        If update.InstallationBehavior.RebootBehavior > 0 Then
            rebootMayBeRequired = true
        End If
    End If

If updatesToInstall.Count = 0 Then
    WScript.Echo "No updates were successfully downloaded."
End If

If rebootMayBeRequired = true Then
    WScript.Echo vbCRLF & "These updates may require a reboot."
End If

WScript.Echo  vbCRLF & "Would you like to install updates now? (Y/N)"
strInput = WScript.StdIn.Readline

If (strInput = "Y" or strInput = "y") Then
    WScript.Echo "Installing updates..."
    Set installer = updateSession.CreateUpdateInstaller()
    installer.Updates = updatesToInstall
    Set installationResult = installer.Install()
    'Output results of install
    WScript.Echo "Installation Result: " & _
    WScript.Echo "Reboot Required: " & _ 
    installationResult.RebootRequired & vbCRLF 
    WScript.Echo "Listing of updates installed " & _
    "and individual installation results:" 
    For I = 0 to updatesToInstall.Count - 1
        WScript.Echo I + 1 & "> " & _
        updatesToInstall.Item(i).Title & _
        ": " & installationResult.GetUpdateResult(i).ResultCode   
End If

Save the code above in a file called Update.vbs and then creating a batch file that looks like this:
start "Command line Windows update" cscript Update.vbs

Run the script and you will get the .vbs executed in a command line window that will also wait for pressing Enter at the end of execution so you can see the result.

For other solutions that are more system admin oriented, follow this link which provides you with a lot of possibilities, some in PowerShell, for example.

Also, I didn't find a way to install the updates without the Windows annoyance that asks me to reboot the computer popping up. If you know how to do that, I would be grateful.

Monday, August 18, 2014

I was mentioned on TMRO (formerly known as Spacevidcast)

I have been watching this weekly space show made by a husband and wife couple working for SpaceX. Initially called Spacevidcast, now it is called TMRO (pronounced Tomorrow). It is a great show, great quality, nice humor and, more than anything, a comprehensive video report on weekly events in space exploration, commercial or otherwise. If you are even remotely interested in space, you should subscribe. And they have been doing it all from their own resources and crowdfunding for seven years! You gotta love that.

But the selfish reason I am blogging about them is that I got mentioned in the TMRO show! Click here to see how they are trying and even succeeding to pronounce my Internet nom de guerre. The effort is appreciated.

Thursday, August 14, 2014

Google Hangouts hides its icon in the traybar

Because of idiotic firewall rules at my workplace I am forced to use Hangouts rather than Yahoo Messenger as an instant messenger. I am not going to rant here about which one is best, enough to say that most of my friends are on YM and being on Hangouts doesn't help. Hangouts has many annoyances for me, like its propensity to freeze when you lose Internet connection often or the lack of features that YM had. In fact I was so annoyed that I planned to do my own professional messenger to rule them all. But that's another story.

I am writing this post because of a behaviour of the Google Hangouts instant messenger (which, to be fair, is only a Chrome extension), mainly that after a while, the green traybar icon of the messenger goes in the "hidden icons" group. I have to customize it every day, sometimes twice, as it seems to reset this behavior after a period of use, not just on restarts. There is a Google product forum that discusses this here: System tray icon resets every time Chrome is started where you also see a few comments from your truly.

I immediately wanted to create a script or a C# program to fix this, but at first I just searched for a solution on the web and I found TrayManager, a C# app that does what the "Customize..." tray link does and more. One of the best features is a command line! So here is what you do after downloading the software and installing it somewhere: TrayManager.exe -t "Hangouts" 2. Now, probably that doesn't solve the problem long term. It is just as you would go into the Customize... link, but it's faster. Also, it has no side effects if run multiple times, so you can script it to run periodically. I will post a script to do that, if there is interest. Yatta!