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 io
C++
/************************************************************************************************
* File name: main.cpp                                                                           *
*************************************************************************************************
* Sub Program List:                                                                             *
*   GetInputDatas().................: Getting datas from text file into memory                  *
*   deAllocateMemory()..............: To delete all the arrays used in the program              *
* ANT COLONY ALGORITHM FUNCTIONS*****************************************************************
*   antColony().....................: The whole ant colony algorithm                            *
*************************************************************************************************
* To run, first download the mknap1.txt from OR-Library                                         *
by WhCrs   Saturday @ 4:45am
51 Views
no comments
 
<#
.COMPONENT
    NUPosh
.SYNOPSIS
    Test if an Assembly (.dll) is already loaded. 
.DESCRIPTION
    Test if an Assembly of the same name is already loaded in the current runspace. 
    Using the -PasThru parameter will return the AssemblyInfo object along with the boolean. 
.PARAMETER  Name
    The file name of the Assembly.   
by qawarrior   Thursday @ 7:42am
32 Views
no comments
 
//******************************//
//Prevent wrong input for mobile
//******************************//
 $("#Mobile").keydown(function (event) 
{
    // Allow: backspace, delete, tab and escape
    if (event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 ||
    // Allow: Ctrl+A
    (event.keyCode == 65 && event.ctrlKey === true) ||
    // Allow: home, end, left, right
by Egli   May 14, 2012 @ 11:43pm
12 Views
no comments
 
C#
return members == null ? 0 : members.Count;
by Warren Wiltshire   May 10, 2012 @ 6:57am
18 Views
no comments
 
//Remeber to use Html.TextBoxFor Html Helper with Html class attribute
 
            // a custom method for validating the Departure and Arrival Dates
            $.validator.addMethod('dateBeginEnd', function () {
                return new Date($('#DepartureDt').val()) < new Date($('#ArrivalDt').val());
            }, 'Depature date must be before Arrival date.');
 
            // a new class rule to group all three methods
            $.validator.addClassRules({
                requiredBeginEndDate: { required: true, date: true, dateBeginEnd: true }
17 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)
            );
23 Views
no comments
 
displayError = function (result) {
    $('#errorDisplay').show();
    $('#errorDisplay').html(result.responseText);
}
by Warren Wiltshire   May 02, 2012 @ 5:20am
33 Views
no comments
 
C#
using System.Diagnostics;
 
try
{
}
catch (Exception ex)
{
  Debug.WriteLine("Exception: " + ex.Message);
}
Finally
by Triplesticks   April 06, 2012 @ 5:12am
25 Views
no comments
 
C#
string connString = System.Configuration.ConfigurationManager.ConnectionStrings["Northwind"].ConnectionString;
by Triplesticks   April 05, 2012 @ 7:02pm
25 Views
no comments
 
<%@ Page Title="" Language="C#" MasterPageFile="~/Miso1.Master" AutoEventWireup="true" CodeBehind="Currency.aspx.cs" Inherits="WebApplication1.Currency" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
    <script type="text/javascript" language="javascript">
 
        $(document).ready(function () {
        });
 
 
        String.prototype.replaceAll = function (str1, str2, ignore) {
            return this.replace(new RegExp(str1.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g, "\\$&"), (ignore ? "gi" : "g")), (typeof (str2) == "string") ? str2.replace(/\$/g, "$$$$") : str2);
by Fred Peters   April 03, 2012 @ 6:44am
46 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">
<head>
    <title></title>
 
        <script type="text/javascript" src="JavaScript/jquery-1.4.1.min.js"></script>
        
        <script type="text/javascript" language="javascript">
 
        String.prototype.replaceAll = function (str1, str2, ignore) {
by Fred Peters   April 03, 2012 @ 6:42am
34 Views
no comments
 
C#
void Main()
{
    Environment.Version.ToString().Dump();
    Environment.Version.Build.Dump();
    Environment.Version.Revision.Dump();
    Environment.Version.Major.Dump();
    
    IsDotNet45().Dump();
}
by Rick Strahl   April 02, 2012 @ 3:00pm
Tags: CLR, Version
160 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">
<head>
    <title></title>
 
        <script type="text/javascript" src="JavaScript/jquery-1.4.1.min.js"></script>
        
        <script type="text/javascript" language="javascript">
 
        String.prototype.replaceAll = function (str1, str2, ignore) {
by Fred Peters   March 30, 2012 @ 11:00am
39 Views
no comments
 
C++
#ifndef FONKSIYONLAR_H_INCLUDED
#define FONKSIYONLAR_H_INCLUDED
#include <iostream>
#include <conio.h>
#include <fstream>
#include <windows.h>
using namespace std;
 
int girdiKontrol(string);
void komutListele();
by spacecamp   March 24, 2012 @ 12:11am
Tags: Function
22 Views
no comments
 
Usage
'strContent = AES_Encrypt(strContent, "somepassword")
'File.WriteAllText("encrypted.txt", strContent)
 
'strContent = AES_Decrypt(strContent, "somepassword")
'File.WriteAllText("decrypted.txt", strContent)
 
  Public Function AES_Encrypt(ByVal input As String, ByVal pass As String) As String
        Dim AES As New System.Security.Cryptography.RijndaelManaged
        Dim Hash_AES As New System.Security.Cryptography.MD5CryptoServiceProvider
by DaveCS   March 14, 2012 @ 7:03am
140 Views
no comments
 
public void invoke(string pText)
        {
            Ms_Supplier_SelectData objMs_Supplier_SelectData = new Ms_Supplier_SelectData(pText);
            RESULT = objMs_Supplier_SelectData.RESULT;
            try
            {
                //Ms_Supplier_SelectData objMs_Supplier_SelectData = new Ms_Supplier_SelectData(pText);
                //RESULT = objMs_Supplier_SelectData.RESULT;
                if (RESULT.HasRows)
                {
27 Views
1 comments
 
C#
// No changes to the _Layout.cshtml, only changes in Global.asax.cs as follows:
 
// Case 1. Default - knockout.debug.js doesn't work, knockout-debug.js works (looks like it doesn't like the .debug.js extension)
BundleTable.Bundles.RegisterTemplateBundles();
 
// Case 2. Deleted the above and added the below - same behavior
BundleTable.Bundles.EnableDefaultBundles();
 
// Case 3. AddFile to the BundleTable manually
jstransformer = new NoTransform("text/javascript");
by VinKamat   March 07, 2012 @ 8:45am
39 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
25 Views
no comments
 
2012-02-22 14:13:30 [INFO] This server is running CraftBukkit version git-Bukkit-1.1-R3-b1846jnks (MC: 1.1) (Implementing API version 1.1-R3)
2012-02-22 14:13:30 [INFO] Unknown command. Type "help" for help.
2012-02-22 14:13:34 [INFO] Plugins: WorldBorder, XrayInformer, WorldEdit, TradeCraft, EnderCrystalizer, CommandBook, PermissionsBukkit, Vault, LogBlockQuestioner, PvPToggle, LogBlock, LWC, FirstLastSeen, WorldGuard, mChatSuite, SimpleJail, SpawnerAdjuster, GroupAnnouncer, Points, LimitedCreative, Honeypot, ThumbsApply, WeatherRestrictions, TeleportSuite, mcbans, CFBanner, MultiSpawn, Xray Detection, SimpleSpleef, NoCheat, Votifier, SimpleReserve, Residence
2012-02-22 14:13:34 [INFO] Unknown command. Type "help" for help.
by Digitalink2008   February 22, 2012 @ 1:14pm
34 Views
no comments
 
users:
    Notch:
        permissions:
            permissions.example: true
        groups:
        - admin
    digitalink2008:
        groups:
        - owner
        permissions:
by Digitalink2008   February 22, 2012 @ 1:12pm
39 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