Обязательные параметры счета в файле XML:
- Дата;
- Номер - будет соответствовать номеру на сайте?
- Контрагент;
- Договор с контрагентом – будет браться из основного договора контрагента;
- Банковский счет;
- Товары и услуги:
- Номенклатура;
- Количество;
- Цена ;
import Foundation | |
public struct StderrOutputStream: OutputStreamType { | |
public mutating func write(string: String) { fputs(string, stderr) } | |
} | |
public var errStream = StderrOutputStream() | |
let T = Int(readLine()!)! | |
debugPrint("T = \(T)", toStream: &errStream) |
@IBAction func loadImage(sender: AnyObject) { | |
let imagePickerActionSheet = UIAlertController(title: "Take/Upload Photo", | |
message: nil, preferredStyle: .ActionSheet) | |
if UIImagePickerController.isSourceTypeAvailable(.Camera) { | |
let cameraButton = UIAlertAction(title: "Take Photo", style: .Default, handler: { (alert) in | |
let imagePicker = UIImagePickerController() | |
imagePicker.delegate = self | |
imagePicker.sourceType = .Camera | |
self.presentViewController(imagePicker, animated: true, completion: nil) | |
}) |
Обязательные параметры счета в файле XML:
# See https://www.thomaskeller.biz/blog/2011/06/04/acls-on-mac-os-x/ | |
$ cd ~/bittorrent | |
$ mkdir private | |
$ chmod -R +a '<username> allow read,write,delete,add_file,add_subdirectory,file_inherit,directory_inherit' private | |
$ chmod -R +a# 1 'everyone deny read,write,delete,add_file,add_subdirectory,file_inherit,directory_inherit' private |
<? | |
if (CModule::IncludeModule("iblock")) { | |
$res = CIBlockElement::GetList(array(), array('IBLOCK_ID'=>23, 'ACTIVE'=>'Y'), false, false, array('NAME', 'ID', 'IBLOCK_ID', 'PROPERTY_FLAT_NUMBER')); | |
//$arElement = $res->Fetch(); | |
//echo '<pre>'; var_dump($arElement); echo '</pre>'; | |
while($arElement = $res->GetNext()) { | |
preg_match('(\d+)', ($arElement['NAME']), $matches); | |
$flatNumber = null; | |
if(count($matches) > 0) { | |
$flatNumber = intval($matches[0]); |
var api = new ParseServer({ | |
databaseURI: databaseUri || 'mongodb://localhost:27017/dev', | |
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js', | |
appId: process.env.APP_ID || 'myAppId', | |
masterKey: process.env.MASTER_KEY || '', //Add your master key here. Keep it secret! | |
serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse', // Don't forget to change to https if needed | |
liveQuery: { | |
classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions | |
}, | |
allowClientClassCreation: process.env.CLIENT_CLASS_CREATION || false // <<< This line is added for disabling client class creation |
let parseConfiguration = ParseClientConfiguration(block: { (ParseMutableClientConfiguration) -> Void in | |
ParseMutableClientConfiguration.applicationId = "myAppId" | |
ParseMutableClientConfiguration.clientKey = "myMasterKey" // This is wrong! Never put your master key into the sources. | |
ParseMutableClientConfiguration.server = "https://anotherdarntest.herokuapp.com/parse" | |
}) | |
Parse.initializeWithConfiguration(parseConfiguration) |
// MARK: - CLLocationManagerDelegate | |
func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { | |
if let location = locations.first { | |
var text = "location: \(location.coordinate.latitude), \(location.coordinate.longitude)\n" | |
text += "course: \(location.course)\n" | |
text += "speed: \(location.speed)\n" | |
text += "altitude: \(location.altitude)\n" | |
CLGeocoder().reverseGeocodeLocation(location, completionHandler: { (placemarks, error) -> Void in | |
if error != nil { |
window.originalSetTimeout=window.setTimeout; | |
window.originalClearTimeout=window.clearTimeout; | |
window.activeTimers=[]; | |
window.setTimeout=function(func,delay) | |
{ | |
var id = window.originalSetTimeout(func,delay); | |
window.activeTimers[id] = {"func": func, "delay": delay}; | |
return id; | |
}; |
module Populator | |
class Record | |
# See http://stackoverflow.com/questions/4470108/when-monkey-patching-a-method-can-you-call-the-overridden-method-from-the-new-i | |
old_initialize = instance_method(:initialize) | |
define_method(:initialize) do |class_name, id| | |
old_initialize.bind(self).(class_name, id) | |
@class_name = class_name | |
end | |
def from_factory |