Posts

sql - Calculate percentage -

hi code gives me employee salaries , manager salaries. select e.emp_fname manager, e.emp_salary, d.dept_no, a.emp_fname employee, a.emp_salary employee e, employee a, department d e.emp_nin = a.emp_manager , a.emp_manager = d.emp_manager; ![alt text][1] how can show employees have salary within 10% of manager salary? assuming want allow employees earning more managers (you know happen, in different, better world) include in clause: and a.salary between (e.salary * 0.9) , (e.salary * 1.1) edit this uses simple mathematics. 0.9 = 90% , 1.1 = 110%; line restricts resultset employee records salary +/- 10% of manager's salary. if employees can never earn more manager need simpler greater test... and a.salary >= (e.salary * 0.9)

can QuickGraph support these requirements? (includes database persistence support) -

would quickgraph able me out requirements below? (a) want model graph of nodes , directional relationships between nodes - example model web pages/files linked under url, or modeling infrastructure , dependencies between hardware/software. library include methods such as * node.getdirectparents() //i.e. there more 1 direct parent node * node.getrootparents() //i.e. traverse tree top root parent(s) given node * node.getdirectchildren() * node.getallchildren() (b) have persist data database - should support sql server , ideally sqlite well. if support these requirement i'd love hear: any pointers parts of quickgraph dig into? what best concept re it's usage in terms of how use database persistence - simpler design assume every search/method works directly on database, or quickgraph support smarts able work in memory , "save" database changes @ appropriate point in time (e.g. ado.net datatable etc) thanks in advance greg, a. yes, quickgr...

http - PHP page load seems to be requesting itself and misinterpreting the result -

i'm working on messy php page developer , analyzing resource view in webkit developer tools , noticed page (index.php) makes http requests , interprets results image despite being sent text/html header. because of throws warning: resource interpreted image transferred mime type text/html. looking @ time graph call comes after <head> because has requested images body. there 2 'bad' requests. can explain might happening and/or suggest how fix this? these related php includes? not sure how webkit making requests, time i've seen kind of behavior (a script calling image) when: image urls supposed generated , not - leaving image source '' or current url. a mod_rewrite 'greedy', , redirects image requests - including browser's favicon request - bootstrap (or similar) script. does webkit request favicon? later request in timeline.

class - Define "Indirect subclass" in Android -

looking @ various pages in android docs , of them list "known indirect subclasses". mean? for interface, it's list of classes implement interface. for class, it's list of classes derive class, indirectly (ie., class in list derived class derives class being documented directly or indirectly). so android.view.viewgroup derives directly android.view.view , indirectly java.lang.object : java.lang.object android.view.view android.view.viewgroup since interfaces can implemented, not directly derived from, class implements interface considered 'indirectly derived' interface.

java - What is an effective method of traversing a 2d Array vertically to programatically find an "empty" set? -

first off, isn't homework ;). i'm trying create wordsearch game scratch , have hit barrier need guidance on. i'm using 2d array of chars grid of wordsearch. i'm quite comfortable placing words in these arrays horizontally, i'm stuck ideas on how vertically. this have far, should able copy/paste , run it import java.util.arraylist; import java.util.list; public class wordgame { private static list<string> words = new arraylist<string>(); private static int longestwordlength = 0; private static int padsize = 4; private static char[][] grid = null; public static void main(string[] args) { initialisewords(); workoutlongestword(); setupgrid(); printit(); } private static void printit() { (int = 0; < grid.length; i++) { (int j = 0; j < grid.length; j++) { system.out.print(grid[i][j]); } system.ou...

javascript - timing/waiting in jQuery -

i writting banner rotator , want cycle among few pictures after few seconds. jquery has waiting , calling callback? can see .delay method, doesn't seem have callback function. or maybe should use browser-dependant function? or maybe javascript contains function need? new javascript :-| . you can use native javascript: settimeout(function(){ /* stuff */ }, 1000); you can have fun mixins: var timeoutcallback = function() { this.foo = 5; } var scheduletimeout = function(obj, delay) { settimeout(function(){ timeoutcallback.call(obj); }, delay); } var myobj = { foo: 1, bar: 2 } scheduletimeout(myobj, 1000); // myobj.foo becomes 5 after 1000ms delay

python - aapt: Do not skip (null) files when packaging -

i developing android application uses number of python scripts in res/raw deployed via sl4a , included in app's apk. scripts make use of python packages, directories contain number of 0byte sized __init__.py files necessary python recognize directories packages. problem aapt skips files during packaging, preventing scripts working on device/emulator, modules not found interpreter: [aapt] creating full resource package... [null] (skipping (null) file '/home/user/app/res/raw/pypackage/__init__.py') is there way tell aapt include files nevertheless, or have pad files manually make them >0kb sized? looked @ aapt command-line options didn't find anything. if problem can add comment ' # ' inside __init__.py files. if find more problems directory structure can use tar or zip , expand after apk installation.