Total Pageviews

Tuesday, February 21, 2012

Blogger


WordPress can be configured to use e-mail to post to a blog. To enable this functionality, you need to:

Create a dedicated e-mail account to be used solely for posting to your blog,
Configure WordPress to access that account, and
Configure WordPress to publish messages from the e-mail account
You can blog by e-mail using most standard e-mail software programs or a Weblog Client -- a program specifically designed to send posts via email.

Limitations: - Standard characters in the object - Plain text only

Setting Up Post via E-mail
Step 1 - Create an e-mail account
Log in to WordPress with the administration login you use to administer your WordPress blog.
Go to Settings > Writing.
Read the instructions under Post via e-mail at the bottom of the page. At the end of these instructions, WordPress will suggest three random strings of numbers you may want to use for the login name of the new e-mail account you'll create.
Create a new e-mail account on your web host's mail server or a separate e-mail server, using one of the suggested numeric strings (or your own secret word) for the username (also called a "login name"). A mail server receives e-mails on your behalf and stores them for retrieval. Do not use public, free e-mail servers like Yahoo, Hotmail, etc., for this account.
Note: It is strongly recommended that you use a "secret" address - that is, an e-mail account name that is very difficult to guess and known only to you, such as those suggested by WordPress. Any e-mail sent to this address will automatically be posted to your blog. Be aware, however, that some e-mail servers do not allow numbers-only e-mail accounts or accounts starting with a number. Please check with your web host.
Step 2 - Configure WordPress to access your new account
When you are done creating the new e-mail account , return to the Writing Options panel and fill in the name of the mail server and port number your web hosting provider uses. (If you don't know these, refer to your web hosting provider's FAQ or manual pages. The port number is usually 110.) If your mail server requires an SSL (secure) connection, precede your mail server address with ssl://, e.g. ssl://pop.example.com.
Next, enter the login name and password for your new e-mail account .
NOTE: In the Login Name field, use the full e-mail address (e.g., user@example.com).
Choose the default category that will be assigned to posts submitted via e-mail.
Click Update Options .
NOTE: If you are using the Administration > Settings > Writing > Post via e-mail section to specify the e-mail address before you've actually created the e-mail account, remember to use the same login and password when you create the account as you specified in the section.
Step 3 - Publish Your E-mail Posts
You've created the new e-mail account and configured your WordPress blog to accept e-mails from that account, but you still need to set up WordPress to publish those e-mail messages on your blog. Do one of the following:

Manual Browser Activation

Go to the following link http://example.com/installdir/wp-mail.php immediately after you send an e-mail to your new e-mail account. (Note: You must do this every time you send a new post.)

Automated Browser Activation

An alternative to manual browser activation is to add the following iframe code to the footer of your blog:

<iframe src="http://yourblogdomain/wordpressinstalldir/wp-mail.php" name="mailiframe" width="0" height="0" frameborder="0" scrolling="no" title=""></iframe>

