Posts

sql - Maximum salary of employee in specific department -

empid empname empsalary empdept 1 steve 5000 hr 2 robert 5000 management 3 brad 3000 hr 4 sam 4000 hr 5 dave 2000 management 6 stuvart 4500 management how employee details employee table salary max , belong hr department... query select empid,empname,empsalary,empdept employee empsalary in (select max(empsalary) employee) , empdept='hr' i tried above query, giving me accurate result, due performance issue can not use inner queries. you can use order by clause rownum oracle version < 12c : select empid, empname, empsalary, empdept employee rownum = 1 , empdept = 'hr' order empsalary desc otherwise can use following: select empid, empname, empsalary, empdept employee empdept = 'hr' order empsalary desc fetch first row ties p.s.: with ties option brings opportunity multiple results in case there multiple employees same max salary (...

swing - java MVC application -

i'm creating application @ moment want reuse gui make easy reuse , change elements i've been using mvc design pattern im having few issues first issue how implement actual design pattern different examples implement in different ways. code have in main, ok. mainview theview = new mainview(); mainmodel themodel = new mainmodel(); maincontroller thecontroller = new maincontroller(theview,themodel); theview.setvisible(true); the second problem have example set controller implemented view in using following code: controller: this.theview.addcalculatelistener(new calculatelistener()); view: public void addcalculatelistener(actionlistener listenforcalcbutton){ calculatebutton.addactionlistener(listenforcalcbutton); } this seems work fine have problems implementing listeners in jmenu there added within constructor of view plan create jmenu in external class can put menu items global variables (to clear code) allow me add listeners in manner, ...

CSS | Footer with Logo -

hey started learn html @ work. so, started make website fake company.i made navigation logo , side navigation. footer got problem, cause not in row. html code: <div id="footer"> <ul class="footer"> <li class="fuss"><a href="#">agb</a></li> <li class="fuss"><a href="#">impressum</a></li> <div class="wortmarke"> caf&eacute; villa bernstein <p class="copyright"> &copy; caf&eacute; villa bernstein. rights reserved. </p> </div> <li class="fuss"><a href="#">datenschutz</a></li> <li class="fuss"><a href="#">pressenews</a></li> </ul> </div> css: /* footer */ ul.footer { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; pos...

excel - Conditional Formatting and text: Based on a condition I want to copy the format of another cell -

Image
in excel i trying copy elements , cell format of cell based on condition. g12 = (if c10 = c11, *leave blank, if (c10>c11, *copy elements , format of b10, *copy elements , format of b11)) i've tried function , have had success copying elements, cannot formatting change well. used: =if($c$10=$c$11,"",if($c$10>$c$11,b10,b11)) i learned conditional formatting don't see way copy format of cell based on condtion. color has specified. thanks help! tl:dr march madness example virginia beat unc 76 75 i want copy copy (1) virginia next spot in bracket lime green background. had unc won, want (16) unc , rose color copy next bracket spot go vb-editor (alt + f11), insert new module , paste code: function rangeselectionprompt(txt string) range dim rng range set rng = application.inputbox(txt, "select range", type:=8) set rangeselectionprompt = rng end function sub formatas() dim sh worksheet dim r1 range, r2 ...

android - Passing Google Places Results into ListView -

i developing application displays taxi companies around you. home page map markers showing different cab companies. there way details such name, address , phone number listview on next page? possible pass hashmap details listview , if so, how? can added class below shows map markers? package com.example.chela.taxilocatorapplication; import java.util.hashmap; import android.os.asynctask; import android.util.log; import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.model.latlng; import com.google.android.gms.maps.model.markeroptions; import org.json.jsonobject; import java.util.list; public class placesdisplaytask extends asynctask<object, integer, list<hashmap<string, string>>> { jsonobject googleplacesjson; googlemap mmap; @override protected list<hashmap<string, string>> doinbackground(object... inputobj) { list<hashmap<string, string>> googleplaceslist = null; com.e...

unity3d - Buttons without background, size, why? -

Image
i want create menu buttons. template button cloned , placed in vertical layout. worked in middle of work there strange effect of rendering text child od button, additionally gameobjects not have width, outside of canvas. on screen , in center template button, goal have 2 columns of buttons on left , right side. using unityengine; using unityengine.ui; public class dividedownui : monobehaviour { void start () { createbtnsrow(transform.find("panelleft")); createbtnsrow(transform.find("panelright")); } void createbtnsrow(transform panel) { for(int = 1; <= 10; i++) { gameobject btn = instantiate(transform.find("btntpl").gameobject); btn.transform.parent = panel; btn.setactive(true); btn.transform.find("text").gameobject.getcomponent<text>().text = "" + i; } } } ` resolved: there problem positioning: after using ...

java - How to get range of rows using spark in Cassandra -

i have table in cassandra structure create table dmp.table ( pid text primary key, day_count map<text, int>, first_seen map<text, timestamp>, last_seen map<text, timestamp>, usage_count map<text, int> } now i'm trying query using spark-cassandra driver , there can chunks of data. in if have 100 rows , should able 0-10 rows 10 -20 , on. cassandrajavardd<cassandrarow> cassandrardd = cassandrajavautil.javafunctions(javasparkcontext).cassandratable(keyspacename, tablename); i'm asking there no column in table can query using in clause range of rows. you can add auto-incrementing id coloumn -- see dataframe-ified zip index solution. can query newly-created id column: select ... id >= 0 , id < 10; etc.