Tag Archives: software

magic that comes from proggramming language

how to change default network interface in linux

how to change default network interface in linux,
how to change network interface priority in linux,

to install ifmetric in linux use this command

sudo apt-get install ifmetric

it happened when i want to change my wlan as default network interface in raspberry pi. i have two connection

  1. LAN connection = eth0
  2. Wifi connection = wlan0
pi@raspberrypi:~ $ ifconfig
eth0      Link encap:Ethernet 
          inet addr:10.2.1.166  Bcast:10.2.1.255  Mask:255.255.255.0
          inet6 addr: fe80::5df2:5b0c:8062:b551/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1194121 errors:0 dropped:77 overruns:0 frame:0
          TX packets:116003 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1428192778 (1.3 GiB)  TX bytes:10600602 (10.1 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:200 errors:0 dropped:0 overruns:0 frame:0
          TX packets:200 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:16656 (16.2 KiB)  TX bytes:16656 (16.2 KiB)

wlan0     Link encap:Ethernet 
          inet addr:192.168.43.120  Bcast:192.168.43.255  Mask:255.255.255.0
          inet6 addr: fe80::8751:b941:7c96:a41/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:35 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4143 (4.0 KiB)  TX bytes:5843 (5.7 KiB)

pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^Z
[2]+  Stopped                 ping 8.8.8.8

while it uses LAN connection as default connection i can’t reach the internet because it only connects internal network. In order to be able to connect internet i set tethering via my smartphone and let raspberry pi download what i need via this tethering connection.

using ifmetric, changing default network interface in linux is as simply as running 3 words command on your shell command.

ifmetric interface metric

NAME
ifmetric - An IPv4 route metrics manipulation tool

SYNOPSIS
ifmetric INTERFACE [METRIC]

DESCRIPTION
ifmetric  is  a  Linux  tool for setting the metrics of all IPv4 routes
attached to a given network interface at once.  This  may  be  used  to
change  the  priority of routing IPv4 traffic over the interface. Lower
metrics correlate with higher priorities.

ifmetric uses the Linux NETLINK interface  to  manipulate  the  routes.
Because  of  that  it  is  compatible  with routes created with the new
iproute2 utility.

as stated by above “man” page, Lower metrics correlate with higher priorities.

So if i want to set wlan0 as default connection (connection with higher priority). i can enter this command

pi@raspberrypi:~ $ sudo ifmetric eth0 10
pi@raspberrypi:~ $ sudo ifmetric wlan0

Now i can reach the internet via wlan0 connection

pi@raspberrypi:~ $ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=50 time=396 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=50 time=524 ms

Java HTTPS testing : sun.security.validator.ValidatorException: PKIX path validation failed:

I’ve had this https connection problem from my java client to other https server.

sun.security.validator.ValidatorException: PKIX path validation failed:

apparently the problem lies on invalid https certificate on https server i want to access.

for simple https connection testing from java client you can use this small java class : sslPoke
https://confluence.atlassian.com/download/attachments/779355358/SSLPoke.class?version=1&modificationDate=1441897666313&api=v2

after downloading above class, just go to the directory where you put SSLPoke.class and run this command

java SSLPoke google.com 443

*replace google.com and port with https server and port you want to test

if there is no problem with your https connection you’ll get
connection successfull response

pi@raspberrypi /home $ java SSLPoke google.com 443
Successfully connected

otherwise youll get exception error printed
for example i test against tomcat https server with self-signed certificate created using keytool

java SSLPoke 10.10.133.194 8443
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
at sun.security.validator.Validator.validate(Validator.java:260)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:138)
at SSLPoke.main(SSLPoke.java:31)
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)

Some https problem require you to import certificate used on https server to your java (client) keystore.
after importing the certificate from the server (to client), we can execute this java command to access the https server

pi@raspberrypi /home $ java -Djavax.net.ssl.trustStore=/home/apps/serverapps/tomcat7/keys/.keystore SSLPoke 10.2.133.194 8443
Successfully connected

Credits:
https://confluence.atlassian.com/display/KB/Unable+to+Connect+to+SSL+Services+due+to+PKIX+Path+Building+Failed

 

InnoDB Slower Update Performance

Yesterday, i had locking table problem in myIsam table. The solution proposed is to change existing myIsam table into InnoDB table. So we changed the engine table as proposed. For information, my existing table had about 50000 rows. Atfer changing the table functionality test was performed and the program worked well. But we notice another problem when real load is applied to the application. we notice the reduced TPS.

