Ruby: selenium DriverExtensions returns unknow command - ruby-on-rails-3

Every function from ::DriverExtensions give an erros:
POST /session/{session_id}/funciont did not match a known command
I'm specially interested in save_print_page(path):
#driver.save_print_page('path.pdf')
but the error is the one described below:
POST /session/731e8f40-b709-4090-845d-e6bdc794fcea/print did not match a known command
can you guys help me?

Related

Getting names of all private repos through GitHub API

I'm trying to get a list of all names in a repo that I have access to. I tried running:
curl -u username:pw -X GET https://api.github.com/orgs/org_name/repos?per_page=100 >> list.txt
but I get the error: zsh: no matches found: https://api.github.com/org/org_name/repos?per_page=100
All I want is a list of the repos... no other information. Can't seem to figure it out. I'm new to programming and started using API like.. 1 hour ago? Any advice would be helpful.
Your shell (zsh) is interpreting the URL as a path and complaining because it doesn't match any files. You can solve this by placing quotes around it. In this case, either single or double quotes will work.

How do we use the --pdf flag for generating documentation?

The video tutorial in http://www.kframework.org/index.php/Lesson_4,_LAMBDA:_Generating_Documentation;_Latex_Attributes suggests that we should use kompile lambda --pdf, but when I run it I got the following error:
[Error] Critical: Unknown option: --pdf (Unknown option: --pdf)
The kdoc --help option also result in a Command 'kdoc' not found error.
How do I correctly use this option to generate the formatted K definition?
The kdoc functionality (and --pdf) has not worked for quite some time.
If you want LaTeX ASTs output for given individual terms, you can use --output latex for any of kast, krun, or kprove. Unfortunately this does not work for entire definitions yet, and will not auto-format for you (it only outputs an AST, you'll still need to tell LaTeX how to render the nodes in said AST).

WebHCat & Pig - how to pass a parameter file to the job?

I am using HCatalog's WebHCat API to run Pig jobs, such as documented here:
https://cwiki.apache.org/confluence/display/Hive/WebHCat+Reference+Pig
I have no problem running a simple job but I would like to attach a parameters file to the job, such as one can do using pig command line's parameter: --param_file .
I assume this is possible through arg request's parameter, so I tried multiple things, such as passing:
'arg': '-param_file /path/to/param.file'
or:
'arg': {'param_file': '/path/to/param.file'}
None seems to work, and error stacks don't say much.
I would love to know if this is possible, and if so, how to correctly achieve this.
Many thanks
Correct usage:
'arg': ['-param_file', '/path/to/param.file']
Explanation:
By passing the value in arg,
'arg': {'-param_file': '/path/to/param.file'}
webhcat generates "-param_file" for the command prompt.
Pig throws the following error
ERROR org.apache.pig.Main - ERROR 2999: Unexpected internal error. Can not create a Path from a null string
Using a comma instead of the colon operator passes the path to file as a second argument.
webhcat will generate "-param_file" "/path/to/param.file"
P.S: I am using Requests library on python to make the REST calls

Nupic : RegionTest fails, pynode cannot be found

I built nupic as per the instructions in the wiki. However, when I run testeverything, the RegionTest fails with a message that pynode cannot be found since neither nta_rootdir nor pythonpath are set.
echo $pythonpath and echo $nta_rootdir gives the correct results though
The exact message is
MSG: Unable to find the pynode dynamic library because neither NTA_ROOTDIR not PYTHONPATH is set.
How do I fix this?
I'd like to track this issue on the NuPIC issue tracker.

Error while trying to execute an example mirah script?

$ ../bin/mirah -e fib.mirah
Inference Error:
Cannot find static method fib() on DashE
DashE:1: Cannot find static method fib() on DashE
Got this while trying to run the mirah script that is grabbed from the examples folder. How can I fix this, thanks!
Ok. I should use mirahc instead of mirah. So... fixed.