Film review by Kevin Patterson
DEEP IMPACT Rating: **1/2 (out of four) PG-13, 1998 Directed by Mimi Leder. Written by Bruce Joel Rubin and Michael Tolkin. Starring Tea Leoni, Morgan Freeman, Robert Duvall.
Since Hollywood has gone through tornadoes, volcanoes, sinking ships, and exploding buses in recent years, I suppose it was only natural that the realm of disaster movies would extend into the realm of destruction by space garbage before too long. Accordingly, this summer we get DEEP IMPACT, in which a 7-1/ 2-mile wide comet is on a collision course with Earth, and ARMAGEDDON, in which an asteroid the size of Texas is, well, on a collision course with Earth. The creative forces behind DEEP IMPACT have stressed that theirs is a film about how human relationships and decisions are affected by the possibly impending disaster, as opposed to the apparently more action-driven ARMAGEDDON.
They are partly right. A team of astronauts, led by Capt. Sturgeon Tanner (Robert Duvall) is dispatched to destroy the comet, but I'd say that at least 70% of the movie takes place on Earth, where the President (Morgan Freeman) is trying to develop contingency plans in case the disaster can't be averted, among them a national lottery in which 1 million Americans are chosen to live underground for two years while the dust will settle. Meanwhile, we follow several other characters as they try to deal with the possibly impending destruction, such as the star reporter Jenny Lerner (Tea Leoni), who is still constantly struggling to get along with her father, and two teenage sweethearts, one of whom has been chosen in the lottery and the other who has not. The astronauts manage to break the comet into two pieces, leaving several possibilities: (a) no disaster will strike at all, if land-based missile defense systems can deflect the comet pieces; (b) the smaller piece will land in the ocean, causing 100-foot tidal waves to destroy shoreline areas but allowing most of the planet to survive; (c) both pieces hit the earth, wiping out all plant, animal, and human life. (Hint: which do you think would allow for both a happy ending and an extended special-effects destruction sequence?)
The problem is that the more action/disaster-oriented sequences are actually the ones that are the most effective. The astronauts' tense and ultimately botched comet-walk and the tidal wave's decapitation of the Statue of Liberty as it topples New York City skyscrapers pointedly illustrate the fragile nature of human existence, and the astronauts' painful goodbyes to their families via NASA satellite when they decide to make a last-ditch suicide run at the larger comet piece is heroic enough to jerk a few tears from the audience. But the only scene involving the drama unfolding on Earth that can match any of those mentioned above is the one in which armed military vehicles pour through suburban streets to escort one of the "chosen" families to the underground caves. The "impact" of the other moments of human drama is, I'm afraid to say, rather shallow.
Part of the reason for this is that there just a few too many things going on at once in DEEP IMPACT. Towards the beginning, it almost seems like it's going to turn into a black-comic media satire. When the President first breaks the news about the comet, for example, we see a TV newsroom where reporters are scrambling and shouting things like, "Where the hell is the Science Division?" and "Does anyone know how big the one was that killed the dinosaurs?" Meanwhile, one of the two teenagers, who helped to discover the comet, is encouraged by a classmate, "You're going to have a lot more sex now that you're famous. That's the best reason to be famous, you know."
This angle soon fades into the background, however, and once the inital comet- walk is over, the screenplay's focus shifts to the quandaries of the various characters. Unfortunately, the film doesn't spend enough time to develop them in much depth and just skips to the crying scenes. We appreciate these scenes intellectually, but we don't really feel for the characters because we don't know them very well. James Cameron, in writing and directing TITANIC, knew that the audience needed to get to know his characters as normal people before he sent them running down corridors filled with freezing water. In DEEP IMPACT, we see the teenagers discovering the comet and pondering their future in light of the lottery, and we see Leoni, who has also been selected, trying one last time to reconcile with her possibly doomed father and delivering news reports about the comet, but we never see how they would behave in everyday situations.
The plot, meanwhile, is a bit skimpy, and as a result it has holes big enough for a 7-1/2-mile wide comet to fly through. I'm still not sure what was the point of a car accident which occurred at the start of the movie: we are led to believe that important information about the comet was lost in the crash, but later we learn that it was recovered completely intact. Also, why wouldn't the world's governments build more than one spaceship in case the first crew's mission failed? I realize it's expensive, but even Washington budget-cutters could probably be convinced to spare a few bucks for averting the end of the world. And why didn't the astronauts land on the comet more than an hour before sunrise would turn the thing into an outer-space mine field? The script also leaves some plot points unclear, such as what exactly is the problem with the missile defense, and whether or not the President had intended to take a spot in the underground bunkers.
Perhaps the biggest sin of DEEP IMPACT, however, is that it pulls some of its punches. There are reports of street fighting in Russia, and it looks towards the end as if a neighborhood has been looted, but we never actually see any of this happen. At the end, the President tells us that "millions have been lost," but rather than show us the aftermath of the devastation, Leder decides to give us some applause and flag-waving at the President's promise of rebuilding and renewal. I had hoped the film might examine some of these issues more directly, particularly given the screenplay credit to Michael Tolkin, who showed in his 1991 film THE RAPTURE that he has a pretty good idea how crazy some people can get when they think the end of the world is right around the corner. DEEP IMPACT, however, seems content to show us news reports of pre-apocalyptic hysteria rather than the real thing.
DEEP IMPACT makes a noble effort at telling a more human story than most big- budget Hollywood disaster flicks, and for that it is to be commended. What it would be like if a comet really was about to hit the earth, however, remains to be seen. Or filmed, as the case may be.
--------
Send comments and suggestions to<EMAIL_ADDRESS>Film Reviews Page: http://members.aol.com/KTPattersn/reviews.html
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


TechTogether, the nation's largest initiative to address the gender inequities in the hackathon community, supports over 10,000 hackers. TechTogether is credited in part with increasing the representation of women and non-binary people in the hackathon community by 18% to 39% from 2019 to 2020. (Source: MLH 2020 State of the League Report)
Since we were founded in 2017, TechTogether has served over 5,600 people of marginalized genders through our annual gender-focused hackathons hosted across the country. On average, 50% of our hackers have never attended a hackathon before.
TechTogether started in 2017 as SheHacks, the 2nd largest all-female hackathon in the world with 800 attendees. Due to the success of SheHacks, the team created a unique model that made it easier for student groups to host similar hackathons across the country. This model has increased the accessibility of gender-focused hackathons and tripled our initial impact. TechTogether currently has 6 chapters in Boston, New York, Seattle, Atlanta, Chicago, and Miami with plans to expand internationally.
TechTogether was the first gender-focused hackathon to adopt gender-inclusive language and policies. Our organization continues to advocate and work with other gender-focused hackathons to adopt similar changes.
Interested in learning more about TechTogether's work? Check out our hacker success stories.
Want to learn more about hackathons? Check out this video by Major League Hacking.


There appears to be no apparent correlation between latitude and cloudiness, in the northern hemisphere or southern hemispheres. However, when looking at the graph the cloudiness tends to cluster around certain percentage values, which may be an indicator that cloudiness may be a result of the altitude of a city and less so the latitudes of the cities themselves.
Given how cloudiness appears across a variety of latitudes, cloudiness could be a result of a variety of weather conditions that could allow for cloudiness. Generally cloudiness can be associated with rainier weather or storms. However, warmer weathers can also result in cloudiness.
As such, additional data points may need to be collected in order to determine how cloudiness may be correlated to other locations or weather conditions and patterns.


