Archive

Archive for December, 2011

TAXISnet – Internal Server Error

Πήγα και εγώ χθες στην εφορία μου κι έλαβα τον κλειδάριθμο για να πιστοποιήσω το λογαριασμό που είχα από παλιότερα (στο παλιό TAXISnet) – έδωσε και νέο password όπως μου ζήτησε και μπήκα να δώ τι καλούδια έχει.

Φαίνεται ενδιαφέρον (απ’ότι κατάλαβα πλέον τα βιβλία θα τα κρατάμε ΜΟΝΟ ηλεκτρονικά), αλλά έχει τα bug-άκια του ακόμη απ’ότι φαίνεται. Παραπάνω φαίνεται ένα “Error 500–Internal Server Error” στο νέο TAXISnet.

Mου χτύπησε όταν πήγα στο “Εφαρμογές φορολ. προφίλ” που σου δείχνει ποιές εφαρμογές υπάρχουν, σε ποιές έχεις πρόσβαση και σε αφήνει να πας σε αυτές από εκεί στα γρήγορα. Το πρόβλημα εμφανίστηκε όταν εκεί διάλεξα “Εφαρμογή Τελών και Ειδικών Φόρων” και πάτησα “Εύρεση” (γιατί άραγε να πρέπει να πατήσω καν το κουμπί και να μην αρκεί να διαλέξω στο dropdown list τι θέλω να δώ;)

image

Redirecting twiitter into a YouTube-styled reward lure scheme

While I was trying to visit twitter I suddenly was faced with this page, which although very well designed looked immediately suspicious to me, first of all because of the redirects I noticed happening at the address bar and also because the landing URL was using the word “rewardz”.

Moreover the page seems to be mimicing (or blatantly copying) YouTube’s design (esp. the red/white “You” which might also be a trademark of YouTube [is it?]):

image

I right clicked the back button in Internet Explorer 9 and found out that I had mistyped twitter.com into twiitter.com which led me to secredir.com and redirected me to video-rewardz.com passing it as parameter on the URL the twiitter.com so that they can track which typos were more successful in leading you there.

So I followed the links (although not suggested to do so on totally unknown websites you get redirected to, especially if you don’t have all security updates installed on your system) to record what it tries to “sell” you:

image

image

image

Then you see a progress dialog and you land into this page (suggesting they don’t have any more Macbook Air to make you think that others have been trusting them and “winning”):

image

And then you get to the truth (with small letters at the bottom). You’re supposed to give your mobile phone number and then get signed up for a costly pay-per-message subscription for ringtones or whatever mobile media assets for a chance to win (yeah, sure).

image

Who’s that girl?

I guess you know the classic pop song "Who’s That Girl" from Madonna:

When I came across the following “You need to log in to read this article” page at NewScientist, I had a feeling of Déjà vu

image

Indeed, it was the same hard to miss pretty face from the home page of a remote control / remote support software I like a lot, TeamViewer:

image

Looking carefully at the shirt she wears, being the same one, both photos must have been taken at the same photo shoot and most probably licensed from a stock photo website.

Attention to detail pays of eventually Ο Γελαστούλης κλείνει το μάτι

Categories: Posts Tags: , ,

Windows 7 Command Line Help mistake for IF command

If you type

help IF

at the Windows 7 command-line (can launch this by searching at Windows Start menu search box for “Command” or by typing cmd there and pressing ENTER), you get in one of the help pages printed out for the batch files’ IF command:

%ERRORLEVEL% will expand into a string representation of
the current value of ERRORLEVEL, provided that there is not already
an environment variable with the name ERRORLEVEL, in which case you
will get its value instead. After running a program, the following
illustrates ERRORLEVEL use:

goto answer%ERRORLEVEL%
:answer0
echo Program had return code 0
:answer1
echo Program had return code 1

If a program you launched from the batch file returns error code 0 (meaning usually no error), then you jump to label (using “goto” command) answer%ERRORLEVEL% that is answer0 (labels are prefixed with : in DOS/Windows batch files) and it prints out (using echo command) on the console “Program had return code 0”.

Fine till here, but then it will proceed to next commands (the block labeled :answer1) and also print out “Program had return code 1”. Obviously the correct example should be:

