Dec 12, 2014

[Solved] SecureCRT Public Key Dialog - A public key file has not been specified

SecureCRT is an excellent tool that can help us manage multiple sessions. There is a free and famous tool called putty, but in my opinion SecureCRT is much better.

But there is one thing which is annoying:
when connecting to a new server, it always popup a public key dialog "A public key file has not been specified for this session. Would you like to specify one now?"



Then I have to click now and go on, which is really wasting time.
To solve this, we can set up a SSH key, but also way can do these steps by only use password authentication:
1.  right click a session and view its properties

2. Unselect the "PublicKey" dialog

After save the annoying dialog will be gone. Save my life for 3 seconds each time, although I wasted too much. 

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Aug 4, 2014

[Solved]Eclipse Font Problem

I met an eclipse font problem that the tab header looks very uncomfortable, as shown below:

The text font a little ugly and is different from the menu bar like the Windows menu or Help menu. I tried to modify the font settings in preference but didn't make it: there are many items in font settings and I don't know which is exactly the one I need to modify and I tried a few but didn't work.

Finally I happened to find a solution: this is controlled by Theme settings.



The solution is to change the appearance to Windows 7. 

After I made the change and restart, it looks like below:

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Jul 14, 2014

Save Power: Windows Scheduled Sleep and Scheduled Wake Up

I have got two laptops, and I plan their roles as: one in the office and the other at home, and I can remote desktop to each other using a great tool called TeamViewer. But here comes a problem that I don't want these two laptops to be always running because I think this would affect laptop's health and in another way this is not necessary during some time frame for example when I sleep this laptop should be turned off to save power.

Image result for HP Z15                                Image result for HP 8470p
HP ZBook 15  Workstation                  HP EliteBook 8470p

In short, I want to make the laptop to automatically sleep and automatically wake up at my configured time.

Part I: Scheduled Sleep
Solution: Windows Scheduled Task

1. Run taskschd.msc or click Scheduled Task in program files.

  • Give it a name for example 'Scheduled Sleep' here, 
  • Select Run whether user is logged on or not, so that when first time reboot it can still run
  • Check Run with highest privileges if you want


2. In Triggers tap, configured the schedule

  • Here I make it run daily


3. The action Tap, configure the command

  • Rundll32.exe Powrprof.dll, SetSuspendState Sleep


4. In conditions tab, configure it as run only is plugged with AC power

5. Last but not least, when you run it, it will popup a dialog and please type your NT password and save.



Part II: Scheduled Wake up
Scheduled wake up is very challenge. I have searched a lot of posts and tried to configure through scheduled task but it didn't work. Luckily I found a tool which is simpler but very useful.

This is a freeware, WakeUpOnStandBy which you can download from here http://www.dennisbabkin.com/wosb/

The configuration is very straightforward.

  • Configure the wake up time
  • Check Turn screen on
  • Select every day so that it will run every day
  • Click Start to make all the configuration take effect


The last step is that to make sure the wakeuponstandby application is running when you login windows by drag the shortcut of this application under Startup.


All set. Test Passed. Happy World!


If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Jun 27, 2014

Finally, My Microsoft OneNote Online!

OneNote, without doubt is the best notebook in industry, and I have been using it since 2009. But there comes a problem that how I can sync my notes among different devices.

Microsoft gives out the solution to use OneDrive, how ever I just could not make it work.

In my OneNote, there is no place that I can switch account or use online folder etc.

When I tried to open a note file stored in OneDrive with my desktop OneNote.exe (by default it will be opened by online OneNote), I got an error like this:

The solution is to edit Registry settings.
HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\signin:signinoptions

Change this value from 3 to 1


Please review the link for details:
http://answers.microsoft.com/en-us/office/forum/office_2013_release-office_install/office-2013-office-account-signin-feature-disabled/d086ea41-431a-4798-b46a-2ebcd25b7cb7

The prerequisite step is to upload your OneNote notes files to OneDrive, and then login using our OneDrive account and it automatically pops up and you can choose a note you want.

Good to go!

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Jun 23, 2014

Strange maven-compiler-plugin Error when importing project

This problem cost me about 3 hours and finally I found a solution.

Let me describe the background. I have got a new laptop and want to set up a development environment: for eclipse I copied from my old machine and when I wanted to import a maven project, a strange problem happened:

Now it is fixed so the screenshot below looks good, but at that time, it was saying: maven-compiler-plugin 2.5.1 missing ...

I continue with the errors, but the project crashed no matter how I add dependencies.


I have tried to re-install eclipse, install maven, use different java version, use other versions of maven-compiler-plugin... None of them worked.

Here is the ultimate solution:
Delete the local repository settings by deleting the repository folder in .m2 (C:\Users\yourid\.m2\repository)


