How to create ORC or Parquet files from PHP code? [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
Is there any library that can be used to write custom data files from a PHP app in ORC or Parquet format for Presto queries ?
If not what is the best practice in this case? Hopefully one that doesn't involve setting up Map Reduce cluster.
10X
- Nir

Sorry for bumping, but I felt this question should be updated.
Last year, I released the first publicly available PHP library for reading/writing Parquet files, php-parquet.
See https://github.com/jocoon/php-parquet and/or the published composer package https://packagist.org/packages/jocoon/parquet (composer require jocoon/parquet). It is a partial port of and inspired by parquet-dotnet, based on the Apache Thrift specifications.
As far as you don't have special compression needs (e.g. snappy), you won't need exotic PHP extensions. BCMath and GMP are required, due to the possibility of arbitrary-precision numbers and you'll need to have zlib available (AFAIK the most-used/typical compression method for Parquet files, to be more precise: gzip).
Basic usage instructions are provided on the respective github page.
DISCLAIMER: I'm the developer of this package. This is not meant as advertising. The library is published under the MIT license. Feel free to submit issues or contribute.

There is the https://github.com/apache/parquet-cpp project that provides a C++ implementation to write Parquet files without any use of MapReduce or the JVM. While there are already Python (https://arrow.apache.org/docs/python/parquet.html), Ruby / GLib (https://github.com/red-data-tools/parquet-glib) and NodeJS (https://github.com/skale-me/node-parquet) bindings, there are none yet for PHP. But given those mentioned bindings, you should be able to write ones for PHP quite easily.

We’ve Apache licensed https://github.com/skipprd/php-parquet, a PHP binding for the C++ https://github.com/apache/parquet-cpp implementation that’s been battle tested by skippr.io.
Pleased to see another effort on jocoon/php-parquet too. So now there’s a C binding and a PHP implementation to choose from! :)
DISCLAIMER: I'm the developer of this package. This is not meant as advertising. The library is published under the Apache license. Feel free to submit issues or contribute.

Related

What is the status of PHPDoc? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I never cared much about documenting my code before, but recently I started working on an open source project and the need arose. Obviously the 'weapon of choice" is PHPDoc, but...
I couldn't really find a single specification of the PHPDoc standard. There is a wikipedia entry listing some of the properties and there is the phpDocumentor project, which supposedly has a more extensive dictionary, but what puzzles me is where is the definitive guide of PHPDoc? Is there a single standard or it is up to all those numerous phpDocumentor knockoffs to extend the PHPDoc "standard" (if any) to whatever they seem fit.
If we assume that phpDocumentor is the place where the PHPDoc standard is created and maintained, things look pretty grim, since the project's website is dead for for about almost 4 years now. And what puzzles me even more is that about a month ago a version 1.4.4 suddenly appeared from the dead on the Pear site of phpDocumentor.
I know there are a lot more smarted and knowledgable fellows around here, so I would like to know. What is the deal with PHPDoc. Is there a single authority that creates the standard? How reliable is it? Is there any future or we are dealing with a zombie and all hope is lost...
Thanks,
Ivo
According to Wikipedia it's dead.
The specifications for the standard for PhpDoc tags used to be what was listed in the documentation for PhpDocumentor. But like I said, it's dead. As DocBlox seems to be filling the void that PhpDocumentor left, I'd advise using the DocBlox documentation as the basis for how you do your PhpDoc comments.
I'm hoping Netbeans 7.1 will introduce DocBlox support because it's so much better. It's PHP 5.3 aware and it's actively maintained.
This question is already a bit old, but for the sake of information, I should add that DocBlox was merged with PhpDocumentor.
Announcing phpDocumentor 2 – the merging of the old (phpDocumentor)
and the new (DocBlox).
With the first alpha release of phpDocumentor (2.0.0a1), the new
“Responsive” default template sports a new page layout, along with the
useful layout improvements that the original DocBlox templates
provided (which remain available) over the old phpDocumentor templates
(which will retire with old phpDocumentor). Explore this new template
at http://demo.phpdoc.org/Responsive/index.html.
=> http://www.docblox-project.org/2012/03/docblox-is-unmasked-it-is-really-phpdocumentor-2/
PHPDoc is back to the action. =)
As of Aug. 2013 the the PHP Framework Interoperability Group began began writing a formal specification (PSR) for PHPDoc. The proposed standard for PHPDoc, current draft PSR5: https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md
The current draft updates the specification to address PHP 5.3+, as well as other changes which have occurred. I believe the expectation is this standard for php comments will be adopted accross multiple doc generators.

