This file contains 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
interface BaseContract { | |
showProgress() | |
hideProgress() | |
} | |
interface Contract extends BaseContract { | |
interface View { |
This file contains 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
package com.company.project.components; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.MessageSource; | |
import org.springframework.context.support.MessageSourceAccessor; | |
import org.springframework.stereotype.Component; | |
import javax.annotation.PostConstruct; | |
import java.util.Locale; |
This file contains 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
# https://stackoverflow.com/questions/19875218/best-way-to-format-large-json-file-30-mb | |
cat ugly.json | python -mjson.tool > pretty.json |
This file contains 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
docker container run -it debian bash |
This file contains 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/python | |
# References: | |
# https://stackoverflow.com/a/15502713/6846888 | |
# http://python-notes.curiousefficiency.org/en/latest/python3/text_file_processing.html | |
import os | |
import sys | |
path = os.path.dirname(__file__) |
This file contains 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
import requests | |
#http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file | |
url = "http://localhost:5000/" | |
fin = open('simple_table.pdf', 'rb') | |
files = {'file': fin} | |
try: | |
r = requests.post(url, files=files) | |
print r.text |
- https://stackoverflow.com/questions/54966200/does-swift-have-standard-scope-functions-like-in-kotlin
extension Optional {
func `let`(do: (Wrapped)->()) {
guard let v = self else { return }
This file contains 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
is there any way to pass cors policy: | |
https://medium.com/@dtkatz/3-ways-to-fix-the-cors-error-and-how-access-control-allow-origin-works-d97d55946d9 | |
https://joke-api-strict-cors.appspot.com/random_joke | |
https://github.com/Rob--W/cors-anywhere | |
https://github.com/Rob--W/cors-anywhere/issues/39 | |
https://cors-anywhere.herokuapp.com/ |