BaseX RESTXQ "hello world" example - rest

I'm strugging to get started with the BaseX RESTXQ API.
I've downloaded and installed the latest version of BaseX for Windows. I have started the BaseX Server by clicking the "BaseX Server (Start)" icon that the BaseX installation adds to the Windows Start menu.
It appears that I need to create a file with an .xqm extension (eg. hello.xqm) and put it somewhere.
Do you have a minimal "hello world" type example file eg. hello.xqm to get me started?
Where should I put the hello.xqm file so it runs on my default installation of BaseX?
Where do I need to point my browser to and what should I see if it works?
Thanks.

We noticed that the web files in Version 7.3 of the Windows version of BaseX were accidentally moved to the bin directory. You'll find a pre-packaged RESTXQ module in the latest (stable) snapshot of BaseX:
http://files.basex.org/releases/latest/
You may also have a look into the BaseX RESTXQ documentation:
http://docs.basex.org/wiki/RESTXQ

I found really nice slide for creating web application with restxq in BaseX. please see on this paper:
http://files.basex.org/publications/xmlprague2013/slides/Andy-Bunce-BaseX-User-Group-Talk.pdf
also here is very good example
https://github.com/siserle/blog-example (thanks to siserle)

Related

typo3 8.7.9 - download language package and update extension list failed

I already installed TYPO3 8.7.9, changed the language to german but can't download the language pack. It says:
Error
The request has failed.
Also if I change the dropdown in Extensions to Get Extensions it says:
Update Extension List
Could not access remote resource https://repositories.typo3.org/mirrors.xml.gz
I'm using MAMP on Windows 7. Also in the System environment check there are four orange issues which - I thought - already fixed in the php.ini:
Low PHP script execution time
PHP max_input_vars very low
Windows apache thread stack size
PHP extension fileinfo not loaded
Do you think it had something to do with "curl"? It often appears during my Google research.
I would be pleased if someone could help me :)
I can access this file via browser, so it's available. A missing curl could be the problem, you're right.

install titanium module from github

i'm having some issues getting modules to work on my app - I keep on getting told that the requested module cannot be found.
It is entirely possible that i'm not installing the modules correctly - so, for the purposes of this question:
Once i've downloaded the zip file from git hub using the green "download" button, what do i do to import the module into my project? Not how do i tell tiapp.xml to use the module - just what do i do to install it?
Can you please run through using the facebook module found at https://github.com/appcelerator-modules/ti.facebook
thanks!
Inside the zip file of the download you'll see there is a folder called modules. This is the same folder that is in your root of the project.
So, an iOS module should be installed in the /modules/iphone folder. Once added, you can add Facebook to your app like this:
<module platform="iphone">facebook</module>
If you want to specify a version you can do so like this:
<module platform="iphone" version="1.1.0>facebook</module>
note: I made up the version number
You can also add it through the tiapp editor in Appcelerator studio, although it doesn't always seem to find the module. This might be a bug in studio though, usually it works great.
HMMMM
Two main issues here, one directly relating, the other less so.
Issue 1
The link i gave to get the codebase from github is wrong - well, it gets the codebase, but not in a form that can be used as a module. It is, in fact, the uncompiled version.
Versions for download can be found here.
So that takes care of issue one, what about
Issue 2
The latest version for use is a bit broken. Seems someone (from the appcelerator team???) decided to make the latest 6.0.1 release have a minsdk of the (at this time) as-yet-unreleased version 6.0.0, and sets the apiversion to 3.
This breaks the current release of 5.5.1, so for anyone reading this prior to 6.0.0 for appcelerator, you will want to use this release version.

What language does SmartFoxServer 2x use on the server side?