SCORM lib for php [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
we have developed e-learning web site for one of our customer.
recently he asked he need SCORM feed.
i dornt know whether my system is compatible with scrom.
do any body know any opensource php tool or lib to generate scrom from existing data.
thanks
The first thing you need to determine is whether your site would be considered a learning management system or a piece of content. The SCORM implementation varies considerably based of what you are trying to develop. Check out http://www.scorm.com/scorm-explained/ for a good explanation of SCORM and how it works.
I have tried Chamilo 1.9.6 and works well with SCORM 1.2 and 2004. This was used as evaluation tool (test) with up to 90 questions.
Have a look at Moodle project - SCORM module: http://docs.moodle.org/20/en/SCORM_module It's open source, but I do not know, it the SCORM related code is easy to use outside Moodle.
www.dokeos.com comes with open source edition containing SCORM module.
Or try Chamilo, it is maybe better fork of dokeos.
Drupal has a limited support for SCORM, too.
Good reputation has eFront.
Ilias is certified for SCORM 2004.
TinyLMS is interesting project - JavaScript only.
Also get idea from http://www.vsscorm.net/run-time-environment-rte/run-time-environment-downloads/
Don't forget Chamilo!! http://www.chamilo.org
You can try a demo at http://campus.chamilo.org
Chamilo supports SCORM is also a claroline/dokeos fork

OpenID Library for PHP 5.3 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
Does anyone have openid working in a PHP 5.3 installation? None of the libraries I've tried seem to be working.
Ok, I finally got to fix the library... I explained everything here (you can also download the php-openid library after my changes).
I needed to do what Paul Tarjan suggested but, also, I needed to modify the Auth_OpenID_detectMathLibrary and add the static keyword to a lot of functions. After that It seems to work perfectly although it is not an ideal solution... I think that someone should rewrite the whole library in PHP 5...
The solution is to remove all the of pass-by-reference elements in php-openid.
change
foo(&$param)
to
foo($param)
and the library should work again.
Zend_OpenId is compatible with PHP 5.3, however it only supports OpenID 1.1 and will not work with Google (which uses OpenID 2.0). Janrain's OpenID system normally available via http://openidenabled.com/php-openid/ is the one I'm using for my PHP 5 application (the OpenID enabled site is currently slightly down for maintenance today) - it is also one of the more popular PHP OpenID implementations (only small snag is that it uses temporary files for the OpenID sessions - making getting it working on a multi-server environment slightly tricky).

How can I use C++ code to interact with PHP? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I was reading somewhere that sometimes PHP is simply not fast enough and that compiled code has to sometimes "do the heavy lifting"
What is the api in C++ to do this?
You can add functions/classes to PHP, programmed in C (and you can wrap a C++ class from C, if I remember correctly from an article I read some time ago), which might allow you to do some things faster -- if programmed well : no need for interpretation of PHP code ; only execution of machine code, which is generally way faster.
To do that, you'll have to develop a PHP extension.
There are not that many resources available on the Internet about that, but these one might help you to start :
Extension Writing Part I: Introduction to PHP and Zend
Extension Writing Part II: Parameters, Arrays, and ZVALs
Extension Writing Part III: Resources
And, specifically about the C++ part, this one might help too :
Wrapping C++ Classes in a PHP Extension
If you are really interested by the subject, and ready to spend some money on it, you could also buy the book Extending and Embedding PHP (some pages are available as preview on Google Books too) ; I've seen a couple of times that it was the book to read when interested on this subject (In fact, I've bought it some time ago, and it's an interesting read)
By the way, the author of that book is also the author of the first four articles I linked to ;-)
You can actually execute compiled applications without any sort of API:
$output = exec('/path/to/yourapp');
Beyond that, you could always write a PHP extension. There's a good guide on the subject here: http://devzone.zend.com/article/1021
swig, the Simplified Wrapper and Interface Generator can help you wrapping (existing) c++ into a php module.
SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is used with different types of languages including common scripting languages such as Perl, PHP, Python, Tcl and Ruby.
Well you have not defined what you are trying to do, but if you need to the C++ interface, then look at the ext directory in the source code to understand how to write a PHP extension that you can then load and use from your PHP scripts.
A couple of links that may help:
http://www.devarticles.com/c/a/Cplusplus/Developing-Custom-PHP-Extensions-Part-1/
http://devzone.zend.com/article/1021

Anything better than PHPDoc out there? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does anybody use anything else to document their PHP code than PHPDoc?
Are there any tools that read the same documentation syntax but give richer output?
I´ll go for doxygen too.
Here are several reasons :
compatible with phpdoc tags and other popular ones : it´s interoperable
works with various programming languages : a better time investment
there is alternative syntaxes : can choose the commenting style that suit you
very efficient with advanced formating / tagging / metadata
there is a GUI that is not linked to any IDE and an eclipse plugin as well
And still free, multiplatform, and open source :-)
It´s easy to learn, but harder that phpdoc because a lot richer.
You could try DocBlox; which is intended to be an alternative for phpDocumentor but with support for additional features of which full PHP 5.3 support is one. An additional benefit is that is it quite fast and uses relatively little memory.
You can read more on http://www.docblox-project.org or see a demo at http://demo.docblox-project.org/default
Another option other than phpDocumentor is Doxygen documentation with PHP support.
Doxygen (www.doxygen.org).
ApiGen
http://apigen.org/
ApiGen has support for PHP 5.3 namespaces, packages, linking between documentation, cross referencing to PHP standard classes and general documentation, creation of highlighted source code and experimental support for PHP 5.4 traits.
DocBlox
http://www.docblox-project.org/
PHP 5.3 compatible API Documentation generator aimed at projects of all sizes and Continuous Integration.
able to fully parse and transform Zend Framework 2
I've not used it with PHP, but doxygen claims to support the language.
I am using Doxygen too - you get used to the various keywords really fast - they are kind of self-explaining. ;)
RubyDoc is nice too, I espcially like they layout of the rdocs.
Doctrine uses PHPDoctor, which appears to work well with 5.3 in my tests.
http://peej.github.com/phpdoctor/#download
If you need to document code for PHP 5.3+, eg. if it uses namespaces Ted Kulp's fork of PHPDoctor might be your answer.

Categories