Posts

Featured post

android - Hide only the Action bar on Scroll not action bar tabs -

Image
i getting issue @ trying hide action bar while scrolling down.then while scrolling up,the action bar have shown again. for eg: i referred tutorial .here can see output , respective codes related hide , show action bar. i showing output till now. after scrolling down: the screenshot above shown, hide action bar tab also.but have hide action bar.that's major issue. after scrolling up: the screenshot above shows displays action bar tabs. topratedfragment.java: import info.androidhive.tabsswipe.r; import android.app.actionbar; import android.content.res.typedarray; import android.os.bundle; import android.support.v4.app.fragment; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.view.viewtreeobserver; import android.view.window; import android.widget.scrollview; public class topratedfragment extends fragment implements viewtreeobserver.onscrollchangedlistener { private float mactionbarheight;

sql - Best way to get next row based on primary key of any row in a table with sequence -

i have table this id name sequence -------------------------- 45 alex 1 22 john 2 2 philip 3 65 shine 4 356 stephy 5 35 tom 6 ok.. here when pass id 2 should row of shine since that's next row based on sequence after philip (2) which best solution? does want? select top 1 t.* table t sequence > @id order sequence;

Scala and implicit class instantiation -

i have following 2 scala files: object implicitshome { implicit class stringwrapper(val str: string) extends implicitshome serializable } trait implicitshome { def str: string def embelishstring: string = { str.concat("fancy") } } and: import implicitshome._ class user { def buildsuperstring(str: string): string = { str.embelishstring } } object user { def main(args: array[string]): unit = { val usr = new user() val fancy = usr.buildsuperstring("hi") println(fancy) } } what wondering that, if have call embelishstring function more once, creating multiple instances of implicit stringwrapper class? i'm concerned because when implicit used, passes string ( str ) in - 'state' have careful sharing across different invocations of embelishstring function? every time call embelishstring - new instance of stringwrapper created. it's pretty cheap if don't have heavy constructor/st

How to delete Content Source in Sharepoint 2013 Search Service -

Image
i want delete default content source in search service in sharepoint 2013 delete button disable?please see below image. how can delete it? the default content source can not removed.

python - Does `try... except Exception as e` catch every possible exception? -

in python 2, exceptions can raise d required inherit exception? that is, following sufficient catch possible exception: try: code() except exception e: pass or need more general like try: code() except: pass with first variant you'll catch "all built-in, non-system-exiting exceptions" ( https://docs.python.org/2/library/exceptions.html ), , should catch user defined exceptions ("all user-defined exceptions should derived class"). for example, first variant not catch user-pressed control-c (keyboardinterrupt), second will.

android - Input for onPrepareOptionsMenu -

i'm trying make app disables user going menu. know have override onprepareoptionsmenu(menu menu) have put input menu if want use function in different function? don't quite understand menu object , how many types has. do this: private menu moptionsmenu; @override public boolean oncreateoptionsmenu(final menu menu) { moptionsmenu = menu ... } private void updateoptionsmenu() { if (moptionsmenu != null) { onprepareoptionsmenu(moptionsmenu); } } and call updateoptionsmenu() function want

xml - Parsing complextype result in PHP -

i have following response soap server <result>vghpcybpcybub3qgdghlihjvym90ihlvdsbhcmugbg9va2luzybmb3i=</result> but don't know how parse result, supposedly there's information in there, wsdl document establish following: <s:element name="some_response"> <s:complextype> <s:sequence> <s:element minoccurs="0" maxoccurs="1" name="result"> <s:complextype mixed="true"> <s:sequence> <s:any/> </s:sequence> </s:complextype> </s:element> </s:sequence> </s:complextype> </s:element> is there way parse xml response object? i'm using simple_xml... parsing response. that result base64 encoded. echo base64_decode('vghpcybpcybub3qgdghlihjvym90ihlvdsbhcmugbg9va2luzybmb3i='); outpu