Skip to content

Instantly share code, notes, and snippets.

@EvanCarroll
EvanCarroll / ex.cs
Created July 18, 2009 22:02
C# - sohws the effect of virtual/overide vs new
using System;
namespace ConsoleView
{
public class Base {
public virtual void View() {
Console.WriteLine("Viewing Base, Original virtual View");
}
public void ViewNew() {
Console.WriteLine("Viewing Base, Original OLD ViewNew ;)");
## You can do this:
<?php
class foo {
function test() {
?>
Hello!
<?php
}
}
$test = new foo();
The errors in error.txt resulted from having written a storedproc, when I wanted to write
a user-defined scalar function. The problem, and solution are named appropriately in
this archive.
#!/usr/bin/env perl
package AleenaCode;
use warnings;
use strict;
use Sub::Exporter -setup => { exports => [qw/
random_color HTML_color random_color_with_key
get_totally_random_color
/] };
#!/usr/bin/env perl
use strict;
use warnings;
use feature ':5.10';
use LWP::UserAgent;
use HTML::TreeBuilder;
my $ua = LWP::UserAgent->new;
#!/usr/bin/perl
use feature ':5.10';
use warnings;
use strict;
my %saving_throws = (
ppd => [qw(paralyzation poison death_magic)],
rsw => [qw(rods staves wands)],
pp => [qw(petrifaction polymorph)],
bw => [qw(breath_weapon)],
sub _sort {
no strict;
my %h;
for my $a_or_b ( qw/ a b / ) {
say "$a_or_b: \t $$a_or_b";
given ( $$a_or_b ) {
when ( 'vin' ) { $h{$a_or_b} = -50 }
when ( 'stock' ) { $h{$a_or_b} = -49 }
when ( 'is_new' ) { $h{$a_or_b} = -48 }
$RFC822PAT = <<'EOF';
[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\
xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xf
f\n\015()]*)*\)[\040\t]*)*(?:(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\x
ff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n\015
"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[\040\t]*(?:\([^\\\x80-\
xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80
-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*
)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\
\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\
UPDATE inventory.vehicles AS v
SET decode_color_ext1 = c.ext1_desc
, decode_color_image = c.jpg_320
FROM chrome.view_image AS c
WHERE v.color_code_ext1 IS NOT null
AND v.chrome_styleid = c.fkey_style
AND v.color_code_ext1 = c.ext1_mfr_full
;
dealermade=# select pg_class.relname,pg_locks.* from pg_class,pg_locks where pg_class.relfilenode=pg_locks.relation order by relname;
SELECT * FROM "contacts"
WHERE (
id IN (
SELECT contact_id FROM customer_contacts
WHERE customer_id IN (
SELECT id FROM customers c WHERE is_potential = false
)
)
AND f_contact_acl(184, id)