CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of to
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>Örnek Uygulama</title>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <script type="text/javascript">
    $(function(){
        $('#menu ul li a').click(function(){
            history.pushState('', $(this).text(), $(this).attr('href'));
by Batuhan AYDIN   May 17, 2012 @ 1:34am
14 Views
no comments
 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>Örnek Uygulama</title>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <script type="text/javascript">
    $(function(){
        $('#menu ul li a').click(function(){
            history.pushState('', $(this).text(), $(this).attr('href'));
by Batuhan AYDIN   May 17, 2012 @ 1:34am
10 Views
no comments
 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>Örnek Uygulama</title>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <script type="text/javascript">
    $(function(){
        $('#menu ul li a').click(function(){
            history.pushState('', $(this).text(), $(this).attr('href'));
by Batuhan AYDIN   May 17, 2012 @ 1:34am
6 Views
no comments
 
C#
return members == null ? 0 : members.Count;
by Warren Wiltshire   May 10, 2012 @ 6:57am
18 Views
no comments
 
//start processing
var api = new moviesApi();
api.getRatings({
    success: function (result) {
        for (var i = 0; i < result.length; i++) {
            //new Option(text, value)
            var option = new Option(result[i].ID, result[i].Name);
            $('#ratings').append(
                $('<option></option>').val(result[i].ID).html(result[i].Name)
            );
24 Views
no comments
 
//Create and type variable
var moviesApi = function () { }
 
moviesApi.prototype.getRatings = function (options) {
    $.ajax({
        url: applicationUrl + '/Api/movies/getratings',
        type: 'GET',
        success: options.success,
        error: function (result) {
            displayError(result);
by Warren Wiltshire   May 02, 2012 @ 5:19am
32 Views
no comments
 
C#
// GET: /Dog/
public ViewResult Index()
{
  var dogs = db.PetSet.ToArray<Pet>().Where(s => s is Dog).Cast<Dog>();
  return View(dogs);
}
by Alessandro Fabozzi (google)   April 07, 2012 @ 11:33pm
22 Views
no comments
 
$(document).ready(function () {
            $('.AutoSelect').focus(function () { $(this).select() });
            $('.AutoSelect').mouseup(function (e) {
        e.preventDefault();
});
by Davide Orazio Montersino   March 27, 2012 @ 12:50am
24 Views
no comments
 
Ctrl + Alt + End
by DaveCS   March 13, 2012 @ 8:54pm
42 Views
no comments
 
<asp:RegularExpressionValidator ValidationGroup="Anagrafica" ID="RegularExpressionValidatorEmail"
                                                    ControlToValidate="TextBoxEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                    ErrorMessage="Indirizzo email immesso non valido" EnableClientScript="true" runat="server" />
by Davide Orazio Montersino   March 05, 2012 @ 1:00am
26 Views
no comments
 
Taskkill /IM firefox.exe /F
 
where /F is used to kill the process forcefully. You can also kill any particular process by using it’s ID, the tasklist command displays the process ID’s as well (you can see the PID column in the screenshot). To kill any process using it’s ID, run the command as:
 
Taskkill /PID 2704 /F
 
Now to kill multiple processes simultaneously, run the above command with the PID’s of all the processes followed by spaces
 
Taskkill /PID 2704 5472 4344 /F
by Jose David Parra   March 04, 2012 @ 12:35pm
30 Views
no comments
 
SQL
 
 
 
 /*************************************************************************************
  *
  *        Copyright 2012 Davide Orazio Montersino http://www.davidemontersino.com
  *
  *        This program is free software: you can redistribute it and/or modify
  *        it under the terms of the GNU General Public License as published by
  *        the Free Software Foundation, either version 3 of the License, or
by Davide Orazio Montersino   January 10, 2012 @ 2:19am
59 Views
no comments
 
C++
from math import *
 
def sumOfDigit(n):
    if n<10: return n
    sum = 0
    if n >0:
        sum += n%10
        n /= 10
    return sum
by Pella86   December 23, 2011 @ 5:10pm
141 Views
no comments
 
C#
/// <summary>
/// Creates the mail message.
/// </summary>
/// <param name="emailBody">The email body.</param>
/// <param name="maTo">The ma to.</param>
/// <param name="maFrom">The ma from.</param>
/// <param name="maBcc">The ma BCC.</param>
/// <param name="attachment">The attachment.</param>
/// <returns></returns>
public static MailMessage CreateMailMessage(string emailBody, string maTo, string maFrom, string maBcc, Attachment attachment)
by Prithvi Ramana A   December 22, 2011 @ 2:51am
49 Views
1 comments
 
<?php
 
/**
 * First, locate your "twitter.php" file in "/common/twitter.php" and replace it with the following one
 * demo :  http://m.tuitme.tk
 * @see http://code.google.com/p/dabr/source/browse/trunk/common/twitter.php
 */
 
function twitter_update() {
by @deniahmad   November 20, 2011 @ 7:31pm
96 Views
no comments
 
new AsyncNetTask(myContext, myHandler) {
 
    // 작업중에 필요한 변수가 있다면 finalize 하거나 이 객체의 생성자 인자로 넘길 수 있을 것입니다.
    // 유지해야 하는 변수라면 멤버 변수 등을 사용할 수도 있을 것입니다.
    Mydata mData;
 
    @Override
    protected TcpEnvelope onPreExecute() {
        return makeEnvelope();
    }
by arngard   November 17, 2011 @ 8:26pm
55 Views
no comments
 
C#
public partial class MyDataContext : System.Data.Linq.DataContext
{
    public void OnCreated()
    {
        if (!this.DatabaseExists())
            MoveDatabase("MyDatabase.sdf");
    }
 
    public static void MoveDatabase(string name)
    {
by Jerry Nixon   November 10, 2011 @ 10:13am
242 Views
no comments
 
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title></title>
    <style>
    .bigbutton
    {
        background: #1e5799; /* Old browsers */        
        color: White;
by Rick Strahl   November 09, 2011 @ 6:35pm
Tags: HTML, CSS, Button
88 Views
no comments
 
C#
public void SaveData(string path, object data)
{
    var _Store = IsolatedStorageFile.GetUserStoreForApplication();
    using (var _Stream
        = new IsolatedStorageFileStream(path, FileMode.Create, _Store))
    {
        var _Serializer = new XmlSerializer(data.GetType());
        _Serializer.Serialize(_Stream, data);
    }
}
by Jerry Nixon   November 07, 2011 @ 1:40pm
173 Views
no comments
 
C#
var _Key = "MyUniqueKey";
 
// persist data to the dictionary
var _DataToStore = "Store this string!";
IsolatedStorageSettings
    .ApplicationSettings.Add(_Key, _DataToStore);
 
// test presence in store
var _BoolResult = IsolatedStorageSettings
    .ApplicationSettings.Contains(_Key);
by Jerry Nixon   November 07, 2011 @ 1:37pm
124 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate