This adds a new feature to Woocommerce Bookings 1.15.41. In a product availability, there's a new checkbox: Title: Full month is bookable? Description: Enabling this option will make bookings available until the end of the month. So if the end date would be June 7 or June 28, it would become June 30 in both cases.
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
# Copyright (c) 2015 Jim Rybarski | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in |
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
import java.text.SimpleDateFormat | |
import java.util.Date | |
def day = new SimpleDateFormat('EEEE').format(new Date()) | |
println day // Tuesday (for example) |
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
import asyncio | |
from dataclasses import dataclass | |
from typing import Any, List | |
import edgedb | |
from edgedb import AsyncIOConnection | |
@dataclass | |
class EdgeObjectProperty: |
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
import numpy | |
val = numpy.ascontiguousarray( | |
[ | |
[ | |
[[4, 8, 15], [16, 23, 42], [4, 8, 15], [16, 23, 42], [4, 8, 15]], | |
[[4, 8, 15], [16, 23, 42], [4, 8, 15], [16, 23, 42], [4, 8, 15]], | |
[[4, 8, 15], [16, 23, 42], [4, 8, 15], [16, 23, 42], [4, 8, 15]], | |
[[4, 8, 15], [16, 23, 42], [4, 8, 15], [16, 23, 42], [4, 8, 15]], | |
[[4, 8, 15], [16, 23, 42], [4, 8, 15], [16, 23, 42], [4, 8, 15]], |
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
""" | |
A decorator to avoid WET code. | |
I happened to have to use the same function, sometimes | |
within a transaction, sometimes not. | |
However, I wanted my function to be executed in a | |
transaction (atomicity needed). | |
I didn't want to have to write twice the same function, | |
depending on whether it was inside a transaction or not. |
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
###### .env ###### | |
EDGEDB_USER="my_user" | |
EDGEDB_PASSWORD="my_password" |
Russian verbs are divided into three categories: Group 1, Group 2, and Irregular Verbs.
- Group 1 verbs have their infinitive end in
-ать
or-ять
; - Group 2 verbs have their infinitive end in
-ить
(sometimes-еть
); - Irregular verbs are verbs that do not follow the rules of Group 1 or Group 2.
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
$ python3.11 -m mypy main.py | |
main.py:19: error: Argument 2 to "add_something" has incompatible type "Callable[[str], int]"; expected "SomeCallback" [arg-type] | |
Found 1 error in 1 file (checked 1 source file) |