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
Map<String, Profile> profileMap { | |
get { | |
if (profileMap == null) { | |
profileMap = new Map<String, Profile>(); | |
for (Profile p: [ | |
select Name | |
from Profile | |
]) { | |
profileMap.put(p.Name, p); |
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 would actually be your CaseTrigger.trigger but the hilighting wouldn't work then | |
List<ChatterPost> postsToInsert = new List<ChatterPost>(); | |
for (Case c: trigger.new) { | |
if (c.Status == 'collab') { | |
postsToInsert.add(new ChatterPost(...)); | |
} | |
if (!postsToInsert.isEmpty()) { |
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
Map<DateTime, User> userMap = new Map<DateTime, User>(); | |
for (User u: [select LastLoginDate from User where Id in:userIds]) { | |
userMap.put(u.LastLoginDate, u); | |
} |
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 AutoConverter on Lead (after insert) { | |
LeadStatus convertStatus = [ | |
select MasterLabel | |
from LeadStatus | |
where IsConverted = true | |
limit 1 | |
]; | |
List<Database.LeadConvert> leadConverts = new List<Database.LeadConvert>(); | |
for (Lead lead: Trigger.new) { |
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
/** | |
* Gets an admin user | |
* | |
* @return An admin user | |
*/ | |
public static User getAdminUser() { | |
Profile adminProfile = [ | |
select id | |
from profile | |
where name = 'System Administrator' |
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
System.debug(System.LoggingLevel.ERROR, '| vs ' + EncodingUtil.urlDecode('%7C;', 'UTF-8')); | |
if ('|' == EncodingUtil.urlDecode('%7C', 'UTF-8')) { | |
System.debug(System.LoggingLevel.ERROR, 'Expected: %7C'); | |
} else { | |
System.debug(System.LoggingLevel.ERROR, 'Unxpected: %7C'); | |
} | |
System.debug(System.LoggingLevel.ERROR, '| vs ' + EncodingUtil.urlDecode('|', 'UTF-8')); | |
if ('|' == EncodingUtil.urlDecode('|', 'UTF-8')) { | |
System.debug(System.LoggingLevel.ERROR, 'Expected: |'); |
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
#!/bin/bash | |
/usr/bin/node /home/$USER/bin/test_status.js |
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
class TestData { | |
public String data; | |
public TestData() {} | |
public TestData(String data) { | |
this.data = data; | |
} | |
} |
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
<apex:page docType="html-5.0" showHeader="false" applyBodyTag="false" applyHtmlTag="false" standardStylesheets="false"> | |
<html ng-app="objDescApp"> | |
<head> | |
<title>Object Description</title> | |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" /> | |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" /> | |
<style>body{padding-top:50px}.sub-header{padding-bottom:10px;border-bottom:1px solid #eee}.navbar-fixed-top{border:0}.sidebar{display:none}@media (min-width:768px){.sidebar{position:fixed;top:51px;bottom:0;left:0;z-index:1000;display:block;padding:20px;overflow-x:hidden;overflow-y:auto;background-color:#f5f5f5;border-right:1px solid #eee}}.nav-sidebar{margin-right:-21px;margin-bottom:20px;margin-left:-20px}.nav-sidebar>li>a{padding-right:20px;padding-left:20px}.nav-sidebar>.active>a,.nav-sidebar>.active>a:focus,.nav-sidebar>.active>a:hover{color:#fff;background-color:#428bca}.main{padding: |
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
┌─┬───────────── Not used. | |
│ │ ┌─────────── Bottom Ranged | |
│ │ │ ┌───────── Bottom Melee | |
│ │ │ │ ┌─────── Middle Ranged | |
│ │ │ │ │ ┌───── Middle Melee | |
│ │ │ │ │ │ ┌─── Top Ranged | |
│ │ │ │ │ │ │ ┌─ Top Melee | |
│ │ │ │ │ │ │ │ | |
0 0 0 0 0 0 0 0 |
OlderNewer