Tuesday, August 31, 2010

Calendar for Date Input

The code


<!-- include jQuery FORM Tools (or any other combination) -->
<script src="http://cdn.jquerytools.org/1.2.4/form/jquery.tools.min.js"></script>

<!-- dateinput styling -->
<link rel="stylesheet" type="text/css" href="dateinput.css"/>

<!-- HTML5 date input -->
<input type="date" />

<!-- make it happen -->
<script>
$(":date").dateinput();</script>
 
See Demo  : & Download File From : http://flowplayer.org/tools/demos/dateinput/ 

Queued Photo Uploader with J query

Java Script Code For that Tool 


window.addEvent('domready', function() { // wait for the content
 
 // our uploader instance 
 
 var up = new FancyUpload2($('demo-status'), $('demo-list'), { // options object
  // we console.log infos, remove that in production!!
  verbose: true,
 
  // url is read from the form, so you just have to change one place
  url: $('form-demo').action,
 
  // path to the SWF file
  path: '../../source/Swiff.Uploader.swf',
 
  // remove that line to select all files, or edit it, add more items
  typeFilter: {
   'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'
  },
 
  // this is our browse button, *target* is overlayed with the Flash movie
  target: 'demo-browse',
 
  // graceful degradation, onLoad is only called if all went well with Flash
  onLoad: function() {
   $('demo-status').removeClass('hide'); // we show the actual UI
   $('demo-fallback').destroy(); // ... and hide the plain form
 
   // We relay the interactions with the overlayed flash to the link
   this.target.addEvents({
    click: function() {
     return false;
    },
    mouseenter: function() {
     this.addClass('hover');
    },
    mouseleave: function() {
     this.removeClass('hover');
     this.blur();
    },
    mousedown: function() {
     this.focus();
    }
   });
 
   // Interactions for the 2 other buttons
 
   $('demo-clear').addEvent('click', function() {
    up.remove(); // remove all files
    return false;
   });
 
   $('demo-upload').addEvent('click', function() {
    up.start(); // start upload
    return false;
   });
  },
 
  // Edit the following lines, it is your custom event handling
 
  /**
   * Is called when files were not added, "files" is an array of invalid File classes.
   * 
   * This example creates a list of error elements directly in the file list, which
   * hide on click.
   */ 
  onSelectFail: function(files) {
   files.each(function(file) {
    new Element('li', {
     'class': 'validation-error',
     html: file.validationErrorMessage || file.validationError,
     title: MooTools.lang.get('FancyUpload', 'removeTitle'),
     events: {
      click: function() {
       this.destroy();
      }
     }
    }).inject(this.list, 'top');
   }, this);
  },
 
  /**
   * This one was directly in FancyUpload2 before, the event makes it
   * easier for you, to add your own response handling (you probably want
   * to send something else than JSON or different items).
   */
  onFileSuccess: function(file, response) {
   var json = new Hash(JSON.decode(response, true) || {});
 
   if (json.get('status') == '1') {
    file.element.addClass('file-success');
    file.info.set('html', '<strong>Image was uploaded:</strong> ' + json.get('width') + ' x ' + json.get('height') + 'px, <em>' + json.get('mime') + '</em>)');
   } else {
    file.element.addClass('file-failed');
    file.info.set('html', '<strong>An error occured:</strong> ' + (json.get('error') ? (json.get('error') + ' #' + json.get('code')) : response));
   }
  },
 
  /**
   * onFail is called when the Flash movie got bashed by some browser plugin
   * like Adblock or Flashblock.
   */
  onFail: function(error) {
   switch (error) {
    case 'hidden': // works after enabling the movie and clicking refresh
     alert('To enable the embedded uploader, unblock it in your browser and refresh (see Adblock).');
     break;
    case 'blocked': // This no *full* fail, it works after the user clicks the button
     alert('To enable the embedded uploader, enable the blocked Flash movie (see Flashblock).');
     break;
    case 'empty': // Oh oh, wrong path
     alert('A required file was not found, please be patient and we fix this.');
     break;
    case 'flash': // no flash 9+ :(
     alert('To enable the embedded uploader, install the latest Adobe Flash plugin.')
   }
  }
 
 });
 
});
 
