Posts

codec - timeoutUs in MediaCodec API android -

I am using the MediaCodec API in one of my apps. I used code from bigflake and the app is running fine But I still can not understand both timeout U in both tasks dequeueInputBuffer () and the function dequeueOutputBuffer () after reading about both Not in this API reference It would be great if someone could use this parameter properly and explain the effect. And should it be in the above mentioned both function calls? Well, the main idea is that internally, working under the MediaCodec layer components is asynchronous, so that's why. When you call dequeueInputBuffer () or dequeueOutputBuffer () , no work is done, calling is threaded, only during the selected timeout The reaction is ready or timeout until the component status is checked. Buffer allocation from my experience is also ASCIN, so if an internal buffer is not ready for dequeue ... small timed out can be in INFO_TRY_AGAIN_LATER but mainly for decoding \ encoding, for processing by non-blocking call Input fra...

javascript - Array not storing values in for loop -

I want to parse a JSN object and store values ​​in an array, then I will assign each array to a second array In order to create an array for loop, where there is every element in a2 a1 . I am already getting json and parsing correctly. var a1 = []; Var a2 = []; For (i = 0; i console.log (a1) prints the right array, which changes for each recurrence of the loop. For example: ["2014-01-01", "John"] ["2014-01-02", "n"] ["2014-01-03", " Mike " but with console.log (a2) print a2 previous a1 values For each index: [["2014-01-03", "Mike"], ["2014-01-03", "Mike"], ["2014-01- 03 Code> In every index of a2 for the inside of "Look" was also tried. Loop () like: a2 [i] = a1; I want a nested (or 2-D) array, but each Element Why is the value? What's going on here? Is there some javascript scoping rules? It works in other languages ​​t...

c++ - How to use cin inside a function? -

I am new to C ++ and am trying to create a simple text based game. The code below should welcome the user in the game and ask if the user wants to start the game or not. I did not find any build errors, but when I run it shows that there is a blank screen. What exactly am I doing wrong? Code below: string D1 (string origin) {cin> & Gt; Original; Original return; } Int main () {string decision1; Cout & lt; & Lt; "Welcome to Game Names" & lt; & Lt; Endl; Cout & lt; & Lt; "Do you want to start the game?" & Lt; & Lt; Endl; Cout & lt; & Lt; "Yes / no" & lt; & Lt; Endl; String D1 (Decision 1); System ("cls"); If (decision 1 == "yes") {cout & lt; & Lt; "It happens" & lt; & Lt; Endl; } And if (decision 1 == "no") {cout & lt; & Lt; "It happens" & lt; & Lt; Endl; }} You do not have to call D1 D1 : std :: string...

twitter bootstrap - The content of my page is located within the navbar -

The content that separates the content and the navbar remains in the middle instead of the content, it happens with all those pages, which Routes are done on the main page, which has nine bars. I have tried to add padding-top, relative positioning, margin-top etc. to the body but it remains in the nabar. It seems that they are on the same line but are not doing nothing to add more time to the content They are different because they are .mail file. This is a symbol with Naubar: .display-options ul.nav.nav-tabs link-to "ediagnostic.entry" tagname = "li" href = "False" link-to "ediagnostic.entry" | Tag "Edgnostic. Stations" from the entry link = "li" href = "wrong" link-to "ad diagnostic.station". Work station link-to "ediagnostic.spur" tagName = "li" href = "false" Link-to "Edgnostic Cyr" | Link "ediagnostic.exit" with tagName = "li" href = ...

linux - Write stdout to two different files (one overwrite, one append) in bash -

मेरे पास समूह और संख्या द्वारा व्यवस्थित किए गए प्रयोगों का एक गुच्छा है I / कोड>। मेरे पास 3 भिन्न समूहों और संख्या के लिए, मैं 2 अलग-अलग प्रयोगों को चलाने के लिए चाहता हूं दूसरे शब्दों में, मेरे पास चलाने के लिए निम्नलिखित प्रयोग हैं: समूह ए, 1 समूह ए, 2 समूह बी, 1 समूह बी, 2 समूह सी, 1 समूह सी, 2 हर बार जब मैं एक प्रोग्राम चलाता हूं जो प्रयोग के परिणामों को stdout पर प्रिंट करता है, तो मैं चाहता हूं कि उन परिणामों को पाठ फ़ाइल में डाल दिया जाए मैं प्रत्येक समूह और संख्या संयोजन के परिणाम के लिए एक अलग पाठ फ़ाइल चाहता हूं, और प्रत्येक समूह वाले परिणामों के लिए एक अलग टेक्स्ट फ़ाइल भी चाहता हूं इसलिए, ये मेरी बास स्क्रिप्ट है जो इन सभी प्रयोगों को चलाता है: #! / Bin / bash groups = $ समूहों में जी के लिए "एबीसी" संख्याएं = "1 2" आरएम * .txt; करो # डॉलर के मूल्य के लिए $ g के मूल्य के आधार पर ग्रुप सेटिंग्स सेट करें; करें # $ n ./myprogram & gt; & gt; के मान के आधार पर संख्या सेटिंग सेट करें। $ G-results.txt किया उपरोक्...

c# 4.0 - Getting an error when trying to call LocalReport.Render("EXCELOPENXML") -

I installed DocumentFormat.OpenXml (see 2.5.5631.0) from nugetpackage manager in VS2010. I can also see the refernce for DLL I have created the package folder too. But when I am trying to execute the law submit public override zero (local report report) {this.SetUpParameters (report); Byte [] Provided Report = Report.Render ("AcelopenxML"); This.target.UpdateRenderedReportContent (renderedReport); } I am getting this error: The specified argument was outside the range of valid values ​​parameter name: format When I am using report.Render ("EXCEL"); I am not getting any error. I have to use ExcelMax to generate XLSX axles. Can anyone help me on this? What version of Microsoft's version report.reportViewer.WinForms is? If this is less than 11.0, then maybe you have a problem Incidentally, Visual Studio (2013) has refused to show me version 11.0 as an option from the Add Reference dialog. I do not understand why I had to browse for ...

Detect keycode ALT+L via Javascript -

I want to find out that a user presses F12 or ALT + L. Documents. Onkeydown = function (event) {event = (event || window.event); If (event.keyCode == 123 || (event.keyCode == 18 and event.keyCode == 76)) {// anything wrong lies; }} What am I doing? The standard way to indicate that 'alt' key is currently placed below and then To find out if it is true and if the L key is pressed - look at Bela: var holds = false; ... and if (event.keyCode == 18) {organized = true;} if (organized == true & amp; event.keyCode == 76) {warnings}; } ... document.onkeyup = function (event) {if (event.keyCode == 18) {held = false;}} To keep any combination of this key Applicable - You can create an array for multiple keys to hold more than two: organized = []; ... if (event.keyCode == i) {organized] [i] = true;} ... and so on