This file contains hidden or 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
| // Con esta función transformamos de pixeles (o la unidad por default) | |
| // a dp | |
| function pixelToDp(pixel) { | |
| var dpi = Ti.Platform.displayCaps.dpi; | |
| var dp = (pixel / dpi) * 160; | |
| dp = Math.ceil(dp); | |
| return dp; | |
| }; |
This file contains hidden or 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
| Private Sub Worksheet_Calculate() | |
| ' definimos una variable | |
| ' donde guardaremos la image | |
| Dim oPic As Variant | |
| Me.Pictures.Visible = False | |
| ' seleccionamos la celda con el nombre | |
| ' de la imagen | |
| With Range("B17") | |
| ' recorremos todas las imagenes del doc. |
This file contains hidden or 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
| // En components.js tienes algo asi: | |
| exports.SexyButton = function(_title,_width) { | |
| var args={ | |
| title: _title, | |
| width:_width?_width:'110dp' | |
| }; | |
| return Ti.UI.createButton(args); | |
| } |
This file contains hidden or 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
| [ERROR] /Users/demogar/Apps/iLoyalty/build/iphone/Classes/TiApp.mm:627:12: error: cannot initialize return object of type 'NSUInteger' (aka 'unsigned int') with an rvalue of type 'id' | |
| [ERROR] | |
| [ERROR] Error: Traceback (most recent call last): | |
| File "/Users/demogar/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.v20120921190208/iphone/builder.py", line 1315, in main | |
| execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s %s" % (log_id,sdk_version,debugstr,kroll_coverage)],False) | |
| File "/Users/demogar/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.v20120921190208/iphone/builder.py", line 1221, in execute_xcode | |
| output = run.run(args,False,False,o) | |
| File "/Users/demogar/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.v20120921190208/iphone/run.py", line 41, in run | |
| sys.exit(rc) | |
| SystemExit: 65 |
This file contains hidden or 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 | |
| // Add this to template-functions.php | |
| // Disclaimer: I based icl_get_anchor_attributes on the _stringify_attributes function on CodeIgniter framework. I made my own function, but I believe this function is just better (and proved to work fine) | |
| function icl_get_anchor_attributes($attributes) { | |
| if (is_object($attributes) && count($attributes) > 0) { | |
| $attributes = (array) $attributes; | |
| } | |
| if (is_array($attributes)) { |
This file contains hidden or 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
| Titanium.Media.openPhotoGallery({ | |
| success: function(event) { | |
| var selectedImage = event.media; | |
| // XHR | |
| var url="http://url.a.tu/servicio"; // Deberas reemplazar esto | |
| var xhr=Ti.Network.createHTTPClient(); // Creamos nuestro cliente | |
| var parameters={ | |
| image: selectedImage // Recuerdan esto? Es la imagen que seleccionamos | |
| }; |
This file contains hidden or 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
| Titanium.Media.openPhotoGallery({ | |
| success: function(event) { | |
| var selectedImage = event.media; | |
| // TODO: Aún necesitamos implementar el uploader | |
| }, | |
| cancel: function(){}, | |
| error: function(error){ | |
| Ti.API.error(error); | |
| alert(error); |
This file contains hidden or 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
| /* Sass con sintaxis .sass */ | |
| /* Variables */ | |
| $azul: #3bbfce /* Guardamos una variable llamada azul con el color #3bbfce */ | |
| $blanco: #fff | |
| /* este es un elemento con class content-navigation */ | |
| .content-navigation | |
| border-color: $blue /* Noten el espacio y la falta de llaves */ | |
| color: darken($blue, 9%) /* darken es una funcion utilitaria que viene en Sass, hace un color mas oscuro */ | |
| p |
This file contains hidden or 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
| sudo chown www-data:www-data -R fastcgi_temp | |
| sudo chmod -R 777 fastcgi_temp | |
| sudo chown www-data:www-data -R client_body_temp | |
| sudo chown -R 777 client_body_temp | |
| sudo /etc/init.d/nginx restart |
This file contains hidden or 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
Show hidden characters
| { | |
| "extensions": | |
| [ | |
| "erb" | |
| ], | |
| "tab_size": 2, | |
| "translate_tabs_to_spaces": true, | |
| "trim_trailing_white_space_on_save": true | |
| } |