Posts

iphone - AudioUnit Input Samples -

so having trouble here audiounit taking in data microphone/line-in in ios. able set think okay , calling recordingcallback, data getting out of buffer not correct. returns same thing, zeros , random large numbers. know causing this. code follows. setting audio unit osstatus status; // describe audio component audiocomponentdescription desc; desc.componenttype = kaudiounittype_output; desc.componentsubtype = kaudiounitsubtype_remoteio; desc.componentflags = 0; desc.componentflagsmask = 0; desc.componentmanufacturer = kaudiounitmanufacturer_apple; // component audiocomponent inputcomponent = audiocomponentfindnext(null, &desc); status = audiocomponentinstancenew(inputcomponent, &audiounit); // enable io recording uint32 flag = 1; status = audiounitsetproperty(audiounit, kaudiooutputunitproperty_enableio, kaudiounitscope_input, kinputbusnumber, ...

"Computed Properties" in AngularJS -

i chose angularjs on ember.js project working on, , have been pleased far. 1 nice thing ember built in support "computed properties" automatic data binding. have been able accomplish similar in angular code below, not sure if best way so. // controller angular.module('mathskills.controller', []) .controller('nav', ['navigation', '$scope', function (navigation, $scope) { // "computed property" $scope.$watch(navigation.getcurrentpagenumber, function(newval, oldval, scope) { scope.currentpagenumber = newval; }); $scope.totalpages = navigation.gettotalpages(); }]); // 'navigation' service angular.module('mathskills.services', []) .factory('navigation', function() { var currentpage = 0, pages = []; return { getcurrentpagenumber: function() { return currentpage + 1; }, gettotalpages: function() { return pages.length; } }...

iphone - how can i tell when the phone is in a call when i return to my app without checking the status bar frame? -

i using uiapplicationwillchangestatusbarframenotification tell when status bar change, , me figure out when call in progress goes away, , behavior like. however, there 1 scene in app in take full screen, , includes hiding status bar … except not hide status bar when in call. my understanding way status-bar first show if (a) phone call, (b) return app. so … when return app upon receiving phone call … there no green status bar. (fwiw, green status bar appear when tap on app make status bar , nav bar , tab bar re-appear, it's not entirely gone; hidden because told hidden. in simulator, performing "hardware -> toggle in-call status bar" works like, don't think behavior ever occur way in real world.) i found answer how notified when user opens iphone app while in phone call? … but works if statusbar visible when app re-opened. i want know how tell i'm in call when return app can manually unhide green status bar while user looking @ scene otherwise h...

c# - Create DetailView for Telerik MVC Grid only on certain conditions -

i know there question conditional detailview, feel that's not i'm looking for. i've been messing around telerik grid mvc, , i've managed create detailview rows in grid. thing of now, detailview filled html-code, , want have new model inside. based on 1 columns value, want create detailview rows matching columns value. so, instance, if column "type" equals fruit, shall create detailview (with "+" sign). if "type" vegetable, should not create detailview (without "+" sign). my current code looks this: html.telerik().grid<searchviewmodel>(model) .name("search") .columns(columns => { columns.bound(o => o.type).width(60); //etc. }) //.prefixurlparameters(false) .detailview(detailview => detailview.clienttemplate( "<div>" + "<...

android - Spinner not getting populated with the given string array -

i have make android app. counting bunks college students. want make this: spinner 1 has select branch me ce it ee select semester 1st 2nd 3rd 4th etc. now if student selecting me , 3rd semester, 3rd semester subjects should come like: enter bunks of subject: abc1: edittext abc2: edittext abc3: edittext abc4: edittext abc4: edittext and input user should come logic of percentage of attendance, , answers should come on page same subject name. can me please? edit my main.xml : <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <textview android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> <spinner android:id="@+id/spinner1...

html - CSS 100% height with header and footer -

i having difficulties achieving css 100% website can right in every web browser. followed tutorial found here no luck in getting working. have example contains footer. footer not in place. also, trying have surrounding black frame cover footer. there doing wrong? for better details please @ live example css <style> html,body { padding: 0px; margin: 0px; background: #333333; background-size: 100%; line-height: 130%; height: 100% font-family: trebuchet, 'trebuchet ms', 'tahoma', sans-serif; font-size: 90%; color: #5e5e5e; } /****** colorblock: orangey-yellow bar behind wrapper background. ******/ #colorblock { position: absolute; top: 60px; left: 0px; background: #c69a55; z-index: -1; height: 65px; width: 100%; padding: 0px; margin: 0px; } /****** wrapper: light gray box background of content. not edit. ******/ #container { z-index: 1; width: 850px; position: re...

Want to design country, currency, timezone table for mysql database? -

am working on international project, , want design 3 major tables structure required in project: country table (contains country_name , iso_code , calling_codes ) currency table (contains currency_name , currency_code ) timezone table (contains gmt_coordinates , gmt_fullname like: -10.0 (gmt-10:00)-hawaii ) am confused tables data-types structure. searched & google it, many confused answers , different structure. so, please suggest proper table structure appropriate fields data-types, appreciates suggestion , answers. advance mates! there surprises when working currencies , time zones every country in world. on geonames , data, idea of expect. from experience geonames data, need following fields: country info country name - varchar(50) iso code - char(2) calling code - integer(4) currency code - char(3) name - varchar(10) with data in geonames database, these data fields , respective sizes should cover ...