Posts

ios - How to change color for tab bar non selected icon in swift? -

how change color tab bar non selected icon , text? found answer ( how change inactive icon/text color on tab bar? ), can't implement swift. the below sets defaults uitabbaritem's, can add appdelegate . change text color. uitabbaritem.appearance().settitletextattributes({nsforegroundcolorattributename: uicolor.blackcolor()}, forstate:.selected) uitabbaritem.appearance().settitletextattributes({nsforegroundcolorattributename: uicolor.whitecolor()}, forstate:.normal) for changing icon' color can either set image given state image have color. self.tabbaritem.selectedimage = [[uiimage imagenamed:@"selectedimage"] imagewithrenderingmode:uiimagerenderingmodealwaysoriginal]; self.tabbaritem.image = [[uiimage imagenamed:@"notselectedimage"] imagewithrenderingmode:uiimagerenderingmodealwaysoriginal]; or can way : add extension uiimage class (from this answer ) : extension uiimage { func imagewithcolor(color1: uicolor) -> uiimage { ...

animation - jquery scroll to different page and same page -

i know how animate scroll on link on same page. know how jquery page scroll external page. problem need use same hash link animate external page , internal page well. let me explain further suppose have 3 links, link link b-1 link b-2 and link b-1 , b-2 on same page , in succeeding divs. i'm in link , when click link b-2, should go page links b-1 , b-2 , animate scroll area link b-2 is. if click link b-1 while on same page, should animate scroll top. same thing should happen if on link a's page , clicked on b-1, should go page b-1 , b-2 , animate scroll b-1's section. if click b-2 on same page, should animate scroll section. does make sense? can me please? thank you if have access source code of external link, can pass variable set cookie in browser. , cookie when reach external link. in cookie put value scrolltoblock = b2. , when value cookie on external link enter, know scroll. you can read cookies here: set cookie , cookie javascript

SQL Server 2008: can 2 tables have the same composite primary key? -

Image
in case, tables reserve_details , payment_details ; can 2 tables have same composite primary key ( clientid, roomid )? or should merge 2 tables become one: clientid[pk], roomid[pk], reserveid[fk], paymentid[fk] in case, tables reserve_details , payment_details ; can 2 tables have same composite primary key ( clientid, roomid ) ? yes, can , happens in relational databases. (you have not set tag, since (a) using sql server, , (b) have compound keys, indicates movement in direction of relational database, making assumption.) whether should or not, in particular instance, separate matter. , gets design; modelling; normalisation. or should merge 2 tables become one : clientid[pk], roomid[pk], reserveid[fk], paymentid[fk] ? ok, realise design not robust. that normalisation question. cannot answered on just pair of tables, because: normalisation overall issue, tables need taken account, together, in 1 exercise. that exercise determines ...

Java NullPointerException javax.xml.transform -

i wrote simple xmlphonebook program inputs such firstname, lastname , phone number user (from input console) , saves xml file called " phonebook.xml ". program checks existing xml file , updates file if exist or else creates new file. first version code wrote without error handling class successful. when tried update code error handling class thats when started getting nullpointerexception javax.xml.transform. have posted both versions of code below understanding. main class xmlphonebook without error handling. /** * * @author sanjayan ravi */ /** * * class xmlphonebook main class controls getcontactinfo function , storecontactinfo. */ public class xmlphonebook { getcontactinformation gci; storecontactinformation sci; xmlphonebook() { gci = new getcontactinformation(); } /** * * getcontactinfo function triggers functions getfirstname, getlastna...

regex - Why and when to use optional perl parameters in R -

out of curiosity, have general question optional perl parameter in r funtions grep . title says in title, i'd know why , when 1 should use option. general thing if possible? in addition thought reason of such parameter. must have decided way go , wonder why. i positive of knows answer. regular expressions come in multiple flavors . different flavors have different features, supported syntax, or other obscure differences. perl considered 1 of feature-complete flavor, led develomment of pcre (perl-compatible regular expressions) library, allows use of perl flavor in other languages. there other regex libraries support perl syntax extent. contrast default regex flavor used in r: posix ere, 1 of least feature-complete. you can use this site compare flavors.

html - Navigation Bar - LI:HOVER Full Height -

so want navigation bar, with, when hover on li / element, different color full height of navigation bar. because when hover on it, background-color of text changes... quite ugly... i hope clear enough, system blocks me uploading image :o. thank you! edit: forgot html , css: <ul id="nav"> <li><a href="">home</a></li> <li><a href="">courses</a></li> <li><a href="">subjects</a></li> <li><a href="">sign up</a></li> <li><a href="">log in</a></li> </ul> #nav { height: 60px; font-size: 30px; line-height: 60px; vertical-align: middle; text-align: center; background-color: #0080ff; width: auto; border: 10px solid #16044e; border-radius: 20px; z-index: 1; } #nav ul { } #nav li {...

java - How to add buttons to the JFace ErrorDialog -

i'm trying add "cancel" button popup dialog, dialog gives user info , allows them hit yes or view details. problem there no cancel button , add one. the dialog jface errordialog uses premade multistatus display error message. dialog opens , gives ok button or cancel button. there anyway directly manipulate how dialog creates buttons or other method use change how looks? appreciated! if (errordialog.openerror(shell, messages.consistencyaction_confirm_dialog_title, null, multistatus, istatus.warning) != window.ok) { return; } this dialog i'm trying change. checking make sure presses ok, if don't exit. can exit hitting red x in corner it'd less confusing have button. you can extend errordialog class can override createbuttonsforbuttonbar method. for example eclipse p2 install plugin: public class okcancelerrordialog extends errordialog { public okcancelerrordialog(shell parentshell, string dialogtitle, string message, ...