Posts

android.support.v7.widget.cardview cannot be found -

i'm using android studio 1.2.2 , attempting use cardview in layout, preview giving me warning class android.support.v7.widget.cardview not found. question has been asked various times, , have looked @ these solutions: error when adding cardview layout android.support.v7.widget.cardview not found (android studio 1.1 preview) but none of them have answer. have added gradle: dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:cardview-v7:21.0.+' } and have added layout: xmlns:card_view="http://schemas.android.com/apk/res-auto" which pretty sums answers given on 2 similar questions asked, still getting same error, , when run on device, cardview doesn't show @ all. can point out other possible solutions? by way, minsdkversion 21. layout: <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/...

sonar runner - Update SonarQube 3.7.4 to 5.0 AddNetworkUseSubCharacteristic: Fail to upgrade database -

hi: both have errror when migrating: the log: 2015.07.16 15:36:57 info app[o.s.p.m.monitor] process[web] 2015.07.16 15:40:54 info web[dbmigration] == replacekeyregexpbykeysearchinmeasurefiltersdata: migrating ================ 2015.07.16 15:40:54 info web[dbmigration] == replacekeyregexpbykeysearchinmeasurefiltersdata: migrated (0.0150s) ======= 2015.07.16 15:40:54 info web[dbmigration] 2015.07.16 15:40:55 info web[dbmigration] == addprovisioningpermission: migrating ====================================== 2015.07.16 15:40:55 info web[dbmigration] == addprovisioningpermission: migrated (0.1250s) ============================= 2015.07.16 15:40:55 info web[dbmigration] 2015.07.16 15:40:55 info web[dbmigration] == addtechnicaldebttoissue: migrating ======================================== 2015.07.16 15:40:55 info web[dbmigration] -- add_column("issues", "technical_debt", :integer, {:null=>true}) 2015.07.16 15:40:55 info web[dbmigration]...

javascript - Set the value of an input field inside a form with a specific attribute? -

i have below html. need jquery selector set value of hidden attribute (selectedentityid) inside form following attribute (data-ajax="true"): <form action="/myserver/list/toolbarfunction" method="post"> <input name="selectedentityid" id="selectedentityid" type="hidden" value=""> </form> <form action="/myserver/list/ajaxtoolbarfunction" method="post" data-ajax="true" data-ajax-success="successmessage" data-ajax-method="post" data-ajax-failure="failmessage"> <input name="selectedentityid" id="selectedentityid" type="hidden" value=""> </form> notes: need input element (selectedentityid) inside 2 forms , have same id. i have tried following: $("form[data-ajax='true'] #selectedentityid").val('123') but value not set , there...

SWI-Prolog predicate for reading in lines from input file -

i'm trying write predicate accept line input file. every time it's used, should give next line, until reaches end of file, @ point should return false. this: database :- see('blah.txt'), loop, seen. loop :- accept_line(line), write('i found line.\n'), loop. accept_line([char | rest]) :- get0(char), c =\= "\n", !, accept_line(rest). accept_line([]). obviously doesn't work. works first line of input file , loops endlessly. can see need have line "c =\= -1" in there somewhere check end of file, can't see it'd go. so example input , output be... input example output found line. found line. or doing wrong? maybe there's built in rule simply? in swi-prolog, elegant way first use dcg describe "line" means, , use library(pio) apply dcg file. an important advantage of can apply the same dcg on queries on toplevel phrase/2 , not need create file test predi...

javascript - Three.js creating geometry and mesh freezes animation -

i trying create scrolling text animation, , add more text animation while running. this function creating text geometry , mesh: function createtext(){ textgeo = new three.textgeometry( "some new text quite long", { size: 20, height: height, font: font }); textmesh1 = new three.mesh( textgeo, new three.meshbasicmaterial( { color: 0x112358 } ) ); textmesh1.position.x = (window.innerwidth / 2) + 100; textmesh1.position.y = ((window.innerheight / 2) * -1) + 40; textmesh1.position.z = 0; textmesh1.rotation.x = 0; textmesh1.rotation.y = 0; group.add( textmesh1 ); } and animate function: function animate() { var fistbox = new three.box3(); requestanimationframe( animate ); for(i = 0; < group.children.length; i++){ group.children[i].position.x -= 2; } fistbox.setfromobject(group.children[0]); if(group.children[0].position.x < ((window.innerwidth / 2) * -1) - fistbox.size().x ){ scene.remov...

operating system - Process synchronization - Critical section -

i studying final in os. on process sync chapter. our book offering following algorithm deal critical section. claims algorithm solves problem of starvation , offers bounded wait. here pseudocode var flag: array [0..1] of boolean; turn: 0..1; repeat flag[i] := true; turn := j; while (flag[j] , turn=j) no-op; critical section flag[i] := false; remainder section until false; from understanding, starvation occurs when process in critical section , process needs access it, first process won't finish. second process has wait forever. remember cpu scheduling implementing aging in algorithm, example, solve starvation. don't see how happen here. am wrong? there i'm not seeing here? thank you. imagine have 2 processes: 1 , 2, process1 wants go cs: let's start first process: repeat flag[1] := true; turn := 2; i want explain "while" in code: if falg[2] equal true: means the process2 has ran blow line of...

concurrency - how to make this play scala controller work? -

i trying create controller extracts file on fly archive , then renders static asset default asset controller import play.api.play.current // import controllers.assets import play.api.logger import myextract.extract import scala.concurrent.{executioncontext, future} import play.api.libs.concurrent.execution.implicits.defaultcontext object myassets extends controller { // drop version , serve asset def at(path: string, file: string): action[anycontent] = action.async { logger.info("looking file = %s" format file) val ret = future { extract.getfile(path, file) // extracts file archive // throws exception if file cannot extracted } ret.map { v => assets.at(path, file) } } } i these errors @ compile ./activator compile [info] loading project definition /home/sylvain/yo-scala/project [info]...