This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const formPost = (fields, path) => { | |
| const form = document.createElement("form"); | |
| form.method = "POST"; | |
| form.action = path; | |
| Object.entries(fields).forEach(field => { | |
| const hiddenField = document.createElement("input"); | |
| hiddenField.type = "hidden"; | |
| hiddenField.name = field[0]; | |
| hiddenField.value = field[1]; | |
| form.appendChild(hiddenField); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FullSearchQueryParser { | |
| //SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_DEFAULT_STOPWORD; | |
| private static final List<String> stopWords = List.of( | |
| "a", "about", "an", "are", | |
| "as", "at", "be", "by", | |
| "com", "de", "en", "for", | |
| "from", "how", "i", "in", | |
| "is", "it", "la", "of", | |
| "on", "or", "that", "the", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from jinja2 import Template | |
| template = Template(""" | |
| {% for lang in my_var.split(',') %} | |
| Language: {{ lang }} | |
| {% endfor %} | |
| """) | |
| output = template.render(my_var="en,nl") | |
| print(output) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ansible localhost -m debug -a 'msg={{ "en,nl".split(",") }}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - hosts: localhost | |
| gather_facts: no | |
| vars: | |
| my_var: "en,nl" | |
| tasks: | |
| - debug: | |
| msg: | | |
| {% for lang in my_var.split(',') %} | |
| Language: {{ lang }} | |
| {% endfor %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const dynamicMailToLink = email => { | |
| const link = document.createElement("a"); | |
| link.href = `mailto:${email}` | |
| link.style.display = "none"; | |
| document.body.appendChild(link); | |
| link.click(); | |
| document.body.removeChild(link); | |
| } |
OlderNewer