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
//HtML | |
<form> | |
{% csrf_token %} | |
<input type="file" name="pic" accept="image/*" id="image"> | |
<input type="submit" id="send"> | |
</form> | |
//JS |
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
$('form').submit(function (e) { | |
e.preventDefault(); | |
var formData = new FormData($(this)); | |
var image_file = $("#file_select")[0].files[0]; | |
if (!image_file) { | |
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
import http.client | |
import ujson | |
def json_dump(data): | |
return ujson.dumps(ujson.loads(data), indent=4, escape_forward_slashes=False) | |
def search_web(host, url): | |
connection = http.client.HTTPConnection(host=host, timeout=10) | |
connection.request(method="GET", url=url) |
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 http.client | |
from lxml import html | |
conn = http.client.HTTPSConnection("www.thesaurus.com") | |
conn.request("GET", "/browse/honesty") | |
r1 = conn.getresponse() | |
data1 = r1.read() | |
# print(data1) | |
# raw html |
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
<template> | |
<div> | |
<h1 class="timer">{{toMin}}</h1> | |
</div> | |
</template> | |
<script> | |
export default { | |
data() { | |
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
<template> | |
<settings | |
v-model:day="store.day" | |
v-model:month="store.month" | |
v-model:year="store.year" | |
/> | |
<timeleft /> | |
</template> | |
<script> |
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
<template> | |
<datpicker | |
v-model:day="store.day" | |
v-model:month="store.month" | |
v-model:year="store.year" | |
@birthDate="checkit" | |
/> | |
</template> | |
<script> |
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
<template> | |
<div class="progress" :data-label="percent + '%'"> | |
<span | |
class="value" | |
:style="{ width: percent + '%', backgroundColor: getColor }" | |
></span> | |
</div> | |
<input type="range" min="0" max="100" v-model="percent" /> | |
</template> |
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
<template> | |
<main class="hero-full"> | |
<div class="text-center text-6xl font-bold text-white hero-body"> | |
<router-view /> | |
<Footer /> | |
</div> | |
</main> | |
</template> |
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 add from "lodash-es/add"; | |
import after from "lodash-es/after"; | |
import ary from "lodash-es/ary"; | |
import assign from "lodash-es/assign"; | |
import assignIn from "lodash-es/assignIn"; | |
import assignInWith from "lodash-es/assignInWith"; | |
import assignWith from "lodash-es/assignWith"; | |
import at from "lodash-es/at"; | |
import attempt from "lodash-es/attempt"; | |
import before from "lodash-es/before"; |
OlderNewer