Posts

java - Android - Execution failed for task ':app:compileDebugJava' with ';' expected -

im fresher in android app dev... using android studio 1.3, jdk 8 event log : 12:44:13 gradle build finished in 13s 724ms 12:59:50 executing tasks: [:app:assembledebug] 12:59:55 gradle build finished 2 error(s) in 5s 804ms gradle build: error:(41, 31) error: ';' expected error:execution failed task ':app:compiledebugjava'. compilation failed; see compiler error output details. information:build failed information:total time: 5.088 secs information:2 errors information:0 warnings information:see complete output in console java class code: package in.co.doordie.shankar.doordie; import android.app.activity; import android.content.intent; import android.media.mediaplayer; import android.os.bundle; public class splash extends activity { mediaplayer oursong; @override protected void oncreate(bundle doordiesplash) { super.oncreate(doordiesplash); setcontentview(r.layout.splash); oursong = mediaplayer.create(splash.this, r.raw.kaly...

Download blur image before actual image gets downloaded in android -

i want image downloading whatsapp blur images appear , when click on image clear image gets downloaded.i want same kind of work in android app.can suggest how achieve this? you can use image loading liabrary(picasso,glide or uil) firstly load image of low quality if using picasso picasso.with(this).load("....").resize(100,100).into(imageviews); than on click load full image.

ios - Audio and video pts is not sync ffmpeg -

i'm trying write sort of rtsp ios streamer based on ffmpeg project. basically, i've got project https://github.com/durfu/dfurtspplayer . big creator of project, unfortunately has problems playing of streams decided write streaming player myself using author's developments. of course, correctly stream playing need sync audio video , can comparing pts of frames. problem in huge gap between audio , video pts. have thoughts i'm getting pts audio , video wrong, couldn't find actual problem own. here's function: - (void) decodeframe { int framefinished = 0; avpacket newpacket; while (framefinished == 0 && av_read_frame(formatctx, &newpacket) >= 0) { if (newpacket.stream_index == videostream) { avcodec_decode_video2(videocodecctx, videoframe, &framefinished, &newpacket); [self convertframetorgb]; uiimage *newimage = [self currentimage]; if (newpacket.pts != ...

asp.net mvc 4 - mvc4 areas multiple route -

i have web site in mvc4 area "admin" inside controller named "homecontroller" ,also in project folder controller controller named "homecontroller" : when call public actionresult logoff() { formsauthentication.signout(); return redirecttoaction("index", "home"); } i error : multiple types found match controller named 'home'. can happen if route services request ('{controller}/{action}/{id}') not specify namespaces search controller matches request. if case, register route calling overload of 'maproute' method takes 'namespaces' parameter. the request 'home' has found following matching controllers: site1.co.il.controllers.homecontroller site1.co.il.areas.admin.controllers.homecontroller if have same controller , action in different areas, mvc4 has no way choose 1 of them, unless specify desired route. you can specify this: return redirecttoaction("action", ...

javascript - How to convert svg element height/width size into pixels -

i have svg elements , want height , width in terms of pixels. how this? <rect height="200" width="400" fill="red" stroke="1"> measurements in vector formats relative size 'window' or 'viewer' going rendered in. without knowing viewports size in pixels, infinitely large or small. if have viweports size , element isnt being transformed anything, you'd need see element in relation viewport, ensure displayed, , calculate rendered size. however, beware if being clipped out of diplay being partially or 'off screen'.

c# - Prevent WNetAddConnection2 class which allows prohibited user to access shared folder -

i had developed c# windows application. os windows 7 requirement: access network shared folder ‘test’ using code credentials using wnetaddconnection2 class. restriction: users has access of shared folder ‘test’, other user,‘deny’ sharing permission set. in code wnetaddconnection2 validates wrong username/password, give me error. for example ‘user a’ lan trying access shared folder ‘test’ using run command , not able access ‘access denied’ because has not permission. but issue wnetaddconnection2 class allows ‘user a’ establish network connection successfully. infect “wnetaddconnection2 allows users domain”. class validating access rights. code is private void btnvalidate_click(object sender, eventargs e) { bool valid = false; try { networkcredential nc = new networkcredential(txtusername.text.trim(), txtpassword.text.trim()); } catch (exception ex) { message...

What's the meaning of this line of CoffeeScript? -

i reading through journo's source code , stumbled upon line of code: markdown = _.template(source.tostring()) variables what variables doing here? _.template(source.tostring()) variables valid stntax @ all? here's function wrapping line of code: journo.render = (post, source) -> catcherrors -> loadlayout source or= fs.readfilesync postpath post variables = rendervariables post markdown = _.template(source.tostring()) variables title = detecttitle markdown content = marked.parser marked.lexer markdown shared.layout _.extend variables, {title, content} yes, valid. parenthesis optional (sometimes) in coffeescript when invoking function, taking result of template , invoking arguments. compiles javascript: _.template(source.tostring())(variables); from coffeescript documentation : you don't need use parentheses invoke function if you're passing arguments. implicit ca...