Edit the above line of code so that it refers to the location of your wp-mail.php file. Add this line of code to the footer.php file in the directory for whatever theme you are using (don't include it within an HTML paragraph).

You may have to refresh your blog to see the new post. New users may find this method the most helpful.

If you're using or would like to use the Postie Plugin for WordPress, use the following iframe code, which will call Postie's check mail commands:

<iframe src="http://yourblogdomain/wordpressinstalldir/wp-content/plugins/postie/get_mail.php?Submit=Run+Postie" name="mailiframe" width="0" height="0" frameborder="0" scrolling="no" title=""> </iframe>

Add this code to your footer, and the next time anyone goes to your blog, your new emails will be automatically posted, so you need to do nothing but send them. You may have to refresh the blog to see the changes.

Action-based functions.php Activation

An alternative to calling the iframe on every page load (detailed above), or setting up a cron job (details below), you can add an action to your active theme's functions.php file. This will check for mail every 15 minutes and does not add any HTML to your theme.

add_action('shutdown', 'retrieve_post_via_mail');
function retrieve_post_via_mail() {
flush(); // Display the page before the mail fetching begins
if(get_transient('retrieve_post_via_mail')) {
return; // The mail has been checked recently; don't check again
} else { // The mail has not been checked in more than 15 minutes
$mail = wp_remote_get(get_bloginfo('wpurl').'/wp-mail.php');
if(!is_wp_error($mail)) { // If retrieve succeeded
set_transient('retrieve_post_via_mail', 1, 60 * 15); // check again in 15 minutes.
} else {
set_transient('retrieve_post_via_mail', 1, 60 * 5); // check again in 5 minutes; we don't want to overload the server
}
}
}
This method is good for users who would like to avoid using cron jobs, which are configured on the server. Unlike cron jobs, this process will only run when pages on the blog are loaded. Cron jobs run independent of site traffic.

WP-Cron Plugin Activation

Download, install, and activate the WP-Cron Plugin. It will work in the background without user intervention to update your site about every 15 minutes.

NOTE: WP-CRON is no longer supported by the author

Cron Job Activation

Set up a UNIX cron job to have your blog periodically view http://example.com/installdir/wp-mail.php using a command-line HTTP agent like wget, curl or GET. The command to execute will look like:

wget -N http://example.com/installdir/wp-mail.php

If you use a different program than wget, substitute that program and its arguments for wget in this line.

Note: Another possibility is to run "php /full/path/to/wp-mail.php" in a cronjob. This will run the php-script using php, without the need for an extra program to run. (You are more likely authorized to run php than wget.)

For more information about setting up a cron job, see:

Intro To Cron Jobs
Your hosting provider's FAQ or manual pages
Note to Windows Users: There are similar programs to cron available if your host runs Windows. For example, VisualCron, Cron for Windows and pycron. Consult these projects' documentation for further information.

Procmail Activation

If your server uses procmail, a simple .procmailrc in the blogmailaccounts home directory will be sufficient:

Shell=/bin/sh
MAILDIR=$HOME/.maildir/
DEFAULT=$MAILDIR
:0
{
:0Wc
./
:0
| wget -N http://example.com/installdir/wp-mail.php
}
This could be more specific, such as capturing certain subject expressions. Check procmail for more information.

.qmail Activation

If your server uses qmail to process e-mail, you may be able to use it to call wp-mail.php whenever an e-mail message is delivered. To do this, first create a small shell script to call wp-mail.php. You could call the file wp-mail:

#!/bin/sh
/bin/sh -c "sleep 5; /path/to/php /path/to/your/blog/wp-mail.php > /dev/null" &
The sleep command causes a 5-second delay to allow qmail to finish processing the message before wp-mail.php is called. Note that the ampersand on the end of the line is required. The above script should go in your root directory, and the execute bit should be set (chmod 700). For debugging purposes, you could change /dev/null to a filename to save the output generated by wp-mail.php.

Then all you need to do create/modify the appropriate .qmail file to call your shell script. Add the following line to the .qmail file for your mailbox name:

|/path/to/your/root/directory/wp-mail
See your ISP's documentation for use of .qmail files. Naming conventions may vary for different ISPs.

Email Format
WordPress will use the Subject line of your email for the title of the post, and all body of the email will be used as the content of the post, with common HTML tags stripped. WordPress will file the post under whichever category is selected for "Usual Category" in Step 1, and will use Site Admin as the poster.

Posting by email does not support attachments and any attachments sent with the email will appear in their raw form in the blog post.

Testing
To test your configuration, simply send an e-mail to yournewaccount@yourmaildomain (or to user@yourmaildomain if you used the .qmail forwarding setup). Then do the following:

If you have no automated system set up, simply view http://example.com/installdir/wp-mail.php in your browser. The script should tell you that it found an e-mail, and print details of the post it made. Then view your blog again to see your email posted.
If you are using an iframe code in your footer, refresh your browser to see the new post.
If you are using WP-Cron, simply wait fifteen or twenty minutes.
If you have a cron job running, wait until the next time it's scheduled to run (or temporarily edit the cron job to make it run sooner). If you run tail -f /var/log/cron in a terminal, you'll be able to see the job create its log entry when it's finished running. When that happens, just view the site in your web browser to see your email posted.
Your email may be recorded with a post status of 'Pending Review' rather than 'Published'. If the status is 'Pending Review', then the post will be visible in the Dashboard but will not be visible in the Blog. By default, wp-mail.php will validate the sending email address against the email addresses for authorized users. If the email address is found, the post status will be 'Published', otherwise the status will be 'Pending Review'.
Troubleshooting
If you receive the following error messages, follow the procedures below.

Error Message:
Ooops POP3: premature NOOP OK, NOT an RFC 1939 Compliant server
For this error, open wp-includes/class-pop3.php and change this line:

if($this->RFC1939) {
to this:

if(!$this->RFC1939) {
Note the exclamation point.

Error Message: There does not seem to be any new mail

This error is a bit of a misnomer - the test just checks to see if anything was retrieved.

If you're feeling adventuresome, open
wp-mail.php
and search for:
$count = $pop3->login(get_settings('mailserver_login'), get_settings('mailserver_pass'));
Change the lines following it to something like:

  if (0 == $count) :
    echo "There does not seem to be any new mail. <br/>\n";
    echo "count = $count<br/> \n";
    echo "$pop3->ERROR \n";
    exit;
  endif;
You'll then be presented with a more informative message.

The e-mail server may be refusing connections that attempt to provide an unencrypted password - like POP3. If your webserver and e-mail server are on the same physical computer, you can specify localhost or 127.0.0.1 as the mail server. That traffic is assumed to be OK without encryption because it never traveled across the network.

Extensions and Add-ons
There are several add-ons and hacks that will extend the capabilities of posting by e-mail with WordPress. Some of these may involve changing the core files, so do it carefully and make backups.

Enhanced Functionality Hack
One replacement file for the original wp-mail.php file has been created:

Postie supports posting to categories, automatic removal of email signatures, POP3/IMAL (+SSL) and more.
Hack E-mail Format
The following enhancements may be made to your wp-mail.php so your e-mail will be translated into metadata for your post:

Sender's e-mail address
The enhanced wp-mail.php looks up the email address you send from in its user database. If there is a match with any user there, it files the post under that user. If there is no match, it drops the e-mail and does not create a post in the blog. (Great for security and spam prevention.) It is set by the From field.
Subject line
If [n] is present anywhere in the subject line of your email, the e-mail will be filed under the category numbered n. Otherwise, it will be posted under whichever category is selected for "Usual Category" in Step 1. Example: [1] This is a Test! would be posted as "This is a Test!", filed under General.
Blog By Email From Yahoo! Mail, Gmail and Hotmail
By default, most web-based email clients send messages in HTML formatting, which WordPress's blog-by-email feature filters out.

To get around this, you must select "plain text" before sending.

In Yahoo! Mail, the button for switching to plain text is just to the right of the SUBJECT field. In Gmail a similar button is located at the right end of the text formatting tool bar. Hotmail's is found next to the SPELL CHECK button in the email action bar which is located above the email message.

Monday, February 13, 2012

C# data types


A built-in data type, such as an int or char, or

A user-defined data type, such as a class or interface.

Data types can also be defined as being either:

Structs

     public struct Book
{
    public decimal price;
    public string title;
    public string author;
}

Enumerations

      enum Days {Sat, Sun, Mon, Tue, Wed, Thu, Fri};



Numeric types


Integral types

Type Range Size
sbyte
-128 to 127
Signed 8-bit integer
byte
0 to 255
Unsigned 8-bit integer
char
U+0000 to U+ffff
Unicode 16-bit character
short
-32,768 to 32,767
Signed 16-bit integer
ushort
0 to 65,535
Unsigned 16-bit integer
int
-2,147,483,648 to 2,147,483,647
Signed 32-bit integer
uint
0 to 4,294,967,295
Unsigned 32-bit integer
long
-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
Signed 64-bit integer
ulong
0 to 18,446,744,073,709,551,615
Unsigned 64-bit integer


Floating-point types
Type Approximate range Precision
float
±1.5e−45 to ±3.4e38
7 digits
double
±5.0e−324 to ±1.7e308
15-16 digits

decimal
ype Approximate Range Precision .NET Framework type
decimal
±1.0 × 10−28 to ±7.9 × 1028
28-29 significant digits
System.Decimal


bool


// keyword_bool.cs
using System;
public class MyClass
{
    static void Main()
    {
        bool i = true;
        char c = '0';
        Console.WriteLine(i);
        i = false;
        Console.WriteLine(i);

        bool Alphabetic = (c > 64 && c < 123);
        Console.WriteLine(Alphabetic);
    }
}

User defined structs.



Reference Types (C# Reference)

class

      class TestClass
{
    // Methods, properties, fields, events, delegates
    // and nested classes go here.
}

interface

      interface ISampleInterface
{
    void SampleMethod();
}

class ImplementationClass : ISampleInterface
{
    // Explicit interface member implementation:
    void ISampleInterface.SampleMethod()
    {
        // Method implementation.
    }

    static void Main()
    {
        // Declare an interface instance.
        ISampleInterface obj = new ImplementationClass();

        // Call the member.
        obj.SampleMethod();
    }
}

delegate
using System;
// Declare delegate -- defines required signature:
delegate void SampleDelegate(string message);

class MainClass
{
    // Regular method that matches signature:
    static void SampleDelegateMethod(string message)
    {
        Console.WriteLine(message);
    }

    static void Main()
    {
        // Instantiate delegate with named method:
        SampleDelegate d1 = SampleDelegateMethod;
        // Instantiate delegate with anonymous method:
        SampleDelegate d2 = delegate(string message)
        {
            Console.WriteLine(message);
        };

        // Invoke delegate d1:
        d1("Hello");
        // Invoke delegate d2:
        d2(" World");
    }
}


This section also introduces the following built-in reference types:

object

// keyword_object.cs
using System;
class SampleClass
{
   public int i = 10;
}

class MainClass
{
   static void Main()
   {
      object a;
      a = 1;   // an example of boxing
      Console.WriteLine(a);
      Console.WriteLine(a.GetType());
      Console.WriteLine(a.ToString());

      a = new SampleClass();
      SampleClass classRef;
      classRef = (SampleClass)a;
      Console.WriteLine(classRef.i);
   }
}

string

      string a = "hello";
string b = "h";
// Append to contents of 'b'
b += "ello";
Console.WriteLine(a == b);
Console.WriteLine((object)a == (object)b);

JAVA PROGRAM WITH RANDOM FUNCTION


import java.util.Scanner;
import java.util.Random;

public class TenRandomNumbers {

public static void main(String[] args) {
// TODO Auto-generated method stub
int[] Random;
Random = new int[10];
int count = 0;
double average = 0;
int Max = 0;
int Min = 100;
int sum = 0;
int number = 0;


for (count = 0; count < 10; count++){
number = 50 + (int)(Math.random()*50);
Random[count] = number;
System.out.println(Random[count]);
sum = sum + number;
average = sum/10;
while(Random[count]>Max)
Max=Random[count];
while(Random[count]<Min)
Min=Random[count];
}
System.out.println("The average is: " + average);
System.out.println("The highest number is " + Max);
System.out.println("The lowest number is " + Min);



}

}

NEED FOR SPEED MOST WANTED RULES FOR FEST


EVENT NAME:FAST AND FEARLESS.
EVENT THEME: Need for Speed™: Most Wanted
EVENT DESCRIPTION:
-4 Players Per Race
-Circuit \ Sprint \ Knockout
-The winner of a race is the first player to complete 3 laps of the circuit course and cross the finish line or first player to complete and cross the sprint track. At the end of each match, players must maintain the final screens and receive confirmation from a referee.
-Car Settings
-No sort of Upgrades are allowed. (All Cars will be Unlocked)
-Personal save files are NOT allowed.
-Courses
-Random.
-Each Course may be modified by the Tech fest organizing committee. Players will be informed before the tournament of any such modifications.
-Race Mode Options:
Circuit \ sprint \ Knockout
Track Direction: Forward \ reverse
LAPS: At the discretion of Tech Fest organizing committee.
N20 : On
Collision Detection : On
Performance Matching : On
Player Options:
Units: Player’s own discretion.
Car Damage : Off
Rearview Mirror: Player’s own discretion.
Disconnections:
(Any disconnection of the connection between match players due to System, Network, PC, and/or Power problems/issues)
Intentional: Upon judgment by the referee, any offending player will be charged with a loss by forfeit.
Unintentional: If the disconnection is deemed to be unintentional by the referee, the match will be restarted. If any player does not agree to a match restart, that player will lose by default.
Penalty for Unfair Play
Unfair Play: Use of any Cheat program
Intentional disconnection
Use of any settings exceeding standard and permitted settings
If the match is disrupted due to unnecessary chatting, the player may be given a warning or lose
By default at the referee’s sole discretion.
Upon discovery of any player committing any violations regarded as unfair play, that player
Will be disqualified from the tournament.
During the course of any match, the operations staff and/or referee may determine other actions
To be unfair play at any time. Two warnings constitute being disqualified from the tournament.
These rules are subject to modification by TECH-FEST organizing committee’s own Discretion

Thursday, February 9, 2012

android phones list with price in india


Dell XCD28 Android Phone Features:
2.8” inch QVGA Touch Display
256MB RAM/ 512MB ROM
ARM11 600Mhz CPU
Wi-Fi 802.11 b/g
Bluetooth v2.1
3.2 Megapixel Camera
Google Android v2.1
Dell XCD28 Mobile Phone Price List: Ra. 10,990/- Indian Rupee (INR)
Speaking on the launch of smartphoones in India, Mr. Farooq Butt, Vice President Worldwide Business Development & Strategy, Dell, said “Today’s launch validates our intention to bring accessible technology to key markets like India as we work relentlessly to enable our customers to grow and thrive. India is one of the fastest growing global markets for mobile devices as well as PCs. We chose to launch the new XCD range of smartphones first in India to offer a complete portfolio of Dell mobile Internet products in all screen sizes”.

Sharekhan


Dear Friends,

Nifty closed higher by 30 points yesterday. Today, the global cues from markets are all positive.

The investors who are investing for the long term on a monthly basis must be even more patient. Imagine that you are growing a teak wood tree and the real value is experienced only many years later. We should concentrate on the process of investing sensibly and with discipline. The rewards of our good investment habits will be seen in the form of good returns over the long term.


This current rally continues without losing steam. Our wait for the next rally continues since we have already sold our stock term holdings at handsome profits. This is the time to use the money earned from the short term trades to re-invest or spend on purchasing essential items.


Sharekhan


The Self-Development Tip for this week is -



The solution in time management does not lie in learning how to do everything more efficiently, but in learning to do less, more effectively


In the fixed time that is available to us, we must not try to do everything. We must prioritize and decide the tasks which are important. Once we know our priorities, we can work towards achieving maximum effectiveness rather attempting to do all tasks efficiently. Some tasks may not be required to be done and hence can be neglected while the others are priorities and must be done very well to achieve success in life.




Let us be clear about the priorities in our lives an work towards performing them to the best of our knowledge and abilities. This will lead to us managing our time better and thereby leading to our overall success.


The successful people in the world are not the people who did all the tasks but are the people who knew which were important to help them go forward in life and which were unnecessary and unproductive.

Sharekhan


Dear Friends,


Nifty traded positive on Friday ending 56 points higher. Global cues were extremely positive due to lower unemployment rate in the US.



Saving regularly is an important activity and must not be neglected. The importance of savings can be seen from the way retirees are able to live comfortably or not in their post retirement life. Some retirees are able to afford expensive holidays, other lavish expenses etc whereas others are barely able to cover their medical and basic expenses. Hence, we must learn lessons from the people who have developed good investment
habits.


There is no opportunity to buy for short term currently. As long as the stocks are higher than the red line, they should not be freshly bought. It is actually a Hold indication. However, since we have already made 10% profits in the rally, we have to now wait for the next rally.


The important thing to note is that although short term opportunities do not occur throughout the year, long term investors get the chance to invest on a monthly basis in bluechips. They do not have to wait for any particular sign before they invest for that month. This also encourages a regular savings plan for people so that they are ready to face any challenging situations in their life.

Sharekhan


Dear Friends,


Nifty fell today by 27 points today after many days of positive closes. The global cues are mixed today and there is no particular direction.


The wait for the next rally continues. Keep aside the money for investment in next rally. Do not use it unless the next opportunity arises.


Long term investors must continue to invest as per their plan. Ensure that you invest only in bluechips on a monthly basis. It is not worth investing in the riskier stocks which may or may not perform in the future. Invest in stocks which will allow you to sleep peacefully in the night.