goto answer%ERRORLEVEL%
:answer0
echo Program had return code 0
goto finish
:answer1
echo Program had return code 1
:finish

Could also have a goto finish after the last echo, but its needless since we don’t have :answer2 etc. labels after that and proceeds to finish by itself anyway.

Thinking of this example again, it’s a pretty silly one since one could do instead:

echo Program had return code %ERRORLEVEL%

BTW, to output an empty line to the console you can use echo:
And speaking of batch file tips, you can use :: for comment lines instead of REM command.

Font Collection sites (many free)

There are various font collection sites where you can find nice typefaces you can preview and download:

http://www.fonts2u.com/

http://www.ffonts.net/

http://www.fontxs.com/

http://www.abstractfonts.com/

http://www.fontspace.com/

http://www.dafont.com/

Make sure you check the license for each font you download before using it in some project (some are only free for personal use, others are free for commercial use too).

 

Also take a trip http://www.deviantart.com/ for lots of artistic stuff that sometimes includes fonts too.

 

And finally checkout some nice hand-picked thematic font collections that point to FontSpace and other font download sites:

http://naldzgraphics.net/freebies/futuristic-fonts/

http://naldzgraphics.net/freebies/kid-fonts/

http://naldzgraphics.net/freebies/christmas-fonts/

http://naldzgraphics.net/freebies/movie-fonts-download/

Categories: Posts Tags: , , ,

Fix: embed Office & Acrobat Active Documents in IE WebBrowser control

Since the LvS desktop application (from Learning Via Subtitling project) uses Internet Explorer to embed Microsoft Office Word, Excel, PowerPoint and Adobe Acrobat PDF documents (among others), I added some useful info to the LvS download page on how to work around issues one may face in such a scenario:

If you don’t have Microsoft Office (or have very old Office versions like Office 95 or Office 97) and want to embed Word documents you should better also install:

To show .docx (Word 2007+) files if you use Office XP or Office 2003 or the free Word viewer you need to also install "Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint File Formats" from: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=3

Office 2007 doesn’t show documents embedded in Internet Explorer by default (which LvS uses internally to host Active Documents), use FixIt button at following page to fix this: http://support.microsoft.com/?id=927009 

In LvS if you have Office 2007 without this fix you will see message "Type the correct address" when your unpacked activity folder contains Office files

To embed Adobe Acrobat files you need Adobe Acrobat or the free Adobe Acrobat Reader from: http://adobe.com/reader

If Adobe PDF files don’t show embedded and open up in separate window: Use Start/All Programs menu from the Windows Taskbar and run Adobe Reader application. Then go to its menu "Edit/Preferences…" and at the dialog that opens up, go to "Internet" and check "Display PDF in browser", then press OK (can then close Adobe Reader).

When such files open embedded you may be asked to open or save the file for each one – select open and DO check to not be asked again (since it gets very annoying).

Since this "not ask again" will be remembered for IE too, if you want to clear it later on see the following article: http://www.howtogeek.com/howto/windows-vista/reset-opensave-choice-for-internet-explorer-downloads-in-vista/

Η σελίδα σφάλματος του YouTube

500 Internal Server Error

Λυπούμαστε, κάτι δεν πήγε καλά.
Η διευθέτηση του ζητήματος έχει ανατεθεί σε μια άρτια εκπαιδευμένη ομάδα μαϊμούδων.

If you see them, show them this information:

