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
| # Define the source and destination folder paths | |
| $sourceFolder = "C:\Path\To\SourceFolder" | |
| $destinationFolder = "C:\Path\To\DestinationFolder" | |
| # Define the cutoff date for file modification (files older than this date will be moved) | |
| $cutoffDate = Get-Date "2023-01-01" | |
| # Create the destination folder if it doesn't exist | |
| if (-not (Test-Path -Path $destinationFolder)) { | |
| New-Item -ItemType Directory -Path $destinationFolder |
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
| https://pl.kotl.in/UacGP9iw3 | |
| /** | |
| * You can edit, run, and share this code. | |
| * play.kotlinlang.org | |
| */ | |
| fun main() { | |
| val numbers = arrayOf(13,79,74,35,76,12,43,71,87,72,23,91,31,67,58,61,96,16,81,92,41,6,32,86,77,42,0,55,68,14,53,26,25,11,45,94,75,1,93,83,52,7,4,22,34,64,69,88,65,66,39,97,27,29,78,5,49,82,54,46,51,28,98,36,48,15,2,50,38,24,89,59,8,3,18,47,10,90,21,80,73,33,85,62,19,37,57,95,60,20,99,17,63,56,84,44,40,70,9,30) | |
| val boards = arrayOf( |
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
| tic = time.perf_counter() | |
| products_json = [foo.to_json2() for foo in foos] | |
| toc = time.perf_counter() | |
| print(f"Hydrated foos: {toc - tic:0.4f} seconds") |
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
| if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { | |
| Intent intent = new Intent(); | |
| String packageName = getPackageName(); | |
| PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE); | |
| if (!pm.isIgnoringBatteryOptimizations(packageName)) { | |
| intent.setAction(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS); | |
| intent.setData(Uri.parse("package:" + packageName)); | |
| startActivity(intent); | |
| } | |
| } |
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 | |
| // goes in src/Controller/HelloController.php | |
| namespace Drupal\my_module\Controller; | |
| use Drupal\Core\Controller\ControllerBase; | |
| class HelloController extends ControllerBase { | |
| public function content() { |