Use perlcassa in Window - windows

I'm trying to use perlcassa perl package in Window app. I started make but it failed because of missing prerequisites like Thrift::XS and Tie::IxHash
Unfortunatelly such prerequisites are not available for Windows.
Any idea how to overcome this?
Or is there another Perl package for Cassandra that supports Windows?
Thanks,
Abed.

Using Cassandra command line solves the problem. It is easy, direct and no need for additional packages. i.e I wrote Cassadnra script and used -f option in Cassandra CLI to invoke it.

Related

Lolcode: variable does not exist: STDIO

I got the following problem while trying to run a LOLCODE program:
variable does not exist: STDIO
I think it's something with me running on Windows instead of any linux. I want to use LOLCODE for a school assignment, as in my opinion just using Python would be too easy.
Thank you,
I was also having this issue while trying to use STDIO for file I/O.
Turns out you must use the future branch of lci for that functionality.
Simply do,
git clone -b future https://github.com/justinmeza/lci.git.
then,
If on linux use python3 install.py.
For windows follow the official guide.

Create RethinkDB database from command line

I need to programatically create a RethinkDB database from the command line. However...I have no clue how to do this.
I know that I can do this from the web UI or from a client driver, but isn't there a command that does this?
As mlucy mentioned, you can create databases and tables using the query language. If you'd like to run RethinkDB queries directly from the command line, you may want to try one of these libraries:
reql-cli: https://github.com/Workshape/reql-cli
recli: https://github.com/stiang/recli
If you have the Python driver you can do the following:
echo -e 'import rethinkdb as r; \nr.connect("localhost", 28015).repl() \nr.db_create("NAME_OF_YOUR_DATABASE").run()' | python
To install the Python driver, you can just use pip:
pip install rethinkdb
This might not be the best way of doing this, but it might be the easiest way of achieving this if you want to create a database in one line from the command line.
If you a Node.js developer, I would recommend using the two CLIS mglukhovsky mentioned.
As of RethinkDB 2.0 I believe you can only do this with the web UI or a client driver. Is there a reason why shelling out to Python or Ruby doesn't work here?

plutil: command not found

Ultimate Goal:
I'm trying to convert a binary plist file to an xml format so that I can put it in an array and grab values from it. What I'm finding via web search on this is that the command for Linux comes from libplist.
Problem: I ran "yum install libplist" and it told me libplist is already installed and latest version. I've read that if I enter the following command:
plutil -i /mypath/file.plist > /mypath/file.xml.plist
That this will help accomplish my ultimate goal. However, when I do this only a blank file called file.xml.plist is created. Further, with this command and any other command involving plutil, I get a "bash: plutil: command not found. . ." error. Is libplist seemingly not installed (even though it says it is) or why would I repeatedly get this error? Thanks for your help.
You can use yum to look for a package knowing the binary you want. For instance, if I want to install the package that provides plutil, I simply run this command:
$> yum provides plutil
Unfortunately, the result is No matches found... But you say you read that the libplist package provides this tool. Maybe it was renamed ? Let's use repoquery for this (if you don't have it, yum provides repoquery tells you that you need to install yum-utils).
$> repoquery --list libplist
/usr/bin/plistutil
/usr/lib/libplist++.so.3
/usr/lib/libplist++.so.3.0.0
/usr/lib/libplist.so.3
/usr/lib/libplist.so.3.0.0
/usr/share/doc/libplist
/usr/share/doc/libplist/AUTHORS
/usr/share/doc/libplist/COPYING.LESSER
/usr/share/doc/libplist/README
And what I see is that a program called plistutil was installed with this package !
I've never used plutil, so I can't tell you for sure plistutil is the program you want (but it probably is). What I wanted to do instead with this post is to show how you can use yum to install the packages you need !
I ran across this thread while Googling for the same thing myself. After looking at a few solutions for my own company (Screenplay) I decided to fork and iterate on a open-source, cross-platform, drop-in replacement for plutil:
https://github.com/screenplaydev/plutil
It's forked from Facebook's xcbuild (a tool developed by them to build xcode projects on Linux), but stripped down to just provide plist-editting functionality. That way you won't need to maintain separate code-paths for Mac and Linux environments.
Hope that's helpful!

Fabfile path problem on windows

I'm trying to deploy my site using Fabric and Mercurial. In the Windows command line, running hg push works perfectly with no problems.
But when I try writing
local("hg push")
in a fabfile and running it, I get the error:
'"hg push"' is not recognized as an internal or external command, operable program or batch file.
Googling gave me an idea that it might be a problem with the PATH variable in Python subprocesses, for example here: Why would an "command not recognized" error occur only when a window is populated?.
Can you help me out? Is the bug in Fabric or in my own code?
Thanks.
As Chris R mentions, we don't do a ton of Windows support as none of the core devs are Windows users; we have to rely on reports and suggestions from our more savvy Windows users.
It sounds like this could be related to this recently fixed, but not released, bug -- it will be in Fabric 1.0.2 which should be out soon. If you're feeling brave, you can test it out now via:
pip install -e git+git://github.com/bitprophet/fabric#1.0#egg=Fabric
If you then do fab -V, it should say it's 1.0.2a -- if so, running your fabfile may work better. Please let us know if you do this!
It sounds like the you need to add Mercurial to the Fabric process's PATH.
Maybe something like:
fabric.context_managers.path(<path to your hg.exe>)
run('hg push')
See the docs for the path context manager. It wasn't clear if path applies to local commands, but run commands are explicitly referenced.
Neither of the fixes provided worked, but changing
local("hg push")
to
os.system("hg push")
solved the problem.

Problem with Zend Framework Quickstart Tutorial and version 1.8.2

I'm trying to work through the quick start tutorial of the Zend Framework version 1.8.2, but I'm getting an error when running this code:
zf.sh create project quickstart
error: expecting `'{'' in /Users/andrew/Sites/_library/ZendFramework-1.8.2/library/Zend/Tool/Framework/Client/Console.php on line 63
I'm doing this on Mac OS X 10.4. Is there an error in Zend Tool? or am I doing something wrong? Or is my environment not set up correctly to run this script?
I tried this on my other computer and got
-bash: zf.sh: command not found
I think this one is a separate problem, but not sure what to do
to the second problem:
$ chmod +x zf.sh
or place it to /usr/bin (or where the other executables lives, don't know where it is in OS X)
or use
$ sh ./zf.sh
first problem:
which PHP version do you use? The problem exists maybe at multi interface implementation.
you can still manually create the folder structure that Zend_Tool does, the quickstart guide does give examples of the naming conventions and there are numerous other examples. in order to better understand the framework, doing this manually can be good since your forced to think about the files your creating and how they are used.

Resources