- Hikaru {Aka} Yuuki のブログ - http://www.hikaruyuuki.com/en -

Who’s gonna win by the end of this year, Surface with Windows RT or iPad (Mini)? Pick up your choice..

Internet Explorer Cannot Connect to the Internet, but Firefox, Downloader Does

Posted By Adikara Putra (Hikaru Yuuki) On In Desktop Application | 18 Comments

Yeah, it sucks indeed, when you need Internet Explorer (IE) but suddenly IE cannot connect to the Internet, meanwhile Firefox, downloader like IDM, etc are able to connect. Of course since IE cannot connect, other applications depend on IE’s settings also unable to connect, such as Yahoo Messenger (YM).

Just knew this when this afternoon I tried to log in to YM but couldn’t, I thought I had problems due to Internet connection (slow or unstable connection). But this night when I tried to install Github Windows, an error occured with error message “Error: An error occurred trying to download ‘http://github-windows.s3.amazonaws.com/GitHub.application’.” After time consuming investigation, the cause was IE. Tried to open Google in IE, but no luck. What a weird, why IE unable to open Google while Firefox does able to.

After browsing around, few things that’s worth to try to fix this Internet connection problem in IE are:

Awal mula ketika siang tadi mencoba konek ke YM tidak bisa, saya kira karena masalah koneksi, tapi malam ini ketika mencoba install Github Windows ternyata tidak bisa. Selidik punya selidik ternyata ketika membuka IE, buka ke mbah Google saja tidak bisa. Aneh, padahal dengan Firefox bisa.

Setelah browsing ke sana kemari, beberapa cara yang patut dicoba untuk membenarkan koneksi Internet di Internet Explorer, antara lain:

Dari cara di atas yang berhasil untuk saya adalah cara Mendisable Proxy sederhana memang tapi terkadang kalau kita tidak tahu atau lupa settingan jadinya ya repot juga. Sehari-hari saya menggunakan WiFi di rumah begitu juga di kantor (bisa kabel atau WiFi), berhubung sekarang menggunakan modem dial-up jadinya settingan yang tepat bukan di bagian Local Area Network (LAN) settings.

Really better than Dropbox? 5 GB storage for free, store & sync file, better file, sharing and security management http://bit.ly/oGAqhk

Posted By Adikara Putra (Hikaru Yuuki) On In Website & Blog | No Comments

Really better than Dropbox? 5 GB storage for free, store & sync file, better file, sharing and security management http://bit.ly/oGAqhk

Updated to WordPress 3.2.1

Posted By Adikara Putra (Hikaru Yuuki) On In My Diary | No Comments

Trying to add post format ‘status’ in WordPress using Twitter Tools when automatically create blog post is enabled

Posted By Adikara Putra (Hikaru Yuuki) On In My Diary | No Comments

Menambahkan post format ‘status’ di WordPress bila ‘automatically create blog post’ dari Twitter Tools diaktifkan

Display Tooltip/Hint Text of Menu Items in Status Bar C#

Posted By Adikara Putra (Hikaru Yuuki) On In Programming @en | No Comments

Have you ever use Windows Explorer or other programs, then you’ll probably notice the hint text in the status bar whenever you hover the mouse pointer on a menu item. This will help user and add application’s usability by providing user support. In C# after we set tooltip/hint text in each menu items, it will not immediately appear in the Status Bar (in .NET it is commonly known with StatusStrip). In Delphi it’s easy to display the hint text in the status bar by assigning handler in Application.OnHint event as follows:

procedure TForm1.ShowHint(Sender: TObject);
begin
  StatusBar1.SimpleText:=Application.Hint;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Application.OnHint:=ShowHint;
end;

Since I’m also relatively a newbie in C# WinForms and doesn’t know the efficient and easier way to display hint text in the Status Strip, the steps that I use are traversing/enumerating each menu items and assign each with event handler on event MouseEnter and MouseLeave if it has a tooltip text.

//constructor Form1
public Form1()
{
    InitializeComponent();
    InitializeMenuHint();
}

private void InitializeMenuHint()
{
    foreach (ToolStripMenuItem item in menuStrip1.Items)
    {
        TraverseMenuItemHint(item);
    }
}
private void MenuHint_Enter(object sender, EventArgs e)
{
    statusStrip1.Text = (sender as ToolStripMenuItem).ToolTipText;
    //bila membuat Status Label di Status Strip gunakan di bawah ini
    //toolStripStatusLabel1.Text = (sender as ToolStripMenuItem).ToolTipText;
}

