Posts

java - This method must return a result of type InputStream -

i'm getting error stating this method must return result of type inputstream however i've added return statement inputstream source method. i'm not sure why issue occurring. (the issue began when attempted integrate used publish progress method in current source.) source: /* * sends query server , gets parsed results in bundle * urlquerystring - url calling webservice */ protected synchronized inputstream getqueryresults(string urlquerystring) throws ioexception, saxexception, sslexception, sockettimeoutexception, exception { try { // httpsurlconnection https = null; string uri = urlquerystring; list<namevaluepair> namevaluepairs = new arraylist<namevaluepair>(); basicnamevaluepair mdn1, mdn2,id1,id2; if (mdn.equals("")) { mdn1 = new basicnamevaluepair(...

Tracking custom image links on WordPress website by Google Analytics -

i developed wordpress website give option admin upload image , give link shown advertisement in front end. basically, image clickable , links link provided admin. what want track clicks on these advertisements via google analytics. possible? new google analytics , not have idea. (function ($) { $(document).ready(function() { // attach onclick event document , catch clicks on elements. $(document.body).click(function(event) { // catch closest surrounding link of clicked element. $(event.target).closest("a,area").each(function() { _gaq.push(['_trackevent', 'image click', $('img', this).attr('alt'), $(this).attr('href')]); }); }); }); })(jquery); yeah possible can track image click via google analytics see reference more info. http://techatitsbest.com/blog/image-click-tracking-google-analytics-events http://www.seotakeaways.com/event-tracking-guide-google-analytics-simplified-versi...

ruby on rails - Fields For Not Working for Has Many Association -

i'm building form model , having trouble developing associated model forms form. the error i'm receiving: undefined method `tradie_id' #<activerecord::associations::collectionproxy::activerecord_associations_collectionproxy_tradiecategory:0xd0f9d78> the form code looks like: = form_for @data[:tradie], url: { action: "update_tradie" } |tradie| # doesn't work = tradie.fields_for :tradie_categories, @data[:tradie].tradie_categories |category| = category.text_field :tradie_id # fields_for = tradie.fields_for :tradie_locations, @data[:tradie].tradie_locations |location| = location.text_field :address the tradie model has has_many relationship tradiecategory model , tradiecategory model has belongs_to relationship tradie . verified tradiecategory has field tradie_id . in form above, @data[:tradie] equals instance of tradie model. whenever call tradie_categories or tradie_locations calling associated model data of tra...

asp.net - Formatting header text in nested gridview -

Image
i have created nested gridview shown in picture. header of child grid repeated. there anyway can add child gridview's headers inline parent gridview?.something have given below. try removing child gridview header , add required headings parent gridview fixed spacing (possible if column lengths fixed)

c++ - "print 1 to n" function prints 1 twice -

void printint(int n){ if(n==1) cout<<1<<" "; else printint(n-1); cout<<n<<" "; } the output is 1 1 2 3....n i'm writing out actual steps of function on piece of paper don't how printing 1 in console (visual studio 2010). past hw solutions strictly understanding how works. you need braces: if(n==1) { cout<<1<<" "; } else { printint(n-1); cout<<n<<" "; } or else second cout gets run when n==1 . strictly speaking braces around first cout aren't required, style in case. editorial note: problem solved stepping through function in debugger.

javascript - How to change "defaultOptions" lang in highCharts dynamically -

i have highcharts trying internationalize. set default defaultoptions ={... lang: { loading: 'loading...', months: ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'], ...} i have properties file, , method writes in properties. methodtowrite['highcharts.months.array'](); but when lang:{ loading: methodtowrite['highcharts.months.loading'](); months: methodtowrite['highcharts.months.array'](); } the chart doesnt show up. have feeling i'm inserting methodtowrite wrong way. methodtowrite works fine , correctly coded. using in other js files. try changing semi-colons commas. e.g lang:{ loading: methodtowrite['highcharts.months.loading'](), months: methodtowrite['highcharts.months.array']() } check methodtowrit...

iphone - App working when debugging but not in ad hoc distrubtion -

i have strange bug occurring. i'm monitoring sound levels using avaudiorecorder , calling action when sound peaks on level. works on simulator using ios 6 , on device connected xcode using ios 7. when distribute app via testflight audio peak method never triggers. when distribute via ad-hoc , install via itunes have same problem. why work on device connected xcode not through ad-hoc build? edit: i've did more testing , problem related microphone. metering enabled app isn't getting levels it. metering working when i'm debugging not ad-hoc. why work on device connected xcode not through ad-hoc build? sounds you've failed include microphone among "required device capabilities" in info.plist: microphone include key if app uses built-in microphone or supports accessories provide microphone.