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
import { NestFactory } from '@nestjs/core'; | |
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; | |
import { AppModule } from './app.module'; | |
async function bootstrap() { | |
const app = await NestFactory.create(AppModule); | |
const config = new DocumentBuilder() | |
.setTitle('Cats example') | |
.setDescription('The cats API description') |
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
use std::path::PathBuf; | |
use std::collections::{BTreeMap, HashMap, HashSet}; | |
use std::thread; | |
use std::os::raw::c_void; | |
use std::rc::Rc; | |
use std::cell::{Cell, RefCell}; | |
use std::i16; | |
use std::time::Instant; | |
use failure::{err_msg, Error}; |
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
<!-- MAKE SURE THIS IS ROW 1 --> | |
<!-- 1. Google Fonts Code --> | |
<link href="http://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css"> | |
<link href="http://fonts.googleapis.com/css?family=Space+Mono" rel="stylesheet" type="text/css"> | |
<!-- 2. Dotty Cell Borders --> | |
<style> | |
td { | |
border: 1px dotted black; | |
} |
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
trigger DefaultEntitlement on Case (before insert, before update) { | |
Set<Id> accountIds = new Set<Id>(); | |
for (Case c : Trigger.new){ | |
if (c.EntitlementId == null && c.AccountId != null) { | |
accountIds.add(c.AccountId); | |
} | |
} | |
if(accountIds.size() > 0) { |
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
onSystemError: function(component, event, handler) { | |
// You can also use $A.log(), but messages logged using $A.log() do not appear in production environments | |
console.log(event.getParam("message")); | |
console.log(event.getParam("error")); | |
} |
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
public class AdvancedPieService { | |
public String getFlavour() { | |
return Pie_Settings__c.getInstance().Flavour__c; | |
} | |
} |
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
public class Examples { // Begin class scope | |
Integer classVariable; | |
void instanceMethod() { // Begin method scope | |
Integer methodVariable; | |
// We can access classVariable because it is defined in a parent scope | |
classVariable = 0; // OK! | |
// We can access methodVariable because it's defined in the current scope |
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
public class ShadowingExample { | |
private Integer shadow; | |
public ShadowingExample(Integer shadow) { | |
this.shadow = shadow; | |
} | |
public Integer getShadow() { | |
return shadow; | |
} |
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
public class Account { | |
} |
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
HttpRequest req = new HttpRequest(); | |
req.setEndpoint('https://api.example.com/path'); | |
req.setMethod('GET'); | |
String username = 'username'; | |
String password = 'password'; | |
Blob headerValue = Blob.valueOf(username + ':' + password); | |
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue); | |
req.setHeader('Authorization', authorizationHeader); |
NewerOlder