Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function functions() { | |
// actions for individual moblogs, rotate, hide & delete | |
if(!empty($this->data)) { | |
$redirect = '/moblogs/view/'.$this->data['Moblog']['id']; | |
if(isset($this->data['Function']['nsfw'])) { | |
if(isset($this->data['Function']['nsfw'])) { | |
//update dbase to set NSFW flag | |
$this->Moblog->nsfw($this->data['Moblog']['id'],$this->data['Function']['nsfw']); | |
$log = ($this->data['Function']['nsfw']) ? 'NSFW' : 'SAFE'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default | |
{ | |
state_entry() | |
{ | |
vector fwd = <llSqrt(2)/2, llSqrt(2)/2, 0.0>; | |
vector left = < 0.0, 1.0, 0.0>; | |
vector up = < 0.0, 0.0, 1.0>; | |
rotation rot = llAxes2Rot(fwd, up % fwd, up); | |
llSay(DEBUG_CHANNEL, (string) rot); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Presentation Object | |
let s:Presentation = { 'slides' : [], 'current' : 0, 'currentLine' : 0 } | |
function! s:Presentation.load() | |
let self.slides = [ | |
\ { | |
\ 'title' : 'presentation.vimについて', | |
\ 'contents' : [ | |
\ '* 概要', | |
\ '* 起動方法', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The ASF licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" maimiku_search.py | |
マイミクの指定ユーザーの日記を全文検索する | |
""" | |
import os | |
import pickle | |
import sys | |
import mymixi_diary # http://d.hatena.ne.jp/ama-ch/20080725/1216995714 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Das ist der nochmals geänderte Inhalt des Testfiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> products = [] | |
=> [] | |
>> 1.upto(5) do |i| | |
?> products << OpenStruct.new(:part_number => "part_num_#{i}", :name => "Product #{i}") | |
>> end | |
=> 1 | |
>> products | |
=> [#<OpenStruct name="Product 1", part_number="part_num_1">, #<OpenStruct name="Product 2", part_number="part_num_2">, #<OpenStruct name="Product 3", part_number="part_num_3">, #<OpenStruct name="Product 4", part_number="part_num_4">, #<OpenStruct name="Product 5", part_number="part_num_5">] | |
>> products.any? {|product| product.part_number == "part_num_5"} | |
=> true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Texas oilman T. Boone Pickens has now joined another high-profile McCain supporter, Arnold Schwarzenegger, in knocking the McCain nostrum that America can drill its way out of its energy crisis. Mr. Pickens, who financed the Swift-boat campaign smearing John Kerry in 2004, was thought to be a sugar daddy for similar assaults against the Democrats this year. Instead, he is underwriting nonpartisan ads promoting wind power and speaks of how he would welcome Al Gore as energy czar if there’s an Obama administration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config | |
:number => { | |
:format => { | |
:precision => 3, | |
:separator => '.', | |
:delimiter => ',' | |
}, | |
:currency => { | |
:format => { | |
:unit => '$', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// show.php | |
class Show extends AppModel { | |
var $hasAndBelongsToMany = array('User'); | |
} | |
// user.php | |
class User extends AppModel { | |
var $hasAndBelongsToMany = array('Show'); |