This file contains 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
/** | |
* @description : This class aims to be an alternative to Autonumber setting on | |
* text field type, offering methods to copy data from other fields | |
* avoiding exceed field length by abbreviating the content with... | |
* @author : caiodelfava@gmail.com | |
* @group : Lightning Cloud Hidden Village | |
* @last modified on : 2022-11-30 | |
* @last modified by : caiodelfava@gmail.com | |
* Modifications Log | |
* Ver Date Author Modification |
This file contains 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
# names of hurricanes | |
names = ['Cuba I', 'San Felipe II Okeechobee', 'Bahamas', 'Cuba II', 'CubaBrownsville', 'Tampico', 'Labor Day', | |
'New England', 'Carol', 'Janet', 'Carla', 'Hattie', 'Beulah', 'Camille', 'Edith', 'Anita', 'David', | |
'Allen', 'Gilbert', 'Hugo', 'Andrew', 'Mitch', 'Isabel', 'Ivan', 'Emily', 'Katrina', 'Rita', 'Wilma', | |
'Dean', 'Felix', 'Matthew', 'Irma', 'Maria', 'Michael'] | |
# months of hurricanes | |
months = ['October', 'September', 'September', 'November', 'August', 'September', 'September', 'September', | |
'September', 'September', 'September', 'October', 'September', 'August', 'September', 'September', | |
'August', 'August', 'September', 'September', 'August', 'October', 'September', 'September', 'July', |
This file contains 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
hairstyles = ["bouffant", "pixie", "dreadlocks", "crew", "bowl", "bob", "mohawk", "flattop"] | |
prices = [30, 25, 40, 20, 20, 35, 50, 35] | |
last_week = [2, 3, 5, 8, 4, 4, 6, 2] | |
total_price = 0 | |
for price in prices: | |
total_price += price | |
average_price = total_price / len(prices) | |
print("Average Haircut Price : " + str(average_price)) |
This file contains 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
/** | |
* This method is called when the plus button is clicked. | |
*/ | |
public void increment(View view) { | |
if (quantity == 100) { | |
// Show an error message as a toast | |
Toast.makeText(this, "You cannot have more than 100 coffees", Toast.LENGTH_SHORT).show(); | |
// Exit this method early because there's nothing left to do | |
return; | |
} |
This file contains 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
int numberOfEmailsInInbox = 0; | |
int numberOfDraftEmails = 2; | |
String emailMessage = "You have " + numberOfEmailsInInbox + " emails. "; | |
String draftMessage = "You have " + numberOfDraftEmails + " email drafts."; | |
if (numberOfEmailsInInbox == 0) { | |
emailMessage = "You have no new messages. "; | |
} | |
if (numberOfDraftEmails == 0) { | |
draftMessage = "You have no new drafts."; |
This file contains 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
@isTest | |
//class name | |
private class vacationdaysTEST{ | |
//test method | |
private static testMethod void vacationdaysTEST(){ | |
//instantiate the object on which the extension is defined. | |
Leave_Request__c lr = new Leave_Request__c(); | |
//instantiate standardcontroller, pass object variable into constructor | |
ApexPages.StandardController sc = new ApexPages.StandardController(lr); | |
//instantiate extension controller, pass standard controller variable into constructor |
This file contains 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
de | |
a | |
o | |
que | |
e | |
do | |
da | |
em | |
um | |
para |