1
2
3
4
<?php
function has( var , default ) {
  if( isset( $_POST[var] )
...

PHP On <input value=''> func...

by slaskis, November 25, 2007 15:51 Star_fullStar_fullStar_full

Long time ago i coded any p...

Ad2ffc6b05fb4390643f36a258b86362 Talk
1
2
3
4
x1 = "<xml testsdf=\"dsfsdf\"><test/><node><content attr='fgsd' /></node><node id='2'><content /></node></xml>"
x2 = <<END
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>blog</title><script type="text/javascript" src="/blog/static/jquery-1.1.3.pack.js"></script><script type="text/javascript" src="/blog/static/blog.js"></script><link type="text/css" rel="stylesheet" href="/blog/styles.css" media="screen"/></head><body><h1 class="header"><a href="/blog/">blog</a></h1><div class="content"><h1 class="post_head"><a href="/blog/view/2">Hej</a><a class="edit_link" href="/blog/edit/2">edit</a></h1><p>ASDJlksdjfsld
...

Ruby On Format to readable XML

by slaskis, November 23, 2007 15:36

Some example xml/xhtml i us...

Ad2ffc6b05fb4390643f36a258b86362 Talk
1
2
3
4
def format_xml(xml)
  formatted = ""
  # Add Newlines
...

Ruby Format to readable XML

by slaskis, November 23, 2007 14:41, 4 refactorings

Sometimes the xml is just o...

Ad2ffc6b05fb4390643f36a258b86362 Talk
1
2
3
function toUpperCase( str : String ):String {
...

JavaScript Uppercase a string, but ski...

by slaskis, October 30, 2007 18:46, 2 refactorings, tagged with string, uppercase, avoid characters

I had to do this on my curr...

Ad2ffc6b05fb4390643f36a258b86362 Talk
1
2
3
4
keys = {
  "a" => %w(q w s z),
  "b" => %w(v n g h),
...

Ruby Getting QWERTY misstypes

by slaskis, October 23, 2007 13:17, 3 refactorings

This is not really a refact...

Ad2ffc6b05fb4390643f36a258b86362 Talk