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.

1

linq query to get records and copy to datatable
Saturday, 28 January 2012 01:28
// linq query to get records and copy to datatable



var query = from p in ds.Tables["Id"].AsEnumerable()
where p.Field("ID") == "1" && p.Field("Name") == "test" select p;

if (query.Count() > 0)
{
dt = query.CopyToDataTable();
}

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/2ydBYwNuC1s/14495

 
Stop-Motion Video With 500 People And 1500 Photos In 110 Seconds [Video]
Tuesday, 23 August 2011 23:59
Here's an excellent video from Eran Amir that features 500 people holding 1500 photographs in a mere 110 second clip. More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/OO2IGj55gko/stop+motion-video-with-500-people-and-1500-photos-in-110-seconds

 
Astronauts Evacuate to Soyuz Spacecraft as Junk Nearly Hits International Space Station [Space]
Tuesday, 28 June 2011 12:02
Astronauts on board the International Space Station had to rush into two docked Soyuz spaceships as space debris nearly missed their homebase, passing just 250 meters (820 feet) from it. In space, that's a pretty close call. More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/QnZZWilSp0U/astronauts-evacuate-to-soyuz-spacecraft-as-junk-nearly-hits-the-international-space-station

 
Olympus' E-PL1s Has Larger ISO Range and Is World's Lightest Interchangeable Lens Camera [Cameras]
Tuesday, 16 November 2010 03:30
Going by Apple's method of whacking an "s" on the end of an only-slightly improved product, Olympus' E-PL1s features an improved battery and larger ISO range, from 3200 to 6400. Weighing 454g (including lens), pricing's yet to be confirmed. [AkihabaraNews] More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/0qpzjLXHYeg/olympus-e+pl1s-has-larger-iso-range-and-is-worlds-lightest-interchangeable-lens-camera

 
Backupscript 1.2
Wednesday, 04 August 2010 09:11
// description of your code here


#!/bin/sh

#
# Dies ist ein einfaches BackupScript welches
# Datenbanken und Ordner synchronisiert und
# das mittels SSH (AuthKey) und rsync.
#
# Name: SSHBackup
# Version: 1.2 (02.08.2010)
# Copyright: 2008-2010 by sp3x, www.sp3x.de
# _____
# ___ _ __|___ /_ __
# / __| '_ \ |_ \ \/ /
# \__ \ |_) |__) > <
# |___/ .__/____/_/\_\
# (c)|_| www.sp3x.de
#

#################
# KONFIGURATION #
#################

#
# Workingdir
#
WDIR="/root/backup/"

#
# Database-Backup History in Days
#
HISTORY=7

#
# Remote IP
#
HOST="localhost"

#
# MySQL-Datenbanken sichern?
# 1 = ja, 0 = nein
#
MYSQL=1

#
# Dateien sichern?
# 1 = ja, 0 = nein
#
FILESYSTEM=1

#
# MySQL-Datenbank Benutzer
#
MYSQL_USR="root"

#
# MySQL-Datenbank Password
#
MYSQL_PWD=""

#
# MySQL-Port
#
MYSQL_PORT=3306

#
# SSH-Port
#
SSH_PORT=9990

#
# SSH-Auth Key (default: ssh/key)
#
SSH_KEY="ssh/key"

#
# SSH-User (default: root)
#
SSH_USER="root"

#
# Maximale Geschwindigkeit in KByte/s
#
SPEED=99999

######################
# KONFIGURATION ENDE #
#####################Ã#

# Text formatiert in Konsole ausgeben
function cout() {

if [ "$2" = "" ]; then
MSG=$1
else
MSG="\033\13301;$2m$1\033\1330m"
fi

if [ "$3" = "1" ]; then
MSG="$MSG\a"
fi


echo -e -n "$MSG"
}

# Commando remote ausfuehren
function scmd() {

ssh -q $HOST -p$SSH_PORT -l$SSH_USER -i $SSH_KEY $1 $2 $3 $4 $5 $6 $7 $8 $9
}

#################################
# Backupvorgang vorbereiten
# und starten
cout "\n\tStarting backup... "

cd $WDIR

set $(date)
DATE=`date "+%Y-%m-%d_%H-%M"`
let deathline=`date "+%Y%m%d"`-$HISTORY+1
deathline=$deathline"0000"
#################################
# Alte Backups löschen
#
for dir in `ls ./DATABASE/`; do
cleandir=`echo $dir |sed s/_// |sed s/-// |sed s/-// |sed s/-//`
if [ $cleandir -lt $deathline ]; then
rm -Rf ./DATABASE/$dir
fi
done

#################################
# MYSQL - Backup
if [ "$MYSQL" = "1" ]; then

cout "\n\n\t\tStarting MySQL backup... "

# Backupscript erstellen
SCRIPT=`cat tpl/mysql`

sed -e "s/{MYSQL_USR}/$MYSQL_USR/" tpl/mysql > tmp.1
sed -e "s/{MYSQL_PWD}/$MYSQL_PWD/" tmp.1 > tmp.2
sed -e "s/{MYSQL_PORT}/$MYSQL_PORT/" tmp.2 > tmp.3
chmod +x tmp.3

scmd rm ~/tmp.dbbackup.sh 2> /dev/null
scp -P$SSH_PORT -i $SSH_KEY tmp.3 $SSH_USER@$HOST:~/tmp.dbbackup.sh 1> /dev/null
rm tmp.*

# Datenbank backup
scmd ~/tmp.dbbackup.sh

# Datenbankbackups synchronisieren
rsync -a -z -e "ssh -q -i$SSH_KEY -p$SSH_PORT" --bwlimit=$SPEED --stats "$SSH_USER@$HOST:/root/tmp.database/" ./DATABASE/ > log/${DATE}_database.log

# Datenbankordner loeoeschen
scmd rm -R ~/tmp.database

cout "\tDone" 32
fi
#################################
# FILESYSTEM - Backup
if [ "$FILESYSTEM" = "1" ]; then
cout "\n\t\tStarting Files backup... "


for x in `cat rpath.conf`; do
IFS=":"
data=($x)
mkdir FILE/${data[1]} 2> /dev/null
rsync -a -z -e "ssh -i$SSH_KEY -p9990" --bwlimit=$SPEED --stats --delete "$SSH_USER@$HOST:${data[0]}/" FILE/${data[1]}/ > log/${DATE}_file.log
done;

cout "\tDone" 32
fi

cout "\n\n\n\tFinished backup!\n\n" 32

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/FmV4RqGgSaU/11967

 


Taxonomy by Zaragoza Online