Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

then

case and if else statement in sql server
Saturday, 28 January 2012 01:52
// case and if else statement in sql server



DECLARE @MyVal INT

DECLARE @OUTPUTValues VARCHAR(200)
SET @MyVal = 1

SELECT @OUTPUTValues =
(
CASE @MyVal
WHEN 1 THEN 'test1'
WHEN 2 THEN 'test2'
WHEN 3 THEN 'test3'
ELSE 'New'
END
)

PRINT @OUTPUTValues

SET @TestVal = 5

IF @MyVal= 1
SET @OUTPUTValues= '1'
ELSE IF @MyVal= 2
SET @OUTPUTValues= '2'
ELSE IF @MyVal= 3
SET @OUTPUTValues= '3'
ELSE
SET @OUTPUTValues= @MyVal

PRINT @OUTPUTValues

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/d-lZJBN1KvY/14507

 
Daily Desired: Designer 3-D Glasses Cool Enough for James Dean [Desired]
Monday, 23 January 2012 22:00
Remember after watching Piranha 3D when you walked off with a set of 3-D glasses, and then wore them in public? You felt silly. These glasses are different. More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/Hv4IHIYUFkw/daily-desired-designer-3+d-glasses-cool-enough-for-james-dean

 
How to Sort Char array
Wednesday, 14 December 2011 00:47
This example uses a character array of three chars and then calls Array.Sort on it to sort it in-place. Then, it loops through all the characters and displays the elements in their new, alphabetical order.


using System;
class Program
{
static void Main()
{
char[] array = { 'y', 'n', 'a' }; // Input array.
Array.Sort(array); // Sort array.
foreach (var c in array) Console.WriteLine(c);
}
}
//Output
// a
// n
// y

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/bR7gyRBipEM/14165

 
SQL Columns metainfo : "vw_XL_TableColumns"
Tuesday, 11 October 2011 10:51
CREATE VIEW dbo.vw_XL_TableColumns
AS
SELECT TOP (100) PERCENT tabs.name AS TableName, col.name AS ColumnName, coltype.name AS TypeName, col.max_length AS MaxLength, col.precision, col.scale,
CASE WHEN col.name = pkCol.COLUMN_NAME THEN 'Y' ELSE 'N' END AS IsPrimaryKey, CASE WHEN col.is_nullable = 1 THEN 'Y' ELSE 'N' END AS IsNullable,
CASE WHEN col.is_identity = 1 THEN 'Y' ELSE 'N' END AS IsIdentity, CASE WHEN col.is_computed = 1 THEN 'Y' ELSE 'N' END AS IsComputed,
col.column_id AS ColumnOrder
FROM sys.columns AS col INNER JOIN
sys.tables AS tabs ON col.object_id = tabs.object_id INNER JOIN
sys.systypes AS coltype ON coltype.xtype = col.system_type_id LEFT OUTER JOIN
(SELECT c.COLUMN_NAME, c.TABLE_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS pk INNER JOIN
INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS c ON pk.TABLE_NAME = c.TABLE_NAME AND
pk.CONSTRAINT_NAME = c.CONSTRAINT_NAME
WHERE (pk.CONSTRAINT_TYPE = 'PRIMARY KEY')) AS pkCol ON pkCol.TABLE_NAME = tabs.name AND pkCol.COLUMN_NAME = col.name
ORDER BY TableName, ColumnOrder

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/0BU9cjaOM5A/13687

 
WordPress MultiSite Subdomains on MAMP
Wednesday, 28 September 2011 10:51

Developing WordPress sites on a local MAMP server provides flexibility, privacy, and security throughout the development process. Setting up a WordPress environment on MAMP is definitely worth the effort, especially if you’re building and testing multiple sites using WordPress’ built-in MultiSite functionality.

The easiest and recommended way of setting up WordPress MultiSite is to use sub-directories. So when you create a new site named “business”, it will be located at http://localhost/business/. Here’s a mini-tutorial on how to use sub-domains for your network sites.

Edit Mac hosts file

After installing MAMP, change the default Apache port to 80. Next, add your sub-domains to the Mac hosts file. To do this, open Terminal and type “sudo pico /etc/hosts” (without the quotes), and then enter your password at the prompt. Use the arrow keys to scroll down to the end of the hosts file and add the following lines:

127.0.0.1       example.com
127.0.0.1       site1.example.com
127.0.0.1       site2.example.com

Edit these entries to match the domain and sub-domains that you want to create with MultiSite. Add as many sub-domains as needed, now or later. Then save the file and exit by typing Ctrl+O, Enter, and then Ctrl+X.

Edit Apache config file

The next step is to add virtual hosts to your Apache configuration file. Open /Applications/MAMP/conf/apache/httpd.conf in a text editor and scroll down to the line that says “#NameVirtualHost *”. Replace that line with the following code:

NameVirtualHost *
<VirtualHost *>
 ServerName example.com
 ServerAlias example.com *.example.com
 DocumentRoot "/Applications/MAMP/htdocs/"
 <Directory "/Applications/MAMP/htdocs/">
  Options Indexes FollowSymLinks Includes
  AllowOverride All
  Order allow,deny
  Allow from all
 </Directory>
</VirtualHost>

Change each instance of example.com to match your domain, save the file, and then Restart Apache by clicking “Stop” and then “Start” in the MAMP control panel.

Intall & configure WordPress

Now to install WordPress by placing the WordPress installation files in your /htdocs/ directory, creating the database via phpMyAdmin (@ http://localhost/MAMP/), and editing wp-config.php with your database credentials. Then complete the install process by accessing http://example.com/wp-admin/install.php in your browser.

Next, enable MultiSite by adding the following line to your wp-config.php file, just above the line that says, “That’s all, stop editing! Happy blogging”:

define('WP_ALLOW_MULTISITE', true);

With that in place, return to the WP Admin and click on Tools > Network. On this page you will now see an option to use sub-domains for your site addresses. Make sure that’s selected, check the other details, and then click the “Install” button to make it happen. Note that you’ll see a warning message that says, “Wildcard DNS may not be configured correctly!” – we can ignore this warning because we know our DNS is correct.

Finally, complete the steps outlined there on the “Enabling the Network” page (i.e., create a blogs.dir folder and add the required code snippets). After that, re-login to the Admin area and go to Network Admin > Sites > Add New to begin adding your sub-domain network sites.

That’s it! You’re now rolling tuff with WordPress subdomains on a local MAMP development server. The sky’s the limit!

© 2011 Perishable Press

Read more: http://perishablepress.com/wordpress-multisite-subdomains-mamp/

 
Start
Prev
1


Page 1 of 4
Taxonomy by Zaragoza Online