|
| Local Methods | ||
| Managed Object Types | Data Object Types | All Properties | All Methods |
Properties
| Name | Type | Description |
|---|---|---|
| None |
Methods
| Methods defined in this Managed Object |
|---|
| CheckHostPatch_Task, InstallHostPatch_Task, InstallHostPatchV2_Task, QueryHostPatch_Task, ScanHostPatch_Task, ScanHostPatchV2_Task, StageHostPatch_Task, UninstallHostPatch_Task |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HostPatchManager used to make the method call. |
| metaUrls* | xsd:string[] |
a list of urls pointing to metadata.zip.
|
| bundleUrls* | xsd:string[] |
a list of urls pointing to an "offline" bundle. It is not supported in 5.0 or later.
|
| spec* | HostPatchManagerPatchManagerOperationSpec |
|
Return Value
| Type | Description |
|---|---|
| ManagedObjectReference
to a Task | This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the HostPatchManagerStatus upon success. |
Faults
| Type | Description |
|---|---|
| InvalidState | Thrown if the feature cannot be supported on the platform, potentially because the hardware configuration does not support it. |
| PlatformConfigFault | Thrown if any error occurs during the operation. More detailed information will be returned within the payload of the exception as xml string. |
| RequestCanceled | Thrown if the operation is canceled. |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| TaskInProgress | Thrown if there is already a patch installation in progress. |
Events
| Type | |
|---|---|
| None |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HostPatchManager used to make the method call. |
| repository | HostPatchManagerLocator |
Location of the repository that contains the
bulletin depot. The depot must be organized as a flat
collection of bulletins with each one being a folder named
after the bulletin ID. Each folder must contain both
update metadata and required binaries.
|
| updateID | xsd:string |
The update to be installed on the host.
|
| force* | xsd:boolean |
Specify whether to force reinstall an update.
By default, installing an already-installed update would fail
with the PatchAlreadyInstalled fault. If
force is set to true, the update will be forcifully reinstalled,
thus overwriting the already installed update.
|
Return Value
| Type | Description |
|---|---|
| ManagedObjectReference
to a Task | This method returns a Task object with which to monitor the operation. |
Faults
| Type | Description |
|---|---|
| InvalidState | Thrown if the host is not in maintenance mode but the patch install requires all virtual machines to be powered off. |
| NoDiskSpace | Thrown if the update can not be installed because there is insufficent disk space for the installation, including temporary space used for rollback. |
| PatchBinariesNotFound | Thrown if required update related binaries were not available. |
| PatchInstallFailed | Thrown if the installation failed, text has details of the failure. Automatic rollback might have succeeded or failed. |
| PatchMetadataInvalid | Thrown if the requried metadata is invalid--for example, it is not found in the repository, is corrupted and so on. Typically a more specific subclass of PatchMetadataInvalid is thrown. |
| PatchNotApplicable | Thrown if the patch is not applicable. Typically a more specific subclass of PatchNotApplicable is thrown to indicate a specific problem--for example, PatchSuperseded if the patch is superseded, MissingDependency if required patch or libraries are not installed, AlreadyInstalled if the patch is already installed. |
| RebootRequired | Thrown if the update cannot be installed without restarting the host. This might occur on account of a prior update installation which needed to be installed separately from other updates. |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| TaskInProgress | Thrown if there is already a patch installation in progress. |
Events
| Type | |
|---|---|
| None |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HostPatchManager used to make the method call. |
| metaUrls* | xsd:string[] |
A list of urls pointing to metadata.zip.
|
| bundleUrls* | xsd:string[] |
a list of urls pointing to an "offline" bundle. It is not supported in 5.0 or later.
|
| vibUrls* | xsd:string[] |
The urls of update binary files to be installed.
|
| spec* | HostPatchManagerPatchManagerOperationSpec |
|
Return Value
| Type | Description |
|---|---|
| ManagedObjectReference
to a Task | This method returns a Task object with which to monitor the operation. |
Faults
| Type | Description |
|---|---|
| InvalidState | Thrown if the feature cannot be supported on the platform, potentially because the hardware configuration does not support it. |
| PlatformConfigFault | |
| RequestCanceled | Thrown if the operation is canceled. |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| TaskInProgress | Thrown if there is already a patch installation in progress. |
Events
| Type | |
|---|---|
| None |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HostPatchManager used to make the method call. |
| spec* | HostPatchManagerPatchManagerOperationSpec |
|
Return Value
| Type | Description |
|---|---|
| ManagedObjectReference
to a Task | This method returns a Task object with which to monitor the operation. |
Faults
| Type | Description |
|---|---|
| InvalidState | Thrown if the bulletin ID did not exist. |
| PlatformConfigFault | |
| RequestCanceled | |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| TaskInProgress | Thrown if there is already a patch installation in progress. |
Events
| Type | |
|---|---|
| None |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HostPatchManager used to make the method call. |
| repository | HostPatchManagerLocator |
Location of the repository that contains the
bulletin depot. The depot must be organized as a flat
collection of bulletins with each one being a folder named
after the bulletin ID. Each folder must contain the full
update metadata.
|
| updateID* | xsd:string[] |
The updates to scan. Wildcards can be used to specify
the update IDs. The wildcards will be expanded to include all
updates whose IDs match the specified wildcard and whose metadata
is available in the repository. Specifying no update is
equivalent to a wildcard "*". In this case all updates available
in the repository will be scanned.
|
Return Value
| Type | Description |
|---|---|
| ManagedObjectReference
to a Task | This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the HostPatchManagerStatus upon success. |
Faults
| Type | Description |
|---|---|
| PatchMetadataInvalid | Thrown if query required metadata is invalid--for example, it is not found in the repository, is corrupted and so on. Typically a more specific subclass of PatchMetadataInvalid is thrown. |
| PlatformConfigFault | Thrown if there is any error in the repository access, metadata download, repository level integrity check, or reading the metadata. See text for specific details. |
| RequestCanceled | Thrown if the operation is canceled. |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
| Type | |
|---|---|
| None |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HostPatchManager used to make the method call. |
| metaUrls* | xsd:string[] |
a list of urls pointing to metadata.zip.
|
| bundleUrls* | xsd:string[] |
a list of urls pointing to an "offline" bundle. It is not supported in 5.0 or later.
|
| spec* | HostPatchManagerPatchManagerOperationSpec |
|
Return Value
| Type | Description |
|---|---|
| ManagedObjectReference
to a Task | This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the HostPatchManagerStatus upon success. |
Faults
| Type | Description |
|---|---|
| InvalidState | Thrown if the feature cannot be supported on the platform, potentially because the hardware configuration does not support it. |
| PlatformConfigFault | Thrown if there is any error in the repository access, metadata download, repository level integrity check, or reading the metadata. See text for specific details. |
| RequestCanceled | Thrown if the operation is canceled. |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| TaskInProgress | Thrown if there is already a patch installation in progress. |
Events
| Type | |
|---|---|
| None |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HostPatchManager used to make the method call. |
| metaUrls* | xsd:string[] |
A list of urls pointing to metadata.zip.
|
| bundleUrls* | xsd:string[] |
a list of urls pointing to an "offline" bundle. It is not supported in 5.0 or later.
|
| vibUrls* | xsd:string[] |
The urls of update binary files to be staged.
|
| spec* | HostPatchManagerPatchManagerOperationSpec |
|
Return Value
| Type | Description |
|---|---|
| ManagedObjectReference
to a Task | This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the HostPatchManagerStatus upon success. |
Faults
| Type | Description |
|---|---|
| InvalidState | Thrown if the feature cannot be supported on the platform, potentially because the hardware configuration does not support it. |
| PlatformConfigFault | Thrown if any error occurs during the operation. More detailed information will be returned within the payload of the exception as xml string. |
| RequestCanceled | Thrown if the operation is canceled. |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| TaskInProgress | Thrown if there is already a patch installation in progress. |
Events
| Type | |
|---|---|
| None |
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HostPatchManager used to make the method call. |
| bulletinIds* | xsd:string[] |
A list of bulletin IDs to be removed.
|
| spec* | HostPatchManagerPatchManagerOperationSpec |
|
Return Value
| Type | Description |
|---|---|
| ManagedObjectReference
to a Task | This method returns a Task object with which to monitor the operation. |
Faults
| Type | Description |
|---|---|
| InvalidState | Thrown if the feature cannot be supported on the platform, potentially because the hardware configuration does not support it. |
| PlatformConfigFault | |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
| TaskInProgress | Thrown if there is already a patch installation in progress. |
Events
| Type | |
|---|---|
| None |
| Top of page | Local Methods | ||
| Managed Object Types | Data Object Types | All Properties | All Methods |


Departments and Sub Departments
Add
Parent Dept Name
{{dept.DeptName}}
Add
{{dept.DeptName}}
{{subdept.SubDeptName}}
No Sub Departments under this Department.
{{errorMessageSubDept[''+dept.DeptId]}}
Opps!! Some Error Occured. Message : {{errorMessageDept}}
{{debuginfo}}
×
{{dept.DeptName}}
×
{{subdept.SubDeptName}}


|
HaHa
|
#include "networkdevice.h"
#include "uart/uart.h"
#include "utils/hahaUtils.h"
#include "network/network.h"
#include <string.h>
Macros | |
| #define | HOPS_NO_MAX 0 |
Functions | |
| uint8_t | _verify_checksum (frameIncoming *f) |
| void | xbee_init () |
| { Intialize the XBee module } More... | |
| void | netdevice_register_callback (netdevice_cb_t t, frameResponseType type) |
| { Register the function to send received payload } More... | |
| void | xbee_enterCmdMode () |
| { Enter XBee command mode } More... | |
| void | xbee_leaveCmdMode () |
| { Leave XBee command mode } More... | |
| uint8_t | cmd_AT_set (char *cmd, uint8_t *value, uint8_t len) |
| uint8_t | cmd_AT_get (char *cmd) |
| uint8_t | calc_checksum (char *data, uint16_t len) |
| uint8_t | netdevice_send (uint64_t dst, char *data, uint8_t datalen) |
| { Send a packet to another XBee node } More... | |
| uint8_t | netdevice_send_radius (uint64_t dst, char *data, uint8_t datalen, uint8_t radius) |
| uint8_t | netdevice_send_hex (char *dst, char *data, uint8_t datalen) |
| { Send a packet to another XBee node } More... | |
| uint8_t | netdevice_send_hex_radius (char *dst, char *data, uint8_t datalen, uint8_t radius) |
| uint8_t | netdevice_send_byte (char *dst, char *data, uint8_t len) |
| uint8_t | netdevice_send_byte_radius (char *dst, char *data, uint8_t len, uint8_t radius) |
| uint8_t | xbee_setAPI (uint8_t type) |
| { Set XBee to API Mode } More... | |
| uint8_t | netdevice_recv (char *data, uint8_t len) |
| { Receives UART data and parses into frame packets} More... | |
Variables | |
| const uint8_t | startdelim = 0x7E |
| frameIncoming | recvBuff [2] |
| frameTX | txData |
| frameRX | rxData |
| uint8_t | RXBUFF_CUR = 0 |
| uint8_t | rxID |
| uint8_t | txID |
| #define HOPS_NO_MAX 0 |
| uint8_t _verify_checksum | ( | frameIncoming * | f | ) |
| uint8_t calc_checksum | ( | char * | data, |
| uint16_t | len | ||
| ) |
| uint8_t cmd_AT_get | ( | char * | cmd | ) |
| uint8_t cmd_AT_set | ( | char * | cmd, |
| uint8_t * | value, | ||
| uint8_t | len | ||
| ) |
| uint8_t netdevice_recv | ( | char * | data, |
| uint8_t | len | ||
| ) |
{ Receives UART data and parses into frame packets}
| data | The data | |
| [in] | len | The length |
| void netdevice_register_callback | ( | netdevice_cb_t | t, |
| frameResponseType | type | ||
| ) |
{ Register the function to send received payload }
| [in] | t | { Function to call when app data is received } |
| uint8_t netdevice_send | ( | uint64_t | dst, |
| char * | data, | ||
| uint8_t | len | ||
| ) |
{ Send a packet to another XBee node }
| dst | The destination | |
| data | The data | |
| [in] | len | The length |
| uint8_t netdevice_send_byte | ( | char * | dst, |
| char * | data, | ||
| uint8_t | len | ||
| ) |
| uint8_t netdevice_send_byte_radius | ( | char * | dst, |
| char * | data, | ||
| uint8_t | len, | ||
| uint8_t | radius | ||
| ) |
| uint8_t netdevice_send_hex | ( | char * | dst, |
| char * | data, | ||
| uint8_t | len | ||
| ) |
{ Send a packet to another XBee node }
| dst | The destination | |
| data | The data | |
| [in] | len | The length |
| uint8_t netdevice_send_hex_radius | ( | char * | dst, |
| char * | data, | ||
| uint8_t | datalen, | ||
| uint8_t | radius | ||
| ) |
| uint8_t netdevice_send_radius | ( | uint64_t | dst, |
| char * | data, | ||
| uint8_t | datalen, | ||
| uint8_t | radius | ||
| ) |
| void xbee_enterCmdMode | ( | ) |
{ Enter XBee command mode }
| void xbee_init | ( | ) |
{ Intialize the XBee module }
| void xbee_leaveCmdMode | ( | ) |
{ Leave XBee command mode }
| uint8_t xbee_setAPI | ( | uint8_t | type | ) |
{ Set XBee to API Mode }
| [in] | type | API Mode [1 or 2] |
| frameIncoming recvBuff[2] |
| uint8_t RXBUFF_CUR = 0 |
| frameRX rxData |
| uint8_t rxID |
| const uint8_t startdelim = 0x7E |
| frameTX txData |
| uint8_t txID |


