Posts

xcode - Concatenate .wav files in C++ -

how can i, using function, library, whatever have to, concatenate 2 .wav files? input should absolute paths, , output audio file created , placed (not played) somewhere, doesn't matter where. i writing mac command line application in xcode 6. the .wav file format simple format, consisting of fixed header defines audio file's properties; namely endian-ness, number of channels, , sampling rate. documentation defined on intertubes. off top of head don't recall if common library offers convenient way (it's worth looking through libsndfile's api documentation , fit bill). in case, shouldn't tough read headers of both wav files, check format, , create output file. if both wav files have same endian-ness, number of channels, , sampling rate, procedure trivial, otherwise have resample/remix @ least 1 of files.

node.js - JavaFX : How to process a webview in a non application thread -

i have javafx application contains webview among other javafx views in same window. webview opens url nodejs webapp consumes lot of cpu resources. with resource consumption webview, other javafx views working slowly. for our application, have powerful system 12 virtual threads in processor. so, need deport webview processing thread won't affect behavior of other javafx views. there way achieve this? you cannot this. javafx has single application thread per jvm process (java invocation) , webview api calls must processed on javafx application thread. note internally, webview uses webkit may have own threading implementation support html5 stuff web workers , hidden when programming webview @ java api level. won't make of difference unless explicitly program javascript make use of it. guess if nodejs webapp optimized other browsers work fine in webview, need benchmark, guess did , found wanting. may want expend effort optimizing nodejs webapp have. the ...

c# - Error while calculating percentage -

unable cast object of type 'system.web.ui.webcontrols.textbox' type 'system.iconvertible'. i getting error while converting. have 2 text boxes in 1 have amount , in have percentage value should come in third text box. public partial class caltxt : system.web.ui.page { double amt1; double exc; public void page_load(object sender, eventargs e) { } public void txtamt_textchanged(object sender, eventargs e) { amt1 = math.round(convert.todouble (txtamt)); //decimal percentagerate = convert.todecimal(this.txtamt.text); } protected void txtexc_textchanged(object sender, eventargs e) { double exc = math.round (convert.todouble(this.txtexc.text)); // decimal temp = (math.round(convert.todecimal(txtexc.text) / convert.todecimal(txtamt.text)*100)); // txttotalexc.text = temp.tostring(); } protected void txttotalexc_textchanged(object sender, eventargs e) { ...

How to zoom in the Image by ROI in MATLAB -

Image
i have 2 images. want see more detail in special region (roi). hence, draw red rectangular , zoom in original size (256 256) , display in second row below expected result. me solve in matlab? current code img1 = imread('peppers.png'); img2 = imread('coins.png'); img1=imresize(img1,[256 256]); img2=imresize(img2,[256 256]); %%draw rectangle subplot(221);imshow(img1); rectangle('position',[100 50 20 20], 'linewidth',2, 'edgecolor','r'); subplot(222);imshow(img2);rectangle('position',[100 50 20 20], 'linewidth',2, 'edgecolor','r'); %% zoom in image try (when images appears, use mouse select region of interest): img1 = imread('peppers.png'); img1=imresize(img1,[256 256]); f=figure; imshow(img1); rect = getrect(f); %//select roi mouse img1_roi = img1( rect(2) : (rect(2)+rect(4)) , rect(1) : (rect(1)+rect(3)) , : ); %//store roi in matrix img2 = imread('coins.png...

plsql - PL/SQL: Does SELECT INTO give the variable NULL if the value is NULL in the table? -

i ask question because trying make function returns value based on if selected information in table null or not. however, cannot argument in if statement true. so, have varchar2 variable prepared, , use select statement select info lv_test ... if lv_test != null --do not null stuff else --do null stuff now, in code use specifically, values lv_test , unless check them directly, if lv_test = 'ny' , becomes true , works, won't become true. not work whenever check null values, nor work if check = '' (initialized/default value). my experience in sql limited basic don't know yet. answer questions: how check null values select ... ... statement? why argument not work?

angularjs - ui-sref in parent div overriding all nested links -

we have series of notifications , want make overall item clickable related item. has been implemented using ui-sref , functions correctly. however, within that, there series of nested links go other relevant information. problem @ moment parent ui-sref overrides of these links. i've tried implementing these nested links standard anchor , ui-sref has same effect. hyperlink shows correctly, , when clicking on it, goes split second, reverts ui-sref link. here code example: <div class="notificationitembalanced"> <div class="notificationitem" ui-sref="community.act({slug: slug, id: id})"> <div class="messagebodywrapper"> <span class="messagetext"><strong><a ui-sref="user.posts({username: username})"></a></strong> commented on post</span> </div> </div> </div> is related ui-sref or there specific setting in r...

actionscript 3 - Adobe Flash Builder 4.7 Full Screening Scaling Problems -

in adobe air application, have room , player can walk around it. set automatically opens in fullscreen, however, when exit fullscreen doesn't scale anything, shows edge of room, can't see player or else. how make when exit fullscreen, scale down windowed version, , again? in adobe flash builder 4.7. i tried scaling down putting if statement in update function, checks if window full screened or not, , if not, it'll scale x , y down .5, , if full screened again, it'll scale 1. player changes position, , if try make x equal it again if move player, doesn't work. i've tried verticlecenter , horizontalcenter on both player , room, doesn't work. what i'm wondering if there stage.autoscale line can solve everything, or if have manually way i've tried. so got 2 options here. check fullscreen event , in listener function scale according logics. give more control on scaling , visual display of components , graphics. can find working example...