Fix VMware Workstation 7 vmnet problem.
I'm running Fedora 12 with VMware Worksation 7 installed. Since the last kernel updated I can't start vmware, it always shows a vmnet errors.
After trying to google many times, I found a solution from fedoraforum :D
First, I must install "kernel-devel".
Then, I run these commands with sudo (my account is in sudoer group)
# cd /tmp
# tar xf /usr/lib/vmware/modules/source/vmnet.tar
# nano vmnet-only/vnetUserListener.c (near line 37 add #include "compat_sched.h")
# tar cf /usr/lib/vmware/modules/source/vmnet.tar vmnet-only
# tar xf /usr/lib/vmware/modules/source/vmci.tar
# nano vmci-only/linux/vmciKernelIf.c vmci-only/include/pgtbl.h (add #include "compat_sched.h" around 30 line)
# tar cf /usr/lib/vmware/modules/source/vmci.tar vmci-only
# vmware-modconfig --console --install-all
Cheer, now vmware can work fine.
Quay trái, quay phải hay đi thẳng?
Mỗi lần phải đưa ra một quyết định là một lần cảm thấy khó khăn. Có lẽ mình không quyết đoán lắm trong những tình huống lựa chọn như vầy. Cùng lúc đưa ra 3 lựa chọn, đi thẳng, quẹo trái và quẹo phải, không thể nào nhắm mắt bước đại được, phải suy nghĩ, phải lựa chọn, để rồi sau khi suy nghĩ xong, lại có cảm giác buồn buồn.
Khi đưa ra quyết định cũng là lúc phải vứt bỏ, quay lưng. Buồn hơn khi quay lưng, chấm dứt với những cái đã dần trở nên thân thuộc với mình.
Nói sao thì nói, quyết định không thể không đưa ra, quay lưng là không thể tránh khỏi, buồn, vương vấn là không thể không gặp, đành vậy thôi, cuộc sống mà, làm sao tránh khỏi được, nhỉ?
Vòng tròn lẩn quẩn :(
Hết năm
Quay qua quay lại vậy mà đã hết năm.
Một năm, ngoại trừ 3 tháng ở nhà chơi, 2 chỗ làm, tính đi tính lại, được nhiều, đầu óc thoải mái nhiều, tuy là chỗ làm chưa ưng ý lắm, chưa gặp sức ép nào đáng để gọi là sức ép, nhưng bù lại học được nhiều, coi như là bàn đạp vậy.
Hết năm, nhận được lời đề nghị từ 2 chỗ mới, 1 fulltime và 1 parttime, cơ hội nhiều, mong đợi nhiều, hy vọng là không phải thất vọng với kỳ vọng (không lấy gì làm cao sang của mình :">) Trước hết là nắm bắt đã.
Ngoảnh đi ngoảnh lại, 365 ngày chỉ như cái chớp mắt, chớp càng nhiều, thời gian càng qua nhanh. Thôi, ngủ đã :">
14 Tips To Make A Better Portfolio Website
Here is some tips to make your portfolio better, these tips was posted by Michael on http://www.webdesigndev.com. Hope this post will useful for you, who want to introduce yourself via a good portfolio :)
Over the last 5 years I have used dozens if not 100’s of designers and found some designers get their portfolio very wrong! You got to expect your websites visitors and clients to be completely uneducated in how to use websites, there for make it idiot proof! Here is a list of 14 tips and suggestions for your online portfolio.
Make it easy for people to contact you
This is my number one point, so often when looking for work to be done I can’t find out a easy way to contact the design. You need to make it easy for people to contact you, there is no point having an amazing portfolio if no one can contact you for work. Don’t just have one form of contact either. You can list your email, phone numbers, and also be contactable via social networks such as Twitter and Facebook. Also another idea is to tell them when they can expect to hear back from you, often potential clients want to start ASAP and so if they can expect to hear from you sooner then other designers then they may pick you over them.
Make it clear who you are
On your portfolio, you need to make it clear who you are. Remember to list your previous experience, so clients know who you have worked with and on what types of projects, etc. Its also useful to list your time zone so clients know what hours you are up and where about in the world you are located.
Your work speaks for itself
Make sure you have a strong portfolio. Don’t list every bit of work in your portfolio, especially if its similar. Display the best, and you will sell yourself at a high standard.

Make it clear what you’re offering
Make it clear to the client what you are actually offering to them. There’s no point in getting to the mid project stage and the client saying, can you buy this domain for me then, if you didn’t make it clear that you aren’t buying the domain but just hosting it, etc.
Make your prices are clear
Make your prices clear on your portfolio. You could say web design 5 pages for $… so that its clear for customers to know what they are actually paying. When working with potential clients they are sometimes don’t see the value in your service and don’t expect to pay very much, so if you are a high end designer, make it clear you are and your average rates. A great example of making it clear how much work will cost is PSD2HTML.
Make your portfolio perfect
If your portfolio is perfect, your customers will think that their website can be the same. This doesn’t just include spelling mistakes, but the navigation, user interface and cross browser compatibility.
Full size previews
On your portfolio, make sure if you are displaying thumbnails that they link to a full size preview of the design. Your customers don’t want to strain their eyes, and plus a full screen size makes sure clients can see your full potential.

Make it clear your a real person
On your portfolio, come across as a real person. Maybe put a picture up of yourself, so clients know that they are working with a real person. Often potential clients are put of thinking you make scam them, make sure your clear this won’t happen because your a real person offering real services.
Explain the process
Clients can always get confused about the process, because every designer is different. You could provide a diagram of how you complete the design process with clients. For example, the design faze, drafts, deposits and so on…
Upsell the client with services they actually need
Maybe on the page where clients get a quote from you, you could sell the client services they might actually need. This maybe domain names, hosting, or website management.
If you have been featured by a big company, show off
Designers around the world have been featured all over the place, in newspaper, magazines, news websites and have been interviewed. This adds to your credibility and so its important to show it off!
If you work with a big client, show off
The same goes for if you actually work with a big client. Say if you designed a posted for Sony’s Playstation 3, why not show off the fact that Sony is one of your clients.

Testimonials, Let your past clients write a personal recommendation
By all means let your clients write a statement about your services, and what working with you was like. I’m sure when displaying the testimonials you can link back to their company. Its a win win situation for both you and the client.
Call to action
If you offer a call to action, clients are more likely to buy your services. Such as if you say 10% discount if you order a logo design by a certain date or ask them to fill out a form asking for a quote.
CSS3 rounded corners for every browser? An alternative quick solution without headache
Here is a really nice post by Antonio Lupetti at http://woork.blogspot.com. Thanks for great post.
In the last weeks I frequently received a question about how to use CSS3 border-radius property to draw HTML elements with rounded corners in Internet Explorer. How you know CSS3 border-radius property is natively supported in Safari, Firefox and Chrome but for some mysterious reason this property is not supported in Internet Explorer.
So to draw rounded corners in IE you have to use some trick, for example using CSS classes with a background image (take a look at this post).
The simpler and quick solution I know to draw rounded corners in every browser is to use a mix of CSS3 and JavaScript. CurvyCorners is a free JavaScript library for creating gorgeous rounded corners for HTML elements. The final result looks like this:

The big advantage of this script is that lets render rounded borders in Safari, Chrome and Mozilla (which support rounded borders via -webkit-border-radius and -moz-border-radius) natively with CSS3 property and in IE and Opera with JavaScript.
The only thing you have to do is to include curvycorners.js into the <head> tag of your page:
Then you have to write a CSS class like this:
padding: 10px;
background-color: #DDEEF6;
border:1px solid #DDEEF6;
/* Do rounding (native in Safari, Firefox and Chrome) */
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
}
At this point add the following code into the <head> of your page, after the previous CSS code:
function initCorners() {
tl: { radius: 6 },
tr: { radius: 6 },
bl: { radius: 6 },
br: { radius: 6 },
antiAlias: true
}
curvyCorners(setting, ".roundedCorners");
}
</script>
tl, tr, bl, br are: top-left, top-right, bottom-left, bottom-right borders.
If you have different CSS classes (ex. roundedCorners, roundedCorners_1, roundedCorners_2) you can apply them changing the previous code in this way:
curvyCorners(setting, ".roundedCorners");
curvyCorners(setting, ".roundedCorners_1");
curvyCorners(setting, ".roundedCorners_2");
...
Now if you want to apply rounded corners to a DIV element use this code:
This is the result in every browser:

