Posts

Showing posts from September, 2012

sql - How to generate 5 digit increment number based on Zone? -

out put : if north "n00001 n00002 if south "s00001 s00002 here tried code declare @zone varchar(20),@zoneid int,@id varchar(10) set @zone = 's' select @zoneid = cast(isnull(max(cast(replace(idno,@zone,'') numeric))+1,'00000') varchar) memberprofiles left(idno,1) = @zone set @id = @zone+cast(@zoneid varchar) select @id but every time getting "s1" need "s00001" how can generate zone wise number generation this question "closed duplicate" candidate. but, there several flaws, think it's worth answer: in database seem have column "idno" leading character marking zone. if true, should - if ever possible - change design. number , zone mark should reside in 2 columns. combination of them presentation issue your left(idno,1) perform badly (read "sargability"). if there

java - How to specify different background colors for alternative rows programatically with JasperReports API -

i creating jasperreports xls report java code (without using .jrxml). i need set different background colors alternative rows in detail section. how can it? use style-definition @ beginning of report: <style name="datacellstyle" mode="opaque" border="none"> <conditionalstyle> <conditionexpression> <![cdata[new boolean($v{report_count}.intvalue() % 2 == 0)]]> </conditionexpression> <style mode="opaque" backcolor="#e0e0e0" /> </conditionalstyle> </style> ...and use style data-cells: <detail> <band height="15"> <textfield> <reportelement x="0" y="0" width="150" height="15" style="datacellstyle"/> <textfieldexpression class="java.lang.string"> <!-- --> </textfieldexpression> </textfield> </b

android - Sqlite query using where condition having more than one condition to satisfy -

