def go_copy(self):
self.disable_all_buttons()
self.btnGo.configure(text = self.folder_source + ' >> ' + self.folder_target)
self.update()
for path, directories, files in sorted(os.walk(self.folder_source)):
for file in sorted(files):
if file.endswith('.mp3'):
path_source = os.path.join(path, file)
d = os.path.basename(self.folder_source)
f = os.path.relpath(path_source, self.folder_source)
path_target = os.path.join(self.folder_target, d, f)
os.makedirs(os.path.dirname(path_target), exist_ok=True)
shutil.copyfile(path_source, path_target)
self.update()
self.btnGo.configure(text='Let's go!')
self.enable_all_buttons()
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
$('.more-functions').click(function(){
var hiddenItems = $('.functions__item:hidden');
if(hiddenItems.length > 0) {
hiddenItems.slice(0,5).slideToggle('slow');
} else {
$('.functions__item:visible').slice(-5).slideToggle('slow');
}
//... rest of the code
});
function outerFunction() {
let x = "Hello";
return function innerFunction() {
console.log(x);
}
}
let myFunction = outerFunction();
myFunction(); // Output: "Hello"
$(document).ready(function() {
$('a.freply').magnificPopup({
type: 'ajax',
showCloseBtn: true,
removalDelay: 300,
closeBtnInside:true,
callbacks: {
close: function() {
//повторно инициализируйте свой код javascript здесь
}
}
});
});
<header>
<h1>My website</h1>
</header>
header {
width: 90%;
margin: 0 5%;
}
@media (min-width: 768px) {
header {
width: 80%;
margin: 0 10%;
}
}
<template>
<swiper :options="swiperOptions">
<swiper-slide v-for="(item, index) in items" :key="index">
{{ item }}
</swiper-slide>
<template v-slot:prev-button>
<CustomArrow type="prev"/>
</template>
<template v-slot:next-button>
<CustomArrow type="next"/>
</template>
</swiper>
</template>
<script>
import Swiper from 'swiper';
import CustomArrow from './CustomArrow.vue';
export default {
components: {
Swiper,
CustomArrow
},
data() {
return {
swiperOptions: {
// swiper options here
},
items: [
// items here
]
}
}
}
</script>
require_once('tcpdf.php');
$pdf = new TCPDF('P', 'cm', array(6, 4), true, 'UTF-8', false);
// ... your code to add content to the PDF ...
$pdf->Output('example.pdf', 'I');
var doc = new jsPDF('p', 'cm', [6, 4]);
// ... your code to add content to the PDF ...
doc.save('example.pdf');
{
"type": "product_preview",
"product_id": "12345"
}
{
"type": "order_product",
"product_id": "54321",
"quantity": "2"
}
def handle_payload(payload):
payload_data = json.loads(payload)
if payload_data["type"] == "product_preview":
product_id = payload_data["product_id"]
# code to show product preview
elif payload_data["type"] == "order_product":
product_id = payload_data["product_id"]
quantity = payload_data["quantity"]
# code to order the product
else:
# handle other payload types
.tile {
margin-left: 10px;
}
.tile:first-child {
margin-left: 0;
}
or
.tile:nth-child(n+1) {
margin-left: 0;
}
tcpdump -i any -s0 -vvv -w /home/Traces/name_%02d.pcap -C 50 -W 50 -G 21600 host 192.168.0.1
tcpdump -i any -s0 -vvv -w /home/Traces/name.pcap -C 50 host 192.168.0.1
import random
# generate 4 random digits from 1 to 9 without repetition
random_digits = random.sample(range(1, 10), 4)
# assign them to different variables
a, b, c, d = random_digits
print(a, b, c, d)
@media screen and (min-width: 600px) {
/* styles for devices with screen width >= 600px */
}
<div class="form-wrapper">
<form id="note-editor-wrapper" className="input-form" >
<div contentEditable="true" id="note-editor" role="textbox" tabIndex={0}></div>
</form>
</div>
.form-wrapper {
position: relative;
}
.input-form {
position: absolute;
width: 100%;
height: 100%;
}
.input-form {
max-width: 100%;
max-height: 100%;
}
.input-form {
min-width: 100%;
min-height: 100%;
}
.input-form {
width: 100%;
height: 100%;
}
// Select the image element with the class "glitch_effect"
const img = document.querySelector('.glitch_effect');
function setup() {
// Create a canvas and set its size
createCanvas(img.width, img.height);
// Draw the image on the canvas
image(img, 0, 0);
}
function draw() {
// Apply the glitch effect to the image
// (This would typically involve manipulating the pixels of the image)
// ...
}
const images = document.querySelectorAll('.glitch_effect');
images.forEach(image =>{
// apply effect to each image
})
<p>Opening Hours:</p>
<ul>
<li>Monday - Friday: <time>9:00</time> - <time>17:00</time></li>
<li>Saturday: <span class="closed">Closed</span></li>
<li>Sunday: <time>10:00</time> - <time>16:00</time></li>
</ul>
<p>Opening Hours:</p>
<ul>
<li>Monday - Friday: <time>9:00</time> - <time>17:00</time></li>
<li>Saturday: <span class="closed">Closed</span></li>
<li>Sunday: <time>10:00</time> - <time>16:00</time></li>
</ul>
<time datetime="2022-09-12T09:00">9:00</time>
<time datetime="2022-09-12T09:00" aria-label="Open at 9:00">9:00</time>
<meta itemprop="openingHours" content="Mo-Fr 09:00-17:00">