Monthly Archives: November, 2009

Indian Dice

Indian Dice is a poker game with dice.
I have played this game a few times, mainly when we don’t have a set of cards to play with and want to play poker.  Its very simple if you have played poker before.
“All the evidence shows that God was actually quite a gambler, and the universe is [...]

Cakephp – Session->setFlash is not working any more.

Question:
setFlash() no longer showing up on the page. Why ?
$this->Session->setFlash(“Hello world”);
Answer
As of CakePHP version 1.2 you need to tell the template where to put the flash message
<?php
$session->check(‘Message.flash’)) {
$session->flash();
}
?>

links for 2009-11-24

Giving WordPress Its Own Directory « WordPress Codex
Many people want WordPress to power their site's root (e.g. http://example.com) but they don't want all of the WordPress files cluttering up their root directory. WordPress allows you to install the WordPress files to a subdirectory, but have your blog exist in the site root.
(tags: install root wp [...]

Ice Cube Raft Race

Ice Cube Raft Race is a drinking game.
What you will need to play

1 ice cube tray for each player
1 straw for each player

How to play the game
Each player gets one ice cube tray which you fill with your favorite beverage.  Then, with a straw, suck up each slot one at a time until the tray [...]

links for 2009-11-19

15 Essential CakePHP Tips « nuts and bolts of cakephp
(tags: php cake cakephp webdevelopment webdev programming)

Cakephp – Using the same view for multiple controler functions

Question:
I have a Cakephp project the controller has several different methods.
function Index()
function IndexAuthor()
And I want to use the same ‘view’ (or template, Index.ctp) for both of the methods of the control.
Answer:
You’re looking for Controller::render().
function IndexAuthor() {
$this->autoRender = false ;
$this->render(‘/stories/admin_index’);
}
Source: http://stackoverflow.com/questions/1753585/cakephp-same-view-for-multiple-functions

High

High is a dice game.
The simplest of all the dice games I know. If you know of a simpler game please tell me, I would be interested to know.
The game can be played for stakes where the player with the highest roll wins the post.
What do you need to play

2 dice
2 or more people

Object [...]

links for 2009-11-13

OpenSocial – It's Open. It's Social. It's up to you.
Lots of people have helped OpenSocial move the social web forward — from huge social networking sites, to two-person startups writing social apps. Everyone works together to iterate on the OpenSocial Specification and collaborate on the OpenSocial Wiki. Whether you're writing an app, a social network, [...]

links for 2009-11-10

PHP: filter_var – Manual
Check a URL or Email address
(tags: php validation)

Golf

Golf is a dice game.
This game is for people that love golf so much that they can’t stop thinking about it every moment of their life.
It if doesn’t involve golf then its not worth thinking about.
This game is also known as Dragon Slayer. Instead of playing 18 rounds of golf, you are trying to [...]

links for 2009-11-05

Multi-Dimensional Analog Literals in C++
(tags: wtf funny humor c++ interesting c/c++ lol analogliterals literals geek)

links for 2009-11-04

Play Super Mario Bros in 14kB Javascript – Nihilogic
Here's an experiment in keeping things small and confined to one Javascript file. A piece of the old Super Mario Bros Nintendo classic. There are no external image or sound files, everything is rendered with Javascript using either canvas elements or old fashioned div-making tactics (for IE).
(tags: [...]

Convert HEX string to BYTE array, bug.

Find the bug in the following code and win a prize.
Its obvious once you find it. CSharp programmers are asked not to mock c++ in this thread.

#include “stdafx.h”
#include <string.h>
#include <stdio.h>

#define USHORT unsigned short
#define BYTE unsigned char

USHORT ConvertHexToBytes(
/* IN */ char * hex,
/* IN */ const USHORT hex_length,
/* OUT */ BYTE * buffer,
/* OUT [...]

Fourteens

Fourteens is a dice game.
This is a banking game that was popular in the Midwest of the USA between the 1930’s and 1950’s.  It was often played in taverns which would make payoffs in drinks until anti-gambling legislation killed off the game to a great extent.  An operator will often provide a score sheet which [...]