Html Code :
 
<form action="../script.php" method="post" enctype="multipart/form-data" id="form-demo">
 
 <fieldset id="demo-fallback">
  <legend>File Upload</legend>
  <p>
   This form is just an example fallback for the unobtrusive behaviour of FancyUpload.
   If this part is not changed, something must be wrong with your code.
  </p>
  <label for="demo-photoupload">
   Upload a Photo:
   <input type="file" name="Filedata" />
  </label>
 </fieldset>
 
 <div id="demo-status" class="hide">
  <p>
   <a href="#" id="demo-browse">Browse Files</a> |
   <a href="#" id="demo-clear">Clear List</a> |
   <a href="#" id="demo-upload">Start Upload</a>
  </p>
  <div>
   <strong class="overall-title"></strong><br />
   <img src="../../assets/progress-bar/bar.gif" class="progress overall-progress" />
  </div>
  <div>
   <strong class="current-title"></strong><br />
   <img src="../../assets/progress-bar/bar.gif" class="progress current-progress" />
  </div>
  <div class="current-text"></div>
 </div>
 
 <ul id="demo-list"></ul>
 
</form> 
 
Get Source File And more detail Here : http://digitarald.de/project/fancyupload/3-0/showcase/photoqueue/ 
 

Monday, August 30, 2010

7 Interface Design Techniques to Simplify and De-clutter Your Interfaces




What is simplicity? Simplicity is the quality of being natural, plain and easy to understand. It is not surprising then that simplicity is often thrived for in user interface design. Most people naturally dislike complexity in devices and software. Yes, some people find joy in figuring out how something works, but for most of us, being unable to operate a device leads to wasted time and frustration, and that’s not a good thing.

1. Modal windows.

2. Hover controls.

3. Controls on demand.

4. Expanding forms.

5. Labels inside input forms.

6. Icons instead of text.

7. Context based controls.

 Visit here to more detail : http://www.webdesignerdepot.com/2009/02/7-interface-design-techniques-to-simplify-and-de-clutter-your-interfaces/

 

Windows Phone 7 Jumpstart Training On-Demand


 Microsoft will spend about $400 million to promote the launch of its forthcoming Windows Phone 7 operating according to Deutsche Bank analyst Jonathan Goldberg, adding his forecast doesn't include the millions the software giant has already committed to pay its handset manufacturer partners to offset non-recurring engineering costs. Goldberg derives his estimate based on conversations with Microsoft brass during a recent visit to the company's Redmond, Wash. headquarters, with execs anticipating that overall spending will reach billions of dollars once its operator and manufacturer partners' marketing spending is factored into the equation. TechCrunch adds that according to another source, Microsoft will invest more than a billion on WP7's launch, half of promotion and half on other development costs.

Visit here To more detail : http://blogs.msdn.com/b/mikeormond/archive/2010/08/19/windows-phone-7-jumpstart-training-on-demand.aspx

or

http://www.fiercedeveloper.com/story/analyst-microsoft-will-spend-400m-market-windows-phone-7/2010-08-30


Five Text Processing Tools You Should Know

In the world of UNIX text is king. Almost anything one wants to know about a system can be gathered from reading a file. Often times that file can be a few thousand lines long. Sometimes it can be twelve million lines long.
This is where text processing comes in. Text processing aims to do one thing: given a source of information answer a question. Everybody has questions for their systems. “How many 404 errors has my website gotten?” “Has anyone tried to access my server without me knowing?” “What program is using the most CPU right now?”
This article will explore the most common ways to answer these questions with a set of tools that will by extension provide a method to answer hundreds of other questions. Questions will be answered with one-liners, or the stringing together of these tools to provide answers without writing a script itself.

