Use of undefined constant SERVICE_HTTP_PATH - assumed 'SERVICE_HTTP_PATH' in YII2 - yii2

SERVICE_HTTP_PATH is not getting recognised although it has been added into the XML file which contains this for web service URL.Do I need to include the XML file in the controller? If yes then how?

The problem was because I was trying to use Zend format along with YII2. Actually there is no config.inc.in file in Yii2 so we have to read the properties of the XML file using different functions and run a foreach on it so as to achieve the desired URL value.

Related

How to Read CSV file using Power Automate?

I have added CSV file to SharePoint Documents library.
I needs to read that CSV file using Power Automate / Flow.
I have created Power Automate flow. Below is the screenshot fro the same.
Which CSV parser do i need to use for read data from file content action?
Can anyone help me for the same?
Thanks
If you want to retrieve the content of the CSV without a premium connector you could use an expression to convert the $content property of the Get File Content action into a string value. You can use the base64tostring function for this.
Below is an example
base64tostring(outputs('Get_file_content')?['body']['$content'])

Extract JSON Data From ThingSpeak API

so i want to get the value from one oof my fields in my thingspeak, i'm able to extract data from my channels but i want to get only one specific field
i read the documentation and the api link that looks like this
https://api.thingspeak.com/channels/<channel_id>/feeds.json?results=1
and when i opened the link it showed this
{"channel":{"id":1688112,"name":"ESP8266 - Web Controlled LED","latitude":"0.0","longitude":"0.0","field1":"Command","field2":"Red LED","field3":"Green LED","field4":"Blue Led","created_at":"2022-03-29T00:36:06Z","updated_at":"2022-04-06T03:12:36Z","last_entry_id":443},"feeds":[{"created_at":"2022-04-10T07:06:01Z","entry_id":443,"field1":null,"field2":"0","field3":"0","field4":"0"}]}
so my question is how do i extract the data for example from my field2 data where "field2":"0"?
i want to use it for my project in my html where later it can do some functions in my content.
thanks!
It really depends on the program you use.
But usually you find a JSON library to be installed in your IDE.
With it you extract any field from the JSON file

Use Include Controller with dynamic path

I created a jmeter project with the included controller, which calls another jmx.
I need to dynamically construct the path using a csv in which there are the names of the jmx children to be called. For example C: performance $ {JmxName}.
I tried using the CSV Data Set Config but the included controller does not recognize the variable (Error displayed: File "C:\performance\${JmxName}" not found for Include Controller "Include Controller")
do you have ideas on how to reach the goal?
thank you in advance
According to the documentation:
This element does not support variables/functions in the filename field
So you will not be able to achieve this using Include Controller.
The options are in:
Include your "children" JMX scripts into the main JMX script and refer them via Module Controller where required. If you need to choose this or that scenario basing on the value of the variable from the CSV file - put the Module Controller's under the Switch Controller
If you cannot include children JMX scripts into the main one you can kick off them as separate processes using i.e. OS Process Sampler. The test results can be combined after the execution using i.e. Merge Results tool

Read properties file with JSON format

I have a Java code using selenium where I have a properties file which is in JSON format with multiple values and I want to use that file in Jenkins. For that I am using "This project is parameterized" option where I am selecting "File parameters" option.
So My question is How to use the JSON format in Jenkins? Am I doing is correct and what changes we have to make in code for that?
Can anyone help on this?
The "File parameters" is not working in the way you think, it is not like Jenkins will parse file and give you something like key/value map - no.
What is it doing is follwoing , you basically upload file and then how you use it is up to you, so in other words, if that file is for you java code, set the path for that file using the JVM params (e.g. -DpropertiesFilePath = ${abc.xyz}) and then Jenkins will parse the ${abc.xyz} for you and you java code will have proper path to file.
Otherwise, if you want to use the properties inside that JSON file itself for jenkins job configuration needs, then you have to write Jenkins job using either DSL or Jenkinsfile, in which having full access to file you can use for example JsonSlupper and parse Json file and assign properties to stages or whatever you need in Jenkins job walkthrow.

symfony2 store read-only configuration

What is the best way to store read-only configuration in symfony?
I have some name/description pairs inside a JSON file, currently sitting in a bundle's resource directory that I'd like to use inside my controllers and views but don't want to insert into my database.
And what do you recommend for parsing / getting the values to display? Making a specific service for the DiC doesn't feel to good tbh..
Same scenario with me ,I worked with ymls file , create a yml file in config folder like product.yml , parse it in controller then send its josn to template .
And this is the right way to play with static data .