From mysql command “show full processlist”, we saw UPDATE query in action.

So in default localhos mysql server i tried to run that run the same query againts +- 5000 rows innodb table & +-5000 rows myIsam table

UPDATE testisam SET sent = sent + 1 WHERE id = ‘5000’;

Table isam, 100 query update on particular row

Id            sent       startupdate                        endupdate
5000       99           2015-09-23 15:48:53        2015-09-23 15:48:53

execution time ~ 1 s

 

UPDATE testinno SET sent = sent + 1 WHERE id = ‘5000’;

Table inno, 100 query update on particular row

Id            sent       startupdate                        endupdate
5000       99           2015-09-23 15:47:07        2015-09-23 15:47:11

execution time ~5 s

From the result above, in default configuration, UPDATE query to single row on innodb table will take longer time than myIsam table. While it is true that InnoDB engine will prevent table locking, several tuning and changes in query should be made in order to work well with InnoDB table.

So because this “tuning & changes in query” will take sometime to learn/read. I decided to revert back to MyIsam table.. 😛

 

How to change default fn button function

change fn button function
change fn button function hp

i have this HP laptop that gave me different fn utility. before this hp laptop i have asus laptop. this hp laptop had default fn function that is assigned to media player function, display function, volume control, wifi control and lcd screen option. so for example, the default button will give me volume up if i press f11, increase brightness if i press f3 and stop/play media player function if i press f6, f7, f8. i prefer to use this spacial function if i press it together with fn button, not when i press this f1-f12 button alone.

actually we can solve it with 2 solution:
first one. we can enter the bios menu and get adjust the setting in bios menu 🙂
second one. we can use software or application to assign and re arrange how our keyboard works.

one of the software that can do this is sharpkeys 😀
its simple and it meets the requirement (function) i need

okay that is How to change default fn button function

please download here
or here http://sharpkeys.codeplex.com/

Warning 1 There was a mismatch between the processor architecture of the project being built “MSIL” and the processor architecture of the reference

Warning 1 There was a mismatch between the processor architecture of the project being built “MSIL” and the processor architecture of the reference

this is my warning message when i try to run my program

Warning 1 There was a mismatch between the processor architecture of the project being built “MSIL” and the processor architecture of the reference “Oracle.DataAccess, Version=2.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=AMD64”, “AMD64”. This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. ConsoleApplication2

as this warning said. we need to avoid this miss match configuration. so simply adjusting the build configuration may solve this warning problem

visual studio properties

visual studio properties2

User Profile Service service failed the logon. User profile cannot be loaded

the user profile service service failed the logon
User Profile Service service failed the logon. User profile cannot be loaded

how to solve problem the user profile service service failed the logon

i just met this problem tomorrow, when i try to login into my windows 7 ultimate edition.
i find this solution in internet

1. Use other profil with administrator privilege to login (if you dont have one then you should
look at this post http://caleudum.com/how-to-get-admin-privilege-in-windows/)
2. Open regedit

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
check:

a) That the key name doesn’t end in “.bak” (remove .bak if there)
b) That the RefCount value is 0 (change it if different)
c) That the State value is 0 (change if different)

User Profile Service service failed the logon. User profile cannot be loaded
User Profile Service service failed the logon. User profile cannot be loaded

for my problem the solution is the a)
i found out that my profile is ended with .bak, like in the picture above
after i rename this by removing the “.bak” i can login with my account that is failed the logon before

3. log off and try to log in with your own user account

hope it can help you.

credits : http://answers.microsoft.com/en-us/windows/forum/windows_vista-security/user-profile-service-service-failed-the-logon-user/4ed66b21-c23e-42f1-98b2-706dcf931fae

BBM for Android Free Download : Plus Minus of BBM for Android Aplication

It is confirmed and tested that BBM for android is working for any android ics 4.0 or later ‘phone’ version and iphone. I had confirmed it by my huawei y 300 phone, it works smoothly and pretty fast compared to Line. However BBM which is known for its robustness still lack of feature.. unlike whatsup which offers to send media form, image, sound, and video, BBM only offers the user to send Picture and record of sound. But its speed and its message status (Delivered-Read notification) is good enough if you consider, minimal usage of multimedia during your communication. User interface is pretty good, but the font and send-option message bar is to big and little bit disturbing for 4 inch phone.

