How to add new functionality into ejabberd server - ejabberd

I have created a .erl file named "confirmDelivery.erl" and compile it successfully, A beam file named "confirmDelivery.beam" has been created.
All these files are in /etc/ejabberd/. Now I wanna add the functionality of this file into ejabberd, But I don't know how to link my file with ejabberd server.
Please help me, I will be really really thankful to you.

You need to place your beam files in the path of the Erlang VM to be able to use them. You should have a look at where are other ejabberd module for example and place it in the same directory.

You need to put your beam file in etc/ejjaberd/ebin folder and call it from ejabberd debug mode.
use command:
ejabberdctl debug

Related

IntelliJ IDEA: Unable to download MySqlDriver

I am using IntelliJ IDEA,and I want to configure MySQL database from the IDE:
then fail:
The error is:
Failed to download 'http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-java-5.1.40-bin.jar
I don't know why connection will time out.
I can download other things such as plugins from jetbrains, but except jdbc-drivers.
I recommend taking a look in IDEA's log files to see if they may have additional details as to why the download is timing out. From the menu go to Help > Show log.
As a workaround, you can manually download the drivers and place them in the necessary location. Download bo the JAR and the mysql-connector-license.txt license file (from http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-license.txt of from MySQL directly). Place both files in the path {idea-config-dir}/jdbc-drivers/MySQL Connector/J/5.1.40 (modifying the version number if necessary). The location of the {idea-config-dir} can be looked up in the Directories used by the IDE to store settings, caches, plugins and logs help document. For example, c:\Users\Dilbert\.IntelliJIdea2017\config or ~/Library/Preferences/IntelliJIdea2017
Thus, in the end, that directory should have two files:
mysql-connector-java-5.1.40-bin.jar
mysql-connector-license.txt
put jars in
C:\Users\UUSER\AppData\Roaming\JetBrains\DataGrip2020.1\jdbc-drivers\PostgreSQL\42.2.5
from another install with internet
In 2019, The folder is this >>
C:\Users{YourUser}.DataGrip2019.3\config\jdbc-drivers\MySQL Connector\J 8\8.0.21
Download jar from
https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.21/mysql-connector-java-8.0.21.jar

How to install ioncube Loader on openshift

I'm having a problem activating ioncube on openshift.
The loader-wizard tells me to do the following steps:
1) Download one of the following archives of Loaders for Linux x86-64: zip tar.gz tar.bz2 etc.
2)Transfer the Loaders to your web server and install in /usr/lib64/php/modules
3) Put this: "zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.3.so " in your ini files directory, /etc/php.d
4)Restart the Apache server software. When the server software has restarted, click here to test the Loader. If the Loader installation failed, check the Apache error log file for errors and see our guide to Unix related errors.
But I can't transfer the loader in /usr/lib64/php/modules, because I don't have permissions.
I tried to put the loader somewhere else and edit the new php ini located at ~/php/versions/shared/configuration/etc/php.ini I added there the the path to the loader, restarted the app, but still does not work.
I also posted this question on openshift.com forums, but didn't get any answers at the moment.
Any suggestions will be very appreciated.
Thank you.
Success in Loader installation will ultimately depend on the server and PHP configuration.
ionCube have recently released a Windows based installer that can automatically deploy the required Loader locally or to a remote server over FTP or SFTP, and also make configuration file changes. I suggest trying that. The download is at http://ioncu.be/LI
(disclosure: I am associated with ionCube)

What is .rds_delta file?

I see a file in the root folder of my Tizen project called .rds_delta that contains what appears to be change commands for something. A Google search reveals nothing. Does anyone know what this file is for and if it should be kept in the Git repository, or should we add this to .gitignore?
.rds_delta file:
#delete
#add
#modify
res/wgt/author-signature.xml
res/wgt/config.xml
res/wgt/signature1.xml
It was a file that inform application installer what is changed in your app between one package build and second one. This is needed to quick application install from SDK.
Some official link: https://developer.tizen.org/development/training/native-application/application-development-process/running-applications
In my opinion it shouldn't be throw into Git repository.

Adding an external project directory in phpStorm 6.0 to keeping workspace files separated from code?

I am try to keep separate workspace directory and code directories in my php project and sweating to understand/find how this could be achieved. A couple of revisions back I tried phpStorm and found that it does not provide such feature.
I just want to know if phpstorm 6.0 has this feature or still lacking it ? If possible please help me out.
Work Around
File > Settings >[Directories]
+[Add Content Root] to add external directory
Assuming that you have created project separate from code.Some of the tool might not work
as expected
This works for linux using sshfs, sorry for windows users.
I've created this folder structure in my pc
/mnt/remote_code/code/
And i have to mount code from server like this
sshfs user#server:/var/www/server_code/ /mnt/remote_code/code/
Code from server will be mounted in code folder
In PS I open this directory: /mnt/remote_code/
So, that means PS will create this folder /mnt/remote_code/.idea (indexing and saving all project and ide settings), and keeps the code folder (with remote code inside) without changes.
Hope it help you.
Greetings.

how to connect mysql databases in weka?

i want to use my mysql databases in weka in order to analysis data.
i download the mysql-connector-java-5.0.8-bin.jar and put that in weka folder in my program Files folder, and add this path to system variable path, but when i open the weka explorer and click the openDB, i don't know what should i write in the url textbox,
i don't know completely what should i do?
the error that i saw is:
problem connecting to database:
no suitable driver found for!
please give me a total guidance, thanks in advance.
add mysql-connector-java-5.1.12-bin.jar to CLASSPATH .
or put it in weka folder, navigate to weka installation folder and run command :
%java_home%/bin/java -Xmx300M -cp ".;weka.jar;mysql-connector-java-5.1.12-bin.jar;" weka.gui.GUIChooser
then click open DB and
fill in the proper user+password
put the url: jdbc:mysql://localhost:3306/DATABASENAME
Click Execute. The result window should show the results now.
For Weka 3.7.10, the classpath system environment variable is not took into account (at leat under Windows 7). The only working approach for me was to modify the RunWeka.ini file from the Weka installation folder as follows: the cp= setting was modified to:
cp=%CLASSPATH%;d:/Programs/jdbc/mysql-connector-java-5.1.26/mysql-connector-java-5.1.26-bin.jar
whereas only the %CLASSPATH%; setting was originally provided. Does not make much sense, but in worked.
find some introduction to WEKA and the environment variable:
http://weka.wikispaces.com/CLASSPATH
Copy mysql-connector-java-X.X.XX-bin.jar to /usr/share/java/
unizip /usr/share/java/weka.jar
edit: /usr/share/java/weka/experiment/DatabaseUtils.props
add:
jdbcDriver=com.mysql.jdbc.Driver
jdbcURL=jdbc:mysql://localhost:3306/test (with your server)
add shell
export CLASSPATH=/usr/share/java/mysql-connector-java-X.X.XX-bin.jar:
export CP=/usr/share/java/mysql-connector-java-X.X.XX-bin.jar::/usr/share/java/:/usr/shared/java/weka.jar
execute weka:
java -cp $CP -Xmx500m weka.gui.explorer.Explorer
Ready