private void MenuHint_Leave(object sender, EventArgs e)
{
    statusStrip1.Text = "";
    //bila membuat Status Label di Status Strip gunakan di bawah ini
    //toolStripStatusLabel1.Text = "";
}

private void TraverseMenuItemHint(ToolStripMenuItem element)
{
    for (int i = 0; i < element.DropDownItems.Count; i++)
    {
        if (!(element.DropDownItems[i] is ToolStripSeparator))
        {
            ToolStripMenuItem item = element.DropDownItems[i] as ToolStripMenuItem;
            if (item.ToolTipText != "")
            {
                item.MouseEnter += MenuHint_Enter;
                item.MouseLeave += MenuHint_Leave;
            }
            TraverseMenuItemHint(item);

        }
    }
}

UPDATE:
The solution above only works to display the tooltip when the mouse is hovering menu items, when using the keyboard it will not work. Therefore, I make another, a simpler way in order to display the tooltip text in the status bar.

The steps are:

  1. Create internal class derived from ToolStripMenuItem in Form
    using ToolStripMenuItem
  2. Add event Hint that will be called when the menu item is selected
  3. Create an event handler Menu_Hint in the Form
  4. Traverse/Enumerate ToolStripMenuItem, when a tooltip text is not empty string, assign event handler Menu_Hint to Hint event
  5. Change all classes System.Windows.Forms.ToolStripMenuItem in Form
    .designer.cs
    into ToolStripmenuItem (from the internal class we create before).

Complete source code like the following

public partial class FormMain : System.Windows.Forms.Form
{
    internal class ToolStripMenuItem : System.Windows.Forms.ToolStripMenuItem
    {
        public event EventHandler Hint;
        protected virtual void OnHint(EventArgs e)
        {
            if (Hint != null)
                Hint(this, e);
        }
        public override bool Selected
        {
            get
            {
                if (base.Selected == true)
                {
                    OnHint(new EventArgs());
                }
                return base.Selected;
            }
        }
    }
    public FormMain()
    {
        InitializeComponent();
        InitializeMenuHint();
    }
    private void InitializeMenuHint()
    {

        foreach (ToolStripMenuItem item in MainMenu.Items)
        {
            TraverseMenuItemHint(item);
        }
    }

    private void MenuHint_Hint(object sender, EventArgs e)
    {
        statusStrip1.Text = (sender as ToolStripMenuItem).ToolTipText;
        //bila membuat Status Label di Status Strip gunakan di bawah ini
        //toolStripStatusLabel1.Text = (sender as ToolStripMenuItem).ToolTipText;
    }

    private void TraverseMenuItemHint(ToolStripMenuItem element)
    {
        for (int i = 0; i < element.DropDownItems.Count; i++)
        {
            if (!(element.DropDownItems[i] is ToolStripSeparator))
            {
                ToolStripMenuItem item = element.DropDownItems[i] as ToolStripMenuItem;
                if (item.ToolTipText != "")
                {
                    item.Hint += MenuHint_Hint;
                }
                TraverseMenuItemHint(item);

            }
        }
    }
}

Block Trackback Spam in WordPress

Posted By Adikara Putra (Hikaru Yuuki) On In My Diary,Website & Blog | Comments Disabled

These recent days, my blog is hit by spam attack, Trackback spam. Just in few days, when I was not at home and was in Jakarta-Bogor for spending my weekend, my blog got so many spam I ever had, up to 2500 (and after few weeks, around 28.000). The Trackback itself actually is good in intention, but petty minded people use trackback spambot to raise up their web rank (which is actually NOT WORKING at all). What the heck Trackback is? what is the benefits and why it can be categorized as spam?

Trackback is one of three linkback methods, the web author can be informed automatically when other people is linking their page to one of the documents (webpages) of that author. This method enable the web author to track whoever link back, reference back to the author’s articles. Thus, when you write a post and somebody else have the same topic with your post, we can get informed if that people link back or reference from your post. In WordPress, Trackbacks appear in comment section (depends on applied theme) and of course if we enable the Trackback itself in the settings.

Unfortunately, such damned people use trackback spambot to keep spamming to blog posts so that their web link will appear in comment section and when search engine crawl to that blog posts that damned web rank will raised up. If you check that web, it has nothing to do nor even related to your blog posts, it is also possible that those are only dead links.

To handle trackback spam in WordPress, we can do some effective ways:

I have tried some, but in the end the one that is effective enough is by activating the Akismet, Captcha, and also the Simple Trackback Validation with Topsy Blocker plugin and finally… bye bye trackback spam!