if you want to experience it you can download it here
download free BBM for Android
https://play.google.com/store/apps/details?id=com.bbm
this is the right link of BBM application on playstore among other BBM-like applications in playstore.

If you come to playstore and search it, just type “BBM for Android”.. This morning, it is located on the second list, with title BBM and small description “BlackBerry Limited”. just make sure you download the right one 🙂

Currently Tablet is not Supported
If you want to download BBM for your tablet, but you can’t install it, there is no wrong with your device. From article http://appscout.pcmag.com/apple-ios-iphone-ipad-ipod/317108-bbm-finally-launches-on-iphone-and-android , i find out that this new release version has not yet support the Tablet version of any android. so just be patient if you still want to download BBM for your tablet, it may come real soon :D.

here i will resume the plus minus off bbm compared to some other chat application
plus :
– Fast & Smooth (compared to Line)
– Add privacy because you use BBM ID instead of you own phone number.
– Has Delivered and Read notification. It will help you to assure the status of your message (whatsup doesnt have this)
– Good User Interface. The display of Android for BBM is better than the original BBM in Blackberry

minus :
– Minimal Multimedia Feature. You can only send your picture and recorded sound (compared to whatsup and Line)
– Harder to invite or to add friend because you should know the BBM ID (compared to whastup)
– Knowing BBM ID doesnt mean you can call the user. BBM ID is separated information to phone number, you still need to share or know phone number manually to be able to call other user.
– Little bit disturbing display of send message option. The display is too big for 4 inch screen

Nah, I think thats all,
again you can download BBM For Android Here
https://play.google.com/store/apps/details?id=com.bbm

How find out unidentified device in windows

So it happened yesterday, when i buy new laptop HP Probook 4441s, Unfortunately the online store where i bought this laptop didn’t put in driver software. i had a hard time finding out what software to install to enable my wireless card.

I tried with my laptop hardware specification, but since its sold in some model, i couldnt get any accurate information about the wireless card. actually HP has stored many driver software but, trying it one by one would just waste my time. I better find out it make and model of any hardware in my laptop, then begin searching the right package of driver software to install.

not like ubuntu, i couldnt find any simple step to find out the make and model of unknown device. so i came to google with keyword
how to find wireless card in windows
how to find wireless card chipset in windows
how to see wireless card information in windows,
e.t.c
untill i find really good sites which offers me simple solution with software
the software named unknown device identifier worked really well, in just one click, you can get a resume for any of your hardware attached in your windows laptop

you can go to the page below and download from the source, hope it can help you solve your problem

  • http://www.fileheap.com/download-unknown-device-identifier-34861.html
  • 24/7 and Media Integration Marketing Concept

    Everyone can do marketing. on one of an occasion i have been invited by my friend to join marketing seminar from one of marketing magazine in jakarta. The seminar talks about the power of 24/7 and media integration in marketing. by using all media available now we can increase the marketing prospect.

    There were two examples/study cases how we can do this concept,

    the first example comes from soyjoy which used only 5 blogger to talk about this product and it succesfully made almost all singapore citizen aware of it. following soyjoy success story, the management use media integration concept on pocari sweat case. pocari sweat claimed it first ever declining profit in 2010. it forced the management to act with new marketing ideas. the head marketing responded really well, resulting marketing ideas with full media integration. they use blogger, celebrity, and game to introduce the product to the customer. this marketing concept results in its increasing profit in the following year.

    the second example comes from belowcepek.com. this online site sells fashion products below 100.000 rupiahs. the owner of this site using media integration. She create facebook game, named miss & match game, where we can choose & combine shirts, trousers, and other wearable fashion, any combinations of those fashion components is given a score. it proves to entertain a lot of women facebook users, she claimed more than 5000 users use this application in its early launch.

    So how did she integrate the game into the marketing?

    She not only put the game to announce its brand, further she made any fashion product in this game available offline, to be purchased by the customer. After finish the game, user will be able to see the product and to buy the product.

    Have you practice this concept :)?

    How to display 3D building in Google Earth

    This is my problem with my fresh installation of google earth. My google earth didnt show any 3D building, while my friends could show the 3D building on their google earth. At first i thought it because my laptop doesn’t meet the display card requirement or that my version of google earth is probably older than their person. After googling for a while i find out that to show any 3D builing in Google Earth, you have to first check 3D building layer in layer menu that located in below left of screen corner.

    enable 3D in google earth
    enable 3D in google earth