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
''' | |
This script fixes manipulator types in blends that have been created with XPlane2Blender <= 3.20.6. | |
Usage: Select the objects with wrongly assigned manipulator types and then run this script in Blender's text-editor. | |
''' | |
import bpy | |
for object in bpy.context.selected_objects: | |
if object.xplane.manip.enabled: | |
if object.xplane.manip.type == 'command': |
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
// define constructor | |
function User() { | |
} | |
// define prototype using "this" | |
User.prototype = new (function() { | |
this.name = 'new User'; | |
var pass = 'secret' | |
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
"use strict"; | |
var exec = require('child_process').exec; | |
var sqlAdapters = ['mysql', 'sqlite', 'postgres']; | |
var utils = require('utilities'); | |
function noop() {} | |
function getAdapter() | |
{ |
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
"use strict"; | |
/* | |
Chainable formatters | |
Usage: | |
function trim(value) { | |
return value.trim(); | |
} |
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
"use strict"; | |
/* | |
Usage: | |
require('./promisify_models')(geddy.model); | |
geddy.model.allPromise() | |
.then(function(result) { ... }) | |
.catch(function(err) { throw err; }); |
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
/** | |
* Adds a loader method to the model innstance that will automatically populate the property for the assoc after load | |
* Example: this.belongsTo('User') will add a "loadUser" method | |
* @param instance | |
*/ | |
module.exports.improveAssocs = function(instance) | |
{ | |
var model = getModel(); | |
var type = instance.type; | |
var def = model.descriptionRegistry[type]; |
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
''' | |
This script fixes manipulator types in blends that have been created with older versions of XPlane2Blender. | |
Usage: Select the objects with wrongly assigned manipulator types and then run this script in Blender's text-editor. | |
''' | |
import bpy | |
for object in bpy.context.selected_objects: | |
if object.xplane.manip.enabled: | |
if object.xplane.manip.type == 'delta': |
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
var formidable = require('formidable'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var UploaderException = function(message) | |
{ | |
this.message = message; | |
this.toString = function() | |
{ | |
return 'Uploader error: '+this.message; |
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 | |
class DateUtil | |
{ | |
public static $weekday_names = array( | |
1 => 'Montag', | |
2 => 'Dienstag', | |
3 => 'Mittwoch', | |
4 => 'Donnerstag', | |
5 => 'Freitag', |
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
var Application = function () { | |
// allow cross domain XHR | |
this.allowCORS = function() | |
{ | |
this.options = function(req, resp, params) | |
{ | |
if (req.method.toLowerCase() == 'options') { | |
resp.setHeaders(200,{ | |
'Content-Type': 'text/plain', | |
'Access-Control-Allow-Origin': '*', |
OlderNewer