ProblemWorkstation 1 needs to connect to Database Server located at another part of the globe.
Prerequisites• Workstation 1 and Workstation 2 are on the same network.
• Workstation 3 and Database Server are on the same network.
• Workstation 2 can connect to Workstation 3 via SSH.
• Port 4321 at mycompany.com is forwarded to port 22 of Workstation 3.
• Workstation 2 does not have a firewall which allows Workstation 1 to connect to it.
• Database Server allows connection from Workstation 3.
SolutionCreate an SSH tunnel using Workstation 2 and Workstation 3 where Workstation 1 connection can pass through going to Database Server.
Steps:1. Go to Workstation 2 and make sure it can connect to Workstation 3 by issuing the following commands:
[user1@Workstation2 ~] ssh firstname.lastname@example.org -p 4321
Last login: Mon Feb 21 21:55:54 2011 from Workstation2
[user1@Workstation3 ~] exit
If you can do the above, then we are set to do tunneling.
2. Still on Workstation 2 issue the following command:
[user1@Workstation2 ~] ssh -f email@example.com -p 4321 -L 192.168.70.2:1234:192.168.50.2:3306 -N
We will define each one of the parameters:
This tells ssh to go to background just before command execution.
This defines your username and address of the remote computer.
This is the port in the firewall where in it is being forwarded to port 22 of Workstation 3. If your firewall is on Workstation 3, then this parameter can be omitted.
This is where the magic happens. -L means you want a local (Workstation 2) port to be forwarded to a remote host (Database Server) and port (3306) on the remote side (Workstation 3). Just to be clear, local side pertains to the computer network at Africa while remote side pertains to the computer network at South America.
The bunch of numbers after -L can be separated by colon(:) and here are their meanings:
192.168.70.2 is the address of the local computer (Workstation 2).
1234 is the port on the local computer (Workstation 2).
192.168.50.2 is the address of the remote computer (Database Server) on the remote side.
3306 is the port to access in the remote computer.
This means that you cannot execute a command on the remote host since your are only tunneling data. This is basically for security.
Once you have issued the above command and entered your password, the ssh connection will go in the background. The tunnel is now created.
3. To use the tunnel, we go to Workstation 1 and execute mysql:
[user1@Workstation1 ~] mysql -h 192.168.70.2 -P 1234 -u dbuser -pdbpasswd dbname
That's all there is to it. Workstation 1 is now connected to Database Server.
I get a lot of small business clients who come to me looking for a new website to help promote their business.
We go through pricing and different options for the web design and development, but for some reason, when I get to search engine optimisation (SEO) - explaining it, not selling it - some people decide this is less important that their website.
They think that having a website will be enough to help promote their business. But how can a website be found if there is nothing supporting it?
The problem is that there are billions of sites on the net. Just typing "Web Design" into google gets me about 700,000,000 results!
How is your website meant to compete? How are people going to find your brand new website or your brand new business? You need SEO.
Firstly, you should have some DIY SEO options available to you.
KAYWEB provides our clients with a SEO-friendly Content Management System (KAYWEB CMS), where tools are provided for clients to constantly be able to optimise their own website to achieve better rankings in Google and other search engines.
Is your current provider offering this service? Do your research, ask your web provider if you are getting a SEO-friendly website included in your package, with some ability to do SEO yourself.
Did you also know that when it comes to SEO, External Link Popularity and Keyword Focused Anchor Text from External Links are two of the most important things to generate better results on Google? Sound confusing? We can explain ;)
Why spend hundreds or thousands of dollars towards a website that will ultimately struggle to be found on Google? Ask questions!
If DIY SEO is proving difficult and not delivering you results, KAYWEB offers many affordable SEO packages for clients, where we focus on External linking, Content massage and much more to generate results. It always works!
Try our SEO services today, you have nothing to lose! Instead you have the opportunity of generating more results to your website and if you are not seeing results, which we know won't happen, just cancel your service!
Let us help you in growing your business.
P.S. I'll give you a BIG SEO hint . . . HOST your website in the same country as your main audience. Google Australia will rank a website higher if it's hosted on an Australian server when searching on Google AU. Google America (and any other country) will also do the same. So make sure you are hosting in the right area - it is worth the extra few hundred dollars per year!!
More info about SEO coming soon!
Gaming shows strong growth year after year. And with this comes innovation as well.
What do you think about a 17 button mouse?
I am sure, if you are one of the many World of Warcraft (WOW) players like me, a gamers’ mouse is not the latest thing. But for amateur gamers, let me discuss this special mouse.
The Razor Naga is the ultimate Massively Multiplayer Online Gaming mouse that shifts the balance between keyboard and mouse by putting an unprecedented number of in-game commands in one place.
The mouse has been optimised with an extra 12 buttons which are customisable to keyboard settings on the computer. This multi-button mouse will place every command you need in the palm of your hand.
According to GamesCom, the mouse enables players to “run rings” around other players who rely on a conventional keyboard to move around, jump, dance, and thwart evil plots.This would certainly make the games easier to play, give maximum comfort for long gaming sessions and make you a more competitive evil doer plot thwarter.
Recently, with my blog ‘A look at mobile websites’, I gave a insight about the growth of use of smart mobile devices. These devices, which are glued to human hands, ears and eyes for more hours in the day than ever before, run on mobile operating systems, like iOS, Android, Symbian, Windows 7, etc.
I thought it would be beneficial to dedicate this blog to introduce you to the fastest-growing mobile operating system in Google's Android.
What is Android?
Android is a software stack for mobile devices that includes an operating system, middleware and key applications. The Android OS can be used as an operating system for cellphones, netbooks and tablets, including the Dell Streak, Samsung Galaxy Tab and other devices.
Skills you’ll need to dive into Android programming:
- For technical and programming skills, knowing Java will make you more comfortable. Also understanding of common, object-oriented languages like C++ and C# will make someone pick things up quickly, as apps you develop in Android are heavily dependent on the said frameworks.
- Some experience with a tag-based view technology like HTML or Adobe's Flex will makes the views very familiar.
Difficulties you’ll encounter:
- Layouts would be the hardest initial things to overcome as an Android developer. It required digging into the source code to make things look the way you wanted. There were things that were just not skinnable, or required making a completely new component, or changing the design.
- Taking full-size pictures in the app and using those pictures is harder than it should be.
- Another thing that is almost unbelievable is how much of a pain it is to work with maps. It requires signing up for an API key per computer to even see maps. Compare that to iPhone map development with Google maps, where you don't have to do any of that. They just work.
Tools you should have on hand:
- You need the Android software development kit, which comes with the emulator. Most developers prefer Eclipse for Java development, and the Android Developer Tools work with Eclipse.
- It also really helps to have a device, especially when doing things with location or with the camera.
Things you need to consider as you are creating Android-based apps for multiple devices:
- The big one is layout. If you fudge a layout to just get it working on a single device, it's going to get you later. You'll also need to prepare for different APIs not being supported, like the camera for instance. Designing the application well is going to make you think harder about the core functionality and use cases you want to support.
Best support resources for Android programmers:
- The Android Developers site would be a great help. It has all the associated documents, code and the Google groups.
- And as Android is open source, you can easily run searches and see what Google engineers did to make the core apps do what they do.
But did you know that double-digit percentage optimisation results can be achieved with a few simple steps?
Having optimally-running software is quite a bit of challenge. The main difficulty in achieving maximum speed lays in small implementation details, that, if not treated properly on time, build up and often are difficult to track down.
In a nutshell, writing a fast program means coding the same logic in fewer steps required for the computer to perform.
The following are several simple hints for programmers related with the well-known statements.
Program codes seldom follow a unidirectional path if statements are probably the most used statements of all. The syntax of the statement is:
if <condition holds true> then <do something with THEN (TRUE) caluse>
otherwise <do something with ELSE (FALSE) clause>
Firstly, some sign legends:
- == - EQUALS TO
- != - NOT EQUALS TO
- && - AND clause
- || - OR clause
- ! - NOT (NEGATION) clause
Usually, the condition of the if statement is comprised of multiple atomic (unbreakable into simpler pieces) conditions with optional NOT negation clause that are joint together with AND or OR clauses.
1. (a == b) && (c != d)
2. (a != b) && (c != d)
are both valid if conditions. Let's analyse the number of steps needed to gain a result.
(a == b) && (c != d) - in human language this means that to perform THEN clause a and b must be the same and c and d must be different.
This condition is equivalent to (a == b) && !(c == d). So
- Check if a is equal to b
- Check if c is equal to d
- Negate the result of 2.
- Output TRUE if 1. and 3. are TRUE
(a != b) && (c != d) - in human language this means that to perform THEN clause a and b must be different and so must c and d.
This condition is equivalent to !(a == b) && !(c == d). So
- Check if a is equal to b
- Negate the result of 1.
- Check if c is equal to d
- Negate the result of 3.
- Output TRUE if 2. and 4. are TRUE
Disjunctive Normal Forms (DNF) and Conjunctive Normal Forms (CNF) are methods to transform a condition into an equivalent condition (which may result to better performance in computer terms).
DNFs contain atomic conditions that are related to each other with OR clauses.
CNFs contain atomic conditions that are related to each other with AND clauses.
Following are statements that we will use to figure out how to optimise conditions of if statements.
DNFs result to TRUE value if at least one of its conditions is TRUE,
CNFs result to TRUE value if and only if all of its conditions are TRUE.
CNFs result to FALSE value if at least one of its conditions is FALSE,
DNFs result to FALSE value if and only if all of its conditions are FALSE.
DNFs can be converted into CNFs and vice versa using the following rules. I will use <==> sign to mark equivalency.
- A || B <==> !(!A && !B)
- A && B <==> !(!A || !B)
Having the two statements above we can deduct that the (a != b) && (c != d) condition can be performed faster by performing less steps. Really,
- (a != b) && (c != d) <==> !(a == b) && !(c == d) ,
- which by the DNF to CNF interconversion rule <==> !( !(!(a == b)) || !(!(c == d)) ).
- ! applied twice neutralises itself thus we have !( (a == b) || (c == d) ).
Analysing the result we have the following steps
- Check if a is equal to b
- Check if c is equal to d
- Take TRUE if either 1. or 2. or both are TRUE
- Take the negated result of 3.
So instead of 5 steps we managed to do the same thing in 4 steps. Taking a close look at both versions
!(a == b) && !(c == d) and !( (a == b) || (c == d) )
we can clearly see that the optimum one has less NEGATION clause. So the verdict is:
- NEGATION clauses can be trimmed
- Excessive NEGATION clauses can slow down the code.
Modern programming languages are going one extra step to optimise the code further by making good use of the 1. statement about DNFs and CNFs:
- For DNFs if the code encounters a TRUE atomic clause it disregards the rest of the clauses as they will not influence the final result,
- For CNFs if the code encounters a FALSE atomic clause it disregards the rest of the clauses as they will not influence the final result.
- For DNFs put the likely TRUE clauses before the rest of the clauses,
- For CNFs put the likely FALSE clauses before the rest of the clauses.
Let's consider !( (a == b) || (c == d) ) again.
- Check if a is equal to b
- If 1. is TRUE negate 1. and take the result as an answer (2 STEPS ONLY), otherwise If 1. is FALSE Check if c is equal to d
- Take TRUE if either 1. or 2. or both are TRUE
- Take the negated result of 3.
Considering that 2. has 50/50 chance to be TRUE or FALSE we finally have that on average the whole statement can be performed in ( 2 + 4 ) / 2 = 3 steps.
So we gained approximately 40% performance improvement in obtaining a result for the condition (a != b) && (c != d).
Additionally, if an
if (condition) then else
can be transformed into an equivalent
if (condition) then
form then the code will avoid an unnecessary calculation which is also an optimisation measure.
Further to come,
1. Does unary operators have underwater reefs.
2. Memory usage versus quick execution, an example.
In 1979, Philips and Sony, through partnership, successfully developed the Compact Disc in 1983. A spin-off of Laserdisc technology.
While Laserdisc was too big, the Compact Disc, or CD as it is called today, was small and was a great technological marvel because at a diameter of 12cm it could hold a 74-80 minute audio capacity and a 650-700 MB data capacity.
With the advent of the CD Writer in early 2000, we have used the CD for audio materials and file backups. CDs have been widely use for almost anything; audio, videos and even greeting cards.
All of that changed when the DVD arrived. DVD, also known as Digital Video Disc or Digital Versatile Disc, is an optical disc storage media format, and was invented and developed by Philips, Sony, Toshiba, and Time Warner in 1995. Its main usage is for video and data storage.
It has the same physical size as the standard CD but packs a 4 Gigabyte storage capacity. It comes in different storage capacity sizes and is pegged at 17 Gigabyte at a maximum. The DVD has also been used to make HD Videos, Hi-Def Videos using HD DVD - a different capacity format.
Blu-ray Disc is also an optical disc storage medium designed to succeed the DVD format. The format has a 12 cm (same as DVDs and CDs) diameter, 25 GB per-layer optical disc, with dual layer discs (50 GB) the norm for feature-length video discs and additional layers possible.
The name Blu-ray Disc refers to the blue laser used to read the disc, which allows for six times more storage than on a DVD. The term Blu was used because blue is commonly used in English and therefore not registrable as a trademark.
Blu-ray Disc was developed by the Blu-ray Disc Association, a group representing makers of consumer electronics, computer hardware, and motion pictures. Every hi-definition game involves a Blu-Ray disc as its medium.
Technology is really moving forward and fast. What you thought impossible is now possible.
I can still remember when I used to play our gramaphone using a vinyl record and was fascinated on how the audio data was encoded there. Now having a CD or DVD that packs a lot of data is a common thing.
I say let's keep moving it forward with the web and digital content and delivery as the next great medium.
For people who have played and experimented with Google AdWords before, you probably thought it was easy to set up your ads.
Your right! It is very easy to set up. But are you setting it up correctly?
Did you know you ad could be affected if you have to many capital letters in your titles? Did you know that you need a good quality score to have you ad show higher? Did you know that there are loads of terms and conditions that Google has when you create an ad which if not followed will affect you ad?
I could go on and on about things that you may have overlooked or not known when setting up your account which is affecting your ads.
A few years ago I started my very first Google AdWords campaign. I thought I set it up correctly. I had my catchy tag lines and loads of keywords that I wanted to show in Google!
I put in my Credit Card details and I was eagerly waiting to get hundreds of visitors to my site.
Day 1 passed and my ad was not visible, Day 2 neither . . . . Day 14 and still nothing. My ad wasn't showing anywhere.
I didn't know what was going on! So I began reading and researching what was going wrong!
I had a low CPC (Cost Per Click) bid that was affecting my ad. My quality score for keywords was low. My ad had too many capitals. My landing page didn't have relevant information. Basically, I was doing a 100 things WRONG and I didn't even know!
AdWords is NOT easy to set up and there is a lot of work that needs to go into an AdWords campaign to make it successful.
AdWords can cost you a lot of money and if you are not targeting the right people or setting up your ad correctly you could be missing out.
If you need help with your existing Google AdWords campaign or you would like to set up and new Google AdWords account to help promote your business, please contact KAYWEB and we will be able to help you out with all our vast Google AdWords knowledge.
The year 2010 saw the emergence of Facebook as the most visited site in the United States. From being the third most visited website in 2009, Facebook, the largest social networking website, has taken the top spot from Google; still the most-used search website.
According to Hitwise, an internet traffic monitoring group:
“Facebook was the top-visited Website for the first time and accounted for 8.93 percent of all U.S. visits between January and November 2010. Google.com ranked second with 7.19 percent of visits, followed by Yahoo! Mail (3.52 percent), Yahoo! (3.30 percent) and YouTube (2.65 percent).”
The rise of Facebook to the top seems inevitable since more people rely on websites with shared information with other people than what we would find in algorithm-driven search websites. This could also mean that people trust online content (videos, photos, etc.) that is shared by people within their network more than going to a random website via a search.
Think of this as an example. People will watch YouTube video embedded in a friend's Facebook wall. Since they are on Facebook, they will decide to post their thoughts about the video underneath that video, share to other friends, etc. These activities will count towards Facebook’s traffic as the said video is determined as trusted content from a friend.
Facebook applications, especially online games, are another factor that heavily contribute to its popularity.
For this year, we are expecting a tighter competition between Google and Facebook. With Facebook setting the trend, don’t be surprised if Google keeps trying to place a dent into the social web market. Its previous attempt with Google Buzz was timid at best.
I stressed particularly that the 2-year minimum/maximum domain registration period is contrary to the needs of business, and I pushed for the auDA Board to allow 1 year to 5 year registrations of .com.au domain names to bring Australia in line with other countries.
This discussion, as well as the dozen or so more that the 2010 auDA Names Policy Panel analysed is part of a Discussion Paper we released for public discourse. Please click here to read.
You are also encouraged to take part in a survey, where the domain name registration period is one of a number of questions you are able to respond to, thus become part of the Australian domain name policy setting process.
Please click here and complete the survey BEFORE 21 January.
A new social network startup has been getting a lot of attention. It is called Path – the Personal Network. Hmm, personal? Does this not translate to anti-social?
Path is a San Francisco-based startup with some high profile employees from the tech industry. Dave Morin, who helped build Facebook Connect and the Facebook Platform, left the company this year to start his own venture and be the company’s CEO. Shawn Fanning, the co-founder of Napster, is also heavily involved in the project. Kevin Rose, of Digg fame, is an investor.
The Path Blog issued a statement conceptualising their network,
“Path is the personal network. A place to be yourself and share life with close friends and family. The personal network doesn’t replace your existing social networks – it augments them.
Path allows you to capture your life’s most personal moments and share them with the 50 closest friends and family in your life who matter most.Because your personal network is limited to your 50 closest friends and family, you can always trust that you can post any moment, no matter how personal. Path is a place where you can be yourself.”
A concept that makes it unique: You're limited to 50 friends. Yes, 50 (and no more than 50) of your closest friends.
This magical number of 50 was based on the research of Robin Dunbar, an Oxford professor of evolutionary psychology, claims that the average human can only maintain about 150 stable relationships. For some reason, Dave Morin decided we can have no more than 50.
Apparently, there is such a thing as having too many friends and I think this is the problem Path team is trying to solve. When you follow hundreds and hundreds of people on Twitter, or have more “friends” on Facebook than you could actually know, you lose the closeness that those networks intend you to have with the people that you care about.
And what else is new on path: Path lets you know who's seen your photos. That's not possible with Facebook, but another social media service, LinkedIn, lets you know who's seen your profile, so it's not entirely new.
And now I’m wondering if Path will catch on. Aren’t there too many social networks already? Isn't any newcomer going to have trouble competing against that 500-million-user Facebook? And Path's 50-friend limit... It is their differetiator, but is it their advantage? Time will tell.