Posts

Featured post

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

i have following statement/query: select table1.file_id, table1.status, table2.status table1 inner join table2 on table1.file_id = table2.file_id; the result follows: file id | status table 1 | status table 2 ----------------------------------------------------- 5500002 | ax | ics 5500002 | ax | icso 5500002 | axo | ics 5500003 | ax | ics 5500003 | ax | ics 5500003 | ax | ics 5500004 | null | icso test 5500004 | axo | ics 5500004 | ax | null i need each file id check 4 statuses: - ax - axo - ics - icso i want run select on file id s cover 4 statuses. can see file id occurs multiple times , i'd want query return file id fulfills requirement, in instance return 5500002 , 5500004. for 550000...

python - Robot Framework location and name of keyword -

i want create python library 0 argument function custom robot framework keywords can call. needs know absolute path of file keyword defined, , name of keyword. know how similar test cases using robot.libraries.builtin library , ${suite_source} , ${test name} variables, can't find similar custom keywords. don't care how complicated answer is, maybe have dig guts of robot framework's internal classes , access data somehow. there way this? thanks janne able find solution. from robot.running.context import execution_contexts def resource_locator(): name = execution_contexts.current.keywords[-1].name libname = execution_contexts.current.get_handler(name).libname resources = execution_contexts.current.namespace._kw_store.resources path = "" key in resources._keys: if resources[key].name == libname: path = key break return {'name': name, 'path': path} execution_context...

methods - python can't use function in submodule -

my folder structure this: pythonstuff/ program.py modulea/ __init__.py foo.py bar.py here's code bar.py : def hello(): print("hello, world!") here's code program.py : #!/usr/bin/env python3 modulea import bar bar.hello() i run $ python3 program.py somehow error: file "program.py", line 3, in <module> bar.hello() attributeerror: 'module' object has no attribute 'hello' edit: __init__.py file empty. edit2: after trying realized had bar.py in root directory contained hello() method. bar.py in modulea/ directory empty. add it import os __all__ = [] module in os.listdir(os.path.dirname(__file__)): if module != '__init__.py' , module[-3:] == '.py': __all__.append(module[:-3]) the init .py files required make python treat directories containing packages; done prevent directories common name, such string, unintentionally hiding v...

Desktop Launcher for Python Script Starts Program in Wrong Path (Linux) -

i can not launch python script .desktop launcher created on linux mint 17.1 cinnamon. the problem script launched in wrong path - namely home folder instead of directory placed in. thereby can not find other vital files accompanying in folder , hence not work. to examine misbehaviour created short script check folder python script executing in: #!/usr/bin/env python import subprocess import time subprocess.call(["pwd"], shell=true) time.sleep(7) # chance read output executing own folder gives output: /home/myusername/pythonprojects i setting desktop launcher via nemo's menu. executing same script yields: /home/myusername i not understand behaviour. how create working desktop launcher python script? the page https://linuxcritic.wordpress.com/2010/04/07/anatomy-of-a-desktop-file/ describes format of .desktop files. you may note "path" element, specifies working directory file run in. in case want desktop file specified path=/...

netbeans - How to keep java.awt.List from covering javax.swing.JMenu -

to put simply, have menus in menu bar that, when @ start of application, goes on list when expand it. however, if list ever updated, menus go behind list, covering menu items. i have theorized need when list updated, make tell list go layer (which set bottom, lowest on list in application using netbeans). but, not know call tell program keep list there. (i still new java , learning go) have idea on how wish or better, causing problem? thank time , have wonderful day :3 you should use jlist instead of list. the problem components in java.awt have peer components, native os components, whereas swing 100% java. cannot write on these native peers... @ least not in java.

Extracting specific parts of a HTML-File with PHP Simple HTML DOM Parser -

i've got html-file several tables try extract link , image part. i'm using php simple html dom parser. here's html-file parse: <h1>title</h1> <p>text</p> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr><td> <a href="http://www.google.com/some_url"> <img width="100" height="100" border="0" src="http://google.com/some_image.jpg"/> </a> </td></tr> </tbody> </table> <h2>title</h2> <p>text</p> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr><td> <a href="http://www.google.com/this_url"> <img width="100" height="100" border="0" src="http://g...

angularjs - Redirect to a new template in angular js -

i new angularjs, please consider mistakes. the scenario is, have index.html page , login.html page, index , login have different layout different header footer , all. other pages expect login share same layout index.html now, how can navigate login.html using anuglar ui router. myapp.config(function ($stateprovider, $urlrouterprovider) { $stateprovider.state('home', { url: '/', templateurl: 'app/views/site/home.html', controller: 'homectrl' }).state('login', { url: '/login', templateurl: 'app/views/site/login.html' }) }); this not work loads content of login index keeping header , footer same of index. know state supposed work way. now, there way can call new view using ui.router. i appreciate help. thanks you set multiple named views ( https://github.com/angular-ui/ui-router/wiki/multiple-named-views ). this allow make header , footer separate views can ...