Categories
Development

From Javafx WebEngine calling outside function with for-each loop

I have to show a lot of markers on a map(WebView). The data for markers is stored in HashMap(Map tocka), the function to add marker is an outside function from JavaScript an I call it from my WebViewLodingListener class: public class WebviewLoadListner implements ChangeListener<State>{ Map<String, TockaXY> tocka= SampleController.output; @Override public void changed(ObservableValue<? extends State> observable, […]

Categories
Development

Copy HTML Table Tag With Format/Style to Clipboard

I am trying the copy HTML table element tag with format. I have followed these Stackoverflow answers but still only text is being copy without format. https://stackoverflow.com/a/38821410 https://stackoverflow.com/a/30566157 Here is my javascript code: function selectElementContents(el) { var body = document.body, range, sel; if (document.createRange && window.getSelection) { range = document.createRange(); sel = window.getSelection(); sel.removeAllRanges(); try […]

Categories
Development

Delete all gmail promotions in gmail

I’m trying to delete all emails in my promotions tab with the following code that I found and modified, but I’m getting an error “Response Code: 404. Message: Not Found. (line 4, file “Code”)Dismiss” Here is the code that I’m using: function deleteForever(userId) { var threads = GmailApp.search(“category:social”); for (var i = 0; i < […]

Categories
Development JSON

laravel update json query

I have mysql db with column that called “info”, this is json column. I have there this json: { “pizza”:{ “sugar”:”yes”, “calorie”:”100″, “protein”:”no” }, “hamburger”:{ “sugar”:”no”, “calorie”:”120″, “protein”:”yes” } } when I want to update for example the calorie of the pizza there is no problem: DB::table(‘food’)->where(‘id’, ‘=’, ‘1’) ->update(array(‘info->pizza->calorie’ => ’90’)); then in the […]

Categories
Development

Where change state in Redux?

so I finally understood Flux architecture with Redux (I connect every function with actions and call services from there) Currently I have this problem: State of my component: this.state = { username: ”, counter: ”, email: ”, buttonText: ‘textbefore’, } I have function in this component (where i dispatch action): handleSubmit(e) { e.preventDefault() if(username && […]

Categories
Development

Is it possible to query firestore for 1 document that contains a unique set of keywords that can scale without it costing a fortune?

In a firebase firestore database of blog posts, i am faced with a business rule that requires me to enforce that no two blog posts can share a matching set of keywords. Order does not matter, just that each blog post must contain a unique set of keywords. With that said. Is it possible to […]

Categories
Development

An assembly specified in the application dependencies manifest (

When I run: dotnet ef migrations add InitialCreate It errors: Error: An assembly specified in the application dependencies manifest (idb-dialog-flow.deps.json) was not found: package: ‘idb-dialog-flow’, version: ‘1.0.0’ path: ‘idb-dialog-flow.dll’ Here is a link to my project: https://github.com/islaam-database/chatbot. How do I get this to work? Edit: I forgot to mention that this project is an Azure […]

Categories
Development

Remove duplicate based on 2 rows value

So I have a database with more than 2000 line and I wanted to delete the duplicate value based on 2 rows. For Example : no server name 1 serv1 a 2 serv1 b 3 serv1 b 4 serv1 b 5 serv2 a 6 serv2 b 7 serv2 c 8 serv2 c So basically I […]

Categories
Development

Issues trying to close a bat file from a vbs script

i’m trying to help my little brother with a vbs script file, i’ve never used vbs, and i’m having serious issues on finding out how to end a bat file that i’ve opened with the vbs script after 2 seconds I’ve tried terminate but it doesn’t work, even running another shell with taskkill and the […]

Categories
Development

Jinja2 and ansible/python : jinja2.exceptions.TemplateAssertionError: no filter named ‘bool’

I try to translate this line enabled: “” with jinja2 library code : template = env.get_template(file) But the result is KO and the error message is : jinja2.exceptions.TemplateAssertionError: no filter named ‘bool’ I need to import sometinhg else ?