netlink ipset list response format - netlink

I'm working on the golang netlink ipset control library.
Everything is working fine except I have no idea how to parse the answer I'm getting from netlink for the list command.
The data I'm getting obviously is what I'm looking for.
But I'm not able to find a spec for the format!
Can anybody point me to the right doc?
Thank you

Finally I found a lib https://github.com/subgraph/go-nfnetlink, which contains a working parser.

Related

Can anyone give me an example of sdpTransform option in simplepeer

Hi I've been searching for an example of how to use sdpTransform feature in simple peer and haven't found anything yet. Also is there any way to check what codecs were used in mediaStream object. Is there anyway to create custom sdp offer in SimplePeer.
the parameter must contain a function that returns the transformed sdp. Found this github issue as example. github

Ionic 3 - Load translation from API URL

I'm actually working on a mobile app with Ionic 3, everything is ok till now. Eveything work fine. I set translation with ngx-translate. So i got all my files in a folder "/assets/i18n/". I can call my data in templates or components so everything is ok.
But my client, wants that those translation files come from a web API. SO they can update them as they want. I searched here on found some things like this link "Ngx-translate - TranslateHttpLoader with external URL" ( I didn't want to answer this topic cause I don't have answer, just questions and as my profile is new I can't comment it )
I read all of this but i can't understand it perfectly so, i keep missing something, so please how can i create a custom loader for calling those translation file ?
I tried to create a provider/service but is that a specific kind of file for a loader ? Where to put it in my app ?
That's the last stop for my app to run. So please if someone know the answer can you help me a little bit with it ? I want to understand exactly how to call those json film from URL !
I can add more code if you want, but actually i got no error i just don't know how to create this "loader" from last topic. And where to put it.

Endpoint with Google Flex env

There is bit of a confusion, wondering if somebody can help me with this.
Here is an example which is a year old and uses goapp with polymer and endpoint
https://github.com/googlesamples/cloud-polymer-go
Here is a recent example using gcloud
https://github.com/GoogleCloudPlatform/golang-samples/tree/master/appengine_flexible/endpoints
Both are different as google changed its approach.
As per second example, I am able to create endpoint functions which uses json for input and output. However there are 2 problems
1st. It is throwing error if I put functions in different file under same package. It works when I run go run .go. but then I dont understand how app.yaml come into picture. I think this url /_ah/spi/. should work
2nd. I am using postman app to check the request and response from endpoint. Is there a better way? I thought google does provide a platform to test endpoint.
Is there any example which implements examples similar to 1st one with new libraries?
looking forward for your help. Thanks.

Can't upload new product image backend prestashop

I need a little help here, i hope someone here can help me for a hint or clue.
First of all, I'm not programmer. I'm just web admin who can use cms and basic html.
I was using PrestaShop for my online shop. In the backend, I can't upload new product image anymore.
The error just blank without any sign for me. Here for the screenshot:
I appreciate it, if someone can help me, thanks, and sorry for my english.
#PanjiWiyono This errors don't really give us a quality information, but this is a start. In your JS code should be a ajax query that has an error when converting results to json (first error). You should check what's the exact error that this request is returning by inspecting in browser developer console.
If you detect that the second error is in fact, the response of this ajax query, well now we almost have the problem.
The second error should be related to data size. Check this: Error while sending QUERY packet
Anyway, you should check DbPDO.php class. You can use debug_backtrace function to display the complete stack, but definitly if error is related to a basic PHP class issue you will have not help knowing wich classes are in calling stack.
Good luck.
Simple solution
maybe a extra module is in a conflict with the prestashop core files. go to advanced parameters, performance and disable third party modules and try again.
other option is reupload admin folder with other name and
js folder check again
hope it will work for you

Get last successfull build on Hudson

I was wondering if anyone know of a way or a plug in to get the last build version with result of success from a particular Hudson job using the CLI somehow.
I can see this result is held in the [DateTime]\build.xml file so I could write something to grab the result but was wondering if anyone has done this already or a know of a way to use the CLI to grab this information?
I have tried to find the information on the documentation but was unable to find the answer. If you need anymore detail then let me know.
I'm a bit late to the party here, but you can also just use the URL http://localhost:8081/job/jobname/lastSuccessfulBuild to get the last successful build. If you want to extract specific data from that page you can use http://localhost:8081/job/jobname/lastSuccessfulBuild//api
You can do it with XPATH:
http://localhost:8081/api/xml?depth=2&xpath=/hudson/job/name[text()="JReport2"]/../build/result[text()="SUCCESS"]/../../build[1]/number/text()
In the above example I'm getting the last successful build number of the build named JReport2. You can query your Hudson server via WGET or CURL sending it an HTTP GET that is equivalent to that URI.
The XPath expression can be shortened, but in the long form it is easier to understand what's going on.
In general, it is instructive to enter http://<hudson-server>/api/xml in your browser and examine the output.
Correct xpath is as:
...&xpath=/hudson/job/name[text()="...name of project..."]/../build/result[text()='SUCCESS']/../number/text()
but it is not work.
Working xpath is as:
http://HudsonServer:Port/job/..nameOfProject../lastSuccessfulBuild/api/xml?xpath=//number/text()
As described above:
...&xpath=/hudson/job/name[text()="JReport2"]/../build/result[text()="SUCCESS"]/../../build[1]/number/text()
it is not correct xpath because /../../build[1]/number/text() always gives the first build.