Posts

android - SoundPool crashes in two scenarios. Code for first scenario crashes -

@ian g. clifton here code first type of soundpool tried. when button load activity program fcs previous activity. code starts here doesn't transfer over:::::: public class soundmanager { private soundpool msoundpool; private hashmap<integer, integer> msoundpoolmap; private audiomanager maudiomanager; private context mcontext; public soundmanager() { } public void initsounds(context thecontext) { mcontext = thecontext; msoundpool = new soundpool(16, audiomanager.stream_music, 0); msoundpoolmap = new hashmap<integer, integer>(); maudiomanager = (audiomanager)mcontext.getsystemservice(context.audio_service); } public void addsound(int index,int soundid) { msoundpoolmap.put(index, msoundpool.load(mcontext, soundid, 1)); } public void playsound(int index) { int streamvolume = maudiomanager.getstreamvolume(audiomanager.stream_music); ...

objective c - Make an Mac app do the CMD + H command -

possible duplicate: cocoa: hide 1 application hey, wondering if it's possible make button cmd + h command on other running apps? this how thinking: the user window force quit window can open clicking on apple logo > force quit. window displays running apps. , instead of having force quit button there hide button. user select app should hided , click on hide button. thank in advance! i know can applescript. like tell application "system events" set visible of process "appname" false i've seen people make scripts , tie quicksilver trigger various things other apps.

google earth - Formula to calculate different coordinates for flight routes in KML -

i need create flight routes in google earth. example point point b, how equivalent middle point both , along point b, there many different coordinates joining line curve. generally should use great-circle distance compute distance of 2 point on surface of sphere, in case earth. wolframalpha uses compute direct travel times. this define midpoint uniquely.

javascript - Sliding panel in the middle of the page. Z-index given not working -

i implementing sliding panel element problem when slide out other div element floating down. i guess , tried give z-index element sliding doesn't seems work. let me put code both div. <div class="vrcontrol"> <div class="slide-out-div"> <a class="handle" href="http://link-for-non-js-users.html">content</a> <h3>contact me</h3> <p>thanks checking out jquery plugin, hope find useful. </p> <p>this can form submit feedback, or contact info</p> </div> this div sliding in , out , beneath code of effective div. <div class="askform"> <p class="titletext">ask expert trade forum</p> <p class="detailtext">wd-40’s leading source diy tips , tricks.</p> <span> <form id="askform" name="askform" action="" method="post"...

c# - Crystal Report: Missing Parameter Values -

i new crystal report, application in asp.net 3.5 , mysql 5.1, going develop report between dates date , date, first page of report shown when tried navigate on page got error missing parameter values same error got in printing , export action in advance public partial class bookingstatement : system.web.ui.page { //dal data access layer class //book reportclass dal obj = new dal(); book bkstmt = new book(); protected void page_load(object sender, eventargs e) { if (!ispostback) { //crvbooking crystal report viewer //reportfill method fill report reportfill(); crvbooking.enableviewstate = true; crvbooking.enableparameterprompt = false; } /* try reportfill() out side !ispostback didn't work */ //check if parmeters have been shown. /* if ((viewstate["parametersshown"] != null) && (viewstate["parametersshown"].tostring() == "true")) { bkstmt.setparametervalu...

java - Why am I getting an InvalidProtocolBufferException when creating a Message.Builder from byte array but not an InputStream? -

i'm working on servlet , trying log requests. crucial part of code causing error following: protected void dopost(httpservletrequest request, httpservletresponse response) throws ioexception { stringwriter writer = new stringwriter(); ioutils.copy(request.getinputstream(), writer); message.builder builder = of type com.google.protobuf.generatedmessage.builder; builder.mergefrom(writer.tostring().getbytes()); } the final line of code above results in following exception: com.google.protobuf.invalidprotocolbufferexception: protocol message tag had invalid wire type. however, when code switched to: protected void dopost(httpservletrequest request, httpservletresponse response) throws ioexception { message.builder builder = of type com.google.protobuf.generatedmessage.builder; builder.mergefrom(request.getinputstream()); } there no error, , works fine. problem be? seem need similar first code snippet because need use input stream second time (onc...

c# - WCF database wrapper -

i need wcf service wrap database access. not want service bind specific database. in fact, receives query , returns dataset. no treatement on data done in service want pure performance need secure too. actually, think using percall session, net.tcp binding , certificate autentification on both side. (it's wan app) still, can give advices on configuration should use?(type of session,type of binding,type of security,etc..) it sounds take advantage of wcf data services . wcf data services (formerly known "ado.net data services") component of .net framework enables create services use open data protocol (odata) expose , consume data on web or intranet using semantics of representational state transfer (rest). odata exposes data resources addressable uris. data accessed , changed using standard http verbs of get, put, post, , delete. odata uses entity-relationship conventions of entity data model expose resources sets of e...