Silicon Valley’s Dark Secret: It’s All About Age

An interesting paradox in the technology world is that there is both a shortage and a surplus of engineers in the United States. Talk to those working at any Silicon Valley company, and they will tell you how hard it is to find qualified talent. But listen to the heart-wrenching stories of unemployed engineers, and you will realize that there are tens of thousands who can’t get jobs. What gives? The harsh reality is that in the tech world, companies prefer to hire young, inexperienced, engineers.
And engineering is an “up or out” profession: you either move up the ladder or face unemployment. This is not something that tech executives publicly admit, because they fear being sued for age discrimination, but everyone knows that this is the way things are. Why would any company hire a computer programmer with the wrong skills for a salary of $150,000, when it can hire a fresh graduate—with no skills—for around $60,000?  Even if it spends a month training the younger worker, the company is still far ahead. The young understand new technologies better than the old do, and are like a clean slate: they will rapidly learn the latest coding methods and techniques, and they don’t carry any “technology baggage”.  As well, the older worker likely has a family and needs to leave by 6 pm, whereas the young can pull all-nighters.

China's wired youth forget how to write

HONG KONG — Like every Chinese child, Li Hanwei spent her schooldays memorising tens of thousands of the intricate characters that make up the Chinese writing system.
Yet aged just 21 and now a university student in Hong Kong, Li already finds that when she picks up a pen to write, the characters for words as simple as "embarrassed" have slipped from her mind.
"I can remember the shape, but I can?t remember the strokes that you need to write it," she says. "It?s a bit of a problem."
Surveys indicate the phenomenon, dubbed "character amnesia", is widespread across China, causing young Chinese to fear for the future of their ancient writing system.
Young Japanese people also report the problem, which is caused by the constant use of computers and mobile phones with alphabet-based input systems.

Click Here “Do you have an application created on Windows Azure? Send it to us for a chance to win a laptop”

Submit a screenshot of your Azure app and you could win one of FIVE Intel® i7 laptops. Plus, the winning entry can get great exposure through The Code Project and partners.

Here are some examples:

    * http://flutrackerapp.cloudapp.net/
    * http://miami311.cloudapp.net/
    * http://countymap.cloudapp.net/

Here's How
Build your app and take a screen shot and send to contest@codeproject.com

At the end of the contest we will choose from best apps and the winner will receive an Intel® i7 laptop!
Windows Azure One Month Pass USA

    * Learn the Windows Azure platform. No steep learning curve.
    * With Azure you pay only for what you use, scale up when you need capacity and pull it back when you don’t.

Windows Azure one MONTH pass is provided so you can put Windows Azure and SQL Azure through their paces. NO credit card required.
What You Could Win

Intel i7 laptop

    * Intel® Core™ i7-720QM processor with 1.60GHz with Turbo Boost Technology up to 2.80GHz
    * 4GB DDR3 System Memory (2 DIMM)
    * 500GB (7200RPM) Hard Drive (SATA)
    * Nvidia GeForce GT 230M with up to 2815MB

    * Additionally, winners could possibly gain exposure with MTBC and other Code Project partners that could result in: Application marketing and exposure, Technology licensing, Customer/supplier relationships, and additional exposure in the marketplace.

ViSit Codeproject.com To more detail : Visit Here

HttpWatch 7.0: Change the way you develop, debug and tune websites today!

  • Seamless HTTP and HTTPS monitoring without changing network settings or adding proxies
  • See low-level HTTP information such as headers, cookies, etc and millisecond accurate timings.
  • Real-time page and request level time charts show performance bottlenecks
  • Your users and customers can send you log files for free
  • Automatically detects and highlights potential configuration, performance and security problems
  • Use it in automated tests written in C#, Ruby, Javascript, ..

Download Here : http://www.httpwatch.com/download/

Write SQL amazingly fast with SQL Prompt

* World-leading SQL Server code-completion
* SQL reformatting to match your preferred style
* Rapid access to your database schema information
* Snippets cut down repetitive typing

