how to print contents of specific div at html?

function printdiv(id)
{

try{
var x = ”;
x = document.getElementById(id).innerHTML;
//alert(x);
newwindow2=window.open(”,’name’,’scrollbars=yes,resizable=yes,height=500,width=500,toolbar=1′);
newwindow2.title = “The new title goes here.”;
var tmp = newwindow2.document;
tmp.write(x);
newwindow2.print();
tmp.close();
newwindow2.close();
}catch(err){}

}

How to activate curl in xampp?

1. Locate XAMPP install directory
2. open php/php.ini (probably C:\xampp\php\php.ini
or C:\ program files\apachefriends\xampp\php\php.ini)

3. do a search for the word ‘curl’ and uncomment (remove the leading semicolon) that line
before removing ;extension=php_curl.dll
after removing: extension=php_curl.dll
4. save & close
5. open apache/bin/php.ini (probably C:\xampp\apache\php.ini
or C:\ program files\apachefriends\xampp\apache\php.ini)

6. search for curl, uncomment as before (step 3)
7. save & close
8. Do not forget! restart apache

what is the event bus?

An event bus is a messaging channel where an event producer sends an event, and any number of event listeners can receive the event and act on it.  The important distinction between an event bus and basic event handling is that with an event bus the event producer and recipient don’t know about each other, they only know about the message channel.  This is a popular pattern that allows you to develop an architecture where components are loosely coupled.  It works similar to IRC (Inter-Relay Chat), where you send a message to the channel, and everyone may respond if they wish to.

 

Message Bus a.k.a. Event Bus

If your application requires a number of modules that need to communicate with each other in various ways, this architecture is a sure bet. It is endlessly flexible: you can add and remove modules at run-time, communicate directly or broadcast messages. It is completely free.

Examples

  • Process monitoring
  • Trading Systems
  • Software development environments

When should you use it?

Use it when your application can be factored in functionally separable modules that are capable of communicating through simple messages.

How does it work?

Modules may be added and removed at any time.

When a module wishes to communicate with another module or other modules, it places a message on the Event Bus. The Event Bus takes care of delivering the message to the recipients.

 


Event Bus architecture

 

There are several types of communication that may occur on the Event Bus:

  • Publish-Subscribe: Modules may subscribe to certain message types. Whenever a module publishes a message to the bus, it will be delivered to all modules that subscribed to its message type.
  • Broadcast: The message will be delivered to all (other) modules.
  • Point-to-point: The message has one and only one recipient.

 

The sending module normally doesn’t care when the other modules receive and process the message. If the time of processing is important, the message may be sent immediately. It corresponds to calling the function in receiving modules directly, with the difference that the modules are still decoupled.

Problems

 

  • If the modules share large amounts of data, it may not be a good idea to pump these over the bus all the time. If you choose to share the data between the modules, make sure no synchronization issues occur.

 

Common implementation techniques

  • Relates to the Observer Design Pattern, with added functionality.

 

 

Introduction to Web Services

Web services are distributed application components that are externally available. You can use them to integrate computer applications that are written in different languages and run on different platforms. Web services are language and platform independent because vendors have agreed on common web service standards.

Several programing models are available to web service developers. These models fall into two categories, both supported by the IDE:

  • REST-based. REpresentational State Transfer is a new way to create and communicate with web services. In REST, resources have URIs and are manipulated through HTTP header operations. For more details, see RESTful Web Services.
  • SOAP/WSDL-based. In traditional web service models, web service interfaces are exposed through WSDL documents (a type of XML), which have URLs. Subsequent message exchange is in SOAP, another type of XML document. For more details, see SOAP-based Web Services.