Author: Admin

  • Snippet for Ctrl-A Shortcut To Select All Text (Windows.Forms.TextBox)

    Set this event handler for your textbox to enable Ctrl-A shortcut and select all text:

    private void anyTextBox_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
    {
    if (e.KeyChar == '\x1')
    {
    ((TextBox)sender).SelectAll();
    e.Handled = true;
    }
    }

    Thanks to:
    http://www.dzone.com/snippets/ctrl-shortcut-select-all-text

  • Vigor, SSTP and VPN

    The Windows integrated SSTP (Secure Socket Tunneling Protocol) is till today supported only by DrayTek Vigor models 2950 and 2930.

    The DrayTek team is of the opinion that the fastest VPN of all is achieved by using IPSec with certificates.

  • #1093 You can not specify target table comments for update in FROM clause

    When I try to run update query for my table “comments”, MySQL returns the #1093 – You can’t specify target table ‘comments’ for update in FROM clause message. My contrived table structure and update query are as follow:

    CREATE TABLE comments(id int primary key, phrase text, uid int);
    
    INSERT INTO comments VALUES(1, 'admin user comments',1),
                               (2, 'HR User Comments',2),
                               (3, 'RH User Comments',2);
    
    UPDATE comments
         SET phrase = (SELECT phrase FROM comments WHERE uid=2 AND id=2)
    WHERE id = 3;
    

    Actually, your above update query seems illegal as per SQL standard. MySQL does not allow to UPDATE or DELETE a table’s data if you’re simultaneously reading that same data with a subquery. Because you are doing so that is why MySQL tersely said its such error message. Therefore, you will have to rewrite your above update query.

    Since MySQL materializes sub queries in the FROM Clause as temporary tables, wrapping the subquery into another inner subquery in the FROM Clause causes it to be executed and stored into a temporary table, then referenced implicitly in the outer subquery. So, the update query will succeed by rewriting it like below:

    UPDATE comments
     SET phrase =( SELECT phrase FROM
     (
     SELECT * FROM comments
     )
     AS c1
     WHERE c1.uid=2 AND c1.id=2
     ) WHERE id =3;
    

    Thanks to the original source:
    http://www.mysqlfaqs.net/mysql-faqs/Errors/1093-You-can-not-specify-target-table-comments-for-update-in-FROM-clause

  • Mysql – Restore only one database from sqldump

    Restoring the whole mysql dump is easy. Either use phpMyAdmin(if the file is not too big) or do it from the console. I had a hard time finding it how to restore only one database from the sqldump of all databases.

    We have a sqldump file which contains multiple databases. If you want to restore only one of them you should use the –one-database command.

    Example:
    I have a sqldump.sql which contains databases named dbispconfig, forum, gallery, … . On the target machine first create the database with the same name and then run the folowing command:

    mysql -u$username$ -p$password$ --one-database $selected_database$ < $sqldump_file$

    If i wanted to select only the “forum” database from the sqldump.sql I would create an empty “forum” database and then run:

    mysql -uroot -pMyPass --one-database forum < sqldump.sql
    

    That’s it.

  • Nokia 5230 podatkovni kabel in USB polnjenje

    Danes sem nekoliko goooglal in po globljem iskanju na več straneh našel in se  sprijaznil z dejstvom, da nokia 5230 ne podpira polnjenja telefona preko USB kabla.  Če je to res nisem čisto prepričan, saj se mi za tako napreden telefon zdi to nekaj samoumevnega. Sam imam sicer kabel vendar ni originalen od nokie.

    Originalnega lahko dobite na mimovrste za 19,80€. Uporabnik mi je sporočil, da NE POLNI TELEFONA.

    Isti podatkovni kabel (ponavljam – ni originalen od nokie) tipa micro USB tipa B  pa se da dobit za cele 4€ in sicer v trgovini svetkomunikacij.si (Tudi ne polni telefona – podatki pa delajo ). Še povezava do samega kabla: http://www.svetkomunikacij.si/izdelek_USB-2-0-kabel-A-M-Micro-B-M-1-8m-bl

  • OfficeSuite 5.3 in Adobe Reader 2.5 za Nokia 5230

    Namestitev podpore za gledanje pdf, doc, docx in xls dokumentov na nokia 5230 in podobnih telefonih lahko dodamo z lahkoto. V tem vodiču vas bom vodil kako namestiti aplikaciji OfficeSuite in Adobe Reader na vaš mobilni telefon.

    Potrebujemo:

    1. Certifikat in ključ za podpis aplikacije
    2. Nepodpisano aplikacijo
    3. SignTool(Program za podpisovanje aplikacij)
    4. Telefon z nekaj prostega prostora

    Aplikacije potrebujejo za namestitev na telefon podpis. Brez podpisa vam telefon ne bo dovolil namestitve.( Lahko namestite tudi nepodpisane vendar ga morate prej odklenit -> pošičite za programom HelloX2). Za pridobitev certifikata se registrirajte na strani http://cer.opda.cn/en/index.php?module=index&action=register. Po prijavi izberite My Certificate in uporabite oranžen gumb na katerem piše Apply Cer (zgoraj desno). Vnesite model telefona, IMEI številko (dobite jo z vpisom *#06# v vaš telefon), potrditev IMEI številke in še opis, ki vam bo pomagal kasneje razbrati za kateri telefon je certifikat. Kliknite Submit application.

    Na certifikat je potrebno počakati do 24 ur, vendar so ponavadi narejeni v približno 6-12 urah. Ko bo certifikat nared boste videli v My Certificate povezavi do certifikata in ključa. Shranite jih na svoj računalnik.

    Poberite še aplikacije

    Odprite program Signer, določite aplikacijo Quickoffice.Adobe.Reader.LE.v2.5.131.Unsigned.Cracked.Read.NFO-illusion.sis v prvem oknu, pod njim certifikat (.cer) in pod njim še ključ, ki pride ste ga pobrali s certifikatom (.key). “Key file password” pustite prazno. Kliknete na “Sign!”. Isto storite tudi za  OfficeSuite 5.3.

    Zdaj sta aplikaciji pripravljeni za namestitev. Prenesite ju na telefon preko Bluetooth povezave ali preko kabla in poženite. Po namestitvi je potrebno telefon izklopiti in vklopiti.

    Aplikaciji najdete pod Meni -> Aplikacije -> Nameščene aplikacije.

  • Hello world!

    Prvič je vedno … zanimivo!

    Novo leto nov blog. Let’s see what happens!