Code completion

SQL reformatting (Pro edition only)

Rapid access to schema information

Snippets

Search

Which version?

Download free trial

 


How Microsoft Is Using SharePoint & Colligo for ECM & Records Management

SHAREPOINT 2010 WEBINAR

How Microsoft Is Using SharePoint & Colligo for ECM & Records Management

Tuesday, September 21, 2010

8:00 AM Pacific / 11:00 AM Eastern

4:00 PM London / 5:00 PM Paris


Join Microsoft guest speaker Nishan DeSilva on September 21st for the webinar: “How Microsoft Is Using SharePoint 2010 & Colligo for ECM & Records Management.” Nishan DeSilva is the Director of Information Management & Corporate Records Compliance at Microsoft. He will provide an inside look at how Microsoft’s Legal and Corporate Affairs Department (LCA) is leveraging SharePoint 2010 and Colligo Contributor to address compliance while empowering users to get their work done.

In this webinar, you’ll learn:
  • Microsoft’s strategy in LCA for information & records management
  • How to effectively move unstructured content & email into SharePoint
  • How to apply consistent classification & compliant retention policies
  • How Colligo Contributor facilitates email management in SharePoint
  • How to improve the user experience to drive adoption & compliance
More Detail Visit : https://www.vconferenceonline.com/event/regeventweb.aspx?id=79&cid=PrgmM1East

Custom Layout using ContentControl in Silverlight


Very Nice Article For Content Control in Silverlight He will use content control to create a site layout. So basically the layout control will have header, footer, left body, right body and main body.

Origibal Article & Source Code Please Link Below : http://silverlightips.net/2010/08/24/silverlight-content-control/

Using ASP.NET and jQuery to Pass Multiple Values from a GridView to Another Page

