Posts

Showing posts from February, 2014

iphone - Will using three20 make my app slower? -

iphone - Will using three20 make my app slower? - i want utilize three20's ttthumbsview & ttphotoview build grindr. instead of (1) subclassing these classes, i'd prefer (2) analyze them , build take necessary code & tweak accordingly. why? because concern alternative (1) increment download size of our app & slow it's performance. (another thing want ues three20's caching, don't understand because right we're using core data. how three20 caching work?) if i'm using part of three20, when compile app, build in other code that's not beingness used? or leave out? if leaves out, gives me hope maybe alternative (1) won't create app lot larger download. in terms of performance (speed). three20 run fast? there's lot of subclassing going on. doesn't slow things down? facebook iphone app seems pretty good, , uses three20, right? what think? thanks! matt there's quite few questions here: analysing three20 cod...

How to bring an activity to front in android? -

How to bring an activity to front in android? - i using movetasktoback() function send activity background. want bring activity front end when timer in activity finishes. using phone key send activity back. how do that? help please. exact same issue mentioned on question. sloved next code snippet. i.addflags(intent.flag_activity_reorder_to_front) ; actauul brings activity front. intent i=new intent(applicationstatus.this,notifyactivity.class); //i.setflags(intent.flag_activity_new_task); i.addflags(intent.flag_activity_clear_top); i.addflags(intent.flag_activity_reorder_to_front); i.putextra("id_timeleft",string.valueof(timeleft)); startactivity(i); android

java - How to Translate contour to the center of image in openCV? -

java - How to Translate contour to the center of image in openCV? - i working on image processing project in android. task extract object , translate center of image can extract features easily. have extracted object, want translate center of image , rotate it, align horizontally on image. i using opencv image processing in android. help highly appreciated. thanks i suggest next technique.. vector<point>contour -- opencv contours vector of points. can translate them distance want. in c++ next translate contour void shifcontour(vector<point>& contour, int x, int y) { (size_t i=0; i<contour.size(); i++) { contour[i].x += x; contour[i].y += y; } } to find xand y, can utilize difference between centre of image , centre of contour. can utilize fitellipse calculate centre of contour. give rough approximation centre of contour. angle in contour directed.. (x_centre,y_centre),(majoraxis,minoraxis),angle = cv2.fite...

Xamarin.Android Edittext in listview looses text when scrolling -