IH6pYV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IkXZDnhqPBJMSYgnePeg5op-q50vPpdUZtYZsuCkytU
MX6zEqe5SQU7wRL7xAyCLnMG4q-5oykERg7wYBdbk5GJ6bLtzNof24zBrCMH
H-L0pBSrFagcz9HlAvQ2PjmQMOc1Bh-ymOBs9iJt2NyCfcZcG9AOb9KzDto1
VUavWLVDWfcmmxcwOjuQjQwGz2Riqpa-mxCADuFe6ISTv2MJ2dLqMK19Byho
95fo66KT_cLl0jxm70z-NLsunBmlIW5O9zjZv5uySrptMIIFQUOPS2xFBBqT
VRrEAg9vpsEYx8h9H2xjOjHVdOpsoCDi4CkSKLmczZ-IMzvx6eajUWuaZMT5
01a-vSK_dis7lHtI_2UWydC_eZN2HGRP-4meXByQ8AupsSoWrz0eUhdIMFSe
uQzEPRMOrMJ7yBxobSFYnubs6CRNWwxiV7r6HT_RIjaql6j6wvCBSWtT6Ko3
Gz7hoShAjBRMwNROLUMtFt1VrDbH5VvmZ8UEPNbeY4hyNLIQOWyA3gcgHtZZ
Zl3_H72IAed12gK9S_R7zEj7Dxb66vfLUDlE8yK7a50lO4BdOgS4tPZcY9TU
cA5iWzHiPVtXcvr9dga8K3dHm6a75vzyfFDU2DcB630PPWBu8IJoGUdVZKRF
TrcmQkH4W4rXLT2rixMaNDkLCPIZxHzpo9raSYsLayElyLLeJciCvguqtbfv
CpmGFuRYAxoFH49-_LO3vl4DSSGENleRoxAUpAIevoBl4KCpTacEZ9xHLMLw
IHFYr1Unj3GWZiAidjQaSFD8Me4uGM7tXbYt_RJUAhFb9O-xmHIrOHgWNhsh
icxG8rAH-kkgycoDF5tYlv-4UTsQtkffgWGK8PltToYgDfSfL_b0ah42qg==
Categories: Posts Tags: , , , ,

Combinatorics library (Silverlight for Windows Phone)

I recently found a very nice article at CodeProject on Combinatorics algorithms implementation (specifically Permutations, Combinations and Variations with Repetition option) using C# Generics:

http://www.codeproject.com/KB/recipes/Combinatorics.aspx

It uses a lexicographic algorithm, so it allows one to ask for “next” permutation/combination/variation from the collection of all possible ones, in the spirit of C++ Standard Library’s (STL) “next_permutation” algorithm.

My Anagram app for Windows Phone 7 is using this code (packed it in a Silverlight library)

I packed the files in a Silverlight for Windows Phone class library (named Combinatorics) and modification I had to do was to:

  1. make the IMetaCollection interface public so that I could abstract the use of any combinatorics operation based on user selection
  2. add CombinatoricsOp class to help with using any combinatorics operation via one entry point
  3. As a bonus there is also a Combinatorics.cd there (class diagram)

You can download the library to use with your WP7 Silverlight apps (or repack source into other library project for other targets) from my Zoomicon public SkyDrive folder:
https://skydrive.live.com/redir.aspx?cid=2335bbef59b92c54&resid=2335BBEF59B92C54!1705&parid=2335BBEF59B92C54!386
Please give due credit to original author of Combinatorics code (and myself if you use my additions too).

The code for CombinatoricsOp class I added is below. Just call GetCombinatoricsOp to get a Permutations, Combinations or Variations class instance (all implement IMetaCollection interface) and then use the enumerator (with extra method to get count of items without counting them one-by-one) as described in the CodeProject article mentioned above.

//Version: 20111119
//Author: George Birbilis (birbilis@kagi.com)

using System;
using System.Collections.Generic;   namespace Facet.Combinatorics
{   public static class CombinatoricsOp {   public enum CombinatoricsOpType
    {
      Permutations = 0,
      PermutationsWithRepetition = 1,
      //---
      Combinations = 2,
      CombinationsWithRepetition = 3,
      //---
      Variations = 4,
      VariationsWithRepetition = 5
    }   public static IMetaCollection<string> GetCombinatoricsOp(
IList<string> values, CombinatoricsOpType opType, int take){ switch (opType) { case CombinatoricsOpType.Permutations: return new Permutations<string>(values);


case CombinatoricsOpType.PermutationsWithRepetition: return new Permutations<string>(values,GenerateOption.WithRepetition); case CombinatoricsOpType.Combinations: return new Combinations<string>(values, take); case CombinatoricsOpType.CombinationsWithRepetition: return new Combinations<string>(
values, take, GenerateOption.WithRepetition); case CombinatoricsOpType.Variations: return new Variations<string>(values, take); case CombinatoricsOpType.VariationsWithRepetition: return new Variations<string>(
values, take, GenerateOption.WithRepetition); default: throw new NotImplementedException(); } }   }   }
Follow

Get every new post delivered to your Inbox.

Join 920 other followers

%d bloggers like this: