Search Results

Search found 4 results on 1 pages for 'satoshi nakajima'.

Page 1/1 | 1 

  • Oracle WebCenter Sites 11gR1 ???????????????????

    - by Satoshi Nakane
    ????ePub???mobi???WebLogic Server 12c???????????????????????????Oracle WebCenter Sites 11gR1??????????????????????? Oracle WebCenter Sites Documentationhttp://www.oracle.com/technetwork/jp/middleware/webcenter/sites/documentation/index.html OTN ?????? Middleware > WebCenter > WebCenter Sites ????????????????????????????????????? Oracle WebCenter Sites 11g Release 1 (11.1.1.6.0) ? View Library ?????????WebCenter Sites 11gR1 ????????????????????????????????????????????????????????????????????????? ?Oracle WebCenter Sites 11gR1 ?????????????  ???FatWire ??????????? Oracle FatWire Documentation ? View Library ????????????????????????????????????????

    Read the article

  • How to preserve the aspect ratio of video using AVAssetWriter

    - by Satoshi Nakajima
    I have a following code, which captures the video from the camera and stores it as a QuickMovie file using AVAssetWriter. It works fine, but the aspect ratio is not perfect because the width and height are hardcoded (480 x 320) in the outputSettings for AVAssetWriterInput. I'd rather find out the aspect ratio of the source video, and specify the appropriate height (480 x aspect ratio). Does anybody know how to do it? Should I defer the creation of AssetWriterInput until the first sampleBuffer? // set the sessionPreset to 'medium' self.captureSession = [[AVCaptureSession alloc] init]; self.captureSession.sessionPreset = AVCaptureSessionPresetMedium; ... // create AVCaptureVideoDataOutput self.captureVideo = [[AVCaptureVideoDataOutput alloc] init]; NSString* formatTypeKey = (NSString*)kCVPixelBufferPixelFormatTypeKey; self.captureVideo.videoSettings = @{ formatTypeKey:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA] }; [self.captureVideo setSampleBufferDelegate:self queue:dispatch_get_main_queue()]; // create an AVAssetWriter NSError* error = nil; self.videoWriter = [[AVAssetWriter alloc] initWithURL:url fileType:AVFileTypeQuickTimeMovie error:&error]; ... // create AVAssetWriterInput with specified settings NSDictionary* compression = @{ AVVideoAverageBitRateKey:[NSNumber numberWithInt:960000], AVVideoMaxKeyFrameIntervalKey:[NSNumber numberWithInt:1] }; self.videoInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:@{ AVVideoCodecKey:AVVideoCodecH264, AVVideoCompressionPropertiesKey:compression, AVVideoWidthKey:[NSNumber numberWithInt:480], // required AVVideoHeightKey:[NSNumber numberWithInt:320] // required }]; // add it to the AVAssetWriter [self.videoWriter addInput:self.videoInput];

    Read the article

  • How do I debug this javascript -- I don't get an error in Firebug but it's not working as expected.

    - by Angela
    I installed the plugin better-edit-in-place (http://github.com/nakajima/better-edit-in-place) but I dont' seem to be able to make it work. The plugin creates javascript, and also automatically creates a rel and class. The expected behavior is to make an edit-in-place, but it currently is not. Nothing happens when I mouse over. When I use firebug, it is rendering the value to be edited correctly: <span rel="/emails/1" id="email_1_days" class="editable">7</span> And it is showing the full javascript which should work on class editable. I didn't copy everything, just the chunks that seemed should be operationable if I have a class name in the DOM. // Editable: Better in-place-editing // http://github.com/nakajima/nakatype/wikis/better-edit-in-place-editable-js var Editable = Class.create({ initialize: function(element, options) { this.element = $(element); Object.extend(this, options); // Set default values for options this.editField = this.editField || {}; this.editField.type = this.editField.type || 'input'; this.onLoading = this.onLoading || Prototype.emptyFunction; this.onComplete = this.onComplete || Prototype.emptyFunction; this.field = this.parseField(); this.value = this.element.innerHTML; this.setupForm(); this.setupBehaviors(); }, // In order to parse the field correctly, it's necessary that the element // you want to edit in place for have an id of (model_name)_(id)_(field_name). // For example, if you want to edit the "caption" field in a "Photo" model, // your id should be something like "photo_#{@photo.id}_caption". // If you want to edit the "comment_body" field in a "MemberBlogPost" model, // it would be: "member_blog_post_#{@member_blog_post.id}_comment_body" parseField: function() { var matches = this.element.id.match(/(.*)_\d*_(.*)/); this.modelName = matches[1]; this.fieldName = matches[2]; if (this.editField.foreignKey) this.fieldName += '_id'; return this.modelName + '[' + this.fieldName + ']'; }, // Create the editing form for the editable and inserts it after the element. // If window._token is defined, then we add a hidden element that contains the // authenticity_token for the AJAX request. setupForm: function() { this.editForm = new Element('form', { 'action': this.element.readAttribute('rel'), 'style':'display:none', 'class':'in-place-editor' }); this.setupInputElement(); if (this.editField.tag != 'select') { this.saveInput = new Element('input', { type:'submit', value: Editable.options.saveText }); if (this.submitButtonClass) this.saveInput.addClassName(this.submitButtonClass); this.cancelLink = new Element('a', { href:'#' }).update(Editable.options.cancelText); if (this.cancelButtonClass) this.cancelLink.addClassName(this.cancelButtonClass); } var methodInput = new Element('input', { type:'hidden', value:'put', name:'_method' }); if (typeof(window._token) != 'undefined') { this.editForm.insert(new Element('input', { type: 'hidden', value: window._token, name: 'authenticity_token' })); } this.editForm.insert(this.editField.element); if (this.editField.type != 'select') { this.editForm.insert(this.saveInput); this.editForm.insert(this.cancelLink); } this.editForm.insert(methodInput); this.element.insert({ after: this.editForm }); }, // Create input element - text input, text area or select box. setupInputElement: function() { this.editField.element = new Element(this.editField.type, { 'name':this.field, 'id':('edit_' + this.element.id) }); if(this.editField['class']) this.editField.element.addClassName(this.editField['class']); if(this.editField.type == 'select') { // Create options var options = this.editField.options.map(function(option) { return new Option(option[0], option[1]); }); // And assign them to select element options.each(function(option, index) { this.editField.element.options[index] = options[index]; }.bind(this)); // Set selected option try { this.editField.element.selectedIndex = $A(this.editField.element.options).find(function(option) { return option.text == this.element.innerHTML; }.bind(this)).index; } catch(e) { this.editField.element.selectedIndex = 0; } // Set event handlers to automaticall submit form when option is changed this.editField.element.observe('blur', this.cancel.bind(this)); this.editField.element.observe('change', this.save.bind(this)); } else { // Copy value of the element to the input this.editField.element.value = this.element.innerHTML; } }, // Sets up event handles for editable. setupBehaviors: function() { this.element.observe('click', this.edit.bindAsEventListener(this)); if (this.saveInput) this.editForm.observe('submit', this.save.bindAsEventListener(this)); if (this.cancelLink) this.cancelLink.observe('click', this.cancel.bindAsEventListener(this)); }, // Event Handler that activates form and hides element. edit: function(event) { this.element.hide(); this.editForm.show(); this.editField.element.activate ? this.editField.element.activate() : this.editField.element.focus(); if (event) event.stop(); }, // Event handler that makes request to server, then handles a JSON response. save: function(event) { var pars = this.editForm.serialize(true); var url = this.editForm.readAttribute('action'); this.editForm.disable(); new Ajax.Request(url + ".json", { method: 'put', parameters: pars, onSuccess: function(transport) { var json = transport.responseText.evalJSON(); var value; if (json[this.modelName]) { value = json[this.modelName][this.fieldName]; } else { value = json[this.fieldName]; } // If we're using foreign key, read value from the form // instead of displaying foreign key ID if (this.editField.foreignKey) { value = $A(this.editField.element.options).find(function(option) { return option.value == value; }).text; } this.value = value; this.editField.element.value = this.value; this.element.update(this.value); this.editForm.enable(); if (Editable.afterSave) { Editable.afterSave(this); } this.cancel(); }.bind(this), onFailure: function(transport) { this.cancel(); alert("Your change could not be saved."); }.bind(this), onLoading: this.onLoading.bind(this), onComplete: this.onComplete.bind(this) }); if (event) { event.stop(); } }, // Event handler that restores original editable value and hides form. cancel: function(event) { this.element.show(); this.editField.element.value = this.value; this.editForm.hide(); if (event) { event.stop(); } }, // Removes editable behavior from an element. clobber: function() { this.element.stopObserving('click'); try { this.editForm.remove(); delete(this); } catch(e) { delete(this); } } }); // Editable class methods. Object.extend(Editable, { options: { saveText: 'Save', cancelText: 'Cancel' }, create: function(element) { new Editable(element); }, setupAll: function(klass) { klass = klass || '.editable'; $$(klass).each(Editable.create); } }); But when I point my mouse at the element, no in-place-editing action!

    Read the article

  • I set up better-edit-in-place but still cannot edit in place in Rails

    - by Angela
    I installed the plugin better-edit-in-place (http://github.com/nakajima/better-edit-in-place) but I dont' seem to be able to make it work. When I use firebug, it is rendering the value to be edited correctly: <span rel="/emails/1" id="email_1_days" class="editable">7</span> And it is showing the full javascript which should work on class editable: var Editable = Class.create({ 5 initialize: function(element, options) { 6 this.element = $(element); 7 Object.extend(this, options); 8 9 // Set default values for options 10 this.editField = this.editField || {}; 11 this.editField.type = this.editField.type || 'input'; 12 this.onLoading = this.onLoading || Prototype.emptyFunction; 13 this.onComplete = this.onComplete || Prototype.emptyFunction; 14 15 this.field = this.parseField(); 16 this.value = this.element.innerHTML; 17 18 this.setupForm(); 19 this.setupBehaviors(); 20 }, 21 22 // In order to parse the field correctly, it's necessary that the element 23 // you want to edit in place for have an id of (model_name)_(id)_(field_name). 24 // For example, if you want to edit the "caption" field in a "Photo" model, 25 // your id should be something like "photo_#{@photo.id}_caption". 26 // If you want to edit the "comment_body" field in a "MemberBlogPost" model, 27 // it would be: "member_blog_post_#{@member_blog_post.id}_comment_body" 28 parseField: function() { 29 var matches = this.element.id.match(/(.*)_\d*_(.*)/); 30 this.modelName = matches[1]; 31 this.fieldName = matches[2]; 32 if (this.editField.foreignKey) this.fieldName += '_id'; 33 return this.modelName + '[' + this.fieldName + ']'; 34 }, But when I point my mouse at the element, no in-place-editing action!

    Read the article

1