-
- Processador Core2Duo 1.83 GHz
-
- Combo drive
-
- 2GB de RAM (originalmente era 1GB, foi atualizado)
-
- 250GB de HD (originalmente era 80GB, foi atualizado)
-
- Teclado Mac com fio
-
- Adaptador DVI -> VGA
Preço: R$700,00
namespace :spree do | |
desc "Export Products to CSV File" | |
task :export_products => :environment do | |
require 'fastercsv' | |
products = Product.find(:all) | |
puts "Exporting to #{RAILS_ROOT}/products.csv" | |
FasterCSV.open("#{RAILS_ROOT}/products.csv", "w") do |csv| | |
csv << ["id", "name", "description","sku", "master_price" ] |
// Kosso imageAsCropped | |
// added to TiBlob.m | |
// requires 4 arguments : x, y, width, height | |
- (id)imageAsCropped:(id)args | |
{ | |
[self ensureImageLoaded]; | |
if (image!=nil) | |
{ | |
ENSURE_ARG_COUNT(args,4); |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
/** | |
* Define our parser class. It takes in some text, and then you can call "linkifyURLs", or one of the other methods, | |
* and then call "getHTML" to get the fully parsed text back as HTML! | |
* @param text that you want parsed | |
*/ | |
function Parser(text) { | |
var html = text; | |
var urlRegex = /((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi; |
[...] | |
/* | |
The minimum delay in seconds (fractional seconds are okay) before | |
a linter is run when the "sublimelinter" setting is true. This allows | |
you to have background linting active, but defer the actual linting | |
until you are idle. When this value is greater than the built in linting delay, | |
errors are erased when the file is modified, since the assumption is | |
you don't want to see errors while you type. | |
*/ |
{ | |
"cmd": "/usr/local/bin/titanium.sh run --platform=iphone", | |
"shell": true, | |
"selector": "source.js", | |
"working_dir": "${project_path:${folder}}" | |
} |
var Utils = { | |
/* modified version of https://gist.github.com/1243697 | |
* adds detection of file extension rather than hard-coding .jpg as in the original | |
*/ | |
_getExtension: function(fn) { | |
// from http://stackoverflow.com/a/680982/292947 | |
var re = /(?:\.([^.]+))?$/; | |
var tmpext = re.exec(fn)[1]; | |
return (tmpext) ? tmpext : ''; | |
}, |
// I was unhappy about there was close to no control over the "pageControl" | |
// in scrollableViews, so I hacked my own | |
// ----- | |
// Configuration | |
var pageColor = "#c99ed5"; | |
PagingControl = function(scrollableView){ | |
var container = Titanium.UI.createView({ | |
height: 60 |
// Forked from https://gist.github.com/2417902 to fix a small bug | |
// ----- | |
function PagingControl(scrollableView){ | |
var pages = []; | |
var page; | |
var numberOfPages = 0; | |
// Configuration | |
var pageColor = "#c99ed5"; | |
var container = Titanium.UI.createView({ |