Posts

c# - Use Async Method at Service Layer from MVC 5? -

i developing asp.net mvc 5 application. have been reading questions here suggest not use type of behavior want. high level of want achieve - mvc controller - calls method @ service layer , continues next line of code in controller not need return anything. method in service layer - want to call external web service has async methods want these run off on , write data db when return. is achievable or not best approach? to dummy out , test principle have following on controller: [acceptverbs(httpverbs.post)] public actionresult testasync() { _myservice.testasync(); return redirecttoaction("summary"); } at _myservice method looks follows: public async task testasync() { await task.delay(10000); var test = "testing"; _testrepository.add(test); } i hoping testasync method wait 10 seconds , check db , value testing added. not working - on ui after hitting button page goes summa...

jquery - Making .ui-btn-left larger -

quick question haven't found exact answer online. i'm new javascript quite simple issue. trying make close button on jquery page larger. .ui-dialog .ui-header .ui-btn-left { left: auto; right: 5px; } i know if specify height , width make button larger, how preferably increase size of icon match or @ least make centre on button? i solved own problem in end. had remove default close button , create own. might else trying same thing. data-close-btn turns off default close button. the data-icon tell use custom icon, more straight forward making it. #btncancel .ui-btn-inner { width: 33px; height: 35px; margin: 0px; border: none !important; background: transparent !important; } .ui-icon-custom { background-image: url(../images/image.png) !important; background-position: 0px -84px; width: 33px; height: 35px; margin: 0 !important; box-shadow:none; } <html> <head> <title>change language</t...

utf 8 - How UTF8/Unicode adapt to new writing systems? -

an example clarify question: the hongkongers' native language cantonese, however, write in different language: madarin chinese. 2 languages kindof similar, , hongkongers educated write in madarin chinese language. cantonese doesn't have writing system. though still happy madarin our writing language, however, in case 1 day hongkongers decided develop 'cantonese script' contains not-yet-existing characters, how should utf8/unicode/fonts change, adapt these new characters? i mean, change utf8/unicode/fonts standard? how linux/windows os have modified, in order display these newly created characters? (the example make question clear. we're not talking politics ;d ) the unicode coding space has on 1,000,000 code points, , 10% of them have been allocated, there lot of room new characters (even though areas of coding space have been set apart use other added characters). unicode consortium, working in close cooperation relevant body @ iso, assigns cod...

c# - Dock a Custom VCLStyle Delphi-XE2 application in AvalonDock -

i've c# application avalondock. in application can dock "third party" applications notepad , windows calculator. in dock application window displayed without titlebar, want be. i've delphi xe2 application want dock. working correct, titlebar removed , mainmenu working. until dock same application custom vcl style. in case titlebar stays displayed in dock , main menu isn't working anymore. can solve titlebar issue setting borderstyle bsnone. when apply custom style during compilation or runtime during formcreate, formshow or formactivate issue occurs. when apply style runtime button click mainmenu keeps working, window undocked, i've got empty dock , application in front of it. does has ideas how solve issue? thijs i've solved issue replacing tmainmenu tactionmanager , tactionmainmenubar. a disadvantage of solution populatemenu of korzh localizer isn't working anymore. no issue application when used in dock, localization set @ lev...

elasticsearch - Elastic search : how to get all data of specific field -

i'm using java api. want know how fetch specific field. have tried query in elasticsearch head plugin: {"fields": ["name"],"query": { "match_all": {} }} it's working. now, please me write using java api. the equivalent sql query be: select name user; to use match queries in java api.. querybuilder qb = querybuilders.matchallquery(); refer http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/query-dsl-queries.html i have created git hub repository.. refer use java client. https://github.com/sidharthancr/elasticsearch-java-client . hope helps..!

c# - FFMPEG Overlay video on top of another video -

i have looked through questions on over stackoverflow none of answers worked me. i have screen recorded video in mp4 , video recorded webcam in mp4. want overlay webcam video on top left of screen recorded video. i think found right command line doing when step through ffmpeg process freezes when reaches " handler_name :soundhandler". here command line: string overlayposition = "movie=" + '"' + _videofile.filename + '"' + "[inner]; [in][inner] overlay [out]"; string overlaycommand = "-i " + '"' + videolist[0].path + '"' + " -vf " + '"' + overlayposition + '"' + + '"' + " c:\\users\\james\\output.mp4" + '"'; does know doing wrong? i've managed trim audio , video, crop video, join sound, join video, , join sound , video cannot overlay work :(. i updated ffmpeg , ended using this: string overlaycom...

html - Canvas: fillText() on android 2.x browser -

context.filltext(text,x,y,maxwidth); maxwidth parameter won't work on android 2.x ignored can try next function? filltext(text, x, y [,maxwidth]) source: safari html canvas guide