This file contains hidden or 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
<polymer-element name="django-ajax" extends="core-ajax"> | |
<script> | |
Polymer({ | |
getCSRFCookie: function() { | |
b = document.cookie.match('(^|;)\\s*csrftoken\\s*=\\s*([^;]+)'); | |
return b ? b.pop() : ''; | |
}, | |
ready: function() { | |
this.super(); | |
this.headers = { |
This file contains hidden or 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
package com.ds.tree.rbtree; | |
import java.util.LinkedList; | |
import java.util.Queue; | |
import com.ds.tree.adt.BinarySearchTree; | |
import com.ds.tree.adt.TreeTraversal; | |
/** |
This file contains hidden or 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
Lekcija | |
- id | |
- naslov, | |
- redni broj, | |
- opis | |
Tekst | |
- id_vjezbe | |
- id_rijecnika | |
- id_ |
This file contains hidden or 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
sub read_file { | |
my $file_name = shift; | |
print STDERR "READ $file_name ... "; | |
my @file; | |
open(FH, "< $file_name") or die("Can't read $file_name: $!\n"); | |
while (<FH>) { | |
chomp; | |
my @t = split /\t/; | |
@t = map { s/^\s+//g; s/\s+$//g; $_ } @t; | |
push @file, \@t; |
This file contains hidden or 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 controller="ActionSupportParamDemoController"> | |
<apex:form> | |
<apex:repeat value="{!accounts}" var="account"> | |
<apex:inputCheckbox value="{!account.IsActive__c}"> | |
<apex:actionSupport event="onchange" | |
action="{!handleAccountCheckboxChange}"> | |
<apex:param id="account" name="accountId" value="{!account.Id}" | |
assignTo="{!targetAccountId}"/> | |
</apex:actionSupport> | |
</apex:inputCheckbox> |
This file contains hidden or 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 SetNewOwner on Case (before insert, before update) { | |
for (Case eachCase : Trigger.new) { | |
if (eachCase.NewOwner__c != null) { | |
eachCase.OwnerId = eachCase.NewOwner__c; | |
eachCase.NewOwner__c = null; | |
} | |
} | |
} |
This file contains hidden or 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 controller="PieChartRemoteController"> | |
<script> | |
var noData = new Object(); // Simply a dummy placeholder for data attribute | |
var App = App || {}; // To hold functions | |
App.retrieveChartData = function(callback) { | |
var year = document.getElementById('theYear').value; | |
Visualforce.remoting.Manager.invokeAction( | |
'{!$RemoteAction.PieChartRemoteController.getRemotePieData}', | |
year, |
This file contains hidden or 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
/* | |
* Database.Batchable that can be executed, assuming you have a custom object | |
* named Experiment__c that already exists in your org, with a custom | |
* Text field named Title__c | |
*/ | |
global class BatchableExperiment | |
implements Database.Batchable<Task>, Iterable<Task>, Iterator<Task> { | |
/* | |
* The ID of the Experiment record created for this batch job |
This file contains hidden or 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 NullSObjectPropertyBugDemoController { | |
@AuraEnabled | |
public static Id editLead(Lead newLead) { | |
Id newLeadId = null; | |
try { | |
upsert newLead; | |
newLeadId = newLead.Id; | |
} |