Jumat, 21 Mei 2010

Taking a closer look at the Publisher Query Language and the future

I get this article from GoogleBlog. This is the article :

Recently we launched v201004, and with that introduced the new Statement object which gives support for one of our top requested features - bind variables. In this blog post, we will take a closer look at the Publisher Query Language (PQL), Statements with bind variables, and what we have in store for the future.

Publisher Query Language


PQL plays a very significant role in the DFP API by providing the developer with a robust way of filtering which objects should be retrieved or modified before the request is completed. In other words, if you would like to retrieve only
orders which are in the draft state, you could take one of two approaches. You could fetch all orders within your network and filter them one by one or instruct the server to only fetch orders in the draft state before returning all results. By doing the latter, the DFP API allows developers to create smaller and more direct requests, and, in turn, increases the efficiency of their code.

PQL has a very similar syntax to SQL, but does not include keywords such as
SELECT or FROM; they are implied by the method which uses the PQL statement. The following piece of code constructs a Statement capable of fetching orders in the draft state and retrieves those orders:

// Create a statement to only select orders in the // 'DRAFT' state.
Statement filterStatement = new Statement();
filterStatement.setQuery("WHERE status = 'DRAFT' LIMIT 500");
OrderPage orderPage = orderService.getOrdersByStatemet(filterStatement);

The documentation included for each "get*ByStatment" (e.g. getOrdersByStatement) method indicates which PQL fields map to which object properties.

Paging

The result for "get*ByStatment" calls are pages specific to the service; i.e. an OrderPage is returned by getOrdersByStatement. The limit for the number of objects that can be fetched for a single PQL request, and in a single Page, is 500. Because of this, you should always include LIMIT 500 in your statement. However, if you would like to fetch more than 500 objects, you will need to page through the results by including an OFFSET <#> in your statement as well. To page through orders in groups of 500, for example, in your statement, you would include LIMIT 500 as well as an OFFSET of an interval of 500.

This can be represented by the following code:

// Sets defaults for page and filter.
OrderPage page = new OrderPage();
Statement filterStatement = new Statement();
int offset = 0;

