Skip to content

Instantly share code, notes, and snippets.

<apex:page >
<!-- Begin Default Content REMOVE THIS -->
<h1>Congratulations</h1>
This is your new Page: tabbedAccount
<!-- End Default Content REMOVE THIS -->
<apex:tabPanel switchType="client" selectedTab="name2" id="tabpanel">
<apex:tab label="One" id="tabone" title="Some One" name="name1">Content for tab 1</apex:tab>
<apex:tab label="Two" id="tabtwo" title="Some Two" name="name2">Content for tab 2</apex:tab>
</apex:tabPanel>
@sudikrt
sudikrt / AddPrimaryContact.apxc
Created August 31, 2017 05:23
QuableApex Not worked
public class AddPrimaryContact implements Queueable {
Contact cont;
String statShort;
public AddPrimaryContact (Contact ct, String shortName) {
cont = ct;
statShort = shortName;
}
public void execute (QueueableContext queue ) {
List<Contact> updateList = new List<Contact> ();
@sudikrt
sudikrt / OpportunityAssignment_rudimmentry.apxc
Created August 24, 2017 06:11
Create one Object Reporting country . Create 3 fields country_code,country,capital. In object Account create field country_code. Now Create Lookup to Reporting country in Opportunity. Lets take example one record of Object Reporting country country_code country capital 91 India Delhi if In Account Object country_code = 91 then all opportunities …
public class Testhandler {
public static void handleTrigger (Map<Id, Account> newVal) {
Set<Decimal> cCode = new set<Decimal> ();
Map<Decimal, Reporting_country__c> ctrMap = new Map <Decimal, Reporting_country__c> ();
List<Opportunity> listToUpdate = new List<Opportunity> ();
for (Account a : newVal.values()) {
cCode.add (a.country_code__c);
}
@sudikrt
sudikrt / Delete_demo.apxc
Created August 14, 2017 08:22
Salesforce DML and its methods
Contact [] delContact = [SELECT Id FROM Contact where LastName = 'YLast'];
delete delContact;
System.debug(delContact);
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include <stdlib.h>
/* Function to write the data to the socket */
int write_socket (int socket_fd, const char* text)
{
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <unistd.h>
#define ORGINAL_FILE "/root/original_file"
#define DUPLICATE_FILE "/root/deplicate_file"
#include<stdio.h>
#include<conio.h>
int n,a[10][10],visited[10],q[10],f=0,r=-1,x[10];
void bfs(int v)
{
int i;
for(i=0;i<n;i++)
{
if(a[v][i]&&!visited[i]){
#include<stdio.h>
#include<conio.h>
int a[10][10],count=0;visited[10],n;
void dfs(int v)
{
int i;
visited[v]=1;
for(i=0;i<n;i++)
{
if(a[v][i]&&!visited[i]){
//http://polynomialtimes.com/algorithms/decrease-and-conquer/fake-coin-algorithm/
#include<stdio.h>
#include<conio.h>
char a[10],c1[10],c2[10],c3[10];
int w[10],n,i,m,sum1=0,sum2=0,sum3=0,tot,k,b[10],c[10],d[10],k1=0,k2=0,k3=0;
void min(int f[],int k,char r[])
{
for( i=0;i<k-1;i++)
{
if(f[i]>f[i+1])
#include<stdio.h>
main()
{
int m,n,m1,n1,i,j,k,a[10][10],b[10][10],r[10][10];
printf("\nEnter the first matrix row & coloumn size:");
scanf("%d%d",&m,&n);
printf("Enter the matrix element:");
i=0;
r1:if(i<m)
{