Showing posts with label templates. Show all posts
Showing posts with label templates. Show all posts
Tuesday, March 10, 2015
Google Sites API v1 2 Page Templates and Web Address Mappings
Today we’re releasing Google Sites API, version 1.2, which includes two top requested new features:
Web address mappings
Web address mappings are now programmatically accessible in the API using a new parameter on the site feed:
See our help center article for more information on web address mappings.
Page templates
A few months ago we launched site templates in the API, but there was no way to use page templates or access them programmatically. With the new page templates API, you can create templates as well as instantiate new pages from existing templates.
As an example usage, this Java snippet creates a new filecabinetpage from an existing template filecabinet:
Check out the documentation, updated Java guide, and changelog for further information.
Bug fixes in this release: 1903, 1762
Posted by Eric Bidelman , Google Sites API Team
Read more »
Web address mappings
Web address mappings are now programmatically accessible in the API using a new parameter on the site feed:
with-mappings=true. If you’re not familar with this feature in Google Sites, web address mappings enable users to point their own domains to a Google Site. For example, you can map the address http://www.mydomainsite.com to http://sites.google.com/a/domain.com/mysite. They’re a great way to fully customize a site.See our help center article for more information on web address mappings.
Page templates
A few months ago we launched site templates in the API, but there was no way to use page templates or access them programmatically. With the new page templates API, you can create templates as well as instantiate new pages from existing templates.
As an example usage, this Java snippet creates a new filecabinetpage from an existing template filecabinet:
FileCabinetPageEntry templateInstanceEntry = new FileCabinetPageEntry();
templateInstanceEntry.setTitle(
new PlainTextConstruct("File cabinet template instance"));
templateInstanceEntry.addLink(new Link(SitesLink.Rel.TEMPLATE,
Link.Type.ATOM,
existingTemplateEntry.getSelfLink().getHref()));
String feedUrl = "https://sites.google.com/feeds/content/site/siteName";
FileCabinetPageEntry fileCabFromTemplate = client.insert(
new URL(feedUrl), templateInstanceEntry);
Check out the documentation, updated Java guide, and changelog for further information.
Posted by Eric Bidelman , Google Sites API Team
Friday, February 13, 2015
6 Free MacBook Air PSD Templates
.jpg)
Free Download MacBook Air PSD Templates. Using these templates, you can quickly create photo-realistic mock-ups of your work at any size. Enjoy!
Type : PSD
Category : Mockups
License : Free
Author : Elegantthemes
Download
iPad Air Mockup PSD Templates

Free Download iPad Air Mockup Templates PSD. Fully layered PSDs with customizable background can be downloaded here. Enjoy!
Type : PSD
Category : Mockups
License : Free
Author : Dribbble
Download
Thursday, February 12, 2015
C Templates Program to Swap Two Numbers Using Function Template

What are Templates in C++?
Templates help in defining generic classes and functions and hence allow generic programming. Generic programming is an approach where generic data types are used as parameters and the same piece of code work for various data types.
Function templates are used to create family of functions with different argument types. The format of a function template is shown below:
template<class T>
return_type function_name (arguments of type T)
{
. . . . .
. . . . .
}
I have written a program below which will swap two numbers using function templates.
#include<iostream>
using namespace std;
template <class T>
void swap(T&a,T&b) //Function Template
{
T temp=a;
a=b;
b=temp;
}
int main()
{
int x1=4,y1=7;
float x2=4.5,y2=7.5;
cout<<"Before Swap:";
cout<<"
x1="<<x1<<" y1="<<y1;
x1="<<x1<<" y1="<<y1;
cout<<"
x2="<<x2<<" y2="<<y2;
x2="<<x2<<" y2="<<y2;
swap(x1,y1);
swap(x2,y2);
cout<<"
After Swap:";
After Swap:";
cout<<"
x1="<<x1<<" y1="<<y1;
x1="<<x1<<" y1="<<y1;
cout<<"
x2="<<x2<<" y2="<<y2;
x2="<<x2<<" y2="<<y2;
return 0;
}
There are so many things that I have missed in this tutorial. In below video templates are explained very nicely. I am sure that after watching this video you will understand templates very easily.
Subscribe to:
Posts (Atom)