After restart eclipse and re-import the maven project, it is all solved.

Happy using new computer!

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Use Apple Keyboard in Windows

I have bought an apple MB110LL/B keyboard (someone called it apple G5) and I want to use it in windows 7. I found that my function keys do not work very well.



To well use it in windows, we have a software called SharpKeys

The step is: click Add, and then click 'Type Key' button, and on the right, select the actual key you want it maps to.
Logout and login again, it will take effect.

Useful Tips:

Clear on the Numeric Keypad is the 'num lock key' in windows.

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Apr 1, 2014

[Solved]Chrome cannot access Internet

All of a sudden I found my Chrome cannot access internet. In the beginning I thought it's a network problem, especially when I was in office using company proxy.

But I found that Internet Explorer is running, and even Chrome Canary is working normally.
https://www.google.com/intl/en/chrome/browser/canary.html

Chrome

I looked at all posts by didn't find any working solution.

Luckily I found out the root cause:
when I go to chrome-->Settings-->Advanced Settings
I found that change proxy settings is grayed out and it says "Your network proxy settings are being managed by an extension"


This makes me realize that there must be one extension that hijacked my network traffic. Then it is simple:
I found it's a AD blocker I am using, and I simply need to disable it.


Chrome is working well again.
For people might have similar problem, please check the extension you are using if Chrome cannot access internet, and you don't need to do things like uninstall and reinstall Chrome etc.

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Mar 21, 2014

Outlook leaves a bacground task running when shut down

When writing programs, I like to turn off Outlook so I would not be distracted by new coming emails, however recently I found a problem with Outlook:
Even I closed Outlook, it is still running in a background. You can launch windows task manager and see OUTLOOK.exe process there. Yes, when there are new emails it still alert me which is a little annoying.

I searched and found out that this problem has a big chance to be caused by Outlook plugin. You can try the solution below which is from Microsoft:

1. Close Outlook and kill OUTLOOK.exe in windows task manager
·         Press the windows key+R on the keyboard to open the Run window.
·         In Run window and type outlook /safe
Note: There is a space between 'outlook' and '/'.

2. If you are able to work with Outlook without any problem then the issue might be due to add-ins. In order to disable the add-ins follow the steps given below:
·         In Outlook, click on File< Options< Add-ins.
·         Under Manage select COM Add-ins.
·         Click on GO options beside Manage, uncheck all the add-ins and click Ok. (You you can uncheck the add-ins you don't think you need most of the time)
·         Try to open Outlook and check if it works fine.

I now can have it Outlook cleanly closed. 

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Feb 28, 2014

Interesting Maven - Repository setting

Today I met a maven problem that adding dependency always return a

The senario is like this:
I want to add a package called storm-kafka, and I can find one in the list

But after I clicked OK, I saw the progress bar was refreshing but very quickly it popped up an error dialog:

But interestingly another project which I download from github and was using the same library looks OK, as you can see below.

You see with the same library entry in pom.xml, this one is successful but my previous one  is not.

I spent much time on this and tried many ways like proxy setting, install an individual maven rather than using the one embedded in eclipse. But none of it works. Finally with a different eye's help, the problem was found:

in the project which successfully imported the library, in the pom.xml it has a setting like below:


Adding this in the first project's pom.xml makes it happy too.
 demo Maven Webapp
  
 http://maven.apache.org
  
   
   
    clojars.org
    http://clojars.org/repo
   
  
  
  
    
......


So this let us me learn that maven repository repository setting is an important part that you need to look at when adding dependency has some problems.

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Jan 26, 2014

How to configure static network IP address in Linux

Sometimes in Linux we need to have a static IP address, for example to install a Hadoop cluster, this is a recommended step. Though in windows it can be done graphically, in Linux it has an interesting way to do through a few commands. Let's take a look.

Part One: configure a static IP address in a physical machine
Note: here a physical machine I mean a machine that installs Linux OS directly, rather than a virtual machine.
Also almost all operations here need a sudo access, so we can sudo to an qualified account or add sudo ahead to each of the command.
1. view or edit 70-persistent-net-rules file
open a terminal, type
cat /etc/udev/rules.d/70-persistent-net-rules



By default, the name will be eth0, which means it will use a file name "ifcfg-eth0" to control the network settings,  but you can also let it use a new control file, say for example eth1. This can be done by in terminal, type
vim /etc/udev/rules.d/70-persistent-net-rules

and modify the name value to eth1.

2. Modify a configuration file
cd /etc/sysconfig/network-scripts
ls


You will see a file named ifcfg-eth0, which is the network configuration file as we mentioned earlier.
If you step1 you configured it to use a new file for example eth1, then you need to create a new configuration file:


vim ifcfg-eth1

Please configure it like below.

Note:
1). NM_CONTROLLED must set to no, so that it's not controlled by a service called NetworkManager
2) BOOTPROTO value is static, because it's a static IP. If it's controlled by NetworkManager, the value is dhcp
3) Add the entry for GATEWAY, IPADDR, and DNS here. If you have multiple DNS, you can put DNS1=...; DNS2=...; if you have only one DNS, you just put DNS1=....
4) People might have question that how I can know what values I can input in step 3. Here are two commands that we can use: ifconfig and route

