Posts

Showing posts from May, 2012

c - Exclude terminator when writing to file -

i'm receiving message through socket in c written buffer. message has terminator ( @@ ) added end know when stop writing buffer, however, buffer larger message. there way write , not including terminator, throwing away rest of buffer? maybe position pointer? char *pos; file* fp = fopen("tempfile", "w+"); pos = strstr(buffer, "@@"); pos = '\0'; // maybe stop writing null? fwrite(buffer, 1, buf_size /*too big*/, fp); fclose(fp); i need size of portion of buffer contains message, or maybe write file character. either way work. statement fwrite(buffer, 1, buf_size, fp) write buf_size bytes, regardless of actual content of buffer , regardless if contains '\0' considered "string termination". way tell fwrite correct number of elements write; , can calculated through pointer arithmetics: fwrite(buffer, 1, pos-buffer, fp) of course, you'll have check if pos != null , on; think straight forward.

android - How to Alias XML Arrays or Reference Them in Other Arrays? -

i have integer array set in values xml so: <integer-array name="nums"> <item>1</item> <item>2</item> <item>3</item> </integer-array> i want able reference/alias other arrays in values so: <integer-array name="@string/alias1">@integer-array/nums</integer-array> basically building hashmap inside xml. not programmatically within code itself. possible?

visual studio - C++ Using a single class in multiple other classes - Multiple definition error when compiling -

i downloaded library arduino communicate mcp23017 chip via i2c. goal use 1 class in various files have different functions, library of things chip. after building code run 7-segment multiplexed display, compiled fine , able load onto arduino. after writing class use second chip inputs only, started getting compile errors due multiple definitions of base class. i'm used coding in vb, not c++, having define classes pretty confusing, , not sure fix it. here error: (this snippet of error, since gist of section enough think. every routine in adafruit_mcp23017.cpp file has error.) adafruit_mcp23017.cpp.o (symbol plugin)*: in function adafruit_mcp23017::bitforpin(unsigned char) (.text+0x0)*: multiple definition of adafruit_mcp23017::readgpio(unsigned char) adafruit_mcp23017.cpp.o (symbol plugin)*: (.text+0x0): first defined here mainfile header: #include <arduino.h> #include <wire.h> #include <unistd.h> #include "sevensegmentdisplay_mcp23017.h" #

css - Accessibility of Hamburger Menu? -