I think this is actually the simpler and quick solution to implement rounded corners in every browser. Ok... and what's if JavaScript is disabled? Sincerly I think this case is not so frequent... but if you don't want to use JavaScript, the most realiable solution is to use CSS classes with background images. Any suggestion about this topic? Please leave a comment, thanks!
Download the source code here:

Related Posts
You can also take a look at these posts I wrote some time ago about similar topics:
- Liquid styled input element with CSS
- Clean Tab Bar Digg-like using CSS
- Liquid expandable section with rounded corners using CSS
- Liquid layer with rounded corners using css
Extjs quick start guide for jQuery Developers
I'm a big fan of jQuery and I always use jQuery for my projects, but, when I changed my job and came to my current workplace, I must use ExtJs, another really cool Js framework. This took me alot of time :( since I've read the tutorial named "Extjs quick start guide for jQuery Developers" written by Anis Ahmad at http://www.ajaxray.com. Hope it can help you :) ( The original post here. Thanks Anis Ahmad. )
I’ve seen many people (including myself) trying out the power of jQuery for once and then getting stuck with it. Why not? It’s one of the coolest and smartest JavaScript library out there. However, I have broken out from the circle and found that Extjs is another great mentor in the field of JavaScript libraries. Especially, I think it’s UI components are unbeatable (Dojo can be a nearest candidate).
If you are habituated to think JavaScript coding in the syntax of jQuery, you can start working with ExtJS right now (with a few twist)! What you need is some little tuning in concept and syntax. Today I will be trying to explain how to do this in 6 important points :
- Document is ready - How to get the our document ready and where to start.
- Selecting elements - How to select elements in Ext.
- Dom scripting - Changing on and in the element.
- Ext events - Assigning and firing events.
- Ext Components - The powerful alternate of jQuery UI.
- Ajax - Making Ajax request in Ext.
Ok, let’s dive in to deep of each of these points.
Document is ready
First of all, you need to download, extract and set up the page for using Ext. Remember to download the API Documentation as well.
Now, here is how we setup jQuery and register a ready event for the document in jQuery:
<script type="text/javascript">
$(document).ready(function() {
// do stuff when DOM is ready
});
</script>
To do the same thing in Ext, you have to include default ext css, an adapter and the Ext itself. See the difference at the point of $(document).ready(). When the DOM is ready, Ext fires the Ext.onReady() event.
<script type="text/javascript">
Ext.onReady(function() {
// do stuff when DOM is ready
});
</script>
Selecting elements
To take any action, you have to select the element first. In jQuery, simply $(’css-selector’) does everything. It works for a single element by ID, some elements by tag name/class or any complex selection with virtual selectors. But in Extjs, two different methods are used for selecting a single element by ID and other combined multiple element.
Selecting by id in Extjs is done by Ext.get() method. Here is an example of selecting an element and performing some action on it.
// Selecting by ID in jQuery
var myDiv = $("#element-id");
// Selecting by ID in Extjs
var myDiv = Ext.get('element-id');
// Perform some action on it
// Add a class
myDiv.addClass('my-class');
// Set the width 100 px,
// true is for applying default animation on change
myDiv.setWidth(100, true);
// Retrive some information of the element
// Get the elements box info as object {x, y, width, height}
var box = myDiv.getBox();
See the Ext.Element class in API Doc to know what more actions you can perform on an element.
On other hand, Ext.select() method is used to select other CSS selection. Here is an example:
// Select elements with CSS Selector
var imgs = Ext.select("#my-div div.member img");
// or select directly from an existing element
var members = Ext.get('my-div');
var imgs = members.select('div.member img');
// Now, any Ext.Element actions can be performed on all the elements in this collection
Please note these points about selected Ext elements:
- Ext.get() returns Ext.Element object and Ext.select() returns Ext.CompositeElement object.
- All Ext.Element actions can be performed on Ext.CompositeElement object
- The actions performed on DOM nodes can be chained.
- Ext.select() uses the powerful DomQuery class for selecting. See this class for using virtual selectors and more.
Dom scripting
Like jQuery, ext has easy methods for perform insertion, deletion, moving, copying etc on selected element(s). Ext.Element class has functions for performing common tasks.
var el1 = Ext.get("my-1st-div");
var el2 = Ext.get("my-2nd-div");
// Appending elements
el1.appendChild("<p>A new paragraph</p>").appendTo(el2)
// Replcing, removing
var el3 = Ext.get("my-3rd-div");
Ext.get("my-4th-div").replace(el3).insertAfter(el2);
el2.remove()
See the Ext.Element class for more functions like these. To extending the power of DOM scripting, see the Ext.DomHelper class.
Ext events
First the easiest example. See how we do in jQuery and how to do in Ext.
// Binding an event in jQuery
$(".btn").click(function() {
// Do something on button click
});
// Binding an event in Extjs
Ext.select('.btn').on('click', function() {
// Do something on button click
});
So, instate of binding with functions with event name, we will bind with Element.on() function of Ext.Element class. The 1st parameter of Element.on() is the event name and the 2nd is a function name or an anonymous function.
See the Ext.EventManager and Ext.EventObject classes for complex event handling.
Ext Components
Ext has dozens of extensive UI Components. All they are extended from Ext.Component class. There are BoxComponent, Button, ColorPalette, DataView, DatePicker, Editor, ProgressBar, Slider, TabPanel, Tree, many kinds of Grids, Toolbars, Menus, Form components and much more. Each of this components needs separate tutorials to learn. So, I am not going to describe it in this little scope. See this page for component specific tutorials.
http://extjs.com/learn/Tutorials
Ajax
Ajax requests are handled in Ext.Ajax class. Sending basic Ajax request in Extjs is very similar to jQuery-
// Basic request in jQuery | // Basic request in Ext |
Like the jQuery load function, here is also similar function exist in Ext.Element to insert Ajax response directly into DOM.
// Load Ajax response in directly in jQuery
var msgBox = $('#message');
msgBox.load('myurl.php', {name : $('#name').val()} );
// Load Ajax response in directly in Ext
var msgBox = Ext.get('message');
msg.load({
url: 'myurl.php',
params: 'name=' + Ext.get('name').dom.value,
});
See the Ext.Ajax class for more featured Ajax functions of Extjs.
Before ending, here is a surprise for you. Though you cannot leave jQuery for a moment, you are not going to miss the power of Ext. These tutorials describe how to use Ext with jQuery -
http://docs.jquery.com/Tutorials:Using_Ext_With_jQuery.
http://filchiprogrammer.wordpress.com/2007/12/27/combination-of-ext-and-jquery/
http://blog.jquery.com/2007/02/19/jquery-and-jack-slocums-ext/
See you soon.
Keyboard navigation with JavaScript and jQuery
Martin Grill at http://arrglarks.de had posted a great tutorial about keyboard navigator with jQuery here.
You can read that tutorial here also :). Thanks Martin Grill for the post :
I had to add functionality for keyboard navigation to my latest project at work recently. It started out with the need to disable the browser’s postback when someone hits ENTER in a formular. Of course more had to be added once our usability guy realized that theoretically eliminates the need for a mouse. The following example is a bit more basic though and covers only what’s need to understand the concepts.
First of all we have to register the event on the document. Unfortunately keypressed isn’t supported on all browsers and keyup is a little too late to prevent all browser functions so we have to go with keydown.
$(document).keydown(function(event){
For cross-browser compatibility two properties of the event need to be checked:
event.keyCode and event.which.var key = event.keyCode || event.which;
And the last thing you have to know is whether the focus is on a textbox or a textarea. Otherwise we can screw up the ability to edit text very easy if we work with
ENTER, DELETE or BACKSPACE. The check is done by looking at event.target.type.if(event.target.type !== 'textarea'){
For the rest of the example, let’s say we have three buttons on our page, selected by jQuery, which get shown and hidden dynamically according to the context: one back button,
$back, one forward button, $forward and one button to submit the form, $save.//ENTER
if (key === 13) {
//The button has to be visible to be used.
if ($save.is(':visible')) {
$save.click();
} else if ($forward.is(':visible')) {
$forward.click();
}
//Preventing any other action by the browser
//even if no button is visible
return false;
}
//Not in a textarea or textbox
if (event.target.type !== 'text') {
//BACKSPACE
if (key === 8) {
//SHIFT is also pressed
if (event.shiftKey) {
if ($forward.is(':visible')) {
$forward.click();
}
} else {
if ($back.is(':visible')) {
$back.click();
}
}
return false;
}
}
}
});
That’s it, our application’s enhanced with a few simple keyboard commands.
A little tip at the end: To make your code easier to write and understand here’s a handy object maps the real key codes of the most important special keys to easy to use constants. Just put it in front of the rest of your code.
var keyCode = {
BACKSPACE: 8,
CAPS_LOCK: 20,
COMMA: 188,
CONTROL: 17,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
INSERT: 45,
LEFT: 37,
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
NUMPAD_ENTER: 108,
NUMPAD_MULTIPLY: 106,
NUMPAD_SUBTRACT: 109,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SHIFT: 16,
SPACE: 32,
TAB: 9,
UP: 38
}

