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
// la chaine de caractères est dans une variable | |
binAsString; | |
var file = new File('appData/path/to/file.png'); | |
file.encoding = 'BINARY'; | |
if (file.open('w')) | |
{ | |
success = file.write(binAsString); | |
file.close(); |
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
//le fichier à convertir | |
var file = new File("path/to/file.png"); | |
//on prévient Ae que c'est du binaire | |
file.encoding = 'BINARY' | |
// continedra le fichier convertit en chaine | |
var content = '' | |
//on ouvre et on lit | |
if (file.open("r")) | |
{ |
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
/** | |
* @class | |
* @name TheTypeName | |
* @classdesc The description of the type.<br /> | |
* This is not a real class, and cannot be instanciated.<br /> | |
* Use {@link methodWhichReturnsThisType} to create a TypeName.<br /> | |
* TypeName inherits Type and has all of its properties and methods. | |
* @property {string} aProperty - This is a string property | |
* @property {TheTypeName~callBack} callBack - a callback. You can set this to one of your own function. | |
*/ |
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
/** | |
* Constructs an iterator | |
* @example | |
* var it = new Iterator(layers); | |
* while (!it.atEnd) | |
* { | |
* it.next(); | |
* var layer = layers[it.current]; | |
* //do something with the layer | |
* |
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
function exportShapeToFile() | |
{ | |
var recenter = false; | |
var comp = app.project.activeItem; | |
if (!comp) return; | |
if (!(comp instanceof CompItem)) return; | |
var props = comp.selectedProperties; | |
var layer = comp.selectedLayers[0]; | |
var path = props.pop(); | |
var shape = path.value; |
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
#include "frameless.h" | |
FrameLess::FrameLess(QWidget *target) : | |
_target(target), | |
_cursorchanged(false), | |
_leftButtonPressed(false), | |
_borderWidth(5), | |
_dragPos(QPoint()) | |
{ | |
_target->setMouseTracking(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
function newUniqueName( newName, stringList ){ | |
//detect digits | |
var reg = "( *)(\\d+)([.,]?\\d*)$"; | |
//clean input | |
var regexClean = new RegExp(reg); | |
newName= newName.replace(regexClean,""); | |
//go! | |
var regex = new RegExp( newName + reg); | |
//The greatest number found | |
var greatestNumber = 0; |