I hereby claim:
- I am archtaqi on github.
- I am archtaqi (https://keybase.io/archtaqi) on keybase.
- I have a public key ASBwJMzs-zmtEWu1UtXE27xXBzk9mILNnZB_vGxNFbpNeAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
We are building a vacation management system where different types of vacations (Paid Vacation, Sick Leave, and Work From Home) need to be created dynamically based on user input.
Below is an incomplete PHP code snippet. Your task is to complete the VacationFactory class so that it properly creates instances of different vacation types using the Factory Pattern.
Use any online compiler to write code;
| <?php | |
| // Usage example: | |
| $calculator = new Calculator(); | |
| $result = $calculator->setValue(5)->add(3)->multiply(2)->getResult(); | |
| ?> |
| <?php | |
| function showDeveloperList(array $developers): void | |
| { | |
| foreach ($developers as $developer) { | |
| $expectedSalary = $developer->calculateExpectedSalary(); | |
| $experience = $developer->getExperience(); | |
| $githubLink = $developer->getGithubLink(); | |
| $data = [$expectedSalary, $experience, $githubLink]; |
There are a few limitations that you need to be aware of and this includes:
| for region in `aws ec2 describe-regions --query 'Regions[].RegionName' --output text`; do | |
| aws sns list-subscriptions --query "Subscriptions[?starts_with(Endpoint, 'arn:aws:sqs:')].[TopicArn, Endpoint]" --output text --region $region | |
| done |
| #!/bin/bash | |
| # | |
| # A script to create a daily mysqldump for crashplan | |
| # Defaults | |
| # Override them in /etc/default/mysqlbackupforcrashplan | |
| OUTPUTFILE=/var/local/full-backup.sql | |
| STATEFILE=/var/local/full-backup.sql.state | |
| CRONFILE=/etc/cron.d/mysqlbackupforcrashplan | |
| MYSQLDUMPBIN=/usr/bin/mysqldump |
| for bucket in `cat list-of-s3-buckets.txt`; do | |
| aws s3api put-bucket-lifecycle \ | |
| --bucket $bucket \ | |
| --lifecycle-configuration '{"Rules":[{"ID":"cleanup","Status":"Enabled","Prefix":"","Expiration":{"Days":1}}]}'; | |
| done |