do {
// Create a statement to get all orders.
filterStatement.setQuery( "WHERE status = 'DRAFT' LIMIT 500 OFFSET " + offset);

// Get orders by statement.
page = orderService.getOrdersByStatement(filterStatement);

if (page.getResults() != null) {
int i = page.getStartIndex();
for (Order order : page.getResults()) {
System.out.println(i + ") Order with ID \""
+ order.getId() + "\", name \"" + order.getName()
+ "\", and advertiser ID \"" + order.getAdvertiserId()
+ "\" was found.");
i++;
}
}
offset += 500;
} while (offset <>

The loop will end when there are no pages left, i.e. the offset is greater than or equal to the to the total result set size.

Bind variables

Bind variables were recently introduced to allow for reusing of the same template PQL statement combined with varying parameters. To change the PQL statement above to differ which status is being selected, 'DRAFT' is changed to the bind variable status, represented by :status. Note that bind variables can be any name - not just the name of their property. We chose :status here for simplicity.

// Create a statement to only select orders in the state // bound to status.
Statement filterStatement = new Statement();
filterStatement.setQuery("WHERE status = :status LIMIT 500");

To bind to :status, you will need to create a parameter map with a String_ParamMapEntry coupling :status with a StringParam. Note that ":" is not included in the bind variable name in the parameter map.

// Create the string parameter.
StringParam stringParam = new StringParam();

// Create bind parameters map.
String_ParamMapEntry[] paramMap = new String_ParamMapEntry[] {
new String_ParamMapEntry("status", stringParam)
};

filterStatement.setParams(paramMap);

Before you make the call to getOrdersByStatement, set the stringParam value to the specific status.

stringParam.setValue("DRAFT");

In this case, because status was bound to a variable declared before the parameter map, you can set the variables value at any time.

The first iteration of the while loop above would then produce the following XML snippet:

...

WHERE status = :status LIMIT 500 OFFSET 0
status
xmlns:ns2= "https://www.google.com/apis/ads/publisher/v201004" xsi:type="ns2:StringParam">
DRAFT
...

Planned features and production

The release of v201004 was the culmination of the last step before we can begin rolling out access to the production API and we will have more information about signing up to for production use in the coming weeks. We are still hard at work on the forecasting and reporting service and will have some news about those in the following weeks as well.

We appreciate all of the great feedback we've been receiving on the forum, both on the API and the client libraries, and we''ll continue to incorporate it as we continue development

Share This

I get this article from GoogleBlog. This is the article :

Recently we launched v201004, and with that introduced the new Statement object which gives support for one of our top requested features - bind variables. In this blog post, we will take a closer look at the Publisher Query Language (PQL), Statements with bind variables, and what we have in store for the future.

Publisher Query Language


PQL plays a very significant role in the DFP API by providing the developer with a robust way of filtering which objects should be retrieved or modified before the request is completed. In other words, if you would like to retrieve only
orders which are in the draft state, you could take one of two approaches. You could fetch all orders within your network and filter them one by one or instruct the server to only fetch orders in the draft state before returning all results. By doing the latter, the DFP API allows developers to create smaller and more direct requests, and, in turn, increases the efficiency of their code.

PQL has a very similar syntax to SQL, but does not include keywords such as
SELECT or FROM; they are implied by the method which uses the PQL statement. The following piece of code constructs a Statement capable of fetching orders in the draft state and retrieves those orders:

// Create a statement to only select orders in the // 'DRAFT' state.
Statement filterStatement = new Statement();
filterStatement.setQuery("WHERE status = 'DRAFT' LIMIT 500");
OrderPage orderPage = orderService.getOrdersByStatemet(filterStatement);

The documentation included for each "get*ByStatment" (e.g. getOrdersByStatement) method indicates which PQL fields map to which object properties.

Paging

The result for "get*ByStatment" calls are pages specific to the service; i.e. an OrderPage is returned by getOrdersByStatement. The limit for the number of objects that can be fetched for a single PQL request, and in a single Page, is 500. Because of this, you should always include LIMIT 500 in your statement. However, if you would like to fetch more than 500 objects, you will need to page through the results by including an OFFSET <#> in your statement as well. To page through orders in groups of 500, for example, in your statement, you would include LIMIT 500 as well as an OFFSET of an interval of 500.

This can be represented by the following code:

// Sets defaults for page and filter.
OrderPage page = new OrderPage();
Statement filterStatement = new Statement();
int offset = 0;

do {
// Create a statement to get all orders.
filterStatement.setQuery( "WHERE status = 'DRAFT' LIMIT 500 OFFSET " + offset);

// Get orders by statement.
page = orderService.getOrdersByStatement(filterStatement);

if (page.getResults() != null) {
int i = page.getStartIndex();
for (Order order : page.getResults()) {
System.out.println(i + ") Order with ID \""
+ order.getId() + "\", name \"" + order.getName()
+ "\", and advertiser ID \"" + order.getAdvertiserId()
+ "\" was found.");
i++;
}
}
offset += 500;
} while (offset <>

The loop will end when there are no pages left, i.e. the offset is greater than or equal to the to the total result set size.

Bind variables

Bind variables were recently introduced to allow for reusing of the same template PQL statement combined with varying parameters. To change the PQL statement above to differ which status is being selected, 'DRAFT' is changed to the bind variable status, represented by :status. Note that bind variables can be any name - not just the name of their property. We chose :status here for simplicity.

// Create a statement to only select orders in the state // bound to status.
Statement filterStatement = new Statement();
filterStatement.setQuery("WHERE status = :status LIMIT 500");

To bind to :status, you will need to create a parameter map with a String_ParamMapEntry coupling :status with a StringParam. Note that ":" is not included in the bind variable name in the parameter map.

// Create the string parameter.
StringParam stringParam = new StringParam();

// Create bind parameters map.
String_ParamMapEntry[] paramMap = new String_ParamMapEntry[] {
new String_ParamMapEntry("status", stringParam)
};

filterStatement.setParams(paramMap);

Before you make the call to getOrdersByStatement, set the stringParam value to the specific status.

stringParam.setValue("DRAFT");

In this case, because status was bound to a variable declared before the parameter map, you can set the variables value at any time.

The first iteration of the while loop above would then produce the following XML snippet:

...

WHERE status = :status LIMIT 500 OFFSET 0
status
xmlns:ns2= "https://www.google.com/apis/ads/publisher/v201004" xsi:type="ns2:StringParam">
DRAFT
...

Planned features and production

The release of v201004 was the culmination of the last step before we can begin rolling out access to the production API and we will have more information about signing up to for production use in the coming weeks. We are still hard at work on the forecasting and reporting service and will have some news about those in the following weeks as well.

We appreciate all of the great feedback we've been receiving on the forum, both on the API and the client libraries, and we''ll continue to incorporate it as we continue development
»»  BACA SELENGKAPNYA...

By HAMMAM MAHRUS with No comments

ESET NOD32 Free Download

Hanya nambahin aja, buat kalian semua yang ingin download ESET NOD32! Sebelumnya ada kok di postingan saya, tapi berhubung dengan kelengkapan Software, nih ada ESET nya plus Key buat UPDATE-NYA.

ESET NOD32® Antivirus and its powerful ThreatSense® engine, ESET Smart Security provides antispyware, antispam and customized firewall features. Utilizing ThreatSense — the industry’s most advanced heuristics — the window of vulnerability between virus outbreak and signature update is reduced.

ESET NOD32 with The key advantage of this approach is that individual protection modules are able to communicate together seamlessly, to create unparalleled synergy to improve the efficiency and effectiveness of protection. Moreover, the integrated architecture guarantees optimal utilization of system resources, so ESET Smart Security continues ESET’s well know reputation for providing rock solid security in a small footprint that will not slow down an individual’s computer.
Yang terbaru dari ESET NOD32 4.2.35 Business Edition
* Fix: Issues with HTTP scanner with longer domain namesmag glass 10x10 NOD32 Smart Security Business Edition 4.2.35 ( support for length of domain name to 256 characters)
* Fix: Issues after PC restart when firewall system integration is “only scan application protocols”
* Fix: When ESS installed with disabled FW, dialog about trusted networks not displayed
* Fix: Installation of ESS using Remote Desktop; after selecting firewall’s “Interactive mode”, the session will interrupt
* Fix: Long file name makes trouble with logs in “document protection enabled” mode
* Fix: Scan profile settings not retained after reinstallation
* Fix: Open ESI log of EAV doesn’t work on Microsoft Windowsmag glass 10x10 NOD32 Smart Security Business Edition 4.2.35 NT4.0
* Fix: Not possible to save EAV’s ESI log and export service script on Microsoft Windows NT4.0
* Fix: Wrong settings imported from ESS configuration cause problems in EAV
* Fix: All ESI logs are lost after upgrade from V4 to V4.2
* Fix: Impossible to delete the on-demand Scan Log in ESS
* Fix: Fixed ceasing of scan tasks when logged in as standard user
* Fix: Minor issues with Trusted zone conversion from older to newer version
* Fix: Unification of behavior when disabling some parts of EAV/ESS/EMS in the main settings window
* Fix: Possible to delete log of a running on-demand scan
* Fix: X64 Vista + win7: UAC appears when opening ESI log from ESS/EAV GUI
* Fix: Minor Thunderbird and Outlook issues.

Download sekarang Antivirus terbaik dunia ini!

NOD32 Business Edition 4.2.35 32-Bit (x86) download
NOD32 Business Edition 4.2.35 64-Bit (x64) download

Update key NOD32 :
  • Username: EAV-28508687 Password: d7mctj6b6a
  • Username: EAV-28508691 Password: a84jm2fdmx
  • Username: EAV-28508711 Password: f2v84nafs8
  • Username: EAV-28508715 Password: d3dfu4kkbx
  • Username: EAV-28508724 Password: u4sd63tsu7
  • Username: EAV-28508670 Password: jsre4j2k3m
  • Username: EAV-28473790 Password: dhfmk4nu7u
  • Username: EAV-28278199 Password: mjams5pb55
  • Username: EAV-28398959 Password: 3xxf3emmn2
  • Username: EAV-28508648 Password: 3tnkn47b5x
  • Username: EAV-28508657 Password: hu5fx2ehn6
  • Username: EAV-28508661 Password: v85amn4vrt
  • Username: EAV-28508664 Password: f4bbeadth5
Thanks for Ardian Key UPDATE - NYA soalnya kalau gak ada key-nya pasti udah ku HAPUS ESET-NYA! Jadi database virus-nya tambah banyak!

Share This

Hanya nambahin aja, buat kalian semua yang ingin download ESET NOD32! Sebelumnya ada kok di postingan saya, tapi berhubung dengan kelengkapan Software, nih ada ESET nya plus Key buat UPDATE-NYA.

ESET NOD32® Antivirus and its powerful ThreatSense® engine, ESET Smart Security provides antispyware, antispam and customized firewall features. Utilizing ThreatSense — the industry’s most advanced heuristics — the window of vulnerability between virus outbreak and signature update is reduced.

ESET NOD32 with The key advantage of this approach is that individual protection modules are able to communicate together seamlessly, to create unparalleled synergy to improve the efficiency and effectiveness of protection. Moreover, the integrated architecture guarantees optimal utilization of system resources, so ESET Smart Security continues ESET’s well know reputation for providing rock solid security in a small footprint that will not slow down an individual’s computer.
Yang terbaru dari ESET NOD32 4.2.35 Business Edition
* Fix: Issues with HTTP scanner with longer domain namesmag glass 10x10 NOD32 Smart Security Business Edition 4.2.35 ( support for length of domain name to 256 characters)
* Fix: Issues after PC restart when firewall system integration is “only scan application protocols”
* Fix: When ESS installed with disabled FW, dialog about trusted networks not displayed
* Fix: Installation of ESS using Remote Desktop; after selecting firewall’s “Interactive mode”, the session will interrupt
* Fix: Long file name makes trouble with logs in “document protection enabled” mode
* Fix: Scan profile settings not retained after reinstallation
* Fix: Open ESI log of EAV doesn’t work on Microsoft Windowsmag glass 10x10 NOD32 Smart Security Business Edition 4.2.35 NT4.0
* Fix: Not possible to save EAV’s ESI log and export service script on Microsoft Windows NT4.0
* Fix: Wrong settings imported from ESS configuration cause problems in EAV
* Fix: All ESI logs are lost after upgrade from V4 to V4.2
* Fix: Impossible to delete the on-demand Scan Log in ESS
* Fix: Fixed ceasing of scan tasks when logged in as standard user
* Fix: Minor issues with Trusted zone conversion from older to newer version
* Fix: Unification of behavior when disabling some parts of EAV/ESS/EMS in the main settings window
* Fix: Possible to delete log of a running on-demand scan
* Fix: X64 Vista + win7: UAC appears when opening ESI log from ESS/EAV GUI
* Fix: Minor Thunderbird and Outlook issues.

Download sekarang Antivirus terbaik dunia ini!

NOD32 Business Edition 4.2.35 32-Bit (x86) download
NOD32 Business Edition 4.2.35 64-Bit (x64) download

Update key NOD32 :
  • Username: EAV-28508687 Password: d7mctj6b6a
  • Username: EAV-28508691 Password: a84jm2fdmx
  • Username: EAV-28508711 Password: f2v84nafs8
  • Username: EAV-28508715 Password: d3dfu4kkbx
  • Username: EAV-28508724 Password: u4sd63tsu7
  • Username: EAV-28508670 Password: jsre4j2k3m
  • Username: EAV-28473790 Password: dhfmk4nu7u
  • Username: EAV-28278199 Password: mjams5pb55
  • Username: EAV-28398959 Password: 3xxf3emmn2
  • Username: EAV-28508648 Password: 3tnkn47b5x
  • Username: EAV-28508657 Password: hu5fx2ehn6
  • Username: EAV-28508661 Password: v85amn4vrt
  • Username: EAV-28508664 Password: f4bbeadth5
Thanks for Ardian Key UPDATE - NYA soalnya kalau gak ada key-nya pasti udah ku HAPUS ESET-NYA! Jadi database virus-nya tambah banyak!

»»  BACA SELENGKAPNYA...

By HAMMAM MAHRUS with No comments

Artikel terkait

Google Translate
Arabic Korean Japanese Chinese Simplified Russian Portuguese
English French German Spain Italian Dutch