I have downloaded and started the community version of SFSx2. I read everything on their documentation page:
http://docs2x.smartfoxserver.com/DevelopmentBasics/introduction
Which unfortunately only talks about flash client side code. Nothing about the corresponding server side code, nor about html5 client side which I need.
I downloaded the HTML5 examples, which took me a long time to find (they are here: http://www.smartfoxserver.com/download/get/140 )
None of the examples work, as they can't connect to the server. Presumably, this is because the examples only supply client side code. There are no instructions supplied on how to install or run the examples.
I can find no mention on the smartfox documenation on the following:
1) what language is used on the server side. One assumes its java.
2) how does one deploy java code to the smartfox server? I cant find any mention of this in the docs.
3) how does one find and install the server part of the client side examples (which are Tris, GameLobby, BuddyMessenger, AdvancedChat).
I applied to be allowed to post on the smartfoxserver forums, but no reply yet.
I also found it hard so I share what I've found out.
The server extensions are written in Java. I used Eclipse JUNO to write my code.
You can download Eclipse here. http://www.eclipse.org/downloads/
You export the extension in jar format from eclipse into you extension path. The name of your file has to end in 'extension' eg MyFirstExtension.jar otherwise sfs2x wont recognize it. Your extension path will be something like this: C:\Program Files\SmartFoxServer2X\SFS2X\extensions\MyFirstExtension\MyFirstExtension.jar if your working in windows.
You will find docs on JAVA API here. http://docs2x.smartfoxserver.com/api-docs/javadoc/server/
This is a link to the basic example code: http://www.smartfoxserver.com/download/get/120
Unzip the content into the [SFS2X_install_folder]/SFS2X/www/root/examples folder, overwriting the existing file. Run the index.html file, then navigate to another index.html to open the example. Run the sfs2x-standalone.exe first of course(see below). If you followed the 'server configuration tutorial' on smartfox website and changed the server ports, the examples wont work. Leave the ports alone until you start to understand the server.
This is a link to the flash example code: http://www.smartfoxserver.com/download/get/108
You will find the example code for apps mentioned above. They are written in Adobe Flash Builder and Java extensions. I don't know if there is any code for HTML5 but the Java server code and AS3 is there.
I also found that using the standalone server was the way to go rather than using SFS2x as a service. c:\program files\smartfoxserver2x\sfs2x\sfs2x-standalone.exe. Using the exe gives you the command prompt window. You can use the window for debugging and see the state of the server when it starts.
Most of the examples should work without creating extensions but to create an extension out of source examples:
Create and setup a new project in your Java IDE. You will have already set up a workspace.
Copy the content of the /source/server/src folder to your project's source folder.
Add SFS2X Libraries. Go to properties of the project -> Select Java Build Path -> Click Library Tab -> Add external jar. Add 'sfs2x.jar' and 'sfs2x-core.jar' from C:\Program Files\SmartFoxServer2X\SFS2X\lib folder. To create the extension, export jar file to extension path. Restart server.
Another problem I had was the Java Version I was using. I had to use Java1.6 with my version of sfs2x when writing extensions. This was trial and error as there was no documentation. There may be a newer version out now.
I had to copy all the server source into eclipse to try and understand how things were done. It was a way of having all the code in one place. There was a lot of trial and error as getting help is hard. I eventually accomplished what I set out to achieve. Good Luck.
SmartFox Server is easy to use even with extension. documentation Give try to Nuggeta solution for game development too. No extension needed at first. This is optionnal.
We have full HTML5 open source game walkthrough on github

Problems with Zend

I have downloaded and installed Zend Server community edition. I am on a mac.
I have tried to changed the path in
/usr/local/zend/apache2/conf/httpd.conf
so that it pointed at a test file in my documents folder. However, when I type
http://localhost:10081/test.php
into my browser, I just get 404- page not found.
Any suggestions? I am new to web stuff and don't really know what I'm doing wrong.
You can find step by step directions for setting up your local environment on a mac:
http://www.cmiwebstudio.com/blog/zend-server-ce-for-mac-osx-10-lion/
and some other posts that may also help here:
http://www.cmiwebstudio.com/blog/tag/zend-server-ce/

I can't get qml to use my custom plugin

I'm working in QtQuick and right now struggling with a weird problem: I can't get my custom plugin to work in Qml. There's a simple demo in the SDK (Examples/4.7/declarative/tutorials/extending/chapter6-plugins) and this doesn't work on my computer either. I don't get any error messages except that it doesn't recognize my custom items. Has anybody seen this problem? Any suggestions?
My setup:
Win 7 Home Premium, Qt Creator 2.1.0, Qt 4.7.3 (MinGW 4.4)
Thanks
Beside the qmldir issue already mentioned by blakharaz, also make sure to set QML_IMPORT_PATH in your pro file or setting the path via QDeclarativeEngine::addImportPath() so the module can be found on your development environment (if you don't install them systemwide before using).
And when using subfolders, make sure they are part of the import (see http://doc.qt.nokia.com/4.7-snapshot/qdeclarativemodules.html)
It would be nice to have some code. One possible issue could be the directory structure or the qmldir file. If you want to have a plugin called Foo you basically need a directory Foo which contains the Foo.dll (or libFoo.so) and a qmldir file (content is at least "plugin Foo")
If you have that "import Foo 1.0" should load the library.
I just had the exact same problem.
Build your .dlls as release instead of debug, that fixed it for me.