Xamarin.Android Edittext in listview looses text when scrolling - i cannot seem find proper solution this, using xamarin.android develop android application , have multiple edit texts displayed in listview. when come in value , scroll downwards , 1 time again info entered before edittext lost or displayed wrong value of different row in listview. below array adapter code can seen: public override view getview(int position, view convertview, viewgroup parent) { view view = null; var item = getitem(position); switch (item.getviewtype()) { case formtypes.text: view = textgetview(position, inflater, convertview); break; } private view textgetview(int position, layoutinflater inflater, view convertview) { view view = convertview; edittext valueedittext = null; if (convertview == null) { ...

templates - Separating Content from Design in Wordpress -

templates - Separating Content from Design in Wordpress - i'm not super-experienced wordpress guy, know i'm doing, , have been programming years. i'm in middle of building simple wordpress site, lots of posts added in future client. it dawned on me posts static, if changes in design needed need applied manually across many pages. i've searched google no avail. need plugin or method allows me have templates posts, unique content each page added. then, if design changes needed, edit template , design alter instantly across pages using template. i've found plugins seem offer post templates, seem create new post pre-made design, not create possible create changes design reflected across posts utilize template. maybe i'm missing simple here, can't wp author wants accomplish this? i'm not talking dynamic content. ie have no need pull updated info weather or prices api. content hand-written each page, separate design, if design changes nee...

Conditional Imputation SAS -

Conditional Imputation SAS - my info list of schools , performances on subject assessments, along percentage of gender enrolled in course. i've created sample info set below: data have; input school $ subject $ perc_male perc_female score similar_school $; datalines; x math 51 49 93 y x english language 48 52 95 y x tech 60 40 90 y x science 57 43 92 y y math . . 87 x y english language . . 83 x y science . . 81 x y language . . 91 x z math 40 60 78 z z english language 50 50 76 z z science 45 55 80 z ; run; as can see, no gender percentages collected school y. research shows school x has similar gender distribution, wish impute subject-specific percentages x y. problem y has score languages, while x did not take assessment. in case, wish take mean of imputed values (51, 48, 57) 52 percentages of language course-takers male. executing demonstrate desired output: data want; input school $ subject $ perc_male perc_female score; datalines; x math 51 4...

adobe - Advanced Actions not working in captivate 8 -

adobe - Advanced Actions not working in captivate 8 - i trying replicate exact functionality of acknowledging custom menu item click explained in tutorial: https://www.youtube.com/watch?v=q_vfrmzcbfu. in other words, have set default value of slide-related-flag variable 0 , when visit specific slide (on clicking respective menu item) set slide-related-flag 1 using on come in event of slide. 1 time again when go menu have written advanced action check if slide-related-flag set 1 if display image alongside menu item clicked acknowledge have clicked it. the issue acknowledge image not appearing , believe advanced action script not beingness triggered. new captivate , version using 8. adobe adobe-captivate

jquery - mouse co ordinates using event.pageX returns undefined -

jquery - mouse co ordinates using event.pageX returns undefined - in jquery tried $(".bydd").live("change", function (event) { // other actions happening console.log(event.pagex); }); when checked console undefined . tried window.x the code not work on alter event ... have created simple demo of same class="snippet-code-js lang-js prettyprint-override"> $( document ).on( "mousemove", function( event ) { $( "#log" ).text( "pagex: " + event.pagex + ", pagey: " + event.pagey ); }); class="snippet-code-html lang-html prettyprint-override"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <div id="log"></div> jquery

SQLite Database Android, check if a record exists and save -

SQLite Database Android, check if a record exists and save - i have database extends sqliteonhelper app of have create sure if, example, alter only title, should update record, otherwise normal insert. this table: public void oncreate(sqlitedatabase db) { string sql = "create table vasca(" + "_id integer primary key,"+ "titolonota text not null,"+ "testonota text not null,"+ "datanota date,"+ "colorenota integer not null,"+ "unique(id, titolonota)"+ // reviewed ")"; db.execsql(sql); } and boolean method insert: public boolean insertnote(nota nota){ // boolean inizializzat false utilizzata come homecoming boolean resultinsert = false; // repository dei dati in modalità scrittura sqlitedatabase dblite = this.getwritabledatabase(); // utilizza united nations contentvalues come ma...

c# - C to Perl Translation HMAC SHA1 , data and secret key -

c# - C to Perl Translation HMAC SHA1 , data and secret key - i want convert c code below perl. know how this? utilize hmac_sha1_hex($data, $key); ? utilize digest:sha module? want sign info key, utilize perl instead of c. using system; using system.collections.generic; using system.text; using system.security.cryptography; using system.web; namespace amazon.cba.signature.common { public class signaturecalculator { public signaturecalculator() { } public string calculaterfc2104hmac(string data, string key) { string result = null; keyedhashalgorithm algorithm = new hmacsha1(); encoding encoding = new utf8encoding(); algorithm.key = encoding.getbytes(key); result = convert.tobase64string(algorithm.computehash(encoding.getbytes(data.tochararray()))); homecoming result; } } } i so: use mime::base64 (); utilize digest::hmac_sha1 (); $result = mime::bas...

internet explorer - How does WebDriver launch an instance of IE? -

internet explorer - How does WebDriver launch an instance of IE? - how webdriver launch ie instance? that is, iedriverserver.exe do? how binary instantiate ie browser window? when new session requested language bindings, iedriverserver.exe calls windows ielaunchurl api function on "known good" url. usually, http://localhost:[port], can controlled passing specific capabilities. introduction of protected mode in ie 7, this api proper way launch ie. driver connects localhost instead of, say, about:blank, because target url must belong protected mode zone, , about:blank not. the ielaunchurl api required because multi-process ie, process started launching iexplore.exe may not actual process containing browser driven. ielaunchurl api returns process id of launched browser, driver can utilize locate window handle of browser window owned iexplore.exe process. 1 time window handle known, driver can utilize 1 of 2 techniques (either active accessibility or shel...

java - Swing GridBagLayout - Alignment issue -

java - Swing GridBagLayout - Alignment issue - i have jpanel jlabel, jtextfield , jpanel jlabel in it. createdomainpanel = new jpanel(new gridbaglayout()); gridbagconstraints gbc = new gridbagconstraints(); //createdomainpanel.setsize(600, 300); gbc.fill=gridbagconstraints.horizontal; gbc.gridx=0; gbc.gridy=0; createdomainpanel.add(new jlabel("enter name of domain"), gbc); gbc.gridx=0; gbc.gridy=1; createdomainpanel.add(domainname, gbc); jpanel result = new jpanel(new flowlayout()); result.add(successmessage); gbc.anchor=gridbagconstraints.last_line_start; gbc.gridx=0; gbc.gridy=2; createdomainpanel.add(result); the lastly jlabel result prints success message after operation. public void actionperformed(actionevent e) { simpledbconnect dbc = new simpledbconnect(); string name = ""; if (e.getsource()==domainname){ name=e.getactioncommand(); ...

java - How do I put a String into an array and then into an array of double? -

java - How do I put a String into an array and then into an array of double? - currently have this: public class sequence { private double[] sequence; // set sequence parsing s //the numbers in s seperated commas public sequence(string s) { string [] terms = s.split (","); sequence = double.parsedouble(terms); } } what have not work. trying accomplish move numerical terms in string s (such 1,2,3,4,5,6) in array of double called sequence. double.parsedouble take 1 string , returns 1 double . passing array of strings. alter code pass 1 string. public sequence(string s) { string [] terms = s.split (","); sequence = new double[terms.length]; (int = 0; < terms.length; i++) { sequence[i] = double.parsedouble(terms[i]); } } java arrays double sequences

sql server - SQL Join based on dates- Table2.Date=Next date after Table1.Date -

sql server - SQL Join based on dates- Table2.Date=Next date after Table1.Date - i have 2 seperate tables want bring together based on dates. however, don't want dates in tables equal 1 want date (and accompanying value) 1 table joined next date available after date in sec table. i've set illustration of problem below: table 1: date value 2015-04-13 2015-04-10 b 2015-04-09 c 2015-04-08 d table 2: date value 2015-04-13 e 2015-04-10 f 2015-04-09 g 2015-04-08 h desired output table: table1.date table2.date table1.value table2.value 2015-04-10 2015-04-13 b e 2015-04-09 2015-04-10 c f 2015-04-08 2015-04-09 d g i'm @ bit of ends of going this, hence lack of current sql starting point! hopefully clear. found related question comes close lost on incorporating bring together statment!! sql - select next date query any help much appreciat...

c# - Waiting for WebBrowser ajax content -

c# - Waiting for WebBrowser ajax content - i want pause execution of thread until particular div has been loaded via ajax webbrowser instance. can continuously check presence of div doing like: while (browser.document.getelementbyid("divid") == null) { thread.sleep(200); } however, sleeping thread browser in between loops blocks browser loading content in first place. seems, therefore, need execute browser.navigate method in separate thread - can go on check/wait presence of div whilst webbrowser instance continues loading url asked to. my attempts @ this, however, have failed , i'd value input on how should go this. thought dispatching new thread new thread(() => { browser.navigate(url); }); work after doing so, nil loads , browser.readystate remains 'uninitialized'. presume i'm misunderstanding how go threading procedures c# , value advice! don't block main thread's message pump. since browser sta component, xmlhttprequest ...

Filtering on the count with the Django ORM -

Filtering on the count with the Django ORM - i have query that's "count items of type x, , homecoming items exist more once, along counts". right have this: item.objects.annotate(type_count=models.count("type")).filter(type_count__gt=1).order_by("-type_count") but returns nil (the count 1 items). doing wrong? ideally, should following: type ---- 1 1 2 3 3 3 and return: type, count ----------- 1 2 3 3 in order count number of occurrences of each type, have grouping type field. in django done using values field. so, should work: item.objects.values('group').annotate( type_count=models.count("type") ).filter(type_count__gt=1).order_by("-type_count") django orm aggregate

c# - How do I use StructureMap with generic unclosed types using Scan with a "greedy" constructor -

c# - How do I use StructureMap with generic unclosed types using Scan with a "greedy" constructor - between various stack overflow questions , blog posts there pretty reasonable amount of documentation on topic of open generics , structuremap. unfortunately, must missing attempts @ using scan perform configuration along class implementation has "greedy" constructor have yet work. i want structuremap grab instance of below class via references implemented interface. tocsvservice exists in unreferenced assembly called infrastructure. itocsvservice exists in referenced assembly called core. can see tocsvservice has "greedy" constructor. public class tocsvservice<tsource> : itocsvservice<tsource> { public tocsvservice(icollection<tsource> collection) { } } i allow structuremap know tocsvservice via connectimplementationstotypesclosing method. objectfactory.initialize(cfg => { cfg.scan(scan => ...

curl - How to quickly deploy assets to Amazon S3 with an Ant target? -

curl - How to quickly deploy assets to Amazon S3 with an Ant target? - what quickest way deploy content cdn ant target? ant target running on continuous integration server (hudson). current solution uses curl , bit slow. should utilize wput or else , how in ant? <target name="deploy"> <for param="file"> <path> <fileset dir="${basedir}/output" includes="**/*"/> </path> <sequential> <echo> deploy @{file} </echo> <exec executable="curl"> <arg value="-f name=value"/> <!-- params secure access --> <arg value= "-f file=@{file}"/> <arg value="http://cdn.com/project"/> </exec> </sequential> </for> </target> several ideas have come speed transfer of content cdn 1) max out pipe bandwidth using parallel ant task ...

jquery - Load JSON file within Javascript -

jquery - Load JSON file within Javascript - this question has reply here: how homecoming response asynchronous call? 11 answers i want load local json file config info usage in javascript file. i tried this: var map; var initialmapcoordinates = ""; function loadconfigfile() { $.getjson('js/config.json', function(jd) { initialmapcoordinates = jd.googlemaps.initialcoordinates; initmap(); }); }; function initmap() { google.maps.visualrefresh = true; var mapoptions = { center: new google.maps.latlng(initialmapcoordinates), zoom: 10, maptypeid: google.maps.maptypeid.roadmap }; var mapelement = document.getelementbyid('map'); map = new google.maps.map(mapelement, mapoptions); } google.maps.event.adddomlistener(window, 'load', loadconfigfile()); i want assign diff...

php - doing monthly and yearly sales laravel 4 from a sales table recorded in timestamps -

php - doing monthly and yearly sales laravel 4 from a sales table recorded in timestamps - i have been looking ideas on how retrieve monthly sales , yearly sales sales table, , list them in months jan, feb,.... , yearly 2015, 2016....in tables sales records entered hourly using timestamps. want implement using laravel 4 any help appreciated i tried daily sales $dates= db::table('sales') ->groupby('hr') ->whereraw("date(created_at) = curdate()") ->select(db::raw('hour(created_at) hr'),db::raw('sum(sale) salez'), db::raw('date_format(created_at,"%b %d %y %h:00 %p") hrtime')) ->get(); php mysql laravel

lm - Do as regression with waste another linear relationship? -

lm - Do as regression with waste another linear relationship? - how can create regression residues of relationship? lm2 <- lm(x_lm1$residuals~latitude, data) regression lm

c# - Dealing with an object of certain type, that can be known in runtime only? -

c# - Dealing with an object of certain type, that can be known in runtime only? - i have question, have asp.net web app can service multiple clients. the difference app needs convert json string .net object of type <t> in order pass object wcf service. for purpose using newtonsoft.json.converter: t input = jsonconvert.deserializeobject<t>(jsoninput); the problem that type <t> unknown @ design time. after deserialization need have generic strongly-typed object can pass wcf service. reason wcf service different each client, , parameter input may have different construction each client. var client = new calcengine.calculatorclient(); var input = new calcengine.calcinputtypes(); var result = client.calculate(input); here input of type calcengine.calcinputtypes. clienta , clientb calcengine.calcinputtypes may have different structure. what best way accomplish that? thanks. for example, suppose input either of next 2 json messages: { ...

javascript - show/hide elements based on title of clicked link? -

javascript - show/hide elements based on title of clicked link? - i trying show , hide elements (divs) based on title of hyperlinks in jquery. my html looks this: <a title="booz" href="" class="netro">booz</a> <a title="books" href="" class="netro">books</a> <a title="sam" href="" class="netro">sam</a> <div data-title="booz" class="drag">something here</div> <div data-title="booz" class="drag">something here</div> <div data-title="booz" class="drag">something here</div> <div data-title="booz" class="drag">something here</div> <div data-title="booz" class="drag">something here</div> <div data-title="sam" class="drag">another thing here</div> <div data-ti...

html - Symfony2 FormBuilder form tag isn't using all forms -

html - Symfony2 FormBuilder form tag isn't using all forms - i got form in formbuilder colleaguetype public function buildform(formbuilderinterface $builder, array $options) { $builder ->add('firstname', 'text', array( 'label' => 'voornaam' )) ->add('lastname', 'text', array( 'label' => 'achternaam' )) ->add('email', 'email', array( 'label' => 'email' )) ->add('phonenumber', 'text', array( 'label' => 'telefoon nummer' )) ->add('savenewcolleague', 'submit'); } public function getname() { homecoming 'colleague'; } i used forms in twig template this: newcolleague.html.twig <div class="container-fluid container-homepage"> <div class=...

hadoop - Ambari + HDP licensing -

hadoop - Ambari + HDP licensing - i'm experiencing deployment , management of hadoop cluster , found out that, purpose, ambari useful , convenient tool. i'm trying figure out if licenses of hdp stack allow deploy hadoop installation in production environment. have experience in utilize of ambari in production? free utilize production environment? as employee of hortonworks myself, can assure there no licensing have comply deploy ambari, including ambari bundled hdp; http://hortonworks.com/hdp/. now... love purchase back upwards contract! ;-) hadoop ambari

Mule:Exact usage of db:select source attribute -

Mule:Exact usage of db:select source attribute - having flow inbound amqp connector <flow name="flow1"> <amqp:inbound-endpoint responsetimeout="10000" exchangename="inputexchange" queuename="inputqueue" routingkey="inputqueue" connector-ref="rabbitconnector" doc:name="amqp"/> <set-variable variablename="datacount" value="0" doc:name="variable"></set-variable> <db:select config-ref="databaseconnector" target="#[flowvars.datacount]" source="#{payload[0]['count(*)']}" doc:name="select"> <db:parameterized-query><![cdata[select count(*) tablename]]></db:parameterized-query> </db:select> </flow> when no source specified datacount=[{count(*)=10}] db select returns list of map. should right value of source attribute 10 assigned datacount v...

design - Why would SPDY signal its version and packet length in every message? -

design - Why would SPDY signal its version and packet length in every message? - while writing thesis on spdy, noticed how much overhead related congestion control. simple window_update packet holds 16 bytes , contains boilerplate contents - packet type, flags, length , actual contents. don't understand engineering science reasong behind - why wouldn't protocol signal version during handshake , rely on info later? why packet size signalled if specification states version of protocol, it's same length? design version network-protocols low-level handshake

seo - Remove all http://www.example.com but keep http://example.com without www -

seo - Remove all http://www.example.com but keep http://example.com without www - i changed url http://www.example.com http://example.com expecting time google update. made redirects in .htaccess www traffic non-www traffic. however still see est. 2500 links in google using www after 2 month , of them outdated links means user ending on frontpage. i considering request google remove http://www. links solve 404 problem. but recommended , how do it? have tried setting preferred domain in google webmaster tools account? seo subdomain google-webmaster-tools

java - net::ERR-INVALID-CHUNKED-ENCODING -

java - net::ERR-INVALID-CHUNKED-ENCODING - i have unusual error happen on pcs when requesting url on page on web application. error is: net::err-invalid-chunked-encoding the error not happened, 2 out of 3 request bound error. application spring mvc jar deployed on web server. any help please? java html web

javascript - Performance: NaCl vs Emscripten -

javascript - Performance: NaCl vs Emscripten - how google's native client (both nacl , pnacl) compare emscripten in ported c++ code performance? the best way find out port , profile. have done work both systems, porting cpu-intensive c/c++ libraries both nacl , js-via-emscripten. have found both remarkably performant. not same compiled c/c++, fast plenty can accomplish tasks in real-time. javascript c++ llvm google-nativeclient emscripten

angularjs - unusual behaviour of ng-checked / checkbox -

angularjs - unusual behaviour of ng-checked / checkbox - <input class="ml1" type="checkbox" ng-checked="item.ph_comp_change" ng-model="item.ph_comp_change" ng-true-value="1" ng-false-value="0" /> this makes input checkbox, problem need uncheck 2 times, in order remove check sign it. if remove ng-true-value="1" ng-false-value="0" , works fine. working jsfiddle http://jsfiddle.net/u3pvm/14616/ please help me out here you need set status on ng-checked ng-checked="item.ph_comp_change === 1" it work. angularjs checkbox

regex - How to redirect my domains without a listing rules or a mapping file -

regex - How to redirect my domains without a listing rules or a mapping file - i have document directory contains 2 subdirs named the same string found on each of folder named domains / subdomains pointing root this: root /abc /www.abc.com /myabc.whatever.com /wholike.allabcismyfriend.com /xyz /www.xyz.com /idontlike.anyxyz.com /stupidxyz.ihatethisfellow.com please advise me how redirect request correspond folder using .htaccess preferably in 1 or 2 lines of regex code. (not list them 1 1 in rewriterule nor using mapping file). edit have got using 1 line code work if set in 1 subdir e.g. 'abc': rewriterule (.*) /abc/%{http_host}/$1 [l] regex .htaccess url-rewriting url-redirection

spring - javassist does not catch exception -

spring - javassist does not catch exception - i have main app(spring) , java-agent app(scala), seek methods(from maim app) name 'doget' , replace body next val replace = """ |{system.out.println("before"); | $_ = $proceed($$); | system.out.println($1); | system.out.println($2); | charresponsewrapper responsewrapper = new charresponsewrapper((httpservletresponse) $2); | system.out.println(responsewrapper.tostring();); | system.out.println("after");}""".stripmargin but line charresponsewrapper creating cause problems , want know problem on line. add together catching method, seemed here method.addcatch(" system.out.println(\"[error]\"); ", pool.get("java.lang.exception")); but when calling these methods prints not print. expecting minimum printing '[error]'. what ...

c# - foreach vs LINQ .ForEach() -

c# - foreach vs LINQ .ForEach() - this question has reply here: why foreach method on list<t> collection? [duplicate] 4 answers why linq .foreach require list object, while foreach statement requires ienumerable ? i prefer using foreach when having multiple lines , linq single line statements - readability. but preferred, , why? , why difference? there no linq foreach() method. method looking @ a fellow member of list<t> . see here give-and-take on why linq/ienumerable doesn't have foreach() . c# linq foreach

osx - Wordpress on local host asks for FTP credentials on mac -

osx - Wordpress on local host asks for FTP credentials on mac - cannot update wordpress plugin beingness asked ftp credentials. have tried using define('fs_method','direct'); did not work. add bottom of wp-config.php file: if(is_admin()) { add_filter('filesystem_method', create_function('$a', 'return "direct";' )); define( 'fs_chmod_dir', 0751 ); } wordpress osx

pandas - running python code despite KeyError -

pandas - running python code despite KeyError - i keyerror 1 of entries in dataframe, code go on other entries seem have not problem. have been reading except() alternative don't know how utilize it. can help the basic form of exception handling in python uses try: try: #code gives key error (replace pass code) pass except keyerror: #do exception handling here (or pass) pass python pandas

Socket object in C++ -

Socket object in C++ - i'm trying write basic socket programme layers reliable info transport on udp in c++. i've been reading beej.us , googling, i'm still confused socket object. come python/java background , have never programmed in c++, understand, programme our professor has given finish should using sort of socket object, correct? so how come can see here, there not seem getter nor setter socket object? bind() using reference when called modify socket object? see there int called sockfd seems identifying each unique socket, don't see how calling number grab reference socket object particular sockfd. also, seems beej.us , bunch of youtube tutorials utilize getaddrinfo() create socket object, function not exist in code provided professor, , instructions indicate not need write additional functions.. the format have utilize pasted below. there 2 files, 1 server , 1 client. header functions inside. rdt.h: #ifndef rdt1_h #define rdt1_h #inclu...

r - Connectivity Isue - RImpala - Kerberos -

r - Connectivity Isue - RImpala - Kerberos - i m stuck rimpala , kerberos issue. all working fine without kerberos(in laptop cloudera vm) cluster kerberos enabled , getting below exception javax.security.sasl.saslexception:gss initiate failed [caused gssexception: no valid credentials provided (mechanism level: failed find kerberos tgt)] command used: rimpala.connect(ip="my-ip",port="port",principal="username@your-local-realm.com") i m providing principal displayed in klist still unable connect it. impala-shell getting connected , getting detail credential cache. any help much appreciated. regards selvan for benefit of others face same issue: we worked on issue , found out original rimpala didnt have provision of working kerberos. or not working properly. have fixed issue , can found on github in url: https://github.com/selvanponraj/rimpala please utilize above code , follow instructions in readme. r impala

Fetch a post under certain no of words or characters in wordpress? -

Fetch a post under certain no of words or characters in wordpress? - is possible fetch post content under 140 characters or 25 words ? if possible how it here random post code // random post link function randompostlink(){ $randpostquery = new wp_query(array('post_type'=>array('tip'),'posts_per_page' => 1,'orderby'=>'rand')); while ( $randpostquery->have_posts() ) : $randpostquery->the_post(); echo the_permalink(); endwhile; wp_reset_postdata(); } character count easy, can add together status and char_length(post_content) < 140 clause. word count more hard because there no built in mysql function counting words. can find simple solutions don't work in every utilize case finish solutions utilize stored functions. i'll utilize simple solution sake of example. what need add together filter clause , apply additional conditions there: add_filter( 'posts_where', 'venki_post_leng...

Why does Android dislike to see implementation of the constructor of an activity? -

Why does Android dislike to see implementation of the constructor of an activity? - my activity contains tabhost , , implemented constructor of activity . @ runtime app crashed ! removed implementation of constructor , app run ! why , when should implement constructor of activity ? in android, activities initialised scheme through classloader, requiring public non-argument constructor in order initialise object. normally, never override/add constructor activities in android. if want it, however, must implement public non-argument constructor. look @ documentation more details how class works: activity android

php - How to I can access the URL for different subdomain in yii? -

php - How to I can access the URL for different subdomain in yii? - i'm new yii framework, , have problem in accessing url module/controler/action. want url http://module/hostname/controller in web application. below code controller : return cmap::mergearray( require(dirname(__file__) . '/main.php'), array( 'components' => array( 'urlmanager' => array( 'urlformat' => 'path', 'showscriptname' => false, 'rules' => array( 'selengkapnya/<title>/<node:\w+>' => 'selengkapnya/index/node/<node>', 'blog/<title>/<node:\w+>' => 'blog/view/node/<node>', // 'blog.eproc.dev'=>'blog/', //url manager url http://<module>/<hostname/<controller> 'http://<module:\w+>.eproc2014.dev...

java - repaint() method not calling paintComponent() -

java - repaint() method not calling paintComponent() - for programme want utilize open button open jfilechooser , select image , draw on jpanel on left side of applet, know file beingness retrieved when go repaint graphics context nil happens. in advance. import java.awt.color; import java.awt.graphics; import java.awt.graphics2d; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.awt.image.bufferedimage; import java.io.file; import java.io.ioexception; import javax.imageio.imageio; import javax.swing.jbutton; import javax.swing.jfilechooser; import javax.swing.jframe; import javax.swing.jpanel; import javax.swing.jtextfield; import javax.swing.swingutilities; import javax.swing.jframe; public class finalproject390 { public static void main(string[] args) { createandshowgui(); } private static void createandshowgui() { jframe f = new jframe("final project"); f.setsize(1025, 520); ...

python - report doesnt containts monitor server info -

python - report doesnt containts monitor server info - i have problem generating report. in benching ok: * start monitoring 188.166.46.45: ... done. ... * stop monitoring 188.166.46.45: done. i run fl-monitor-ctl in debug mode , 200,ok. i found in generated bench.xml this: <monitorconfig host="188.166.46.45" key="monitormemfree" value="(lp0\n(ifunkload.monitorplugins\nplot\np1\n(dp2\ns'plots'\np3\n(dp4\ns'mem'\np5\n(lp6\ns'lines lw 2'\np7\nas'memory'\np8\nass'swap'\np9\n(lp10\ng7\nas'swap'\np11\nasss'ylabel'\np12\ns''\np13\nss'unit'\np14\ns'kb'\np15\nss'title'\np16\ns'memory usage'\np17\nsba." /> <monitorconfig host="188.166.46.45" key="monitorcpu" value="(lp0\n(ifunkload.monitorplugins\nplot\np1\n(dp2\ns'plots'\np3\n(dp4\ns'load1'\np5\n(lp6\ns'lines lw 2'\np7\nas'load 1min'\np8\n...

twirl - How to specify that a parameter is optional -

twirl - How to specify that a parameter is optional - i new twirl, , trying create todo application play, way have right now, trying send 2 objects(an arraylist , , string ). have wrapped code in controller in seek catch. if exception caught template should rendered string , not arraylist , , if no exception caught, homecoming arraylist , not string . have tried passing 1 null , sense there improve way it. there? here twirl: @(message: string, tasks: arraylist[task]) <!doctype html> <html> <head> <title>todo</title> </head> <body> <h1>todos</h1> <p>@message</p> @for(task <- tasks) { <li><@task.task</li> } </body> </html> you utilize option s: @(maybemessage: option[string], maybetasks: option[seq[task]]) <!doctype html> <html> <head> <title>todo</title> </head> <body> <h1>todos</h1> @f...

Index Formula with condition - Excel 2010 -

Index Formula with condition - Excel 2010 - i have table in sheet: teamdetails employee details next name domain ect.. etc.. , status status column contains active or in active in dashboard sheet, employees of domain displayed when select domain name info validation list(cell: f32). current array formula: {=iferror(index(teamdetails[name], small(if(teamdetails[domain]=dashboard!$f$32,row(teamdetails[domain])-row(teamdetails!$d$4)+1), rows(teamdetails!$d$4:teamdetails!$d4)) ),"no team")} my question: above formula displays employees including status "in active" want avoid. please help! (no vba please) excel knowledge: beginner thank you! you should able throw in sec status , multiply first one. assume sec status of form teamdetails[status] = "active" . combining first status gives: =iferror(index(teamdetails[name], small(if((teamdetails[domain]=dashboard!$f$32)*(teamdetails[status]="active"),row(...

internet explorer 8 - IE 8 absolute positioned element outside its parent clipping problem -

internet explorer 8 - IE 8 absolute positioned element outside its parent clipping problem - i have absolute positioned div within absolute positioned div. kid div content much bigger parent can contain. design. need kid div spill out of parent. in every other browser except ie 8 (ie 7 looks ok, not sure) in ie8 part of kid out of parent clipped. there, not visible can verified ie developer tools. tried z-index, tried explicitly setting overflow:visible, no luck @ all. update: found out problem caused filter defined in parent div this: -ms-filter: "progid:dximagetransform.microsoft.gradient(startcolorstr=#66c6dea2,endcolorstr=#66c6dea2)"; anyone has thought how work around that? i solved using http://stackoverflow.com/questions/2756851/how-do-i-stop-internet-explorers-propriety-gradient-filter-from-cutting-off-cont my solution little modified, set empty div class "ie_rgba_fix" within container want transparent, add together css someplac...

javabeans - How to define private getter method in Groovy Bean? -

javabeans - How to define private getter method in Groovy Bean? - i used next code. class bike{ def manufacturer; private getmanufacturer(){ manufacturer } } but able invoke getter method class. you can't using private modifier. scheduled groovy 2.0 believe related questions: groovy phone call private method in java super class groovy parent/child private field access weirdness closure groovy javabeans

moss - Sharepoint Designer 2010 Deployment of CSS, masterpage and general brand -

moss - Sharepoint Designer 2010 Deployment of CSS, masterpage and general brand - what stand best method deploying style, masterpage, branding have created on site live environment. i've looked @ creating solution file doesn't seem carry styling. can pleae point me in right direction? rob best practice create solution bundle (wsp file) , apply branding in featureactivated method. moss

graph - Constrained k-medoids clustering in R -

graph - Constrained k-medoids clustering in R - i looking way implement semi-supervised clustering, perchance constrained clustering in r, particularly "cannot-link" part (i think - see below). found this question, don't know these languages. i have info set (of indices words) looks this: 11 195 752 67 77 243 130 8 2178 2581 201 129 77 3872 8967 282 880 77 65 535 363 282 the first index on each line "leaf" on directed acyclic graph, i.e., tree/hierarchy. there more 1 word hierarcies/trees in database; lastly item on each line root/top node (semantically, general/abstract word), line represents path leaf root. suppose want in end dimension reduction: instead of 1000 unique words there 200 clusters of words, can useful when dealing limited info (small texts), since reduces info sparseness in e.g. topic/summarization models. what have far. first, derive similarity matrix (based on how many nodes pair of leaves have in mutual in tree ...

xcode - Why time is changing when add event -

xcode - Why time is changing when add event - self.eventstore = [[ekeventstore alloc] init]; nslog(@"check addevent time :%@",self.date); if ([_eventstore respondstoselector:@selector(requestaccesstoentitytype:completion:)]) { [_eventstore requestaccesstoentitytype:ekentitytypeevent completion:^(bool granted, nserror *error) { if (granted){ addeventgranted = 1; ekevent *event = [ekevent eventwitheventstore:_eventstore]; [event settitle:self.shownametitle]; [event setstartdate: self.date]; [event setenddate:[[nsdate alloc]initwithtimeinterval:self.duration sincedate:event.startdate]]; nstimeinterval alarmoffset = -300; ekalarm *alarm = [ekalarm alarmwithrelativeoffset:alarmoffset]; [event addalarm:alarm]; [event setcalendar:[_eventstore defaultcalendarfornewevents]]; nserror *err; [_eventstore saveevent:event span:ekspan...

while loop not looping in python -

while loop not looping in python - simple while loop, not working expected. trying create function simulate roll of die, , maintain running total of result, until total >= m, @ point should stop. want know final total is, , how many rolls took there. currently rolls twice, , reports sum of 9. have checked code outside loop , should (that is, these 3 lines: r = rdm.randint(1,6) , tot += r , rolls.append(r) ). what missing?? def roll(m): rolls = [] tot = 0 while tot < m: r = rdm.randint(1,6) tot += r rolls.append(r) homecoming tot homecoming rolls homecoming r m=100 roll(m) print "the number of rolls was", len(rolls) print "the total is", tot it seems have misconception on how command returns function , how homecoming values. current issue nil pertinent while loop rather how processing returns function. you should understand there can multiple homecoming paths particular...

python - What should I do to fix my code? -

python - What should I do to fix my code? - here code def print_chars(num,char): print(char*num) homecoming def sum_arithmetic_seq(num): total= num in range(1,num): total += homecoming total def factorial(num): total= num in range(1,num): total *= homecoming total #final num in range(1,7): print(num) print('sum :',print_chars(sum_arithmetic_seq(num), '*')) print('factorial:',end = ' ') print_chars(factorial(num),'#') here output 1 * sum : none factorial: # 2 *** sum : none factorial: ## 3 ****** sum : none factorial: ###### 4 ********** sum : none factorial: ######################## 5 *************** sum : none factorial: ######################################################################################################################## 6 ********************* sum : none factorial: #########################################################################...

javascript - Phonegap on android - will only play mp3 when button clicked, but not through a function -

javascript - Phonegap on android - will only play mp3 when button clicked, but not through a function - i'm using phonegap, , works beautifully in browser. i have various buttons play mp3 sounds , work fine, on browser , android. i have few sounds called functions, when timer runs out. these play in browser, don't play when i'm testing app on android device via phonegap desktop program. it isn't sound files play when button clicked no sounds play on function. here code. index.html - <audio src = "sounds/beginjingle.mp3" id="begin-jingle" preload = "auto" type="audio/mpeg"></audio> <audio src = "sounds/donebell.mp3" id="done-bell" preload = "auto" type="audio/mpeg"></audio> javascript.js //audio function - plays sound function playsound(sound){ document.getelementbyid(sound).currenttime = 0; document.getelementbyid(sound).play(); } this...

javascript regex in chrome extension -

javascript regex in chrome extension - okay, little context. want modify crappy html on page utilize lot. i'm doing via content_script "js", defined in manifest.json file of chrome extension. primary method i've been using sort of ugly thing: var str1 = 'something on page'; var str2 = 'something on page, plus stuff'; document.body.innerhtml = document.body.innerhtml.replace(str,st2); i'm trying re-order form objects, , expand them little show more information, , filter/condense them less superfluous. i'd appreciate pointer improve way this. anyway... here's specific problem. i want retrieve pistol (or string) following: <form action="map.cgi?use-o" method="post" class="a"><input type="submit" value="pistol" class="m"\></form> i tried every variation of following: str.exec(/value="([^]+)" class/); and i'm either getting n...

visual studio 2012 - Reading XML data From .net Webserice in Xamarain Android -

visual studio 2012 - Reading XML data From .net Webserice in Xamarain Android - webmethod <webmethod()> _ <scriptmethod(responseformat:=responseformat.xml)> _ public function getdonationrequestxml(usertype string, userid string, donationid long, requeststatus string) donationmaster() dim da new sqldataadapter("donation_getall_by_usertype", cn) da.selectcommand .connection = cn .commandtype = commandtype.storedprocedure .commandtext = "donation_getall_by_usertype" .parameters.addwithvalue("@usertype", usertype) .parameters.addwithvalue("@userid", userid) .parameters.addwithvalue("@donationid", donationid) .parameters.addwithvalue("@requeststatus", requeststatus) end dim dt new datatable da.fill(dt) dim dr datarow dim integer = 0 if dt.rows.count > 0 ...