{asp:gridview allowpaging="True" allowsorting="True" autogeneratecolumns="False" datakeynames="CustomerID" datasourceid="SqlDataSource1" id="GridView1" runat="server">
            {columns>                         
                [asp:boundfield datafield="CustomerID" headertext="CustomerID" readonly="True" sortexpression="CustomerID">
                [asp:boundfield datafield="CompanyName" headertext="CompanyName" sortexpression="CompanyName">
                [asp:boundfield datafield="ContactName" headertext="ContactName" sortexpression="ContactName">
                [asp:boundfield datafield="Address" headertext="Address" sortexpression="Address">
                [asp:boundfield datafield="City" headertext="City" sortexpression="City">
            [/asp:boundfield>
        [/asp:boundfield}

C#
    protected void Page_Load(object sender, EventArgs e)
    {
        string cid = Request.QueryString["CID"];
        string cname = Request.QueryString["CName"];
        Response.Write("CustomerID= " + cid + " : " + "CompanyName= " + cname);
    }


{script type="text/javascript">

        $(document).ready(function() {
            $("tr").click(function(event) {
                var row = jQuery(this)
                var firstParam = row.children("td:eq(0)").text();
                var secondParam = row.children("td:eq(1)").text();              
                var navUrl = "http://localhost:7250/GridViewRowJQuery/CustomerDetails.aspx?cid=" + firstParam + "&cname=" + secondParam;
                top.location = navUrl;

            });
        });
   
{/script}

Tuesday, August 17, 2010

Javascript For Circling text

<script type="text/javascript">


;(function(){


var msg = "www.dotnetspider.com";




var size = 24;


var circleY = 0.75; var circleX = 2;


var letter_spacing = 5;


var diameter = 10;


var rotation = 0.4;

var speed = 0.3;



if (!window.addEventListener && !window.attachEvent || !document.createElement) return;

msg = msg.split('');
var n = msg.length - 1, a = Math.round(size * diameter * 0.208333), currStep = 20,
ymouse = a * circleY + 20, xmouse = a * circleX + 20, y = [], x = [], Y = [], X = [],
o = document.createElement('div'), oi = document.createElement('div'),
b = document.compatMode && document.compatMode != "BackCompat"? document.documentElement : document.body,

mouse = function(e){
e = e || window.event;
ymouse = !isNaN(e.pageY)? e.pageY : e.clientY; // y-position
xmouse = !isNaN(e.pageX)? e.pageX : e.clientX; // x-position
},

makecircle = function(){ // rotation/positioning
if(init.nopy){
o.style.top = (b || document.body).scrollTop + 'px';
o.style.left = (b || document.body).scrollLeft + 'px';
};
currStep -= rotation;
for (var d, i = n; i > -1; --i){ // makes the circle
d = document.getElementById('iemsg' + i).style;
d.top = Math.round(y[i] + a * Math.sin((currStep + i) / letter_spacing) * circleY - 15) + 'px';
d.left = Math.round(x[i] + a * Math.cos((currStep + i) / letter_spacing) * circleX) + 'px';
};
},

drag = function(){ // makes the resistance
y[0] = Y[0] += (ymouse - Y[0]) * speed;
x[0] = X[0] += (xmouse - 20 - X[0]) * speed;
for (var i = n; i > 0; --i){
y[i] = Y[i] += (y[i-1] - Y[i]) * speed;
x[i] = X[i] += (x[i-1] - X[i]) * speed;
};
makecircle();
},

init = function(){ // appends message divs, & sets initial values for positioning arrays
if(!isNaN(window.pageYOffset)){
ymouse += window.pageYOffset;
xmouse += window.pageXOffset;
} else init.nopy = true;
for (var d, i = n; i > -1; --i){
d = document.createElement('div'); d.id = 'iemsg' + i;
d.style.height = d.style.width = a + 'px';
d.appendChild(document.createTextNode(msg[i]));
oi.appendChild(d); y[i] = x[i] = Y[i] = X[i] = 0;
};
o.appendChild(oi); document.body.appendChild(o);
setInterval(drag, 25);
},

ascroll = function(){
ymouse += window.pageYOffset;
xmouse += window.pageXOffset;
window.removeEventListener('scroll', ascroll, false);
};

o.id = 'outerCircleText'; o.style.fontSize = size + 'px';

if (window.addEventListener){
window.addEventListener('load', init, false);
document.addEventListener('mouseover', mouse, false);
document.addEventListener('mousemove', mouse, false);
if (/Apple/.test(navigator.vendor))
window.addEventListener('scroll', ascroll, false);
}
else if (window.attachEvent){
window.attachEvent('onload', init);
document.attachEvent('onmousemove', mouse);
};

})();

</script>

Monday, August 16, 2010

How to gchange Gridview row Color

if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';this.style.color='blue'";
e.Row.Attributes["onmouseout"] = "this.style.color='black'";
e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.GridViewProp, "Select$" + e.Row.RowIndex);

}
 

File Retrival in Asp.net C#

string strQuery = "select Name, ContentType, Data from tblFiles where id=@id";


SqlCommand cmd = new SqlCommand(strQuery);


cmd.Parameters.Add("@id", SqlDbType.Int).Value = 1;


DataTable dt = GetData(cmd);


if (dt != null)


{


    download(dt);


}

private DataTable GetData(SqlCommand cmd)

{

    DataTable dt = new DataTable();

    String strConnString = System.Configuration.ConfigurationManager

    .ConnectionStrings["conString"].ConnectionString;

    SqlConnection con = new SqlConnection(strConnString);

    SqlDataAdapter sda = new SqlDataAdapter();

    cmd.CommandType = CommandType.Text;

    cmd.Connection = con;

    try

    {

        con.Open();

        sda.SelectCommand = cmd;

        sda.Fill(dt);

        return dt;

    }

    catch

    {

        return null;

    }

    finally

    {

        con.Close();

        sda.Dispose();

        con.Dispose();

    }

}

To insert a file in Database in asp.net C#


Reading The File


string filePath = Server.MapPath("APP_DATA/Docu.docx");
string filename = Path.GetFileName(filePath);
FileStream fS = new FileStream(filePath, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fS);


Inserting The Data
insert the file into database
string strQuery = "insert into tblFiles(Name, ContentType, Data) values (@Name, @ContentType, @Data)";


SqlCommand cmd = new SqlCommand(strQuery);


cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = filename;


cmd.Parameters.Add("@ContentType", SqlDbType.VarChar).Value = "application/vnd.ms-word";


cmd.Parameters.Add("@Data", SqlDbType.Binary).Value = bytes;


InsertUpdateData(cmd);
private Boolean InsertUpdateData(SqlCommand cmd)


{


    String strConnString = System.Configuration.ConfigurationManager


    .ConnectionStrings["conString"].ConnectionString;


    SqlConnection con = new SqlConnection(strConnString);


    cmd.CommandType = CommandType.Text;


    cmd.Connection = con;


    try


    {


        con.Open();


        cmd.ExecuteNonQuery();


        return true;


    }


    catch (Exception ex)


    {


        Response.Write(ex.Message);


        return false;


    }


    finally


    {


        con.Close();


        con.Dispose();


    }


}

Monday, August 2, 2010

The Law Of Abundance And Your New Life

The Law Of Abundance And Your New Life
by Kim McMillan

There is nothing complicated about the law of abundance, to put it simply all you need to do is believe. You should believe you deserve wealth, health, happiness, love and think positive. That is it, no more no less. All types of people have been abiding by this law for generations and this simplistic belief has reaped many benefits for them.

The very best thing about the law of abundance is the fact that it is so simple. You may not want to believe it but everything you have at this point in your life and everything that you are is a direct result of the thoughts you have had over the past several years. Sadly, all the things that are lacking in your life are a result of what you believe as well.

Tomorrow when you get out of bed the law of abundance is automatically at work. Failing to take advantage of the 'powers that be' in your life is the biggest problem.

If you want your dreams to come true and manifest themselves in your life, you must look at what you have already. It is through appreciation for these things that you will see multiplication begin to take hold in your life.

For the pessimistic individual this piece of common sense is going to seem like an insurmountable object. If it helps just keep in mind that all you are really doing is breaking a bad habit, you have established in your life. You see, the law of abundance does not have to be a difficult thing at all.

Each day when you wake up, you are the one who is creating the opportunities for wealth and happiness. By waking up in a bad mood, you are setting yourself up for disappointment and failure. Something that may help you to think more positively about your life is to leave little notes for yourself throughout your house reminding you of how lucky you are.

When you open yourself up to that level of abundance, there is so much more for you to obtain. People prevent their own happiness from becoming a reality by not taking advantage of the law of abundance. You can prevent do this by taking control of your thoughts. Make the decision to change your mind.

When a negative thought sneaks into your thought processes flip it upside down and turn it into something that is positive for you. There are those who find it beneficial to feed off these negative thoughts. If you are naturally pessimistic, this may be something you can work with to bring about the law of abundance.

When your natural inclination is to always assume you are fat, you might try turning that statement around and saying 'I am thankful I am fit and trim'. This type of positive energy will allow you to have whatever it is you are dreaming of because positive energy is contagious. Try this in the days ahead and see if abundance begins to flow in your life.

Are you constantly worrying about money thinking you never have enough? You need to change that attitude to one that says you have all you want and need plus some! You will suddenly see abundance flowing in your life.

Remember that making the law of abundance a prominent force in your life is achievable. You are going to be pleasantly surprised at how much better everything turns out after deciding to accept your life the way it is by appreciating what you currently have. It's almost like magic!

About the Author:

The writer, Kim McMillan is one of the experts who writes for the http://www.abundance-info.com website. If you have been disappointed in the past, find out the real secrets of successfully using manifesting secrets by visiting here and watching the amazing Law Of Abundance Video.


Source: http://www.PopularArticles.com/article203463.html

Action Method in Mvc

In this section, you will learn about the action method of controller class. All the public methods of a Controller class are called Act...