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
| async def search_knowledge_base(query: str, product_category: str = None) -> List[Dict]: | |
| """Search knowledge base for relevant articles.""" | |
| # Implementation details... | |
| return relevant_articles | |
| async def update_ticket_status(ticket_id: str, new_status: str, notes: str = None) -> Dict: | |
| """Update the status of a support ticket.""" | |
| # Implementation details... | |
| return update_result |
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
| apt install libjansson4 libjansson-dev |
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
| add-apt-repository ppa:ubuntu-toolchain-r/ppa | |
| apt update | |
| apt install gcc-11 libgccjit0 libgccjit-11-dev | |
| apt build-dep emacs |
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
| <?php | |
| 6.674_083e-11; // float | |
| 299_792_458; // decimal | |
| 0xCAFE_F00D; // hexadecimal | |
| 0b0101_1111; // binary | |
| 0137_041; // octal |
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
| <?php | |
| // previously | |
| $number = 987654321.22; // hard to read | |
| // now | |
| $price = 987_654_321.22; // easy to read |
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
| <?php | |
| $arr0 = 'red'; | |
| $arr1 = [&$arr0, 'green', 'blue']; | |
| $arr2 = ['white', ...$arr1, 'black']; |
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
| <?php | |
| $arr1 = ['red', 'green', 'blue']; | |
| $arr2 = [...&$arr1]; |
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
| <?php | |
| function generator() { | |
| for ($i = 3; $i <= 5; $i++) { | |
| yield $i; | |
| } | |
| } | |
| $arr1 = [0, 1, 2, ...generator()]; |
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
| <?php | |
| function buildArray(){ | |
| return ['red', 'green', 'blue']; | |
| } | |
| $arr1 = [...buildArray(), 'black', 'violet', 'yellow']; | |
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
| <?php | |
| $arr1 = [1, 2, 3]; | |
| $arr2 = [4, 5, 6]; | |
| $arr3 = [...$arr1, ...$arr2]; | |
| $arr4 = [...$arr1, ...$arr3, 7, 8, 9]; |
NewerOlder