CentOS useful commands
To get your CentOS version type: cat /etc/redhat-release To update all your CentOS packages at once: yum update To install nslookup, dig and other network utilities: yum install bind-utils -y
To get your CentOS version type: cat /etc/redhat-release To update all your CentOS packages at once: yum update To install nslookup, dig and other network utilities: yum install bind-utils -y
Show User ~/Library in OS X Lion Launch Terminal from Spotlight or Launchpad > Utilities, and enter the following command to show the directory: chflags nohidden ~/Library/ The users Library folder will immediately become visible. Reverting this back to the standard Lion setting is simple too: Hide User ~/Library in OS X Lion (default setting) [...]
Creating a simple gradient using two colors is very simple: Rectangle rect = new Rectangle(0, 0, 100, 100); LinearGradientBrush lgb = new LinearGradientBrush(rect, Color.White, Color.Blue, 90); e.Graphics.FillRectangle(lgb, rect); This code will generate a gradient in the given rectangle that goes from white to blue in a vertical way (see last parameter in constructor). In this [...]
Believe me, it is easy. As with any class, before we can use any of the Classes, Events and Objects available to us in the .Net Framework we need to import the Namespaces we need. For this we need but 3, the VB.Net counterpart only required 2 because VB.Net assumes the System Namespace, whereas C# [...]
There is a simple way to know this. The following code takes white (#ffffff) divided it by two as our reference color. If the comparing color is “lower” than the reference color, then you have a dark color, otherwise you have a light color. function isLightOrDark($hexcolor) { return (hexdec($hexcolor) > 0xffffff/2) ? ‘light color’ : [...]
You can assign a printer and other settings by using the basic PrintDocument and PrintDialog controls properties. Look at the next example: if (printDialog.ShowDialog() == DialogResult.OK) { printDocument.PrinterSettings.PrinterName = printDialog.PrinterSettings.PrinterName; printDocument.PrinterSettings.Copies = printDialog.PrinterSettings.Copies; }
For blogger who self-hosts the WordPress blog publishing system on a web hosting server with own registered domain name, sometimes, you may decide to reorganize the blog link URL to make it tidier or to reflect new focus or theme of the blog. If you decide to change the URL or link location of your [...]
Worth to see…
Papyrus is a UML designer plugin for the eclipse development environment. Installing it on the Indigo version is very easy: Go to Help > Install New Software… Under Work with, select All Available Sites and look for Modeling on the tree view. Under Modeling, look for MDT Papyrus – SDK and press the Next button [...]
If you are one of those who started surfing and creating the web in the 90′s, Reocities will take you back in time to the beginning of an era. Blue text on green or yellow wallpapers and animated gif’s overloaded the pages during the last decade of last century. After Geocities closed in 2009, Reocities [...]