I'd like to read the value of a setting in the ejabberd.yml file and was wondering if I could still use application:get_env(ejabberd, ) to do so, as I was able to do from the ejabberd.cfg file which is a collection of erlang terms.
Any clues? I've tried searching and when I try using the application:get_env() call, I get back the value 'undefined' ...
I'm thinking that it must be a simple thing to do, and would appreciate all help!
Thanks,
Ombud.
Related
I am trying to set up json logging for log4j2 described here:
https://logging.apache.org/log4j/2.x/manual/json-template-layout.html
However, the format of the output is not matching what I expect. This is what I am getting:
{"#version":1,"source_host":"localhost","message":"hello world","thread_name":"main","#timestamp":"2021-08-17T15:44:54.948-04:00","level":"INFO","logger_name":"com.logging.test.LoggingTest"}
At first I created my own template but this wasn't working so I set it to the logstash one described in the docs:
<JsonTemplateLayout eventTemplateUri="classpath:LogstashJsonEventLayoutV1.json"/>
I am not getting the line number in the output or a lot of other fields. I know it is picking up the eventTemplateURI field because if I set it to a value I know doesn't exist then I get an exception on start up.
I am using log4j-slf4j-impl, does anything special need to be done to make it work with this?
Thanks
Here's what I'm doing:
=IMPORTXML("https://www.predictit.org/api/marketdata/markets/7164", "/MarketData/Contracts/MarketContract/ID")
The other answers I've seen about this have said that Javascript would be the issue, but the page in question seems to load without it, and I've tried using IMPORTJSON and IMPORTFROMWEB to no avail.
Please help!
You are input incorrect parameter for the xmlpath, a proper formula should be as following and you need to spend sometime to find the correct xmlpath to extract the specific string or information you want,
=IMPORTXML("https://www.predictit.org/api/marketdata/markets/7164","//a/#href")
Here is one example from Google:
=IMPORTXML("https://en.wikipedia.org/wiki/Moon_landing", "//a/#href")
I'd like to a construct which is going to kick in by default and therefore I'll be able to extract some metadata and remove it from the parsed YAML.
For instance I could have a construct to do that but in SnakeYAML to register a construct one has to specify a String for it meaning that it has to have a name. However, I don't want that but instead I want my tag to be a root one, a default one which always will kick in so to say.
Is there a possibility to do something like that?
Cheers,
I actually found the answer myself, there is a property
at org.yaml.snakeyaml.constructor.BaseConstructor#rootTag which one can set a tag like:
super.rootTag = new Tag("!root");
The rest is simple because one has to only register that construct to org.yaml.snakeyaml.constructor.BaseConstructor#yamlConstructors and you are done. Your construct will be triggered in all read attempts.
Hope that helps to someone,
Cheers,
I have a table called settings, when I would change or enter data into the form it did not change the data in the table. In addition on form an image upload file is not running, There may be the wrong code below.
(Solved by me)
Maybe someone can help me Related to this.
What you are doing here is tottaly in secure and your data can be hacked / manipulate really fast.
Why dont you use a framework like codeignighter there are about 100 easy frameworks that will help you manage database a lot easyer.
Are you sure that you are updating the wrond ID? where id = 1, seems to be not dynamic.
Please post your error http://www.w3schools.com/php/func_mysql_error.asp
I know it is not so related to your question, but you should see these light frameworks:
http://kohanaframework.org/
https://github.com/ElbertF/Swiftlet
http://ellislab.com/codeigniter
You're not checking the return status of of your query, so if it's not working you wouldn't know. Do this:
mysql_query("UPDATE settings SET site='$name',keywords='$keys',descrp='$desc',email='$email',fbpage='$fbpage',twitter='$twitter',gplus='$gplus',disclaimer='$disclaimer',template='$template' WHERE id=1")
or die(mysql_error());
Note: mysql_*() is deprecated: you shouldn't use it. Use mysqli_*() or PDO instead.
Also: You are susceptible to an SQL Injection attack. You should escape your input variables with mysql_real_escape_string() (or the equivalent if you switch to mysqli), or consider moving to prepared statements.
I cant seem to figure this one out.
Exporting data to Excel works OK but I do not want to use the original table field names but ones of my choice.
Right now, the original field names get exported (with the data,of course). QExport4XLS1 is linked to the data-set. I tried to use qeCustomSource41 (custom source) and changing field names - it worked OK but no data got exported. Only the field names.
Does anyone know how to accomplish this ? I never used these components before, so I am just trying them out. The documentation is horrible.
It seems the only way to do this is through QExport4Dialog1 and not through QExport4XLS1.