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
// copy mailing street to contact | |
trigger on Account (before insert, before edit) | |
{ | |
List<Account> accounts = [SELECT ID, MailingStreet FROM Account WHERE AccountId = trigger.new]; | |
for(int i = 0; i < accounts.length(); i++) | |
{ | |
Account a = accounts[i]; | |
List<Contact> contacts = [SELECT ID, MalingStreet from Contact WHERE AccountId = a.Id]; | |
for(Contact c : contacts) |
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
////oAuth related code | |
//hardcoded here for easily tweaking this. should move this to ScriptProperties or better parameterize them | |
//step 1. we can actually start directly here if that is necessary | |
var AUTHORIZE_URL = '/services/oauth2/authorize'; | |
//step 2. after we get the callback, go get token |
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 onActivity on Event (before insert, before update) | |
{ | |
List<Antrag__c> antraege = new List<Antrag__c>(); | |
for(Event e : trigger.new) | |
{ | |
if(e.Abwesenheitsart__c == 'Krankheit' || e.Abwesenheitsart__c == 'Urlaub') | |
{ | |
if(e.WhatId == null) | |
{ | |
Antrag__c newAntrag = new Antrag__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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script src="http://code.highcharts.com/highcharts.js"></script> | |
<script src="http://code.highcharts.com/modules/exporting.js"></script> | |
</head> | |
<body> | |
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div> |
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 strict'; | |
/** | |
* @ngdoc function | |
* @name treeviewHeidelbergApp.controller:HeidelbergtreeviewCtrl | |
* @description | |
* # HeidelbergtreeviewCtrl | |
* Controller of the treeviewHeidelbergApp | |
*/ | |
var slice = [].slice; |
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 void massUpdate() { | |
// first loop (don't forget to use Lists | |
for (List < Contact > contacts: [SELECT FirstName, LastName FROM Contact]) { | |
for (Contact c: contacts) { // 2nd for loop | |
if (c.FirstName == 'Barbara' && | |
c.LastName == 'Gordon') { | |
c.LastName = 'Wayne'; | |
} | |
} | |
update contacts; // update is part of the 1st for loop |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<hotelliste> | |
<hotelkette name ="tempelhotels"> | |
<hotel name="Devisen-Tempel"> | |
<ausstattung typ="Casino" /> | |
<ausstattung typ="Sonnenbank" /> | |
<gaeste> | |
<gast> | |
<name>Gerald Futsch</name> | |
<zimmer>343</zimmer> |
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 URL dispatcher | |
*/ | |
@RestResource(urlMapping = '/*') | |
global class RestDispatcher | |
{ | |
// dispatchables | |
static Map<RequestType, List<Dispatchable>> dispatchables; | |
// requestTypes | |
enum RequestType {HTTPGET, HTTPPOST, HTTPPUT, HTTPDELETE, HTTPPATCH} |
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
{ | |
"hd_geometry.heads": "-1", | |
"hd_geometry.sectors": "63", | |
"hd_geometry.start": 0, | |
"hd_geometry.cylinders": 2088, | |
"HDIO_GET_UNMASKINTR": 140518042901248, | |
"HDIO_GET_MULTCOUNT": 140518042901248, | |
"HDIO_GET_IDENTITY": "@�??VBaa570e48-83e1c9011.0VBOXHARDDISK��@���??���xxxx~"ht@h4@@��", | |
"HDIO_GET_KEEPSETTINGS": 140518042901248, | |
"HDIO_GET_32BIT": 140518042901249, |
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
List<CronTrigger> listCronTrigger = [SELECT Id, CronExpression, EndTime, NextFireTime, OwnerId, | |
PreviousFireTime, StartTime, State, TimesTriggered, TimeZoneSidKey FROM CronTrigger | |
WHERE State != 'DELETED']; | |
System.debug('#### Number of jobs: '+listCronTrigger.size()); | |
if (listCronTrigger.size() > 0) | |
{ | |
for (CronTrigger aCronTrigger : listCronTrigger) | |
{ | |
System.abortJob(aCronTrigger.Id); |
NewerOlder