please find wrong here here _id , chek column of db write query search has id =id , check =number public cursor query(int id){ return mydatabase.query("question", null,"_id = "+id+ "and " + "chek ="+number,null, null, null, null); } may you: replace query these lines.. public cursor query(int id){ return mydatabase.query("question", null,"_id = "+id+ " , " + "chek ="+number,null, null, null, null); keep space between double quotes in , : " , " otherwise string example: _id=3and check =9

hibernate - INSERT stmt in HQL -

i new hql, want insert data directly database using insert stmt. when using following code: companymaster model name( companymaster.java ) public void insertcompanydata(companymaster company) { logger.info("entering insertcompanydata"); session session = null; try{ session = getsession(); string hql = "insert companymaster (compname,description,status) select (company.getcompname(),company.getdescription(),company.getstatus())"; //string hql = "insert companymaster company(compname,description,status) values (company.getcompname(),company.getdescription(),company.getstatus())"; query query = session.createquery(hql); //query.setstring("groupid", groupid); query.executeupdate(); } finally{ releasesession(session); } logger.info("exiting insertcompanydata"); } i getting error this 2013-07-23 09:34:53 info [http-8080-2] companydaoimpl.java:157 -

python - In flask how do i call data from another function/route in another view as explained below -

the following 3 links not explaining want achieve in layman's terms how call 1 flask view one? get json 1 view calling view call route within route in flask i have following code @app.route('/rate_isp_service', methods=['get', 'post']) @login_required def rate_isp_service(): isp_query = db.session.query(isps) isp_entries = [dict (isp_id=isp.isp_id, isp_name=isp.isp_name, isp_description=isp.isp_description) isp in isp_query] services_query = db.session.query(services) services_entries = [dict (service_id=service.service_id, service_name=service.service_name, service_catergory_id=service.service_catergory_id) service in services_query] ratings_query = db.session.query(ratings) ratings_entries = [dict (ratings_id=rating.ratings_id, rating_value=rating.rating_value, rating_comment=rating.rating_comment) rating in

What is the exact meaning of Git Bash? -

git bash i have been working git bash last 2 days. know basic operations such commit , push , pull , fetch , , merge . still don't know git bash itself is! i've searched lot git bash, sites have seen focus on functionality of commands. still haven't found answer question. now, think, i'm in right place answer! git bash shell where: the running process sh.exe (packaged msysgit , share/wingit/git bash.vbs ) git known command $home defined see " fix msysgit portable $home location ": on windows 64: c:\windows\syswow64\cmd.exe /c ""c:\prog\git\1.7.1\bin\sh.exe" --login -i" this differs git-cmd.bat , provides git commands in plain dos command prompt. a tool github windows (g4w) provides different shell git (including powershell one) update april 2015 : note: git bash in msysgit/git windows 1.9.5 old one: gnu bash, version 3.1.20(4)-release (i686-pc-msys) copyright (c) 2005 free software foundation,

javascript - Why can't observe document.write on document.body using MutationObserver API? -

Image
i failed observe document.write on document.body . here code: <script> var observedom = (function(){ var mutationobserver = window.mutationobserver || window.webkitmutationobserver, eventlistenersupported = window.addeventlistener; return function(obj, callback){ if( mutationobserver ){ // define new observer var obs = new mutationobserver(function(mutations, observer){ if( mutations[0].addednodes.length || mutations[0].removednodes.length ) callback(); }); // have observer observe foo changes in children obs.observe( obj, { childlist:true, subtree:true }); } else if( eventlistenersupported ){ obj.addeventlistener('domnodeinserted', callback, false); obj.addeventlistener('domnoderemoved', callback, false); } } })(); window.onload = function() { //console.log("dom ready");

How can I take immediate payment plus recurring via PayPal? -

Image
i'm using express checkout, , set scenario follows: $10 charged right now a monthly payment of $15 set up so if today day 0, on day 0 they'd billed $10, on day 1, they'd billed $15, , on day 61 they'd billed $15 again (and on). i'm doing using trialamt , trialtotalbillingcycles , trialbillingperiod , trialbillingfrequency parameters. sets payments profile in screenshot: as can see, set on may 6th. no money has been taken out, not initial amount there, , says next payment due may 6th, , profile start date too. there gigantic delay on sandbox? it's been 3 days now. alternatively there way this? make standard express checkout payment today amount , use profilestartdate start tomorrow. however, believe if set future date using profilestartdate , profile marked 'suspended' , nor customer can cancel until it's activated. there appear delay, on sandbox, of several days. makes testing difficult sometimes. alternative might use

postgresql - Enterprise Architect generate SQL without quotes in table name -

i've created database diagram in ea (12.0.1210) , need generate sql script create postgresql database schema. noticed table name in double quotes ( create table "term" ) , therefore case sensitive. is there way how generate sql script without double quotes in table name ? choose package/database engineering/edit ddl templates choose postgres db dropdown select ddl create table macro remove , "include_surround" part on line 9 this ea proprietary language awkward, polite.

objective c - How to clear all object on NSView in Cocoa -

i want clear objects added nsview before call function. how can that? i use following function -(void)clearallsubviewsofview :(nsview *)parent { (nsview *subview in [parent subviews]) { [subview removefromsuperview]; } }

javascript - Redux: Why not put actions and reducer in same file? -

i'm creating app redux , scratching head why best place actions , reducers in separate files. @ least, that's impression i'm getting examples. each action, or action creator , appears map single function called reducer (inside switch statement). wouldn't logical keep these in same file? makes using same constant action type , switch case easier, doesn't have exported/imported between files. from redux creator dan abramov: many reducers may handle 1 action. 1 reducer may handle many actions. putting them negates many benefits of how flux , redux application scale. leads code bloat , unnecessary coupling. lose flexibility of reacting same action different places, , action creators start act “setters”, coupled specific state shape, coupling components well. from redux docs : we suggest write independent small reducer functions each responsible updates specific slice of state. call pattern “reducer composition”. given action h

MySQL if string contains ' symbol how to search in LIKE -

how can search name database if string contains ' symbol? this query trying search, unable search this. select * distributor name like'%jeni'%' how search text if string contains ' symbol? you should escape (like in pretty every situation this) select * distributor name like'%jeni\'%' you can find more here

cmake - generate CMakeList.text for OS X -

i'm trying create plugin obs using c, , compiling using cmake .. && make see - https://github.com/jp9000/obs-studio/wiki/install-instructions#mac-osx when running cmake .. && make cmd gives me error cmake: command not found , when run program gives me error - cmake error: source directory "/users/gerwin/desktop/soobs" not appear contain cmakelist.text specify --help usage, or press button on cmake gui how can generate cmakelist.text compile soobs script .so file? one problem cmake not in path. so, if type cmake command line cannot found. other problem not specifying correctly source directory: have specify source directory location of main/root cmakelists.txt . so, proceed follow: locate cmake executable, obtaining <full path cmake> open shell go source directory (location of main/root of obs-studio cmakelists.txt ) mkdir build cd build <full path cmake> .. the first argument .. source directory, location of mai

how to find self intersection in a polygon using boost/? -

i need find self intersections in polygon. know boost has ability. can't figure out how use turn_info information intersections. segments intersected , etc. can help? thanks you cannot, properly, because concepts defined boost geometry dis-allow self intersections. however, indirectly can use validation features (new since think 1.59) information self intersection: std::string reason; poly p; bg::read_wkt("polygon((0 0, 0 4, 2 4, 2 2, 6 2, 6 6, 2 6, 2 4, 0 4, 0 8, 8 8, 8 0, 0 0))", expected); bool ok = bg::is_valid(p, reason); std::cout << "expected: " << bg::dsv(p) << (ok?" valid":" invalid: '" + reason + "'") << "\n"; prints: expected: (((0, 0), (0, 4), (2, 4), (2, 2), (6, 2), (6, 6), (2, 6), (2, 4), (0, 4), (0, 8), (8, 8), (8, 0), (0, 0))) invalid: 'geometry has invalid self-intersections. self-intersection point found @ (0, 4); method: t; operations: x/u; seg

java - PDFbox arabic textnot show retrieve from database mysql -

i want display pdf report in arabic generated through mysql database. here code: protected void doget(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception { // todo auto-generated method stub string relativewebpath = "/font/a_nefel_adeti.ttf"; string absolutediskpath = getservletcontext().getrealpath(relativewebpath); file file = new file(absolutediskpath); system.out.print(file); bytearrayoutputstream output=new bytearrayoutputstream(); pddocument document=new pddocument(); pdfont font = pdtruetypefont.load(document, new file(absolutediskpath),new winansiencoding()); pdpage test=new pdpage(); document.addpage(test); pdpagecontentstream content=new pdpagecontentstream(document, test); final string example = "نديم"; system.out.print(example); try{ con=dbutility.getconnection(); stmt=con.preparestatement("select * login"); rs=stmt.executequery(); while(rs.next())

objective c - Google Interactive Media Ads for tvOS -

i using google interactive media ads in ios application. it's working , want use them in tvos application. when add code google interactive media ads getting these issues: terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[nsconcretenotification imamessage]: unrecognized selector sent instance 0x7fe4d9e0cb20' and using code playing ad: - (void)requestadspre:(nsstring *)url { self.adplayerlayer = nil; //[self.contentplayer.view removefromsuperview]; [self setupadsloader]; [self setupaddisplaycontainer]; // create ad request our ad tag, display container, , optional user context. imaadsrequest *request = [[imaadsrequest alloc] initwithadtagurl:url addisplaycontainer:self.addisplaycontainer usercontext:nil]; [self.adsloader requestadswithrequest:request]; } #pragma mark sdk setup - (void)setupadsloader { self.adsloader = [[imaad

jquery - How find new element on page after ajax response -

i have problem find current html elements after - ajax response , deleted them page. here jquery code send post , delete element page. after refresh want find element stay in page - dont know why got elements - use callback function. function removeproduct(callback) { var recordchosen = $(this); var recordtodelete = recordchosen.attr("data-id"); if (recordtodelete != '') { // send post request ajax $.post("/cart/removefromcart", { "albumid": recordtodelete }, function (response) { // success $('#productcart-' + response.prodid).fadeout('slow', function () { if (response.productscart == 0) { $("#cartempty").removeclass("hidden"); } callb

algorithm - How to find closed loop more efficiently -

i have following data structures , algorithms question i've been trying think better solution - given $x longitude , $y latitude and following characters '>' east $x++ ; '<' west $x-- ; '^' north $y++ ; 'v' south $y-- ; and sample input string "^v<>><^>v<>^<^>^>>v>><^^<>><<<><<><^<^v<^^v<<>><<<<^>v^>v^v^<<>>v<><^<>><>>^><>v^v>v<<>v<>v^^><<>>>v<<>>>>^>v>>” write function identifies closed loops (some samples given below examples of closed loop) [ “^v”, “<>”, “><“, “^>v<“, ... ] i have been able solve in o(n^2) picking each character input given , going through entire string , keeping 2 count variables - 1 vertical count , horizontal count, @ point value on both 0 it

javascript - JSON to EDI format converter -

i found lot of javascript libraries parse edi files in javascript, example: https://www.npmjs.com/package/edipsy https://www.npmjs.com/package/edi https://www.npmjs.com/package/edifact but can't find library converting json or csv files edi. google, or stackoverflow returns edi json answers. wrong format, find working solutions? try bots ( http://bots.sourceforge.net ). not 'library'. handles json, x12 , edifact. not expect find decent 'library', x12 , edifact not suited 'libraries'.

wxwidgets - how to stop growing width of window when child sizers width increased in wx.Dialog in wxpython -

Image
i new wxpython , wxwidgets.i have code wx.dialog below. def __init__(self, parent, name, platform): wx.dialog.__init__(self, parent, -1, 'launch dialog', size=(-1,-1), pos=(-1,-1)) ###some code self.createsizers() self.fit() def createsizers() self.mainsizer = wx.boxsizer(wx.vertical) selectionsizer = wx.staticboxsizer(self.staticboxtestselection, wx.vertical) self.horzdetailssizer = wx.boxsizer(wx.horizontal) self.detailssizer = wx.boxsizer(wx.vertical) ### add func here self.listingsizer = wx.boxsizer(wx.vertical) ### add func here # horizontal splitter self.horzdetailssizer.add(self.listingsizer, 3, wx.expand) self.horzdetailssizer.addspacer(5) self.horzdetailssizer.add(self.detailssizer, 2, wx.expand) # add subsizers main selectionsizer.add(self.horzdetailssizer, 1, wx.expand | wx.all, 5) self.mainsizer.add(selectionsizer, 0, wx.expand | wx.left | wx.right, 5) ### initialize mainsi

ios - Should I check user auth ( user name , password, device token) in webservice every time when my mobile application is launch? -

should check user auth ( user name , password, device token) in webservice every time when mobile application launch? i developing ios application need user login username , password ( first time of application launch). after user information save in app local data , user no need key in username , password again. my idea check if user still active-user calling web service whenever application launch. my question , necessary check whenever app launch .? and there design pattern control user auth ios app.? generally, should not store username , password locally, if must, store in ios keychain , not in local app db. (if not familiar keychain follow this tutorial ) to able 'not' save username , password in app, need implement authentication mechanism (like oauth 2 : check tutorial ) handles authentication via web view , needs client use authorized token. to refresh token, need 'refresh token' api can check if token valid , if expired can prompt user

reactjs - React onChange event doesnt return object -

i'm setting simple signup form react , using onchange handler update state. event argument caught onchange handler string , not object . therefore i'm unable access event.target.value or event event.target event yields typed keywords this relevant snippet. class signup extends component{ constructor(props){ super(props); this.state = { username:'', password:'' } this.handlechange = this.handlechange.bind(this) } handlechange(event){ this.setstate({...this.state,[event.target.name]:event.target.value}) } render(){ const signup = this.props.signup; return( <form> <card classname={style.signupcard}> <cardtitle title="sign up" /> <cardactions> <input type="text" label="username" value={this.state.username} placeholder="pick username" maxlength={16} onchange={this.handlechange}

hosting - How to host in 5gbfree? -

i have domain registered godaddy , free hosting in 5gbfree, installed wordpress in , don't know how map domain hosting. can please help. according knowledge-base article here , 5gbfree has following default nameservers. ns1.5gbfree.com ns2.5gbfree.com just login godaddy domain control panel , set above nameservers. here's tutorial should follow. https://www.godaddy.com/help/set-custom-nameservers-for-domains-registered-with-us-12317

jquery - JQGrid Displaying Server Errors -

Image
i have tried several solutions found here , elsewhere on web still can't server sent errors display on jqgrid edit form. have put breakpoints in aftersubmit method of jqgrid it's never hit. have simplified show alert if method executed nothing working. end stacktrace displayed header of edit form. did miss? jqgrid code <script type="text/javascript" language="javascript"> $(document).ready(function() { $("#jqgrid1").jqgrid({ url: '@url.action("getdata", "invoicetype")', editurl: '@url.action("editdata", "invoicetype")', mtype: "get", datatype: "json", page: 1, colmodel: [ { editable: true, editoptions: { readonly: "readonly" }, key: true, width: 60, label: "id", name: "id", hidden: false }, { editable: true, width: 2

How to get contents of a sub directory in a Gitlab repository using Gitlab API (with PHP curl) -

i trying list of repository contents using gitlab api repository subdirectory. because top level access working fine, i'm assuming issue not authorization or general approach, url , parameters being passed subdirectory. or perhaps documented unimplemented feature of gitlab api. for example, using php , curl get, following url works top level list of files , folders: the api doc says: get /projects/:id/repository/tree and url works ok curl function: https://gitlab.com/api/v3/projects/username%2fprojectname/repository/tree (the username%2fprojectname %2f found in gitlab thread. appears docs mean id) for clarifcation, snipppet of working code top level list of contents is: $url = "https://gitlab.com/api/v3/projects/username%2fprojectname/repository/tree"; $ch = curl_init($url); so sub directory access, api docs list paramters: id (required) - id of project path (optional) - path inside repository. used contend of subdirectories ref_name

time - Is there a global variable in Java for the length of day? -

i don't want write 24 * 60 * 60 * 1000 in code instead use more readable static day variable. i know can myself define variable writing private static final long day = 24*60*60*1000; however seems me basic function. covered in standard library somewhere? you try duration api of java.time package in java 8 java.time.duration.ofdays(1).getseconds() . just store in public static field: public static final long seconds_in_day = duration.ofdays(1).getseconds() your method of interest ofdays(long) method: obtains duration representing number of standard 24 hour days. seconds calculated based on standard definition of day, each day 86400 seconds implies 24 hour day. nanosecond in second field set zero. parameters: days - number of days, positive or negative returns: duration, not null throws: arithmeticexception - if input days exceeds capacity of duration follow call getseconds() method on same duration api: gets number

javascript - Need an alert on first log in -

i have requirement show alert box when user logs in first time. i used localstorage method below: var visited = localstorage.getitem('visited'); if (!visited) { alert("please view firefox" + visited); } however, seems working, doesnot work on every login, works when page visited first time. please let me know if there way it. please note, using javascript functionality done. thanks, ark

Why is Swift's fatalError's argument an @autoclosure? -

i poking around swift find out fatalerror has signature: @noreturn public func fatalerror(@autoclosure message: () -> string = default, file: staticstring = #file, line: uint = #line) any specific reason why function defined way? wrong : @noreturn public func fatalerror(message:string = default, file: staticstring = #file, line: uint = #line) { //termination code } note understand how @autoclosure works, , question not usage; use-cases such pattern used. it used optionally evaluate statement reduce overhead. for code fatalerror("\(someexpansivecomputation())") if function defined normal parameter passing, someexpansivecomputation() called, in production build. however @autoclosure , implementation of fatalerror can choose not call closure, avoid overhead of calling someexpansivecomputation() a possible implementation can be @noreturn public func fatalerror(message:string = default, file: staticstring = #file, line: uint = #line) {

Can people be in several organizations in github? -

i've never seen this, people may belong several organizations (i do). i can send request included in 1 of them (so far i'm in none), wouldn't prevent me joining other organizations , wouldn't future inclusion in organization pulling me out of current 1 (as if update of current situation or similar). therefore decided ask before messing things up, knows i'm in organizations am, wouldn't mess things , piss people up. thank you. yes, can part of more 1 organization on github. in settings organizations , can see organizations you're part of, , create own. if you're invited organization, you'll e-mail notification. each organization has it's own dashboard, , can switch between them. read more here .

.net - How to snoop a tooltip using Snoop? -

is there trick snooping tooltip? since disappears mouse gets on there no chance ctrl+shift+click. if can change code, can write simple code prevents tooltip close, , can snoop it. take this: forcing wpf tooltip stay on screen

node.js - Angular 2 http request is giving pending/cancelled status on new system -

i'm sending http request following this.http.post('/api/login', body) .subscribe( response => { ... }, error=> { ... }); but in new systems gives pending after gots cancelled sometimes. after loading 1 time never happens on system again , works fine. i'm redirecting client routes index.html. follows: app.get(['/', '/login', '/dashboard'],function(req, res, next){ res.sendfile(path.join(__dirname,'/../public/index.html')); }); where '/', '/login', '/dashboard' routes @ client end. follows: @routeconfig([ { path: '/', redirectto: ['/dashboard'] }, { path: '/login', component: login, as: 'login' }, { path: '/dashboard', component: dashboard, as: 'dashboard' } ])

mime types - java mail logs html template to catalina.out -

i using velocity generate html template based content email sent, , java mail api spring's mimemessagehelper send emails. problem facing while rendering, html template thrown catalina.out making file grow in size , not desirable. i have separate application log file logs generated. there way can redirect rendering application log file? or may can stop thrown @ catalina.out . below details gets written while sending email loading javamail.default.providers jar:file:/d:/workspace/emailservice/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/email-service/web-inf/lib/mail-1.4.jar!/meta-inf/javamail.default.providers debug: loading new provider protocol=imap, classname=com.sun.mail.imap.imapstore, vendor=sun microsystems, inc, version=null debug: loading new provider protocol=imaps, classname=com.sun.mail.imap.imapsslstore, vendor=sun microsystems, inc, version=null debug: loading new provider protocol=smtp, classname=com.sun.mail.smtp.smtptransport, vendor=s

bash - An awk script to run over different files -

i have wrote script: looking.awk searches particular data in file: {if ($0 ~ "neighbors of non-equivalent atoms") {flag=1}}; # if current line of file begins string, asign flag=1 {if (flag==1) {if ($0 ~ $1==1 && $2=="ca" && $6==14 && $7=="o"){line=$0; exit} } }; # here searching "1 ca" on each line end{vol=filename; # filename is: "c_from_v_273_008245_50_neighbours_symremo.out" # intention end new file 2 columns: # "volume" , "distance". # notice filename contains volume: 273.008245 gsub("^.*_v_","",vol); gsub("_",".",vol); gsub(".50.neighbours.symremo.out"," ",vol); # substitutions make "c_from_v_273_008245_50_neighbours_symremo.out" # "273.008245" # output of running: # search_for_distance.awk -f c_from_v_273_008245_50_neighbours_symremo.

html5 - Filter a Select menu with jQuery -

i read nice tutorial , explain, how filter select menu. works nice jquery-1.9.1, need mobile version of web-application, add in html: <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script> full index.html: <meta charset="utf-8"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" /> <div data-role="fieldcontain"> <label for="search">search input:</label> <input type="search" id="search" /><br/> </div> <div data-role="fieldcontain"> <label for="metro" class="select">Ст. метро:</label> <select name="metro" id="metro" data-native-menu="false"> <option value="country..." data-

javascript - AngularJS + IE 11 + Polymer = ng-model not updating -

in directive in application have text input variable bound using ng-model: <input type="text" class="text-input" ng-change="oninputchange()" ng-model="value" /> i've set following in link function: scope.oninputchange = function() { console.log(scope.value); }; scope.$watch('value', function(value) { console.log(value); }); setinterval(function(){ console.log(scope.value); }, 500); as type in input field, ng-change , watch never fired , interval outputs undefined. running directive in standalone application in ie 11 works. running directive in standalone application in chrome (latest) works. running whole application in chrome (latest) works. what in application causing behaviour? edit 2: this situation appears have been caused webcomponents.js . when file included in ie 11, removes event listeners dom elements replaces them it's own dispatchoriginalevent function. on input field specified

android - google map blank screen, programmatic added -

i have put google map service on console, , generate debug key. i've debug it, mmap , mlocation both not null. can latitude , longitude successfully. but map still blank. please help. sam here layout xml: <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#f2f5fa" tools:context=".locfm" > <!-- top bar component --> <imageview android:id="@+id/loc_topbar" android:layout_width="match_parent" android:layout_height="60dp" android:layout_alignparenttop="true" android:layout_alignparentleft="true" android:background="@drawable/topbar" /> <textview android:id="@+id/loc_title" android:layout_width="wrap_content" andro