Skip to content

Instantly share code, notes, and snippets.

View olamedia's full-sized avatar
:octocat:
Working from home

olamedia olamedia

:octocat:
Working from home
  • Russian Federation
View GitHub Profile
@olamedia
olamedia / jobResumeController.php
Created April 26, 2011 11:54
jobResumeController
<?php
class jobResumeController extends controller{
public function initDelete(){
$this->_options['jobResume']->delete();
$this->redirect($this->rel('../..'));
}
public function initEdit(){
$this->_form = new jobResumeForm();
$this->_form->setItem($this->_options['jobResume']);
if ($this->_form->process()){
(function(window, undefined) {
var document = window.document, $ = window.jQuery;
var iframe = function(element) {
console.log('make jquery iframe element');
var iframe = $('<iframe frameborder=1 style="border: solid 1px #f00;" width="800" height="400"></iframe>');
console.log('append iframe to body');
$(element).after(iframe);
//$(element).hide();
// $("body").append(iframe);
(function(window, undefined) {
var document = window.document, $ = window.jQuery;
$.fn.getWindow = function() {
if (this[0].nodeName.toLowerCase() === 'iframe') {
return this[0].contentWindow;
}
return false;
};
$.fn.getDocument = function() {
if (this[0].nodeName.toLowerCase() === 'iframe') {
@olamedia
olamedia / LICENSE.txt
Created May 28, 2011 18:11 — forked from jed/LICENSE.txt
generate random UUIDs
Copyright (c) 2011 Jed Schmidt, http://jed.is
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {
@olamedia
olamedia / rAF.js
Created July 12, 2012 09:11 — forked from paulirish/rAF.js
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller
// fixes from Paul Irish and Tino Zijdel
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
for (int n = 0; n < vertexCount; n++) {
int tex = (int) buffer.get(vertexSize * n + 9);
if (!materials.containsKey(tex)) {
materials.put(tex, 1);
} else {
materials.put(tex, materials.get(tex) + 1);
}
}
for (Integer m : materials.keySet()) {
int matVertCount = materials.get(m);
/*
The MIT License
Copyright (c) 2012 olamedia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
import java.nio.FloatBuffer;
import org.ode4j.ode.internal.gimpact.GimGeometry.aabb3f;
import org.openmali.spatial.bodies.Box;
import org.openmali.spatial.bodies.Classifier;
import org.openmali.vecmath2.Matrix4f;
import com.jogamp.opengl.math.FloatUtil;
import com.jogamp.opengl.math.geom.AABBox;
import com.jogamp.opengl.util.PMVMatrix;
protected FloatBuffer Mvi = FloatBuffer.allocate(16);
protected FloatBuffer Pi = FloatBuffer.allocate(16);
protected ProjectFloat projectFloat = new ProjectFloat(true);
public void renderFrustum() {
GL2 gl = GLContext.getCurrentGL().getGL2();
gl2 = gl;
gl.glDisable(GL2.GL_CULL_FACE);
gl.glDisable(GL2.GL_DEPTH_TEST);
gl.glDisable(GL2.GL_TEXTURE_2D);