Object
The transport layer represents the lowest level of the SSH protocol, and implements basic message exchanging and protocol initialization. It will never be instantiated directly (unless you really know what you’re about), but will instead be created for you automatically when you create a new SSH session via Net::SSH.start.
The standard port for the SSH protocol.
The host-key verifier object used to verify host keys, to ensure that the connection is not being spoofed.
The port number to connect to, as given in the options to the constructor. If no port number was given, this will default to DEFAULT_PORT.
Instantiates a new transport layer abstraction. This will block until the initial key exchange completes, leaving you with a ready-to-use transport session.
# File lib/net/ssh/transport/session.rb, line 57 def initialize(host, options={}) self.logger = options[:logger] @host = host @port = options[:port] || DEFAULT_PORT @bind_address = options[:bind_address] || nil @options = options debug { "establishing connection to #{@host}:#{@port}" } factory = options[:proxy] || TCPSocket @socket = timeout(options[:timeout] || 0) { @bind_address.nil? || options[:proxy] ? factory.open(@host, @port) : factory.open(@host,@port,@bind_address) } @socket.extend(PacketStream) @socket.logger = @logger debug { "connection established" } @queue = [] @host_key_verifier = select_host_key_verifier(options[:paranoid]) @server_version = timeout(options[:timeout] || 0) { ServerVersion.new(socket, logger) } @algorithms = Algorithms.new(self, options) wait { algorithms.initialized? } end
Cleans up (see PacketStream#cleanup) and closes the underlying socket.
# File lib/net/ssh/transport/session.rb, line 105 def close socket.cleanup socket.close end
Returns true if the underlying socket has been closed.
# File lib/net/ssh/transport/session.rb, line 100 def closed? socket.closed? end
Configure’s the packet stream’s client state with the given set of options. This is typically used to define the cipher, compression, and hmac algorithms to use when sending packets to the server.
# File lib/net/ssh/transport/session.rb, line 232 def configure_client(options={}) socket.client.set(options) end
Configure’s the packet stream’s server state with the given set of options. This is typically used to define the cipher, compression, and hmac algorithms to use when reading packets from the server.
# File lib/net/ssh/transport/session.rb, line 239 def configure_server(options={}) socket.server.set(options) end
Enqueues the given message, such that it will be sent at the earliest opportunity. This does not block, but returns immediately.
# File lib/net/ssh/transport/session.rb, line 225 def enqueue_message(message) socket.enqueue_packet(message) end
Sets a new hint for the packet stream, which the packet stream may use to change its behavior. (See PacketStream#hints).
# File lib/net/ssh/transport/session.rb, line 245 def hint(which, value=true) socket.hints[which] = value end
Returns the host (and possibly IP address) in a format compatible with SSH known-host files.
# File lib/net/ssh/transport/session.rb, line 86 def host_as_string @host_as_string ||= begin string = "#{host}" string = "[#{string}]:#{port}" if port != DEFAULT_PORT if socket.peer_ip != host string2 = socket.peer_ip string2 = "[#{string2}]:#{port}" if port != DEFAULT_PORT string << "," << string2 end string end end
Blocks until a new packet is available to be read, and returns that packet. See poll_message.
# File lib/net/ssh/transport/session.rb, line 151 def next_message poll_message(:block) end
Returns a hash of information about the peer (remote) side of the socket, including :ip, :port, :host, and :canonized (see host_as_string).
# File lib/net/ssh/transport/session.rb, line 145 def peer @peer ||= { :ip => socket.peer_ip, :port => @port.to_i, :host => @host, :canonized => host_as_string } end
Tries to read the next packet from the socket. If mode is :nonblock (the default), this will not block and will return nil if there are no packets waiting to be read. Otherwise, this will block until a packet is available. Note that some packet types (DISCONNECT, IGNORE, UNIMPLEMENTED, DEBUG, and KEXINIT) are handled silently by this method, and will never be returned.
If a key-exchange is in process and a disallowed packet type is received, it will be enqueued and otherwise ignored. When a key-exchange is not in process, and consume_queue is true, packets will be first read from the queue before the socket is queried.
# File lib/net/ssh/transport/session.rb, line 166 def poll_message(mode=:nonblock, consume_queue=true) loop do if consume_queue && @queue.any? &&<EMAIL_ADDRESS>return @queue.shift end packet = socket.next_packet(mode) return nil if packet.nil? case packet.type when DISCONNECT raise Net::SSH::Disconnect, "disconnected: #{packet[:description]} (#{packet[:reason_code]})" when IGNORE debug { "IGNORE packet recieved: #{packet[:data].inspect}" } when UNIMPLEMENTED lwarn { "UNIMPLEMENTED: #{packet[:number]}" } when DEBUG send(packet[:always_display] ? :fatal : :debug) { packet[:message] } when KEXINIT algorithms.accept_kexinit(packet) else return packet if algorithms.allow?(packet) push(packet) end end end
Adds the given packet to the packet queue. If the queue is non-empty, poll_message will return packets from the queue in the order they were received.
# File lib/net/ssh/transport/session.rb, line 213 def push(packet) @queue.push(packet) end
Requests a rekey operation, and blocks until the operation completes. If a rekey is already pending, this returns immediately, having no effect.
# File lib/net/ssh/transport/session.rb, line 128 def rekey! if !algorithms.pending? algorithms.rekey! wait { algorithms.initialized? } end end
Returns immediately if a rekey is already in process. Otherwise, if a rekey is needed (as indicated by the socket, see PacketStream#if_needs_rekey?) one is performed, causing this method to block until it completes.
# File lib/net/ssh/transport/session.rb, line 138 def rekey_as_needed return if algorithms.pending? socket.if_needs_rekey? { rekey! } end
Sends the given message via the packet stream, blocking until the entire message has been sent.
# File lib/net/ssh/transport/session.rb, line 219 def send_message(message) socket.send_packet(message) end
Returns a new service_request packet for the given service name, ready for sending to the server.
# File lib/net/ssh/transport/session.rb, line 121 def service_request(service) Net::SSH::Buffer.from(:byte, SERVICE_REQUEST, :string, service) end
Performs a “hard” shutdown of the connection. In general, this should never be done, but it might be necessary (in a rescue clause, for instance, when the connection needs to close but you don’t know the status of the underlying protocol’s state).
# File lib/net/ssh/transport/session.rb, line 114 def shutdown! error { "forcing connection closed" } socket.close end
Waits (blocks) until the given block returns true. If no block is given, this just waits long enough to see if there are any pending packets. Any packets read are enqueued (see push).
# File lib/net/ssh/transport/session.rb, line 201 def wait loop do break if block_given? && yield message = poll_message(:nonblock, false) push(message) if message break if !block_given? end end
Generated with the Darkfish Rdoc Generator 2.


All active projects
| ID | GitHub Username | Repo Name | Branchname OR Commit Sha | Status |
|---|
Add new project
LEGEND
| Up to Date with Master | |
| Behind Master | |
| Data Invalid: Try Re-Entering |
| ID | GitHub Username | Repo Name | Branchname OR Commit Sha | Status |
|---|
| Up to Date with Master | |
| Behind Master | |
| Data Invalid: Try Re-Entering |


Akan names are derived from Ghanian culture. Get your Akan name by filling the form
below!
Names are based on gender and the date you were born.
Frequently in Ghana, children
are given their first name as a 'day name'
which corresponds to the day in the week they were born.


Awesome video and audio in HTML5/CSS3
Sorry, your browser does not support video, consider upgrading.
Sorry, your browser does not support audio, consider upgrading.


Usage¶
One of the mechanisms Coach uses for running experiments is the Preset mechanism. As its name implies, a preset defines a set of predefined experiment parameters. This allows defining a complex agent-environment interaction, with multiple parameters, and later running it through a very simple command line.
The preset includes all the components that are used in the experiment, such as the agent internal components and the environment to use. It additionally defines general parameters for the experiment itself, such as the training schedule, visualization parameters, and testing parameters.
Training an Agent¶
Single-threaded Algorithms¶
This is the most common case. Just choose a preset using the -p flag and press enter. To list the available presets, use the -l flag.
Example:
coach -p CartPole_DQN
Multi-threaded Algorithms¶
Multi-threaded algorithms are very common these days.
They typically achieve the best results, and scale gracefully with the number of threads.
In Coach, running such algorithms is done by selecting a suitable preset, and choosing the number of threads to run using the -n
flag.
Example:
coach -p CartPole_A3C -n 8
Multi-Node Algorithms¶
Coach supports the multi-node runs in distributed mode. Specifically, the horizontal scale-out of rollout workers is implemented.
In Coach, running such algorithms is done by selecting a suitable preset, enabling distributed coach using -dc
flag,
passing distributed coach parameters using dcp
and choosing the number of to run using the -n
flag.
For more details and instructions on how to use distributed Coach, see Usage - Distributed Coach.
Example:
coach -p CartPole_ClippedPPO -dc -dcp <path-to-config-file> -n 8
Evaluating an Agent¶
There are several options for evaluating an agent during the training:
For multi-threaded runs, an evaluation agent will constantly run in the background and evaluate the model during the training.
For single-threaded runs, it is possible to define an evaluation period through the preset. This will run several episodes of evaluation once in a while.
Additionally, it is possible to save checkpoints of the agents networks and then run only in evaluation mode.
Saving checkpoints can be done by specifying the number of seconds between storing checkpoints using the -s
flag.
The checkpoints will be saved into the experiment directory.
Loading a model for evaluation can be done by specifying the -crd
flag with the experiment directory, and the --evaluate
flag to disable training.
Example:
coach -p CartPole_DQN -s 60
coach -p CartPole_DQN --evaluate -crd CHECKPOINT_RESTORE_DIR
Playing with the Environment as a Human¶
Interacting with the environment as a human can be useful for understanding its difficulties and for collecting data for imitation learning.
In Coach, this can be easily done by selecting a preset that defines the environment to use, and specifying the --play
flag.
When the environment is loaded, the available keyboard buttons will be printed to the screen.
Pressing the escape key when finished will end the simulation and store the replay buffer in the experiment dir.
Example:
coach -et rl_coach.environments.gym_environment:Atari -lvl BreakoutDeterministic-v4 --play
Learning Through Imitation Learning¶
Learning through imitation of human behavior is a nice way to speedup the learning. In Coach, this can be done in two steps -
Create a dataset of demonstrations by playing with the environment as a human. After this step, a pickle of the replay buffer containing your game play will be stored in the experiment directory. The path to this replay buffer will be printed to the screen. To do so, you should select an environment type and level through the command line, and specify the
--play
flag.Example:
coach -et rl_coach.environments.doom_environment:DoomEnvironmentParameters -lvl Basic --play
- Next, use an imitation learning preset and set the replay buffer path accordingly.
The path can be set either from the command line or from the preset itself.
Example:
from rl_coach.core_types import PickledReplayBuffer
coach -p Doom_Basic_BC -cp='agent.load_memory_from_file_path=PickledReplayBuffer(\"<experiment dir>/replay_buffer.p\"')
Visualizations¶
Rendering the Environment¶
Rendering the environment can be done by using the -r
flag.
When working with multi-threaded algorithms, the rendered image will be representing the game play of the evaluation worker.
When working with single-threaded algorithms, the rendered image will be representing the single worker which can be either training or evaluating.
Keep in mind that rendering the environment in single-threaded algorithms may slow the training to some extent.
When playing with the environment using the --play
flag, the environment will be rendered automatically without the need for specifying the -r
flag.
Example:
coach -p Atari_DQN -lvl breakout -r
Dumping GIFs¶
Coach allows storing GIFs of the agent game play.
To dump GIF files, use the -dg
flag.
The files are dumped after every evaluation episode, and are saved into the experiment directory, under a gifs sub-directory.
Example:
coach -p Atari_A3C -lvl breakout -n 4 -dg
Switching Between Deep Learning Frameworks¶
Coach uses TensorFlow as its main backend framework, but it also supports MXNet.
MXNet is optional, and by default, TensorFlow will be used.
If MXNet was installed, it is possible to switch to MXNet using the -f
flag.
Example:
coach -p Doom_Basic_DQN -f mxnet
Additional Flags¶
There are several convenient flags which are important to know about.
The most up to date description can be found by using the -h
flag.


Already a member? Please log in instead.
Error: There was a problem submitting the registration. Please try again.


Represents the sum of all quantity currently quoted for contract's side at a specific price. This represents the same as a value in a single box on Smarkets.com in market depth view.


For purposes of auditing anything that goes on our servers we’re looking to parse the binary logs of all servers (masters), as with “Anemomaster”. With Row Based Replication this is problematic since pt-query-digest does not support parsing RBR binary logs (true for 2.2.12, latest at this time).
I’ve written a simple script that translates RBR logs to SBR-like logs, with a little bit of cheating. My interest is that pt-query-digest is able to capture and count the queries, nothing else. By doing some minimal text manipulation on the binary log I’m able to now feed it to pt-query-digest which seems to be happy.
The script of course does not parse the binary log directly; furthermore, it requires the binary log to be extracted via:
mysqlbinlog –verbose –base64-output=DECODE-ROWS your-mysql-binlog-filemame.000001
The above adds the interpretation of the RBR entires in the form of (unconventional) statements, commented, and strips out the cryptic RBR text. All that is left is to do a little manipulation on entry headers and uncomment the interpreted queries.
The script can be found in my gist repositories. Current version is as follows:
pt-query-digest, Anemometer or “Anemomaster” do a great job of analysing your queries and giving you visibility into what’s going on with your MySQL servers. However, the place where the query digests are written is just some MySQL tables on some server. Do you have monitoring/alerts on that table? How will you verify a specific query does not exceed some runtime/execution count threshold, and get notified when it does?
At Outbrain we use Graphite to collect almost all of our data. We like it for its simplicity and for the fact it has a “push” strategy as opposed to “pull” strategy: every service/server/collectd writes (pushes) its own data to Graphite, as opposed to having some centralized monitoring service trying to pull data from thousands of servers & services. We also have a great Graphite dashboard (developed at our company by Erez Mazor) called graphitus, which is a very sophisticated and easily configurable visualization solution (see documentation).
Our love/hate relationship with Nagios boil down to having a single Nagios plugin: one that reads data from Graphite. We use Nagios to generate our alerts, and dream of the day we will substitute it with something else (there’s not too much love in this love/hate relationship).
Graphite is a numeric timeseries data monitoring solution. How do you throw MySQL query analysis into Graphite, then?
The answer lies within the flexible structure of a Graphite metric entry, which is a freely composed path, such as collectd.hosts.us-east.myhost01.mysql.gauge-Threads_running.value. Graphite does not require you to pre-define paths, and you can use anything that makes sense to you. Thus, you can use a slow query’s text, for example, as part of the Graphite entry path. This is not entirely simple as the graphite path limits the allowed characters. So this is what we do:
The following script will report the largest InnoDB tables under the data directory: schema, table & length in bytes. The tables could be non-partitioned, in which case this is simply the size of the corresponding .ibd file, or they can be partitioned, in which case the reported size is the sum of all partition files. It is assumed tables reside in their own tablespace files, i.e. created with innodb_file_per_table=1. ( mysql_datadir=$(grep datadir /etc/my.cnf | cut -d "=" -f 2) cd $mysql_datadir for frm_file in $(find .
common_schema 1.3 is released and is available for download. New and noteworthy in this version:
- Parameterized split(): take further control over huge transactions by breaking them down into smaller chunks, now manually tunable if needed
- duplicate_grantee(): copy+paste existing accounts along with their full set of privileges
- similar_grants: find which accounts share the exact same set of privileges (i.e. have the same role)
- json_to_xml(): translate any valid JSON object into its equivalent XML form
- extract_json_value(): use XPath notation to extract info from JSON data, just as you would from XML
- query_checksum(): given a query, calculate a checksum on the result set
- random_hash(): get a 40 hexadecimal digits random hash, using a reasonably large changing input
Let’s take a closer look at the above:
Parameterized split()
split takes your bulk query and automagically breaks it down into smaller pieces. So instead of one huge UPDATE or DELETE or INSERT..SELECT transaction, you get many smaller transactions, each with smaller impact on I/O, locks, CPU.
As of 1.3, split() gets more exposed: you can have some control on its execution, and you also get a lot of very interesting info during operation.
Here’s an example of split() control:
set @script := “
split({start:7015, step:2000} : UPDATE sakila.rental SET return_date = return_date + INTERVAL 1 DAY)
throttle 1;
“;
call common_schema.run(@script);
In the above we choose a split size of 2,000 rows at a time; but we also choose to only start with 7015, skipping all rows prior to that value. Just what is that value? It depends on the splitting key (and see next example for just that); but in this table we can safely assume this is the rental_id PRIMARY KEY of the table.
You don’t have to use these control parameters. But they can save you some time and effort.
If you are familiar with both openark kit and common_schema, you’ll notice I’ve incorporated some functionality already working in openark kit into common_schema, essentially rewriting what used to be a Python script into SQL/QueryScript.
What was my reasoning for rewriting good code? I wish to explain that, and provide with a couple examples.
I’m generally interested in pushing as much functionality into the MySQL server. When using an external script, one:
- Needs the right dependencies (OS, Perl/Python version, Perl/Python modules).
- Needs to provide with connection params,
- Needs to get acquainted with a lot of command line options,
- Is limited by whatever command line options are provided.
- Has to invoke that script (duh!) to get the work done.
This last bullet is not so trivial: it means you can’t work some operation with your favorite GUI client, because it has no notion of your Perl script; does not run on the same machine where your Python code resides; simply can’t run those scripts for you.
With server-side code, functionality is accessible via any client. You run your operation via a query (e.g. CALL some_procedure). That can be done from your GUI client, your command line client, your event scheduler, your cronjob, all equally. You only need access to your MySQL server, which is trivial.
Of course, server side scripting is limited. Some stuff simply can’t be written solely on server side. If you want to consult your replicating slave; gracefully take action on user’s Ctrl+C, send data over the web, you’ll have to do it with an external tool. There are actually a lot of surprising limitations to things one would assume are possible on server side. You may already know how frustrated I am by the fact one can hardly get info from SHOW commands.
But, when it works, it shines
Let’s review a couple examples. The first one is nearly trivial. The second less so.
The issue of terminating long-time idle open InnoDB transaction has been discussed recently by many. I wish to add my share, by proposing a quick and clean solution via common_schema.
common_schema 1.2 provides with the innodb_transactions view, which relies on INNODB_TRX - one of the InnoDB Plugin views in INFORMATION_SCHEMA - as well as on PROCESSLIST, and so is able to determine with certainty that a transaction has been idle for a long time.
innodb_transactions offers us with a sql_kill_query column, which produces a ‘KILL QUERY 12345’ type of value.  This may be your weekly/monthly cleanup task. The table is large, the amount of rows to be deleted is large, and doing so in one big DELETE is too heavy.
You can use oak-chunk-update or pt-archiver to accomplish the task. You can also use server side scripting with QueryScript, offering a very simple syntax with no external scripting, dependencies and command line options.
I wish to present three cases of row deletion, with three different solutions. In all cases we assume some TIMESTAMP column exists in table, by which we choose to purge the row. In all cases we assume we wish to purge rows older than 1 month.
We assume the naive query is this:
DELETE FROM my_schema.my_table WHERE row_timestamp < CURDATE() - INTERVAL 1 MONTH
Case 1: TIMESTAMP column is indexed
I almost always index a timestamp column, if only for being able to quickly purge data (but usually also to slice data by date). In this case where the column is indexed, it’s very easy to figure out which rows are older than 1 month.
We break the naive query into smaller parts, and execute these in sequence:
MySQL 5.6 offers the groundbreaking online DDL operations for InnoDB. Most common use cases will enjoy this feature, and the need for online alter table scripts will decrease. This is a killer feature!
I’ve put this new feature to the usability test. How did it go? Not too well, I’m afraid.
[Updates to this text inline], also see this followup.
sakila & DDL
sakila is still a very useful database. I say “still” because it is not very large, and computing power is getting stronger; yet on my laptop some operations can still take many seconds to complete, which is just fine for my tests.
Sakila tables are mostly InnoDB, and rental being the largest, I do:
node1 (sakila) > alter table sakila.rental engine=InnoDB;
Query OK, 16044 rows affected (6.94 sec)
Records: 16044 Duplicates: 0 Warnings: 0
So what can be executed during these 6.94 seconds? In a second terminal, I try the following:
This post exposes some of the internals, and the SQL behind QueryScript’s split. common_schema/QueryScript 1.1 introduces the split statement, which auto-breaks a “large” query (one which operates on large tables as a whole or without keys) into smaller queries, and executes them in sequence.
This makes for easier transactions, less locks held, potentially (depending on the user) more idle time released back to the database. split has similar concepts to oak-chunk-update and pt-archiver, but works differently, and implemented entirely in SQL on server side.
Take the following statement as example:
split (UPDATE sakila.inventory SET last_update = last_update + INTERVAL 6 HOUR)
pass;
It yields with (roughly) the following statements:
UPDATE sakila.inventory SET last_update = last_update + INTERVAL 6 HOUR WHERE ((((inventory
.inventory_id
> ‘1’)) OR ((inventory
.inventory_id
= ‘1’))) AND (((inventory
.inventory_id
< ‘1000’)) OR ((inventory
.inventory_id
= ‘1000’))));
UPDATE sakila.inventory SET last_update = last_update + INTERVAL 6 HOUR WHERE ((((inventory
.inventory_id
> ‘1000’))) AND (((inventory
.inventory_id
< ‘2000’)) OR ((inventory
.inventory_id
= ‘2000’))));
UPDATE sakila.inventory SET last_update = last_update + INTERVAL 6 HOUR WHERE ((((inventory
.inventory_id
> ‘2000’))) AND (((inventory
.inventory_id
< ‘3000’)) OR ((inventory
.inventory_id
= ‘3000’))));
UPDATE sakila.inventory SET last_update = last_update + INTERVAL 6 HOUR WHERE ((((inventory
.inventory_id
> ‘3000’))) AND (((inventory
.inventory_id
< ‘4000’)) OR ((inventory
.inventory_id
= ‘4000’))));
UPDATE sakila.inventory SET last_update = last_update + INTERVAL 6 HOUR WHERE ((((inventory
.inventory_id
> ‘4000’))) AND (((inventory
.inventory_id
< ‘4581’)) OR ((inventory
.inventory_id
= ‘4581’))));
(I say “roughly” because internally there are user defined variables at play, but for convenience, I verbose the actual values as constants.)
How does that work?
common_schema works on server side. There is no Perl script or anything. It must therefore use server-side operations to:
- Identify table to be split
- Analyze the table in the first place, deciding how to split it
- Analyze the query, deciding on how to rewrite it
- Split the table (logically) into unique and distinct chunks
- Work out the query on each such chunk
Following is an internal look at how common_schema does all the above.
(pun intended)
common_schema’s new split statement (see release announcement) auto-splits complex queries over large tables into smaller ones: instead of issuing one huge query, split breaks one’s query into smaller queries, each working on a different set of rows (a chunk).
Thus, it is possible to avoid holding locks for long times, allowing for smaller transactions. It also makes for breathing space for the RDBMS, at times boosting operation speed, and at times prolonging operation speed at will.
In this post I show how split exposes itself to the user, should the user wish so.
split can manage queries of the following forms:
- DELETE FROM table_name [WHERE]…
- DELETE FROM table_name USING <multi table syntax> [WHERE]…
- UPDATE table_name SET … [WHERE]…
- UPDATE <multiple tables> SET … [WHERE]…
- INSERT INTO some_table SELECT … FROM <single or multiple tables> [WHERE]…
- REPLACE INTO some_table SELECT … FROM <single or multiple tables> [WHERE]…
- SELECT … FROM <multiple tables> [WHERE]…
The latter being a non-obvious one at first sight.
Basically, it’ automatic
You just say:
split (UPDATE sakila.inventory SET last_update = last_update + INTERVAL 6 HOUR)
throttle 2;
And split identifies sakila.inventory as the table which needs to be split, and injects appropriate conditions so as to work on a subset of the rows, in multiple steps.
By the way, here’s how to execute a QueryScript code like the above.
I’m very happy to announce the release of common_schema, version 1.1 (revision 300).
This version boasts with compelling new features: innovative QueryScript syntax, libraries, views which add to your skills as a DBA, making some maintenance and management tasks a breeze.
- QueryScript, split statement: automagically break long queries into smaller chunks, avoid long locks and reduce query/transaction overhead
- QueryScript, try-catch statement: just try { something; } catch { act_on_error; }.
- killall(): quickly kill connections based on grantee/user/host information.
- profiling/profiling_last: utility views to assist in query profiling diagnostics
- 1 size fits all: a single installer which auto-recognizes available server features and enables respective common_schema features accordingly.
- QueryScript performance boost
- much much more…
Not familiar with common_schema? It allows you to do stuff on server side, by selecting from views, calling upon useful routines or writing easy-to-manage scripts.
I’m suggesting that common_schema should be a really-should-have tool to accompany your MySQL install. Did I say “tool”? It’s merely a schema. But it makes for a great framework:
In High Performance MySQL, 3rd edition, Baron Schwartz describes common_schema:
The common_schema is to MySQL as jQuery is to javaScript
Reviewing highlights for version 1.1:
QueryScript
QueryScript is a scripting language. It sees some major improvements here. I’ve made some speed boosts by avoiding using temporary tables, and by using string parsing instead.
Without doubt the two most handy statements added to QueryScript are:
Some administrative tasks can be simplified by using common_schema/QueryScript.  Here’s one for example:
The DBA/developer has the task of retaining only top 3 most populated countries per continent. That is, she has to DELETE 4th, 5th, 6th, … most populated counties in each continent.
Is it possible to work out with a single query? Yes. But the query is not pretty. In fact, it is quite complicated, and either involves unintuitive subqueries, or unintuitive hacks. A normal DBA would not want to write, neither maintain this kind of query, unless top-notch-geek, which is fine.
Since this is a one time job, we just need to get it done. And common_schema/QueryScript provide with the intuitive solution: if we read our demand aloud, we realize we want to delete 4th, 5th, 6th, … populated countries for each continent.
I present a solution made available by QueryScript, and discuss the ways in which the code overcomes limitations, or simplifies complexity:
var $num_countries_to_delete;
foreach($continent, $num_countries: SELECT continent, COUNT(*) FROM world.Country GROUP BY continent)
{
if ($num_countries > 3)
{
set $num_countries_to_delete := $num_countries - 3;
DELETE FROM world.Country WHERE Continent = $continent ORDER BY Population ASC LIMIT :$num_countries_to_delete;
}
}
Discussion
The first thing that should be apparent from the above is that this is a programmatic solution. Queries are declarative, which is why complex ones sometimes look incomprehensible. The above is more straightforward.
common_schema, revision 218 is released, with major new features, top one being server side scripting. Here are the highlights:
- QueryScript: server side scripting is now supported by common_schema, which acts as an interpreter for QueryScript code.
- Throttling for queries is now made available via the throttle() function.
- Enhancements to processlist-related views, including the new slave_hosts view.
- Inline documentation/help is available via the help() routine.
- more…
QueryScript
common_schema makes for a QueryScript implementation for MySQL. You can run server side scripts, interpreted by common_schema, which allow for easy syntax and greater power than was otherwise previously available on the MySQL server. For example:
foreach($table, $schema, $engine: table like ‘%’)
if ($engine = ‘ndbcluster’)
ALTER ONLINE TABLE :$schema.:$table REORGANIZE PARTITION;
QueryScript includes flow control, conditional branching, variables & variable expansion, script throttling and more.
Read more on common_schema’s QueryScript implementation.
Introducing QueryScript: a programming language aimed for SQL scripting, seamlessly combining scripting power such as flow control & variables with standard SQL statements or RDBMS-specific commands.
QueryScript is available fro MySQL via common_schema, which adds MySQL-specific usage.
What does QueryScript look like? Here are a few code samples:
Turn a bulk DELETE operation into smaller tasks. Throttle in between.
while (DELETE FROM archive.events WHERE ts < CURDATE() LIMIT 1000)
{
throttle 2;
}
Convert all InnoDB tables in the ‘sakila’ database to compressed format:
foreach ($table, $schema, $engine: table in sakila)
{
if ($engine = ‘InnoDB’)
ALTER TABLE :$schema.:$table ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCKSIZE=8;
}
Shard your data across multiple schemata:
foreach($shard: {USA, GBR, JAP, FRA})
{
CREATE DATABASE db:$shard;
CREATE TABLE db:$shard.city LIKE world.City;
INSERT INTO db:$shard.city SELECT * FROM world.City WHERE CountryCode = $shard;
}
Students in my training classes usually prefer to use some kind of visual editor for MySQL. Typically this would be the software they’re using at work. Sometimes they just bring over their laptops with the software installed. Or they would use MySQL Workbench, which is what I usually have pre-installed on their desktops.
I see MySQL Workbench, SQLyog, Toad for MySQL, or several more.
I always humbly suggest they close down their software and open up a command line.
It isn’t fancy. It may not even be convenient (especially on Windows, in my opinion). And repeating your last command with a minor modification requires a lot of key stroking. Or you would copy+paste from some text editor. Most students will give it a shot, then go back to their favorite editor.
Well, again and again I reach the same conclusion:
Visual editors are not as trustworthy as the command line.
Time and again students show me something on their editor. Behavior seems strange to me. Opening up a console shows a completely different picture.
Things like:
In my previous post I’ve shown several generic use cases for foreach(), a new scripting functionality introduced in common_schema.
In this part I present DBA’s handy syntax for schema and table operations and maintenance.
Confession: while I love INFORMATION_SCHEMA’s power, I just hate writing queries against it. It’s just so much typing! Just getting the list of tables in a schema makes for this heavy duty query:
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=‘sakila’ AND TABLE_TYPE=‘BASE TABLE’;
When a join is involved this really becomes a nightmare. I think it’s cumbersome, and as result, many do not remember the names and meaning of columns, making for “oh, I need to read the manual all over again just to get that query right”. Anyway, that’s my opinion.
A SHOW TABLES statement is easier to type, but cannot be integrated into a SELECT query (though we have a partial solution for that, too), and besides, when filtering out the views, the SHOW statement becomes almost as cumbersome as the one on INFORMATION_SCHEMA.
Which is why foreach() offers handy shortcuts to common iterations on schemata and tables, as follows:
Use case: iterate all databases
call foreach(‘schema’, ‘CREATE TABLE ${schema}.event(eventid INT, msg VARCHAR(128))’);
In the above we execute a query on each database. Hmmm, maybe not such a good idea to perform this operation on all databases? Let’s filter them:
Use case: iterate databases by name match
call foreach(‘schema like wordpress%’, ‘ALTER TABLE ${schema}.wp_posts MODIFY COLUMN comment_author VARCHAR(96) NOT NULL’);
The above will only iterate my WordPress databases (I have several of these), performing an ALTER on wp_posts for each of those databases.
A new routine is now available in common_schema, which makes for an easier execution syntax for some operations: foreach(collection_to_iterate_over, queries_to_execute_per_iteration_step); To illustrate what it can do, consider: call foreach('table in sakila', 'ALTER TABLE ${schema}.${table} ENGINE=InnoDB ROW_FORMAT=COMPACT'); call $('schema like shard_%', 'CREATE TABLE ${schema}.messages (id INT)'); call $('2000:2009', 'INSERT IGNORE INTO report (report_year) VALUES (${1})'); $() stands as a synonym to foreach(). I suspect it should look familiar to web programmers. The idea for foreach() was introduced by Giuseppe Maxia during a correspondence.
I’m having a lot of fun writing common_schema, an SQL project which includes views, tables and stored routines.
As the project grows (and it’s taking some interesting directions, in my opinion) more dependencies are being introduced, and a change to one routine or view may affect many others. This is why I’ve turned the development on common_schema to be test driven.
Now, just how do you test drive an SQL project?
Well, much like the way you test any other project in your favorite programming language. If its functions you’re testing, that’s all too familiar: functions get some input and provide some output. Hmmm, they might be changing SQL data during that time. With procedures it’s slightly more complex, since they do not directly return output but result sets.
Here’s the testing scheme I use:
Listing some useful sed / awk liners to use with MySQL. I use these on occasion. sed, awk & grep have many overlapping features. Some simple tasks can be performed by either. For example, stripping empty lines can be performed by either: grep '.' awk '/./' sed '/./!d' grep -v '^$' awk '!/^$/' sed '/^$/d' It's a matter of taste & convention which tool and variation to use. So for any script I suggest, there may be many variations, possibly cleaner, shorter; feel free to comment.
The latest release of openark kit introduces oak-hook-general-log, a handy tool which allows for some analysis of executing queries.
Initially I just intended for the tool to be able to dump the general log to standard output, from any machine capable to connect to MySQL. Quick enough, I realized the power it brings.
With this tool, one can dump to standard output all queries using temporary tables; or using a specific index; or doing a full index scan; or just follow up on connections; or… For example, the following execution will only log queries which make for filesort:
oak-hook-general-log –user=root –host=localhost –password=123456 –filter-explain-filesort
The problem with using the standard logs
So you have the general log, which you don’t often enable, since it tends to grow huge within moments. You then have the slow log. Slow log is great, and is among the top tools for MySQL diagnosis.
The slow log allows for log-queries-not-using-indexes, which is yet another nice feature. Not only should you log any query running for over X seconds, but also log any query which does not use an index.
Wait. This logs all single-row tables (no single row table will use an index), as well as very small tables (a common 20 rows lookup table will most often be scanned). These are OK scans. This makes for some noise in the slow log.
And how about queries which do use an index, but do so poorly? They use an index, but retrieve some 12,500,000 rows, using temporary table & filesort?
What oak-hook-general-log does for you
This tool streams out the general log, and filters out queries based on their role or on their execution plan.
To work at all, it must enable the general log. Moreover, it directs the general log to log table. Mind that this makes for a performance impact, which is why the tool auto-terminates and restores original log settings (default is 1 minute, configurable). It’s really not a tool you should keep running for days. But during the few moments it runs, it will:
- Routinely rotate the mysql.general_log table so that it doesn’t fill up
- Examine entries found in the general log
- Cross reference entries to the PROCESSLIST so as to deduce database context (bug #52554)
- If required and appropriate, evaluate a query’s execution plan
- Decide whether to dump each entry based on filtering rules
Filtering rules
Filtering rules are passed as command line options. At current, only one filtering rule applies (if more than one specified only one is used, so no point in passing more than one). Some of the rules are:
I’m pleased to announce a new release of the openark kit. There’s a lot of new functionality inside; following is a brief overview.
The openark kit is a set of utilities for MySQL. They solve everyday maintenance tasks, which may be complicated or time consuming to work by hand.
It’s been a while since the last announced release. Most of my attention was on mycheckpoint, building new features, writing documentation etc. However my own use of openark kit has only increased in the past few months, and there’s new useful solutions to common problems that have been developed.
I’ve used and improved many tools over this time, but doing the final cut, along with proper documentation, took some time. Anyway, here are the highlights:
New tool: oak-hook-general-log
oak-hook-general-log hooks up a MySQL server and dumps the general log based on filtering rules, applying to query role or execution plan. It is possible to only dump connect/disconnect entries, queries which make a full table scan, or use temporary tables, or scan more than X number of rows, or…
I’ll write more on this tool shortly.
New tool: oak-prepare-shutdown
This tool makes for an orderly and faster shutdown by safely stopping replication, and flushing InnoDB pages to disk prior to shutting down (keeping server available for connections even while attempting to flush dirty pages to disk). A typical use case would be:
oak-prepare-shutdown –user=root –ask-pass –socket=/tmp/mysql.sock && /etc/init.d/mysql stop
New tool: oak-repeat query
oak-repeat-query repeats executing a given query until some condition holds. The condition can be:
- Number of given iterations has been reached
- Given time has elapsed
- No rows have been affected by query
The tool comes in handy for cleanup jobs, warming up caches, etc.
Revision 208 of mycheckpoint, a MySQL monitoring solution, has been released. New and updated in this revision:
- Aggregation tables: aggregated data makes for fast reports on previously slow queries.
- Enhanced charting: interactive charts now present time stamps dynamically (see demo); “Zoom in” charts are available (see demo) on mycheckpoint’s HTTP server.
- RPM distribution: a “noarch” RPM mycheckpoint build is now available.
- Initial work on formalizing test environment
mycheckpoint celebrates one year of existence!
Aggregation tables
I really wanted to avoid using these: everything was so more beautiful with one single dataset and dozens of supporting views (OK, the views themselves are hardly “beautiful”).
However it was impossible (for my level of expertise) to optimize query performance what with all those views on per-hour and per-day aggregation. The GROUP BYs and the JOINs did not make it possible for condition pushdown (i.e. using MERGE algorithm) where desired.
As result, mycheckpoint now manages aggregation tables: per-hour and per-day. The impact on sample taking is neglect able (making for two additional fast queries), but the impact on reading aggregated data is overwhelming. Generating a HTML full report could take a few minutes to complete. It now returns in no time. This makes charting more attractive, and allows for enhanced charting, such as zooming in on charts, as described following.
Aggregation tables will automatically be created and retroactively populated upon using revision 208. There’s nothing special to do; be advised that for one single execution of mycheckpoint, many INSERT queries are going to be executed. Shouldn’t take more than a couple minutes on commodity hardware and a few months of history.
It is possible to disable aggregation tables, or make for a complete rebuild of tables; by default, though, aggregation is ON.
Enhanced charting
Two enhancements here:
Here’s a few thoughts on current status and further possibilities for Facebook’s Online Schema Change (OSC) tool. I’ve had these thoughts for months now, pondering over improving oak-online-alter-table but haven’t got around to implement them nor even write them down. Better late than never.
The tool has some limitations. Some cannot be lifted, some could. Quoting from the announcement and looking at the code, I add a few comments. I conclude with a general opinion on the tool’s abilities.
“The original table must have PK. Otherwise an error is returned.”
This restriction could be lifted: it’s enough that the table has a UNIQUE KEY. My original oak-online-alter-table handled that particular case. As far as I see from their code, the Facebook code would work just as well with any unique key.
However, this restriction is of no real interest. As we’re mostly interested in InnoDB tables, and since any InnoDB table should have a PRIMARY KEY, we shouldn’t care too much.
“No foreign keys should exist. Otherwise an error is returned.”
Tricky stuff. With oak-online-alter-table, changes to the original table were immediately reflected in the ghost table. With InnoDB tables, that meant same transaction. And although I never got to update the text and code, there shouldn’t be a reason for not using child-side foreign keys (the child-side is the table on which the FK constraint is defined).
The Facebook patch works differently: it captures changes and writes them to a delta table, to be later (asynchronously) analyzed and make for a replay of actions on the ghost table.
Revision 190 of mycheckpoint, a MySQL monitoring solution, has been released. New and updated in this revision:
- HTTP server: mycheckpoint can now act as a web server. Point your browser and start browsing through HTML reports. See mock up demo.
- Interactive charts: HTML line charts are now interactive, presenting with accurate data as you move over them. See sample.
- Enhanced auto-deploy: now auto-recognizing failed upgrades.
- Reduced footprint: much code taken out of the views, leading to faster loading times.
- Better configuration file use: now supporting all command line options in config file.
- Remote host monitoring accessibility: now supporting complete configurable accessibility details.
- Bug fixes: thanks to the bug reporters!
mycheckpoint is free, simple, easy to use (now easier with HTTP server) and useful. I encourage you to try it out: even compared with other existing and emerging monitoring tools, I believe you will find it a breeze; it’s low impact and lightness appealing; it’s alerts mechanism assuring; its geeky SQL-based nature with ability to drill down to fine details – geeky-kind-of-attractive.
</encouragement>
HTTP server
You can now run mycheckpoint in http mode:
bash$ mycheckpoint http
mycheckpoint will listen on port 12306, and will present you with easy browsing through the reports of your mycheckpoint databases.
This HOWTO discusses two (unrelated) issues with mylvmbackup:
- The minimal privileges required to take MySQL backups with mylvmbackup.
- Making (non compressed) file system copy of one’s data files.
Minimal privileges
Some just give mylvmbackup the root account, which is far too permissive. We now consider what the minimal requirements of mylvmbackup are.
The queries mylvmbackup issues are:
- FLUSH TABLES
- FLUSH TABLES WITH READ LOCK
- SHOW MASTER STATUS
- SHOW SLAVE STATUS
- UNLOCK TABLES
Both SHOW MASTER STATUS & SHOW SLAVE STATUS require either the SUPER or REPLICATION CLIENT privilege. Since SUPER is more powerful, we choose REPLICATION CLIENT.
The FLUSH TABLES * and UNLOCK TABLES require the RELOAD privilege.
However, we are not done yet. mylvmbackup connects to the mysql database, which means we must also have some privilege there, too. We choose the SELECT privilege.
Following up on Matt Reid's simple python, mysql connection and iteration, I would like to share one of my own, which is the base for mycheckpoint & openark kit scripts. It is oriented to provide with clean access to the data: the user is not expected to handle cursors and connections. Result sets are returned as python lists and dictionaries. It is also config file aware and comes with built in command line options.
LVM uses copy-on-write to implement snapshots. Whenever you’re writing data to some page, LVM copies the original page (the way it looked like when the snapshot was taken) to the snapshot volume. The snapshot volume must be large enough to accommodate all pages written to for the duration of the snapshot’s lifetime. In other words, you must be able to copy the data somewhere outside (tape, NFS, rsync, etc.) in less time than it would take for the snapshot to fill up.
While LVM allows for hot backups of MySQL, it still poses an impact on the disks. An LVM snapshot backup may not go unnoticed by the MySQL users.
Some general guidelines for making life easier with LVM backups follow.
Lighter, longer snapshots
If you’re confident that you have enough space on your snapshot volume, you may take the opportunity to make for a longer backup time. Why? Because you would then be able to reduce the stress from the file system. Use ionice when copying your data from the snapshot volume:
ionice -c 2 cp -R /mnt/mysql_snapshot /mnt/backup/daily/20100719/
[Update: this is only on the cfq I/O scheduler; thanks, Vojtech]
Are you running out of space?
Monitor snapshot’s allocated size: if there’s just one snapshot, do it like this:
Revision 132 of mycheckpoint has been released. New and updated in this revision:
- Custom monitoring: monitoring & charting for user defined queries
- HTML reports for custom monitoring
- Process list dump upon alert notifications
Custom monitoring & charts
Custom monitoring allows the user to supply with a query, the results of which will be monitored.
That is, mycheckpoint monitors the status variables, replication status, OS metrics. But it cannot by itself monitor one’s application. Which is why a user may supply with such query as:
SELECT COUNT(*) FROM shopping_cart WHERE is_pending=1
Such a query will tell an online store how many customers are in the midst of shopping. There is no argument that this number is worth monitoring for. Given the above query, mycheckpoint will execute it per sample, and store the query’s result along with all sampled data, to be then aggregated by complex views to answer for:
- What was the value per given sample?
- What is the value difference for each sample?
- What is the change per second, i.e. the rate?
mycheckpoint goes one step forward, and explicity records another metric:
- How much time did it take to take that sample?
I’m further developing a general log hook, which can stream queries from the general log.
A particular direction I’m taking is to filter queries by their type of actions. For example, the tool (oak-hook-general-log) can be instructed to only stream out those queries which involve creation of a temporary table; or those which cause for a filesort, or full index scan, etc.
This is done by evaluating of query execution plans on the fly. I suspect the MySQL query analyzer roughly does the same (as a small part of what it does).
It’s almost nothing one cannot do with sed/awk. However, I bumped into a couple of problems:
- The general log (and the mysql.general_log table, in particular) does not indicate the particular database one is using for the query. Since slow log does indicate this data, I filed a bug on this. I currently solve this by crossing connection id with the process list, where the current database is listed. It’s shaky, but mostly works.
- Just realized: there’s no DB info in the EXPLAIN output! It’s weird, since I’ve been EXPLAINing queries for years now. But I’ve always had the advantage of knowing the schema used: either because I was manually executing the query on a known schema, or mk-query-digest was kind enough to let me know.
I’m seeking input on a new openark kit utility I’ve started to implement.
The tool, oak-hook-general-log, will hook up to a MySQL (>= 5.1) server, and stream the general log into standard output. It looks like this:
bash$ python src/oak/oak-hook-general-log.py –socket=/tmp/mysql.sock –user=root
2010-03-21 10:18:42 root[root] @ localhost [] 79 1 Query SELECT COUNT(*) FROM City
2010-03-21 10:18:48 root[root] @ localhost [] 79 1 Query DELETE FROM City WHERE id=1000
2010-03-21 10:18:54 root[root] @ localhost [] 79 1 Query SHOW PROCESSLIST
2010-03-21 10:19:06 root[root] @ localhost [] 79 1 Quit
2010-03-21 10:19:07 root[root] @ localhost [] 93 1 Connect root@localhost on
2010-03-21 10:19:07 root[root] @ localhost [] 93 1 Query select @@version_comment limit 1
2010-03-21 10:22:33 root[root] @ localhost [] 93 1 Query SELECT City.Name, Country.Name FROM Country JOIN City ON Country.Capit
2010-03-21 10:22:58 root[root] @ localhost [] 93 1 Quit
Since output is written to stdout, one can further:
bash$ python src/oak/oak-hook-general-log.py –socket=/tmp/mysql.sock –user=root | grep Connect
bash$ python src/oak/oak-hook-general-log.py –socket=/tmp/mysql.sock –user=root | grep webuser@webhost
What the tool does is to enable table logs, and periodically rotate the mysql.general_log table, read and dump its content.
In response to Mark Callaghan’s post mk-schema-change.
I apologize for not commenting on the post itself, I do not hold a Facebook account. Anyway this is a long write, so it may as well deserve a post of its own.
Some of the work Mark is describing already exists under openark kit’s oak-online-alter-table. Allow me to explain what I have gained there, and how the issue can be further pursued. There is relevance to Mark’s suggestion.
oak-online-alter-table uses a combination of locks, chunks and triggers to achieve an almost non-blocking ALTER TABLE effect. I had a very short opportunity to speak with Mark on last year’s conference, in between bites. Mark stated that anything involving triggers was irrelevant in his case.
The triggers are a pain, but I believe a few other insights from oak-online-alter-table can be of interest.
Revision 76 of mycheckpoint comes with quite a few improvements, including:
- OS monitoring (CPU, load average, memory)
- Auto-deploy
- Improved charting
- Brief HTML reports
- 24⁄7 charts
OS Monitoring
When monitoring the local machine, mycheckpoint now monitors CPU utilization, load average, memory and swap space.
This only applies to the Linux operating system; there is currently no plan to work this out for other operating systems.
Examples:
mysql> SELECT os_cpu_utilization_percent FROM sv_report_chart_sample;
mysql> SELECT ts, os_loadavg FROM mycheckpoint.sv_report_sample;
+———————+————+
| 2009-12-27 11:45:01 | 1.78 |
| 2009-12-27 11:50:01 | 2.48 |
| 2009-12-27 11:55:01 | 2.35 |
…
+———————+————+
mysql> SELECT report FROM mycheckpoint.sv_report_human_sample ORDER BY id DESC LIMIT 1 \G
*************************** 1. row ***************************
report:
Report period: 2009-12-27 13:20:01 to 2009-12-27 13:25:01. Period is 5 minutes (0.08 hours)
Uptime: 100.0% (Up: 334 days, 06:37:28 hours)
OS:
Load average: 1.67
CPU utilization: 25.2%
Memory: 7486.4MB used out of 7985.6484MB (Active: 6685.8906MB)
Swap: 3835.2MB used out of 8189.3750MB
…
Auto-deploy
mycheckpoint now has a version recognition mechanism. There is no need to call mycheckpoint with the “deploy” argument on first install or after upgrade. mycheckpoint will recognize a change of version and will auto-deploy before moving on to monitoring your system.
Following Restore one table from an ALL database dump and Restore a Single Table From mysqldump, I would like to add my own thoughts and comments on the subject. I also wish to note performance issues with the two suggested solutions, and offer improvements. Problem relevance While the problem is interesting, I just want to note that it is relevant in very specific database dimensions. Too small - and it doesn't matter how you solve it (e.g.


Assembly: SystemObjectClient
Assmebly: SystemObjectClient
|
Example of boxcarring and using the system object.
This example class calls the system object to get a list of methods available, and
then boxcars a collection of calls to get the signature of each of the methods
returned in the original list.
| SERVER_URL |
The URL of the XML-RPC server.
|
The Main method, the entire class is embodied in this single method. This method simply
creates an XmlRpcRequest to system.listMethods which is sent. If all goes well a list
of methods is returned. That list is then used to make a collection of XmlRpcRequests
each a call to system.methodSignature. This collection of requests is not sent
individually but instead is "boxcarred" together and sent all at once.
The results of the second call is a collection of results to each individual request
bundled into an array. The array of results is then formatted for output.


| Class | Description |
|---|---|
| AdvisoriesTask |
Requests and loads advisory data into local domain objects from the API.
|
| AerisAbstractTask |
Abstract class that all specific endpoint tasks will use so that they can
return the object in a friendly model versus have to know what response is
being returned to you as by using the AerisCommunicationTask.
|
| CountriesTask |
Requests and loads countries data into local domain objects from the API.
|
| EarthquakesTask |
Requests and loads earthquake data into local domain objects from the API.
|
| FiresTask |
Requests and loads fires data into local domain objects from the API.
|
| ForecastsTask |
Requests and loads observation data into local domain objects from the API.
|
| LightningTask |
Requests and loads lightning strike data into local domain objects from the
API.
|
| MoonphasesTask |
Requests and loads moon phases data into local domain objects from the API.
|
| NormalsStationsTask |
Requests and loads normals stations data into local domain objects from the
API.
|
| NormalsTask |
Requests and loads normals data into local domain objects from the API.
|
| ObservationsArchiveTask |
Requests and loads observation archive data into local domain objects from
the API.
|
| ObservationsRecentTask |
Requests and loads observation recent data into local domain objects from the
API.
|
| ObservationsSummaryTask |
Requests and loads observation summaryPeriod data into local domain objects from the
API.
|
| ObservationsTask |
Requests and loads observation data into local domain objects from the API.
|
| PlacesAirportsTask |
Requests and loads places airports data into local domain objects from the
API.
|
| PlacesPostalcodesTask |
Requests and loads postal codes data into local domain objects from the API.
|
| PlacesTask |
Requests and loads places data into local domain objects from the API.
|
| RecordsTask |
Requests and loads observation data into local domain objects from the API.
|
| StormCellsTask |
Requests and loads storm cells data into local domain objects from the API.
|
| StormReportsTask |
Requests and loads storm reports data into local domain objects from the API.
|
| SunmoonTask |
Requests and loads sunmoon data into local domain objects from the API.
|
| TidesStationsTask |
Requests and loads tide stations data into local domain objects from the API.
|
| TidesTask |
Requests and loads tides data into local domain objects from the API.
|


Running samples
To execute samples in this dir:
- If not already done, download and install dependencies in project home:
cd
..; curl -s http://getcomposer.org/installer | php;
php
composer.phar install
- Configure a php enabled web server to publish
samples
directory and point browser to it.
This file should be shown.
- Click links to run examples.
- See sources.
- Play with http headers (i.e. Accepts) and http methods using an interactive REST client compatible
with your browser (here an example for chrome).
sample.php
This script loads sample.ttl file ( in RDF turtle format) and publish it as a Linked
Data Resource supporting content negotiation. Try it.
sparqAgent.php
This script realizes a simple Semantic Web Agent that acts as a proxy to a generic remote SPARQL endpoint. It
accepts as GET parameters an sparql endpoint url, a urlencode sparql query an the username and password to be
used to access sparql endpoint. It makes the query to the remote endpoint and provides back result managing
content negotiation. It provdes als hyperlinks to edit the query and to show alternate formats for resuts.This
script can be drived by this simple html form.
eCloud Linked Data Platform Server
This simple endpoints implements a LDP Server that presents all features contained in the graph
http://e-artspace.com/s/eCloud/ inside http://lod.openlinksw.com/sparql sparql endpoint. Both a
ldp:DirectContainer and ldp:Resource view is provided. Try it.
products Linked Data Platform Server
This simple endpoints implements a LDP Server that describe as ldp:paged Container all products with an
associated image inside http://linkedopencommerce.com/sparql sparql endpoint. Try
it.


--- layout: page-home-layout title: Home ---
A fully-functional UVDesk Community Edition project skeleton packaged along with the bare essential utilities that you can use to develop your own custom helpdesk solutions.
Enjoy the adaptability and extensibility of PHP-based Helpdesk System which is fit for any trade to deliver better customer support experience.
Now, anyone can inspect, modify or utilize the source code of Symfony component-based Enterprise Open Source Helpdesk to deliver better customer support or to build modules on it.
You can also dockerize your helpdesk project to easily deploy your setup from within a docker container.
We provide one to one personalized demo to clear your doubts.
Manage your support staff and customers with robust tools. Control your Groups, Teams, Agents and Customers.
Hub of information which works as the user guide for the customers to help themselves.
Watch video to understand how to install UVdesk and how it works.
Automate your processes by creating set of rules and presets to respond faster to tickets.
Forum teaches more about ticket, workflow, add-ons, updates.
We have more than 100+ active members who highly engage in opensource community.
We request to the developer community to contribute their valuable ideas and thoughts to the community.
Our expertise are always with you to solve your issue. Verify each and every doubt before purchase.
We continuously increase the features, efficiency, optimization, and security in every release.
What are we doing in our meantime? Just check it out by reading our latest blog.


MAMAMOO say peace in 2nd 'HIP' MV teaser
by germainejMAMAMOO have dropped their second music video teaser for "HIP"!
Their lastest MV teaser reveals more of MAMAMOO's choreography and addicting beat for "HIP", and the members end the teaser with peace signs. As previously reported, the girl group is returning with a concept about different universes for their upcoming second full album 'reality in BLACK'.
MAMAMOO's 'HIP' and 'reality in BLACK' drop on November 14 KST. Check out the MV teaser above and the first MV teaser here if you missed it!


Blockchain is a network of distributed and decentralized systems to faciltate a procedure (of value) based on the needs of end-user on the underlying P2P network. In simple terms, it is a technology based on the concept of decentralizing some entity of value.
After Bitcoin was introduced in 2008-9, some anonymous person from Japan claimed to have built a solution to develop s/w on top of bitcoin in form of distributed digital ledgers. Digital Ledgers are nothing but a mechanism to process some entity of value (where the entity doesn't necessarily has to be in the financial domains) while other systems keep listening to it for changes.
Consider 4 people: A, B, C and D
to be the primary nodes on the network of a private blockchain. Here's how things work from there on:
Node A
has to send some money to Node B
.Node A
initiates a transaction request on the network.Node A
, hence it is visible to every other node across the network.n
number of transactions (not limited to/of having some economic value). New blocks are generated every 10 minutes or so
.


module Bil:sig
..end
This module defines BIL language and is useful to write BIL programs and expressions.
Example:
Bil.([
v := src lsr i32 1;
r := src;
s := i32 31;
while_ (var v <> i32 0) [
r := var r lsl i32 1;
r := var r lor (var v land i32 1);
v := var v lsr i32 1;
s := var s - i32 1;
];
dst := var r lsl var s;
])
where i32
is defined as
let i32 x = Bil.int (Word.of_int ~width:32 x)
and v,r,s
are some variables of type var
; and
src, dst
are expressions of type exp
.module Types:sig
..end
include Bap.Std.Bil.Types
typet =
stmt list
include Bap.Std.Printable
module Infix:sig
..end
include Bap.Std.Bil.Infix
val move : var -> exp -> stmt
move v x
evaluate x
and assign its value to v
val jmp : exp -> stmt
jmp t
evaluate expression t
to absolute address and
transfer control to that addressval special : string -> stmt
val while_ : exp -> stmt list -> stmt
val if_ : exp -> stmt list -> stmt list -> stmt
val cpuexn : int -> stmt
val unsigned : cast
val signed : cast
val high : cast
val low : cast
val plus : binop
val minus : binop
val times : binop
val divide : binop
val sdivide : binop
val modulo : binop
val smodulo : binop
val lshift : binop
val rshift : binop
val arshift : binop
val bit_and : binop
val bit_or : binop
val bit_xor : binop
val eq : binop
val neq : binop
val lt : binop
val le : binop
val slt : binop
val sle : binop
val neg : unop
val not : unop
val load : mem:exp -> addr:exp -> endian -> size -> exp
val store : mem:exp -> addr:exp -> exp -> endian -> size -> exp
val binop : binop -> exp -> exp -> exp
val unop : unop -> exp -> exp
val var : var -> exp
val int : Bitvector.t -> exp
val cast : cast -> nat1 -> exp -> exp
val let_ : var -> exp -> exp -> exp
val unknown : string -> typ -> exp
val ite : if_:exp -> then_:exp -> else_:exp -> exp
val extract : hi:nat1 -> lo:nat1 -> exp -> exp
val concat : exp -> exp -> exp
visitor
folds arbitrary value over the AST, finder
is a
visitor, that can prematurely finish the traversal, mapper
that maps AST, allowing limited transformation of its
structure.
class state :object
..end
class['a]
visitor :object
..end
class['a]
finder :object
..end
class mapper :object
..end
val fold : 'a #visitor -> init:'a -> stmt list -> 'a
fold visitor ~init bil
folds visitor over BIL, passing init
value through the tree nodes. See also Exp.fold
and
Stmt.fold
.val iter : unit #visitor -> stmt list -> unit
val map : #mapper -> stmt list -> stmt list
val find : 'a #finder -> stmt list -> 'a option
val exists : unit #finder -> stmt list -> bool
val is_referenced : var -> stmt list -> bool
is_referenced x p
is true
if x
is referenced in some
expression or statement in program p
, before it is
assigned.val is_assigned : ?strict:bool -> var -> stmt list -> bool
is_assigned x p
is true
if there exists such Move
statement, that x
occures on the left side of it. If
strict
is true, then only unconditional assignments are
accounted. By default, strict
is false
val prune_unreferenced : stmt list -> stmt list
prune_unreferenced p
remove all assignments to variables that
are not used in the program p
. This is a local optimization.
The variable is unreferenced if it is not referenced in its lexical
scope, or if it is referenced after the assignment. Only
temporary variables are pruned, as their scope is local.val normalize_negatives : stmt list -> stmt list
normalize_negatives p
transform x + y
to x - abs(y)
if y < 0
val substitute : exp -> exp -> stmt list -> stmt list
substitute x y p
substitutes each occurrence of expression x
by
expression y
in program p
. The mnemonic to remember the
order is to recall the sed's s/in/out
syntax.val substitute_var : var -> exp -> stmt list -> stmt list
substitute_var x y p
substitutes all occurences of variable x
by expression y
val free_vars : stmt list -> Var.Set.t
free_vars bil
returns a set of free variables in program
bil
. Variable is considered free if it is not bound in a
preceding statement or is not bound with let
expressionval fold_consts : stmt list -> stmt list
fold_consts
evaluate constant expressions.
Note: this function performs only one step, and has no loops,
it is supposed to be run using a fixpoint combinator.class constant_folder :mapper
constant_folder
is a class that implements the fold_consts
val fixpoint : (stmt list -> stmt list) -> stmt list -> stmt list
fixpoint f
applies transformation f
until fixpoint is
reached. If the transformation orbit contains non-trivial cycles,
then the transformation will stop at an arbitrary point of a
cycle.module Trie:sig
..end


animal (%) knowledge health meetings groups village education villages transfer participants Fig group local meeting treatment paravets study keepers discussed KTR rural PVE use {border-style additional used India Table better data px;} #ffffff;} performed diarrhoea reported challenges disease educational women (TIF) .). Click LINK file. intervention significantly animals cattle different effective frequently potential Indian Sciences Writing information participatory review Animal Investigation Veterinary community editing led livestock maggot region treatments veterinary Accessed FMD Kanha Participants Tiger colostrum did discussion female forest included people received shown KTR. current husbandry intestinal meetings. prior questions significant using wounds (/) Education Wallis assessment carried discuss diseases farmers following greatest individual individuals interventions open problem programmes px; remedies selected work {font-family (/); Biology Group Kruskal- Life Madhya access agricultural assessed cases commonly difference engagement farmer followed font-size importance important lantana leaflets level major materials participation particularly practices printed provide results risk small team (IQR Current Health Hindi India. Medicine Methodology Resources University application common contact diarrhoea, double; grazing home identified images improve including ingestion keepers. large meetings, methods non- number overall para- paravet previous problem. relevant result role scores studies sustainable taken tick villages, wild working .); Critchlow- Livestock Paravets Pradesh, Printed Project Reserve Steel, Vet administration aids area border-color border-width causes communities compress conditions consumption controls development effect factors free gains greater healing human increased infectious issues keeper leaf male management need occurrence opinions plastic poor prevention productivity programme provides respiratory resulting rice significance solid; ticks time variation visual {font-style {font-weight (/), .), ./journal.pone..t A.K. BRD Corbett Core Data Edinburgh, Fligner Following Information Kumar Local Materials Number Paravet Participatory Research Reserve, Social Text Training VE, Village Women affected analysis answer area. available awarded based benefit benefits bold breakdown calf cartoon challenge community, control courier; design despite discussing discussions electrolyte em; employed engage ensure examined faith good groups. identification improvements include indicate infestation intervention. involvement knowledge. lack leaflet levels limited literacy make making means members months natural neonatal parasites participant participants, problem; produced provided pt;} reduce region. respondents sample scores. services simple solution statistical test topic topic. topics transfer. understanding usually water way widespread wished workers worms yield zone


THtmlViewer component
procedure ReplaceImage(Const NameID: String; NewImage: TStream);
ReplaceImage will replace an existing image in the displayed document with a new image.
NameIdThe Name or ID attribute assigned in the relevant <img> tag.
NewImageThe new image in stream form. The image format (bmp, gif, etc.) may be in any format currently supported by THtmlViewer.
Usage Notes:
The replaced image will have the same position and size as the original image.
The NewImage stream is not freed by ReplaceImage. It may be freed imediately after the call.