3. Add DNS IP information in /etc/resolv.conf
vim /etc/resolv.conf


4. Persistent the configuration
1) We want to stop NetworkManager, so that the IP is set as we input and will not be changed by the service.
service NetworkManager stop

2) Make service NetworkManager by default not started when reboot system
chkconfig NetworkManager off

3) If you are using a new control file, for example in step 1 you want it to use eth1, and the original one is eth0. We need to bring down eth0 and bring up eth1
ifdown eth0

ifup eth1

4) restart network service
service network restart

5) if in step 3 or 4 you met some errors for example saying eth1 cannot be initialized. please reboot the system
reboot


Now you will have a static IP successfully configured.

Part Two:  configure a static IP address in a VMware virtual machine
configure a static IP in virtual machine is similar as doing it in physical machine, but there are a few differences.
Step 1. Same as step 1 in part one
Difference: In case you run vim /etc/udev/rules.d/70-persistent-net.rules and get the result as below. You may not know which is the right one to change.

Here you need to check in VMware your virtual machine settings by
right click your virtual machine name --> Network Adapter --> Advanced
It will show the MAC address, comparing it with the result above, now you will now it's the second one to modify.

Step 2: the same as Step 2 in part one
Difference: VMware NAT settings by default use 192.168.136.2 as the DNS and GATEWAY


so your configuration setting can be like below

Step 3: the same as Step 3 in part one
Step 4: the same

OK. All set!

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Jan 23, 2014

[Solved]Internet Explorer prompt "Request for permission to use a key" every time

I have imported a digital key but when I apply it, internet explorer always prompt a message "Request for permission to use a key" which is very annoying.



I searched but the posts in microsoft forum didn't point me to the right direction. Finally I figured out that the reason of this problem is that when I imported this key, I selected "Enable strong private key protection..." as shown below, which is by default selected.

Now how to solve this problem becomes very simple: delete the key and re-import it with the "Enable strong private key protection" check box unchecked. 

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Jan 14, 2014

Compile and Run Java Program in Command Window

I cannot recall the old days when we used the command window to compile and run a Java program, because we get used to use IDE like Eclipse. But it worth to make a note here:

1. Say you have write a simple program Hello.java, which will print "Hello World", for example the program is in directory called D:\temp

public class Hello{
 public static void main(String[] args){
  System.out.println("Hello World");
 }
}


2. Launch a command window, and go to folder D:\temp
javac Hello.java 
3. Here is the important part:
java -cp . Hello

Note:
-cp is the option to specify where the class path is,
. means the current folder, you can also specify a detail folder like D:\temp


If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Jan 6, 2014

How to install Windows 8 or Windows 8.1 from USB

DVD is decommissioning...We now watch TV series online, rather than renting from DVD stores, listen to music online, now we can even install Windows operation system online, and Microsoft develops a tool to help this.

Update: this tool is only valid for official Microsoft image file. Microsoft will do a check on whether the img file is valid. 

The name is Windows7-USB-DVD Download tool.
The introduction page is this:
http://www.microsoftstore.com/store/msusa/html/pbPage.Help_Win7_usbdvd_dwnTool
You can also download it directly:
http://images2.store.microsoft.com/prod/clustera/framework/w7udt/1.0/en-us/Windows7-USB-DVD-tool.exe


When you download an iso image, you can use this tool to make a bootable USB device in 4 steps. Plug your device in your computer, make the boot device as flash drive, and then Bing! everything flies all the way...

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

A Great Search Tool: Everything

Good tools can make your life easier, this is the moment in my head a famous advertise quote plays in loop:
Technology improves life...

I found a tool that fits in this category, the name is
Everything

The official site is: http://www.voidtools.com/
Everything is a tool that can quick search all files in your disk. You can type the name you want to search and the tool list all the files which name contain the keyword. Three things make the tool extraordinary:
No. 1: the index file it very small
No. 2: the tool itself is small
No. 3: search result is shown immediately.

Besides, it has a zip version if you don't need to install from a installer.

For example, if I want to search search "javascript"
The result is shown immediately in the list, and we can double click to open it or right click a file and choose "Open path" to open the folder in windows explorer.

Moreover, it supports regular expression and FTP... In all, a good tool to use.

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.