i working on making responsive website accessible , wonder whether blind person opens page on smartphone able open hidden menu somehow, or if he/she "sees" anyway - read screen reader? my "hamburger menu" has structure this: <div class="menu-icon">click here open or close menu</div> <nav id="navigation" role="navigation" tabindex="0" > <ul> <li><a href="...">...</a></li> <li><a href="...">...</a></li> <li><a href="...">...</a></li> <li><a href="...">...</a></li> <li><a href="...">...</a></li> </ul> </nav> the related css follows (first general rules, media queries mobile): .menu-icon { display: none; } nav { display: block; } @media screen , (max-width: 850px) { .m

amazon web services - AWS with Fortigate - How to access two web servers in a DMZ? -

i'm trying configure fortigate-firewall in aws 2 web servers in dmz. according the below link, 1 can create port forwarding rule access dmz server (rdp in case). http://docs.fortinet.com/uploaded/files/2082/fortigate-aws-deployment.pdf but understand, if have 2 web servers need external ip external port same. i have tried configure 2 private ips & 2 elastic ips the network interface of firewall , add secondary ip external leg without success. what missing?

SQL query to exclude rows within same table with duplicate field values -

i'll try brief. i have single table need data from, contacts. there company field , can in either company or company b. all contacts in company b have duplicate in company a, can matched column legacyid . what i'm trying company rows not have in company b same legacyid . i've tried and legacyid not in (select legacyid contacts company = 'b') and not exists (select legacyid contacts company = 'b') . neither of above work because there 260,000 company contacts , 96,000 company b. not in , not exists worked when there less 50,000 rows total, data migration, query timing out or running forever. thanks if understand correctly, not exists should want: select c.* contacts c companyid = 'a' , not exists (select 1 contacts c2 c2.legacyid = c.legacyid , c2.companyid = 'b' ); for performance, want index on contacts(legacyid, companyid) .

Capabilities error after using selenium grid and Webdriver manager -

i have been using [webdriver manager][1] local executions, has been outstanding, right i'm trying use selenium grid , use same approach i'm getting errors related capabilities. the hub , node localhost, these details of implementation: i'm starting hub line: start cmd /k java -jar selenium-server-standalone-3.5.0.jar -role hub -port 4443 i'm starting node line start cmd /k java -jar selenium-server-standalone-3.5.0.jar -port 5556 -role node -hub http://localhost:4443/grid/register this configuration i'm using browsers, problem chrome, haven't tested other ones yet. public webdriver cbt(string browser, string methodname) throws exception{ webdriver driver; desiredcapabilities caps; //check if parameter passed testng 'firefox' if(browser.equalsignorecase("firefox")) { caps = desiredcapabilities.firefox(); caps.setcapability("platform", "win

php - Order mysql query by id but also by extra part -

i trying order db table champion name using id table , if id = champion id order. i tried not order seems miss place rows in order think query missing something. have tried asc , desc , still comes out buggy select plat_plus_champion_stats.* plat_plus_champion_stats, champion_data concat(plat_plus_champion_stats.champ_id, '.jpg') = champion_data.champion_sub_background order champion_data.champion the aim data table champion_data table id champion champion_sub_background ---|------------|-------------------------| 6 | janna | 80.jpg | 5 | karthus | 123.jpg | 7 | aatrox | 45.jpg | 1 | talon | 95.jpg | plat_plus_champion_stats table id champ_id ---|------------| 6 | 80 | 5 | 45 | 7 | 123 | 1 | 95 | the aim champ_id , compare champion_sub_background if both same number show c

php - Appending a div and article tag using jQuery or AJAX -

so code, , want append <article> tag data database display username , post, next entry should in next line. <div id ="test"> <article id="main"> <p><div id ="post"><?php //echo $row ['post']; ?></p></div> <p><?php $p= $row['post']; ?></p> <a href="http://www2.cs.uregina.ca/~khanna2g/public_html1/hashtagresult.php?hs=<?php echo $row['hashtag']; ?>"> <?php $hh=$row['hashtag']; if(strlen($hh)>14){ echo "#".$hh; } else{ echo ""; } ?> </a> <?php $sqlw = "select * a4_comment post ='$p'"; $result = mysqli_query($conn, $sqlw); while ($row = mysqli_fetch_assoc($result)) {?> <article class = "comment"> <?php echo $row['email']." :- ";

gnu parallel no dependency between jobs in each division -

assuming have following gnu parallel command: parallel --resume-failed --joblog test.log --jobs 2 -m -k sh ::: 1.sh 2.sh 3.sh the first cpu: 1.sh 2.sh the second cpu:3.sh right if 1.sh failed, code retry 1.sh. if 1.sh still failed, 2.ish won't executed well. wonder if there anyway run 2.sh first if 1.sh failed, , re-try 1.sh @ end again? thanks. i have feeling not want -m : $ parallel --dryrun --resume-failed --joblog test.log --jobs 2 -m -k sh ::: 1.sh 2.sh 3.sh sh 1.sh 2.sh sh 3.sh is want run? i.e. having 2.sh argument 1.sh . i reckon want run instead: $ parallel --joblog test.log --jobs 2 -k sh ::: 1.sh 2.sh 3.sh if of these fails, resume failed by: $ parallel --resume-failed --joblog test.log --jobs 2 -k sh ::: 1.sh 2.sh 3.sh

java - Are static Logger references still capable of Memory Leaks? -

i looking log strategies , found this article , talking dangers of static logger references. the official log4j2 documentation shows static logger pattern on it's examples, got me intrigued it: // define static logger variable references // logger instance named "myapp". private static final logger logger = logmanager.getlogger(myapp.class); i using log4j2 and wanted know if still problem, since article written in 2009.

Wordpress PHP/Web.Config Issues -

i have installed , been able use wordpress on server fine. use iis 8 , windows server 2012 r2. however, learning having problems how configured, found out because trying update max upload size. have no web.config, php.ini, .htaccess files need in order change it. most sites saying update , save permalinks , force creation when telling me “you should update web.config now”. tried manually create php.ini, .htaccess, , web.config files , placed them @ various levels individually test see if picking weren't. suggestions how proceed? i've been stuck on week , have ran out of pages of google click on. according this article, iis need create web.config file in root folder. article shows default code wordpress. try use code. regarding update max upload size , need edit php.ini file php installed in system. inside php.ini , locate upload_max_filesize option , set size 1 want. once change saved, restart server.

java - code runs but no output is generated -

trying improve skills @ coding. after running bellow code, receive build message. appreciated in advance. package javacourse; public class monopoly { public int diceroll(int sides){ double randomnum = math.random() * 6; randomnum = randomnum + 1; return (int) randomnum; } public int monopolyroll(){ int dice1 = diceroll(6); int dice2 = diceroll(6); int tot = dice1 + dice2; if(dice1 == dice2){ int dice3 = diceroll(6); int dice4 = diceroll(6); tot = tot + dice3 + dice4; } return tot; } public static void main(string[] args) { } } the code doesn't show because didn't anything, can in case execute print example using system.out.println function, can see in example bellow: also learning how code, important using indentation, code more easy read. package javacourse; public class monopoly { public int diceroll(int sides) {

How to build jnativehook on window 10 -

i using jnativehook on program. edit source code little , works on mac. when executed on window, got error. 8월 18, 2017 10:47:48 오전 org.jnativehook.defaultlibrarylocator getlibraries 심각: unable extract nativelibrary /org/jnativehook/lib/windows/x86_64/jnativehook.dll! java.lang.reflect.invocationtargetexception @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ com.sun.javafx.application.launcherimpl.launchapplicationwithargs(launcherimpl.java:389) @ com.sun.javafx.application.launcherimpl.launchapplication(launcherimpl.java:328) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ sun.launcher.launche

c# - WCF service HttpResponseMessage type not able to be consumed -

i have question on webservice method not being able consume, httpresponsemessage type. works fine if other type. need pull data linq , return client, however, data return has backslashes on datatime type data, have find ways return pure json data. referring example: [ returning raw json (string) in wcf below implementation method retrieve data used in wcf. public httpresponsemessage get(long userid,int maxrownum,int folderid,string shortname=null,datetime reportdatefrom=default(datetime),datetime reportdateto = default(datetime), string reportperiod=null,string filename=null, datetime committimefrom = default(datetime), datetime committimeto = default(datetime),string id=null) { //some methods pull data using linq server //i serialised data, put them list before sending them response object, need return pure json format data. httpresponsemessage response = new httpresponsemessage(); string jsonclient = newtonsoft.json.jsonconvert.ser

angular ui grid - How to bring a link or anchor tag in Json? -

an example populating angular ui grid json data , working fine plnkr.co/edit/xbvc4094ciu6ogdzxzx7?p=preview however not sure how have download link or link external source in 1 of column in json. example, download link <a href....>download link</a> in datatables, supports how provide same in angular ui grid via json data. thanks. use cell template celltemplate generate column hyperlink, , {{row.entity.link}} fetch link json property ( link property name in sample json). sample below. columndefs: [{ name: 'firstname' }, { name: 'lastname' }, { name: 'job' }, { name: 'hyperlink', celltemplate: '<div>' + ' <a href="{{row.entity.link}}">click me</a>' + '</div>' }], data: [{ "firstname": "sonny", "lastname": "jayet",

arrays - Why is the output by PHP natsort() function wrong in the following situation? -

i reading natsort() on php manual. show examples headline "natsort() examples demonstrating potential gotchas". think means out of natsort() different in these examples supposed be. here code: <?php echo "negative numbers\n"; $negative = array('-5','3','-2','0','-1000','9','1'); natsort($negative); print_r($negative); echo "zero padding\n"; $zeros = array('09', '8', '10', '009', '011', '0'); natsort($zeros); print_r($zeros); ?> the output in first case is: array ( [2] => -2 [0] => -5 [4] => -1000 [3] => 0 [6] => 1 [1] => 3 [5] => 9 ) i understand wrong because negative number not sorted smaller bigger. here output of second example: array ( [5] => 0 [1] => 8 [0] => 09 [3] => 009 [2] => 10 [4] => 011 ) what output supposed in case? me, seemed right order. numbers

angular - Show an array with ngFor separated by type -

i trying show array using *ngfor can not figure out how show in way want. example, next array: [bmw, apple, mercedes, lg, banana, iphone] is array of objects use pipe filter array type property , in case have car type , food type , mobile type . array ordered be: [bmw, mercedes, apple, banana, iphone, lg] well, problem want show in way: cars: -bmw -mercedes food -apple -banana mobile -iphone -lg using template: <div *ngfor="let item of items | orderpipe" > <div *nfif="item.type == 'car'> <h3>cars</h3> {{ item.name }} </div> </div> but is: cars -bmw cars -mercedes food -apple food -banana mobile -iphone mobile -lg if array ordered type showed, add an *ngif around header: <div *ngfor="let item of items | orderpipe; let i=index"" > <h3 *ngif="i==0 || items[i-1].type!=items[i].type">{{item.type}}</h3> {{ item

c++ - MFC - Remove leading zeros for CEdit number control -

i find cedit control has option 'number' in property, can prevent user enter non-digit character textbox - cedit number control now. if there option 'number', think maybe there way remove leading zeros cedit simple option 'number'. i have tried dialog data exchange hope remove leading zeros me automatically, won't. then think way add en_killfocus message each of cedit number controls, find exhausted. so think better way add en_killfocus, cedit number controls lose focus event point 1 function, in function i'll remove leading 0 'current' control, in c# can 'current' control, in c++ don't know if it's supported. or inherit cedit make ceditnum - implement lose focus remove leading zeros feature, solution, can't design on visual studio design window (i think). hope there solution similar this solution (which solution draw&drop problem) anyway, before apply final solution (en_killfocus), want make sure if there

php - Can I save created paypal plan and use them for billing agreement -

i'm integrating paypal php sdk system. when try create new billing agreement, i create new plan i active plan created i create new agreement , set plan , payer agreement after user has confirmed payment, execute token received , apicontext. the problem is, not want create new plan each time. because have 4 subscription, example, $5, $10, $20, $50 infinite payment monthly. can create them once, , save plan id in config file, , use id each time create new agreement user. there gonna potential problem? can stripe, paypal doc not clear. help.

How to view ArcGIS layer legend in Android? -

Image
i have 3 layers (drainage, bridge , slope) in arcgis feature server. android app view each layer on arcgismap , , set layer visibility based on checkbox tick. using arcgis runtime sdk android (version 100.1). my question is, possible view layers' legend feature server layers dialog ? means replace 3 cute icons. android app (layers dialog in middle) feature server (layers' legend on left) thank in advance! update thanks falldownhill 's suggestion use create swatch ! working code // loop each layer (int x=0; x<featurelayer.length; x++) { try { // try each layer legend final listenablefuture<list<legendinfo>> layerlegend = featurelayer[x].fetchlegendinfosasync(); final int finalx = x; layerlegend.adddonelistener(new runnable() { @override public void run() { try { // each layer legend

php - SQL get nearest date record -

this sample data: booking_id name start_date 1 abc 1/1/2018 2 efg 5/2/2018 3 pqr 16/1/2018 4 xyz 19/2/2018 i want in order nearest today date on top , past date in last you need sort desc function on column start_date . below query produce desired result. select * table1 order start_date desc; you can check sqlfiddle demo here if dates in future, have use asc desired result. select * table1 order start_date asc; if dates mix of past , future dates below sample data. id name start_date --------------------- 1 abc 2018-01-01 2 efg 2018-02-05 3 pqr 2018-01-16 4 xyz 2018-02-19 1 abc 2017-01-01 2 efg 2017-02-05 3 pqr 2017-01-16 4 xyz 2017-02-19 below query can option show data in more friendly format. select * ( select * table1 start_date < current_date order start_date desc ) b union select 0,'today_date', current_date union select * ( select * tabl

blockchain - How to add peers after Hyperledger Fabric is launched -

i add peers, after hyperledger fabric network got up. learned this site configtxlator tool can it. possible tool? kindly let me know if there alternative method add peer without using configtxlator tool. the configtxlator can update configuration of channel. can used adding new organizations. in order add new peers existing organization need generate new certificates peers , sign them using key of root ca certs f existing organizations - configtxlator won't in aspect.

ios - Update ParseInstallation Cached -

is there way update parse installation cached or on disk? i can't seem assign new parse installation, cloud code, current installation on device. i'm sort of manually changing parseinstallation via cloud code. note: fetchinbackground doesn't work. , wanted updated version server.

c# - CefSharp not loading a URL? -

as can see below code trying start browser visiting example.com changing url facebook.com. issue browser wont change url's. loads example.com , remainds on example.com, can me this? public partial class form1 : form { private chromiumwebbrowser browser; public form1() { initializecomponent(); cefsettings settings = new cefsettings(); cef.initialize(settings); browser = new chromiumwebbrowser("example.com"); browser.isbrowserinitializedchanged += onisbrowserinitializedchanged; this.controls.add(browser); browser.dock = dockstyle.fill; browser.bringtofront(); } private void form1_load(object sender, eventargs e) { } private void onisbrowserinitializedchanged(object sender, isbrowserinitializedchangedeventargs args) { if (args.isbrowserinitialized) { browser.getbrowser().mainframe.loadurl("http://facebook.com"); }

javascript - react native blog feed view -

i'm creating react native app , on it's first page(home page) show content of blog feeds , on clicking read more show detailed view of blog feed on next page. so, question how ? here output: output image so on clicking read more button should open detailed view of blog feed , question how in react native? here code: import react, { component } 'react'; import { activityindicator, listview, text, stylesheet, view, touchableopacity } 'react-native'; import {actions, router, scene} 'react-native-router-flux'; import timeago 'react-native-timeago'; import { card, carditem, content, header, body, footer, footertab, container, left, icon, right } 'native-base'; import {getimage,contentsnippet} './helpers/helpers'; import htmlview 'react-native-htmlview'; import fitimage 'react-native-fit-image'; export default class home extends component { constructor(props) { super(p

linux - test if all files in directory have correct permissions -

how can test if files in directory have correct permissions ? using command stat --format %a /home/user/dir/* can permissions of files in directory in multi line string. let's want check if files have permissions 0700. i use if [ "$(stat --format %a ~/file)" != 600 ]; chmod 0600 ~/file; fi single file, how can test multiple files ? could try this? for in ~/your_dir/*/* if [ "$(stat --format %a $i)" != 600 ]; chmod 0600 $i fi done

java - Android Multiple Permissions Error -

i have method should check if permission need have granted or not : public boolean checkcamera(){ string[] permissions= new string[]{ manifest.permission.write_external_storage, manifest.permission.camera}; int result; list<string> listpermissionsneeded = new arraylist<>(); (string p:permissions) { result = contextcompat.checkselfpermission(getapplicationcontext(),p); if (result != packagemanager.permission_granted) { listpermissionsneeded.add(p); } } if (!listpermissionsneeded.isempty()) { activitycompat.requestpermissions(this, listpermissionsneeded.toarray(new string[listpermissionsneeded.size()]),multiple_permissions ); return false; } return true; } if not, request these permissions. problem is, if denied 1 of them pass valid permission. private void requestpermissioncamera(){ if(checkcamera()){ values.put(mediastore.images.media.title, &qu

webgl - Calculating color values in vertex shader? -

so i'm using noise functions create procedural terrain. how understand it, can use noise function takes in 2d vector , returns float. can interpret float "height" of point in space. can interpret float color corresponding fragment. result, end mountains white on top , black on bottom. right now, i'm doing same calculation in vertex , fragment shaders same value: vertex shader: uniform sampler2d texture; uniform float time; uniform float speed; varying vec3 pos; varying vec2 vuv; float random (in vec2 st) { return fract(sin(dot(st.xy, vec2(12.9898,78.233)))* 43758.5453123); } // based on morgan mcguire @morgan3d // https://www.shadertoy.com/view/4ds3wd float noise (in vec2 st) { vec2 = floor(st); vec2 f = fract(st); // 4 corners in 2d of tile float = random(i); float b = random(i + vec2(1.0, 0.0)); float c = random(i + vec2(0.0, 1.0)); float d = random(i + vec2(1.0, 1.0)); vec2 u = f

PHP Image Intervention Library not working with image path passed from bash script -

i using call php-cli in bash script like php /var/www/scripts/php_script.php "$output" where $output bash variable. argument of $output variable $argv[1] in php script. $path = $argv[1]; i did way: $path = "/path/to/some/images.png"; i using php intervention image library create instance of image file path $path. $image = image::make($path); the second way string assigned works there no output or error when using first approach. code flow exits @ line. tried var_dump($path) . both of approaches give same result. difference in using these 2 approaches?

HTML5 record moderate video quality for upload to be playable by Safari -

i creating web-based mobile app should possible upload video-recordings. there 2 ways achieve this: use input: <input type="file" name="video" accept="video/*" capture></input> use rtc mediarecorder: var recordedblobs = []; function handledataavailable(event) { if (event.data && event.data.size > 0) { recordedblobs.push(event.data); } } var options = { mimetype: 'video/webm', audiobitspersecond : 128000, videobitspersecond : 2500000 } mediarecorder = new mediarecorder(window.stream, options); mediarecorder.ondataavailable = handledataavailable; mediarecorder.start(10); while first option works main problem uses build-in mobile camera application leaving no control on quality, again leads potentially large files (especially on android) second version gives full control on quality , lets os create moderate file sizes size-wise acceptable content in application. ios/safari not supp

web services - “Connection closed by peer” error occurs in Android 7.0 Nougat while calling SOAP webservice using KSOAP2 -

i getting javax.net.ssl.sslhandshakeexception: connection closed peer while calling soap webservice using ksoap2 (ksoap2_android_2.6.4) in android 7.0 nougat. have refereed below questions “connection closed peer” error occurs in android 7.0 nougat while connecting sha256 ca installed windows 2003 server sp2 through https android 7.0 : 'javax.net.ssl.sslhandshakeexception: connection closed peer below code calling webservice usiong ksoap public class validateuserasynctask extends asynctask<string, integer, void> { progressdialog dialog = new progressdialog(loginactivity.this); string tempaction = ""; @override protected void onpreexecute() { dialog.setmessage("validating user..."); dialog.setcancelable(true); dialog.show(); super.onpreexecute(); } @override protected void doinbackground(string... strings) { try { if (splashscreenactivity.checknetworkconn

datetime - Find objects between two dates MongoDB -

i've been playing around storing tweets inside mongodb, each object looks this: { "_id" : objectid("4c02c58de500fe1be1000005"), "contributors" : null, "text" : "hello world", "user" : { "following" : null, "followers_count" : 5, "utc_offset" : null, "location" : "", "profile_text_color" : "000000", "friends_count" : 11, "profile_link_color" : "0000ff", "verified" : false, "protected" : false, "url" : null, "contributors_enabled" : false, "created_at" : "sun may 30 18:47:06 +0000 2010", "geo_enabled" : false, "profile_sidebar_border_color" : "87bc44", "statuses_count" : 13, "favourites_count" : 0, "description" : "", &quo

ios - How to update Battery Level in BLE Device with CoreBluetooth in Swift? -

func peripheral(_ peripheral: cbperipheral, diddiscovercharacteristicsfor service: cbservice, error: error?) { c in service.characteristics!{ print("---characteristic found uuid: \(c.uuid) \n") let uuid = cbuuid(string: "2a19")//battery level if c.uuid == uuid{ //peripheral.setnotifyvalue(true, for: c)//battery level peripheral.readvalue(for: c) } } } } func peripheral(_ peripheral: cbperipheral, didupdatevaluefor characteristic: cbcharacteristic, error: error?) { /* battery level */ if (characteristic.uuid == cbuuid(string: "2a19")) && (characteristic.value != nil){ let value = characteristic.value let valueuint8 = [uint8](value!) print("\(valueuint8)") print("\(valueuint8[0])") let batterylevel: int32 = int32(bitpattern: uint32(valueuint8[0])) print("\(batterylevel)

xml - How to use NestedScrollView into CollapsingToolbarLayout on Android -

in application should use nestedscrollview collapsingtoolbarlayout . in nestedscrollview show many views , data not scrolled in nestedscrollview , not show of views! my xml codes: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/celebritydetail_root" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/white" android:fitssystemwindows="true"> <app.test.com.utils.componenets.controllableappbarlayout android:id="@+id/celebritydetail_appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:color/white"