text:
'-------------------------------------------------------------------------------------------'
' Inicio del codigo
'-------------------------------------------------------------------------------------------'
' Importando librerias
'-------------------------------------------------------------------------------------------'
Imports System.Data

'-------------------------------------------------------------------------------------------'
' Inicio de clase "fReclamos_Sugerecias"
'-------------------------------------------------------------------------------------------'
Partial Class fReclamos_Sugerecias
    Inherits vis2Formularios.frmReporte

    Dim loObjetoReporte As CrystalDecisions.CrystalReports.Engine.ReportDocument

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Try

            Dim loComandoSeleccionar As New StringBuilder()

			loComandoSeleccionar.AppendLine(" SELECT")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Documento, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Status, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Fec_Ini, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Fec_Fin, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Fec_Reg, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Fec_Cie, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Tip_Doc, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Cod_Tip, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Cod_Cli, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Cod_Ven, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Cod_Ope, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Res_Cli, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Res_Emp, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Cuerpo, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Motivo, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Solucion, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Cierre, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Seguimiento, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Otros, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Articulos, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Tipo, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Clase, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Grupo, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Valor1, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Valor2, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Valor3, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Valor4, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Valor5, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Comentario, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Nivel, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Prioridad, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Logico1, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Logico2, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Logico3, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Logico4, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Logico5, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Caracter1, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Caracter2, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Caracter3, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Caracter4, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Caracter5, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Numerico1, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Numerico2, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Numerico3, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Numerico4, ")
			loComandoSeleccionar.AppendLine(" 			Reclamos.Numerico5, ")
			loComandoSeleccionar.AppendLine(" 			Clientes.Nom_Cli, ")
			loComandoSeleccionar.AppendLine(" 			Vendedores.Nom_Ven, ")
			loComandoSeleccionar.AppendLine(" 			Operador.Nom_Ven AS Nom_Ope, ")
			loComandoSeleccionar.AppendLine(" 			Renglones_Reclamos.Renglon,  ")
			loComandoSeleccionar.AppendLine(" 			Renglones_Reclamos.Cod_Art,  ")
			loComandoSeleccionar.AppendLine(" 			Renglones_Reclamos.Nom_Art,  ")
			loComandoSeleccionar.AppendLine(" 			Renglones_Reclamos.Cod_Uni,   ")
			loComandoSeleccionar.AppendLine(" 			Renglones_Reclamos.Can_Art1,  ")
			loComandoSeleccionar.AppendLine(" 			Renglones_Reclamos.Cod_Ven AS Cod_Ven_Renglon,  ")
			loComandoSeleccionar.AppendLine(" 			Vendedor_Renglon.Nom_Ven AS Nom_Ven_Renglon, ")
			loComandoSeleccionar.AppendLine(" 			Tipos_Reclamos.Nom_Tip")
			loComandoSeleccionar.AppendLine(" FROM Reclamos")
			loComandoSeleccionar.AppendLine(" LEFT JOIN Renglones_Reclamos ON Renglones_Reclamos.Documento = Reclamos.Documento")
			loComandoSeleccionar.AppendLine(" LEFT JOIN Tipos_Reclamos ON Tipos_Reclamos.Cod_Tip = Reclamos.Cod_Tip")
			loComandoSeleccionar.AppendLine(" LEFT JOIN Clientes ON Clientes.Cod_Cli = Reclamos.Cod_Cli")
			loComandoSeleccionar.AppendLine(" LEFT JOIN Vendedores ON Vendedores.Cod_Ven = Reclamos.Cod_Ven")
			loComandoSeleccionar.AppendLine(" LEFT JOIN Vendedores AS Operador ON Operador.Cod_Ven = Reclamos.Cod_Ven")
			loComandoSeleccionar.AppendLine(" LEFT JOIN Vendedores AS Vendedor_Renglon ON Vendedor_Renglon.Cod_Ven = Reclamos.Cod_Ven")
			loComandoSeleccionar.AppendLine(" WHERE")
            loComandoSeleccionar.AppendLine("           " & cusAplicacion.goFormatos.pcCondicionPrincipal)

            Dim loServicios As New cusDatos.goDatos
            Dim laDatosReporte As DataSet = loServicios.mObtenerTodosSinEsquema(loComandoSeleccionar.ToString, "curReportes")

           	'--------------------------------------------------'
			' Carga la imagen del logo en cusReportes            '
			'--------------------------------------------------'
			Me.mCargarLogoEmpresa(laDatosReporte.Tables(0), "LogoEmpresa")

           	'-------------------------------------------------------------------------------------------------------
            ' Verificando si el select (tabla nº0) trae registros
            '-------------------------------------------------------------------------------------------------------

            If (laDatosReporte.Tables(0).Rows.Count <= 0) Then
                Me.WbcAdministradorMensajeModal.mMostrarMensajeModal("Información", _
                                          "No se Encontraron Registros para los Parámetros Especificados. ", _
                                           vis3Controles.wbcAdministradorMensajeModal.enumTipoMensaje.KN_Informacion, _
                                           "350px", _
                                           "200px")
            End If

            loObjetoReporte = cusAplicacion.goFormatos.mCargarInforme("fReclamos_Sugerecias", laDatosReporte)
            Me.mTraducirReporte(loObjetoReporte)
            Me.mFormatearCamposReporte(loObjetoReporte)
            Me.crvfReclamos_Sugerecias.ReportSource = loObjetoReporte

        Catch loExcepcion As Exception

            Me.WbcAdministradorMensajeModal.mMostrarMensajeModal("Error", _
                          "No se pudo Completar el Proceso: " & loExcepcion.Message, _
                           vis3Controles.wbcAdministradorMensajeModal.enumTipoMensaje.KN_Error, _
                           "auto", _
                           "auto")

        End Try

    End Sub

    Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload

        Try

            loObjetoReporte.Close()

        Catch loExcepcion As Exception

            Me.WbcAdministradorMensajeModal.mMostrarMensajeModal("Error", _
                          "No se pudo Completar el Proceso: " & loExcepcion.Message, _
                           vis3Controles.wbcAdministradorMensajeModal.enumTipoMensaje.KN_Error, _
                           "auto", _
                           "auto")

        End Try

    End Sub

End Class
'-------------------------------------------------------------------------------------------'
' Fin del codigo
'-------------------------------------------------------------------------------------------'
' CMS:  17/09/09 : Codigo inicial
'-------------------------------------------------------------------------------------------'
' CMS: 18/03/10: Se aplico el metodo carga de imagen
'-------------------------------------------------------------------------------------------'


text:
@interface HFLoginViewController () {
    IBOutlet HFLabelBold *titleLabel;
}

@end

@implementation HFLoginViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.navigationController.navigationBarHidden = YES;

    [PFFacebookUtils initializeWithApplicationId:kFacebookAppId];

    [self setViewShadow:titleLabel];
}

- (void) setViewShadow:(UIView*)label
{
    label.layer.masksToBounds = NO;
    label.layer.shadowOffset = CGSizeMake(5, 5);
    label.layer.shadowRadius = 5;
    label.layer.shadowOpacity = 0.5;
}

- (IBAction)facebookLoginButtonPressed:(id)sender
{
    [MBHUDView showLoadingHUDWithBody:@"Logging In"];

    NSArray *permissions = @[@"email", @"user_about_me", @"user_location", @"user_birthday"];
    [PFFacebookUtils logInWithPermissions:permissions block:^(PFUser *user, NSError *error) {
        [MBHUDView dismissCurrentHUD];
        if (!user) {
            NSLog(@"Error! - %@", [[error userInfo] description]);
        }
        else
        {

            if (user.isNew) {
                PF_FBRequest *request = [PF_FBRequest requestForMe];
                [request startWithCompletionHandler:^(PF_FBRequestConnection *connection, id result, NSError *error) {

                    NSString *username = nil;
                    NSString *email = nil;
                    if (!error) {
                        email = [result objectForKey:@"email"];
                        username = [result objectForKey:@"username"];

                        [user setFacebookId:[result objectForKey:@"id"]];
                        [user setFirstName:[result objectForKey:@"first_name"]];
                        [user setLastName:[result objectForKey:@"last_name"]];
                        [user setIsStaffMember:@NO];

                        NSDate *birthdayDate = [[result objectForKey:@"birthday"] dateWithFormat:@"MM/dd/yyyy"];
                        [user setGraduationYear:[birthdayDate yearOffset:18]];

                        [user save];
                    }

                    HFCreateUserViewController *controller = [[HFCreateUserViewController alloc] initWithUsername:username email:email];
                    [self.navigationController pushViewController:controller animated:YES];
                }];
            } else {

                [self dismissCustomModalController];

            }

        }
    }];
}

- (IBAction)usernameLoginButtonPressed:(id)sender {
    HFUsernameLoginViewController *controller = [[HFUsernameLoginViewController alloc] initWithNib];
    [self.navigationController pushViewController:controller animated:YES];
}

- (IBAction)signUpButtonPressed:(id)sender {
    HFCreateUserViewController *controller = [[HFCreateUserViewController alloc] initWithNib];
    [self.navigationController pushViewController:controller animated:YES];
}

@end

redpajama_set_name: RedPajamaGithub


text:
maintainer       "RightScale, Inc."
maintainer_email "support@rightscale.com"
license          "Copyright RightScale, Inc. All rights reserved."
description      "RightScale Database Manager"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
version          "0.2"

depends "rs_utils"
depends "block_device"
depends "sys_firewall"
depends "db_mysql"
depends "db_postgres"

recipe "db::default", "Adds the database:active=true tag to your server, identifying it as an database server. The tag is used by application servers to identify active databases. It also loads the required 'db' resources."

recipe "db::install_client", "Installs the database client onto the virtual machine so that it can connect to a running server. This should be run on all database servers and servers intended to connect to the servers."

recipe "db::install_server", "Installs and sets up the packages that are required for database servers."

recipe "db::setup_monitoring", "Installs the collectd plugin for database monitoring support, which is required to enable monitoring and alerting functionality for your servers."

# == Common Database Recipes
#
recipe "db::do_primary_backup", :description => "Creates a primary backup of the database using persistent storage in the current cloud. On Rackspace, LVM backups are uploaded to the specified Cloud Files container. For all other clouds, volume snapshots (e.g., Amazon EBS or CloudStack volumes) are used.", :thread => 'db_backup'
recipe "db::do_primary_restore", "Restores the database from the most recently completed primary backup available in persistent storage of the current cloud."

recipe "db::do_primary_backup_schedule_enable", "Enables db::do_primary_backup to be run periodically."
recipe "db::do_primary_backup_schedule_disable", "Disables db::do_primary_backup from being run periodically."

recipe "db::setup_privileges_admin", "Adds the username and password for 'superuser' privileges."
recipe "db::setup_privileges_application", "Adds the username and password for application privileges."

recipe "db::do_secondary_backup", :description => "Creates a backup of the database and uploads it to a secondary cloud storage location, which can be used to migrate your database to a different cloud. For example, you can save a secondary backup to an Amazon S3 bucket or a Rackspace Cloud Files container.", :thread => 'db_backup'
recipe "db::do_secondary_restore", "Restores the database from the most recently completed backup available in a secondary location."

recipe "db::do_force_reset", "Resets the database back to a pristine state. WARNING: Execution of this script will delete any data in your database!"

recipe "db::do_dump_export", "Creates a dump file and uploads it to remote object storage (e.g., Amazon S3 or Rackspace Cloud Files)."
recipe "db::do_dump_import", "Retrieves a dump file from remote object storage (e.g., Amazon S3 or Rackspace Cloud Files) and imports it to the database server."
recipe "db::do_dump_schedule_enable", "Schedules the daily run of do_dump_export."
recipe "db::do_dump_schedule_disable", "Disables the daily run of do_dump_export."

# == Database Firewall Recipes
#
recipe "db::do_appservers_allow", "Allows connections from all application servers in the deployment that are tagged with appserver:active=true tag. This script should be run on a database server so that it will accept connections from application servers."

recipe "db::do_appservers_deny", "Denies connections from all application servers in the deployment that are tagged with appserver:active=true tag. This script can be run on a database server to deny connections from all application servers in the deployment."

recipe "db::request_appserver_allow", "Sends a request to allow connections from the caller's private IP address to all database servers in the deployment that are tagged with the database:active=true tag. This should be run on an application server before attempting a database connection."

recipe "db::request_appserver_deny", "Sends a request to deny connections from the caller's private IP address to all database servers in the deployment that are tagged with the database:active=true tag. This should be run on an application server upon decommissioning."

# == Master/Slave Recipes
#
recipe "db::do_init_and_become_master", "Initializes database server and tags it as the master. Sets DNS. Starts a fresh backup from this master."
recipe "db::do_primary_restore_and_become_master", "Restores the database and tags it as the master. Sets DNS. Starts a fresh backup from this master."
recipe "db::do_secondary_restore_and_become_master", "Restores the database from a secondary backup location and tags it as the master. Sets DNS. Starts a fresh backup from this master."
recipe "db::do_primary_init_slave", "Initializes the slave server from the primary backup location."
recipe "db::do_secondary_init_slave", "Initializes the slave server from the secondary backup location."
recipe "db::do_init_slave_at_boot", "Initializes the slave server at boot."
recipe "db::do_set_dns_slave_private_ip", "Sets the slave DNS record to the private IP."
recipe "db::do_promote_to_master", "Promotes a replicating slave to master."
recipe "db::setup_replication_privileges", "Sets up privileges for replication slave servers."
recipe "db::request_master_allow", "Sends a request to the master database server tagged with rs_dbrepl:master_instance_uuid=<master_instance_uuid> to allow connections from the server's private IP address. This script should be run on a slave before it sets up replication."
recipe "db::request_master_deny", "Sends a request to the master database server tagged with rs_dbrepl:master_instance_uuid=<master_instance_uuid> to deny connections from the server's private IP address. This script should be run on a slave when it stops replicating."

recipe "db::handle_demote_master", "Remote recipe executed by do_promote_to_master. DO NOT RUN."

recipe "db::do_delete_volumes_and_terminate_server", "Deletes any currently attached volumes from the instance and then terminates the machine."

# == Common Database Attributes
#
attribute "db",
  :display_name => "General Database Options",
  :type => "hash"

attribute "db/dns/master/fqdn",
  :display_name => "Database Master FQDN",
  :description => "The fully qualified domain name for the master database server (e.g., text:db-master.example.com).",
  :required => "required",
  :recipes => [ "db::default" ]

attribute "db/dns/master/id",
  :display_name => "Database Master DNS Record ID",
  :description => "The unique identifier that is associated with the DNS A record of the master server.  The unique identifier is assigned by the DNS provider when you create a dynamic DNS A record. This ID is used to update the associated A record with the private IP address of the master server when this recipe is run.  If you are using DNS Made Easy as your DNS provider, a 7-digit number is used (e.g., 4403234).",
  :required => "required",
  :recipes => [
                "db::do_primary_restore_and_become_master",
                "db::do_secondary_restore_and_become_master",
                "db::do_init_and_become_master",
                "db::do_promote_to_master"
                ]

attribute "db/dns/slave/fqdn",
  :display_name => "Database Slave FQDN",
  :description => "The fully qualified domain name for a slave database server (e.g., text:db-slave.example.com).",
  :required => "optional",
  :recipes => [ "db::do_set_dns_slave_private_ip" ]

attribute "db/dns/slave/id",
  :display_name => "Database Slave DNS Record ID",
  :description => "The unique identifier that is associated with the DNS A record of a slave server.  The unique identifier is assigned by the DNS provider when you create a dynamic DNS A record. This ID is used to update the associated A record with the private IP address of a slave server when this recipe is run.  If you are using DNS Made Easy as your DNS provider, a 7-digit number is used (e.g., 4403234).",
  :required => "required",
  :recipes => [ "db::do_set_dns_slave_private_ip" ]

attribute "db/admin/user",
  :display_name => "Database Admin Username",
  :description => "The username of the database user with 'admin' privileges (e.g., cred:DBADMIN_USER).",
  :required => "required",
  :recipes => [ "db::install_server", "db::setup_privileges_admin" ]

attribute "db/admin/password",
  :display_name => "Database Admin Password",
  :description => "The password of the database user with 'admin' privileges (e.g., cred:DBADMIN_PASSWORD).",
  :required => "required",
  :recipes => [ "db::install_server", "db::setup_privileges_admin" ]

attribute "db/replication/user",
  :display_name => "Database Replication Username",
  :description => "The username of the database user that has 'replication' privileges (e.g., cred:DBREPLICATION_USER).",
  :required => "required",
  :recipes => [ "db::setup_replication_privileges", "db::do_primary_restore_and_become_master", "db::do_secondary_restore_and_become_master", "db::do_init_and_become_master", "db::do_promote_to_master", "db::do_primary_init_slave", "db::do_secondary_init_slave", "db::do_init_slave_at_boot" ]

attribute "db/replication/password",
  :display_name => "Database Replication Password",
  :description => "The password of the database user that has 'replication' privileges (e.g., cred:DBREPLICATION_PASSWORD).",
  :required => "required",
  :recipes => [ "db::setup_replication_privileges", "db::do_primary_restore_and_become_master", "db::do_secondary_restore_and_become_master", "db::do_init_and_become_master", "db::do_promote_to_master", "db::do_primary_init_slave", "db::do_secondary_init_slave", "db::do_init_slave_at_boot" ]

attribute "db/application/user",
  :display_name => "Database Application Username",
  :description => "The username of the database user that has 'user' privileges (e.g., cred:DBAPPLICATION_USER).",
  :required => "required",
  :recipes => [ "db::default", "db::setup_privileges_application" ]

attribute "db/application/password",
  :display_name => "Database Application Password",
  :description => "The password of the database user that has 'user' privileges (e.g., cred:DBAPPLICATION_PASSWORD).",
  :required => "required",
  :recipes => [ "db::default", "db::setup_privileges_application" ]

attribute "db/init_slave_at_boot",
  :display_name => "Init Slave at Boot",
  :description => "Set to 'True' to have the instance initialize the database server as a slave on boot. Set to 'False' if there is no master database server running.",
  :default => "false",
  :choice => [ "true", "false" ],
  :recipes => [ "db::do_init_slave_at_boot" ]

attribute "db/dns/ttl",
  :display_name => "Database DNS TTL Limit",
  :description => "The upper limit for the TTL of the master DB DNS record in seconds. This value should be kept low in the event of Master DB failure so that the DNS record updates in a timely manner. When installing the DB server, this value is checked in the DNS records.",
  :required => "optional",
  :recipes => [ "db::install_server" ]

# == Backup/Restore
#
attribute "db/backup/lineage",
  :display_name => "Database Backup Lineage",
  :description => "The prefix that will be used to name/locate the backup of a particular database. Note: For servers running on Rackspace, this value also indicates the Cloud Files container to use for storing primary backups. If a Cloud Files container with this name does not already exist, the setup process creates one.",
  :required => "required",
  :recipes => [
    "db::do_primary_init_slave",
    "db::do_secondary_init_slave",
    "db::do_init_slave_at_boot",
    "db::do_promote_to_master",
    "db::do_primary_restore_and_become_master",
    "db::do_secondary_restore_and_become_master",
    "db::do_init_and_become_master",
    "db::do_primary_backup",
    "db::do_primary_restore",
    "db::do_primary_backup_schedule_enable",
    "db::do_primary_backup_schedule_disable",
    "db::do_force_reset",
    "db::do_secondary_backup",
    "db::do_secondary_restore"
  ]

attribute "db/backup/lineage_override",
  :display_name => "Database Backup Lineage Override",
  :description => "If defined, this will override the input defined for 'Backup Lineage' (db/backup/lineage) so that you can restore the database from another backup that has as different lineage name. The most recently completed snapshots will be used unless a specific timestamp value is specified for 'Restore Timestamp Override' (db/backup/timestamp_override). Although this input allows you to restore from a different set of snapshots, subsequent backups will use 'Backup Lineage' to name the snapshots. Be sure to remove the 'Backup Lineage Override' input after the new master is operational.",
  :required => "optional",
  :recipes => [
    "db::do_primary_init_slave",
    "db::do_secondary_init_slave",
    "db::do_init_slave_at_boot",
    "db::do_restore",
    "db::do_restore_and_become_master"
  ]

attribute "db/backup/timestamp_override",
  :display_name => "Database Restore Timestamp Override",
  :description => "An optional variable to restore a database backup with a specific timestamp rather than the most recent backup in the lineage. You must specify a string that matches the timestamp tag on the volume snapshot. You will need to specify the timestamp that is defined by the snapshot's tag (not the name). For example, if the snapshot's tag is 'rs_backup:timestamp=1303613371' you would specify '1303613371' for this input.",
  :required => "optional",
  :recipes => [
                "db::do_primary_restore",
                "db::do_secondary_restore",
                "do_primary_restore_and_become_master",
                "do_secondary_restore_and_become_master"
              ]

attribute "db/backup/restore_version_check",
  :display_name => "Backup restore version check",
  :description => "A variable to allow to restore from a backup performed on a different version of the DB software. Make sure you fully understand the implications of cross-version restoration.  Set to false to skip version checking.",
  :required => "optional",
  :choice => [ "true", "false" ],
  :default => "true",
  :recipes => [
                "db::do_primary_restore",
                "db::do_secondary_restore",
                "db::do_primary_init_slave",
                "db::do_secondary_init_slave",
                "do_primary_restore_and_become_master",
                "do_secondary_restore_and_become_master"
              ]

attribute "db/backup/primary/master/cron/hour",
  :display_name => "Master Backup Cron Hour",
  :description => "Defines the hour of the day when the primary backup will be taken of the master database. Backups of the master are taken daily. By default, an hour will be randomly chosen at launch time. Otherwise, the time of the backup is defined by 'Master Backup Cron Hour' and 'Master Backup Cron Minute'. Uses standard crontab format (e.g., 23 for 11:00 PM).",
  :required => "optional",
  :recipes => [ 'db::do_primary_backup_schedule_enable' ]

attribute "db/backup/primary/slave/cron/hour",
  :display_name => "Slave Backup Cron Hour",
  :description => "By default, primary backups of the slave database are taken hourly. However, if you specify a value in this input (e.g., 23 for 11:00 PM), then backups will occur once per day at the specified hour, rather than hourly.",
  :required => "optional",
  :recipes => [ 'db::do_primary_backup_schedule_enable' ]

attribute "db/backup/primary/master/cron/minute",
  :display_name => "Master Backup Cron Minute",
  :description => "Defines the minute of the hour when the backup will be taken of the master database. Backups of the master are taken daily. By default, a minute will be randomly chosen at launch time. Otherwise, the time of the backup is defined by 'Master Backup Cron Hour' and 'Master Backup Cron Minute'. Uses standard crontab format (e.g., 30 for minute 30 of the hour).",
  :required => "optional",
  :recipes => [ 'db::do_primary_backup_schedule_enable' ]

attribute "db/backup/primary/slave/cron/minute",
  :display_name => "Slave Backup Cron Minute",
  :description => "Defines the minute of the hour when the backup EBS snapshot will be taken of the Slave database. Backups of the Slave are taken hourly. By default, a minute will be randomly chosen at launch time. Uses standard crontab format (e.g., 30 for minute 30 of the hour).",
  :required => "optional",
  :recipes => [ 'db::do_primary_backup_schedule_enable' ]

# == Import/export attributes
#

attribute "db/dump",
  :display_name => "Import/export settings for database dump file management.",
  :type => "hash"

attribute "db/dump/storage_account_provider",
  :display_name => "Dump Storage Account Provider",
  :description => "Location where the dump file will be saved. Used by dump recipes to back up to Amazon S3 or Rackspace Cloud Files.",
  :required => "required",
  :choice => [ "s3", "cloudfiles", "cloudfilesuk", "SoftLayer_Dallas", "SoftLayer_Singapore", "SoftLayer_Amsterdam" ],
  :recipes => [ "db::do_dump_import", "db::do_dump_export", "db::do_dump_schedule_enable" ]

attribute "db/dump/storage_account_id",
  :display_name => "Dump Storage Account ID",
  :description => "In order to write the dump file to the specified cloud storage location, you need to provide cloud authentication credentials. For Amazon S3, use your Amazon access key ID (e.g., cred:AWS_ACCESS_KEY_ID). For Rackspace Cloud Files, use your Rackspace login username (e.g., cred:RACKSPACE_USERNAME).",
  :required => "required",
  :recipes => [ "db::do_dump_import", "db::do_dump_export", "db::do_dump_schedule_enable" ]

attribute "db/dump/storage_account_secret",
  :display_name => "Dump Storage Account Secret",
  :description => "In order to write the dump file to the specified cloud storage location, you will need to provide cloud authentication credentials. For Amazon S3, use your AWS secret access key (e.g., cred:AWS_SECRET_ACCESS_KEY). For Rackspace Cloud Files, use your Rackspace account API key (e.g., cred:RACKSPACE_AUTH_KEY).",
  :required => "required",
  :recipes => [ "db::do_dump_import", "db::do_dump_export", "db::do_dump_schedule_enable" ]

attribute "db/dump/container",
  :display_name => "Dump Container",
  :description => "The cloud storage location where the dump file will be saved to or restored from. For Amazon S3, use the bucket name. For Rackspace Cloud Files, use the container name.",
  :required => "required",
  :recipes => [ "db::do_dump_import", "db::do_dump_export", "db::do_dump_schedule_enable" ]

attribute "db/dump/prefix",
  :display_name => "Dump Prefix",
  :description => "The prefix that will be used to name/locate the backup of a particular database dump. Defines the prefix of the dump file name that will be used to name the backup database dump file, along with a timestamp.",
  :required => "required",
  :recipes => [ "db::do_dump_import", "db::do_dump_export", "db::do_dump_schedule_enable" ]

attribute "db/dump/database_name",
  :display_name => "Dump Schema/Database Name",
  :description => "Enter the name of the database name/schema to create/restore a dump from/for. Ex: mydbschema",
  :required => "required",
  :recipes => [ "db::do_dump_import", "db::do_dump_export", "db::do_dump_schedule_enable" ]

attribute "db/terminate_safety",
  :display_name => "Terminate Safety",
  :description => "Prevents the accidental running of the db::do_teminate_server recipe. This recipe will only run if this input variable is overridden and set to \"off\".",
  :type => "string",
  :choice => ["Override the dropdown and set to \"off\" to really run this recipe"],
  :default => "Override the dropdown and set to \"off\" to really run this recipe",
  :required => "optional",
  :recipes => [ "db::do_delete_volumes_and_terminate_server" ]

attribute "db/force_safety",
  :display_name => "Force Reset Safety",
  :description => "Prevents the accidental running of the db::do_force_reset recipe. This recipe will only run if the input variable is overridden and set to \"off\".",
  :type => "string",
  :choice => ["Override the dropdown and set to \"off\" to really run this recipe"],
  :default => "Override the dropdown and set to \"off\" to really run this recipe",
  :required => "optional",
  :recipes => [ "db::do_force_reset" ]


text:
package org.ovirt.engine.ui.uicommonweb.models.vms;

import org.ovirt.engine.core.common.businessentities.VM;
import org.ovirt.engine.core.common.businessentities.VmPool;
import org.ovirt.engine.ui.uicommonweb.models.events.SubTabEventListModel;
import org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs;

public class VmEventListModel extends SubTabEventListModel
{
    @Override
    protected void onEntityContentChanged()
    {
        super.onEntityContentChanged();

        // Deal with pool as Entity without failing.
        if (getEntity() != null && !(getEntity() instanceof VmPool))
        {
            getSearchCommand().execute();
        }
        else
        {
            setItems(null);
        }
    }

    @Override
    public void search()
    {
        VM vm = (VM) getEntity();

        if (getEntity() != null)
        {
            preSearchCalled(vm);
            super.search();
        }
    }

    protected void preSearchCalled(VM vm) {
        setSearchString("events: vm.name=" + vm.getName()); //$NON-NLS-1$
    }

    @Override
    protected void entityPropertyChanged(Object sender, PropertyChangedEventArgs e)
    {
        super.entityPropertyChanged(sender, e);

        if (e.propertyName.equals("vm_name")) //$NON-NLS-1$
        {
            getSearchCommand().execute();
        }
    }
}


text:
const EventEmitter = require('events').EventEmitter;
const _ = require('lodash');
const assign = require('object-assign');
const debug = require('debug')('scope:app-store');
const Immutable = require('immutable');

const AppDispatcher = require('../dispatcher/app-dispatcher');
const ActionTypes = require('../constants/action-types');
const Naming = require('../constants/naming');

const makeOrderedMap = Immutable.OrderedMap;

// Helpers

function findCurrentTopology(subTree, topologyId) {
  let foundTopology;

  _.each(subTree, function(topology) {
    if (_.endsWith(topology.url, topologyId)) {
      foundTopology = topology;
    }
    if (!foundTopology) {
      foundTopology = findCurrentTopology(topology.sub_topologies, topologyId);
    }
    if (foundTopology) {
      return false;
    }
  });

  return foundTopology;
}

function makeNode(node) {
  return {
    id: node.id,
    label_major: node.label_major,
    label_minor: node.label_minor,
    rank: node.rank,
    pseudo: node.pseudo,
    adjacency: node.adjacency
  };
}

// Initial values

let currentTopologyId = 'containers';
let errorUrl = null;
let version = '';
let mouseOverEdgeId = null;
let mouseOverNodeId = null;
let nodes = makeOrderedMap();
let nodeDetails = null;
let selectedNodeId = null;
let topologies = [];
let websocketClosed = true;

// Store API

const AppStore = assign({}, EventEmitter.prototype, {

  CHANGE_EVENT: 'change',

  getAppState: function() {
    return {
      topologyId: currentTopologyId,
      selectedNodeId: this.getSelectedNodeId()
    };
  },

  getCurrentTopology: function() {
    return findCurrentTopology(topologies, currentTopologyId);
  },

  getCurrentTopologyId: function() {
    return currentTopologyId;
  },

  getCurrentTopologyUrl: function() {
    const topology = this.getCurrentTopology();

    if (topology) {
      return topology.url;
    }
  },

  getErrorUrl: function() {
    return errorUrl;
  },

  getHighlightedEdgeIds: function() {
    if (mouseOverNodeId) {
      // all neighbour combinations because we dont know which direction exists
      const adjacency = nodes.get(mouseOverNodeId).get('adjacency');
      if (adjacency) {
        return _.flatten(
          adjacency.forEach(function(nodeId) {
            return [
              [nodeId, mouseOverNodeId].join(Naming.EDGE_ID_SEPARATOR),
              [mouseOverNodeId, nodeId].join(Naming.EDGE_ID_SEPARATOR)
            ];
          })
        );
      }
    }
    if (mouseOverEdgeId) {
      return mouseOverEdgeId;
    }
    return null;
  },

  getHighlightedNodeIds: function() {
    if (mouseOverNodeId) {
      const adjacency = nodes.get(mouseOverNodeId).get('adjacency');
      if (adjacency) {
        return _.union(adjacency.toJS(), [mouseOverNodeId]);
      }
    }
    if (mouseOverEdgeId) {
      return mouseOverEdgeId.split(Naming.EDGE_ID_SEPARATOR);
    }
    return null;
  },

  getNodeDetails: function() {
    return nodeDetails;
  },

  getNodes: function() {
    return nodes;
  },

  getSelectedNodeId: function() {
    return selectedNodeId;
  },

  getTopologies: function() {
    return topologies;
  },

  getTopologyIdForUrl: function(url) {
    return url.split('/').pop();
  },

  getVersion: function() {
    return version;
  },

  isWebsocketClosed: function() {
    return websocketClosed;
  }

});

// Store Dispatch Hooks

AppStore.registeredCallback = function(payload) {
  switch (payload.type) {

    case ActionTypes.CLICK_CLOSE_DETAILS:
      selectedNodeId = null;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.CLICK_NODE:
      selectedNodeId = payload.nodeId;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.CLICK_TOPOLOGY:
      selectedNodeId = null;
      if (payload.topologyId !== currentTopologyId) {
        currentTopologyId = payload.topologyId;
        nodes = nodes.clear();
      }
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.CLOSE_WEBSOCKET:
      websocketClosed = true;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.ENTER_EDGE:
      mouseOverEdgeId = payload.edgeId;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.ENTER_NODE:
      mouseOverNodeId = payload.nodeId;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.HIT_ESC_KEY:
      nodeDetails = null;
      selectedNodeId = null;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.LEAVE_EDGE:
      mouseOverEdgeId = null;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.LEAVE_NODE:
      mouseOverNodeId = null;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.OPEN_WEBSOCKET:
      // flush nodes cache after re-connect
      nodes = nodes.clear();
      websocketClosed = false;

      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.RECEIVE_ERROR:
      errorUrl = payload.errorUrl;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.RECEIVE_NODE_DETAILS:
      errorUrl = null;
      nodeDetails = payload.details;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.RECEIVE_NODES_DELTA:
      debug('RECEIVE_NODES_DELTA',
        'remove', _.size(payload.delta.remove),
        'update', _.size(payload.delta.update),
        'add', _.size(payload.delta.add));

      errorUrl = null;

      // nodes that no longer exist
      _.each(payload.delta.remove, function(nodeId) {
        // in case node disappears before mouseleave event
        if (mouseOverNodeId === nodeId) {
          mouseOverNodeId = null;
        }
        if (nodes.has(nodeId) && _.contains(mouseOverEdgeId, nodeId)) {
          mouseOverEdgeId = null;
        }
        nodes = nodes.delete(nodeId);
      });

      // update existing nodes
      _.each(payload.delta.update, function(node) {
        nodes = nodes.set(node.id, nodes.get(node.id).merge(makeNode(node)));
      });

      // add new nodes
      _.each(payload.delta.add, function(node) {
        nodes = nodes.set(node.id, Immutable.fromJS(makeNode(node)));
      });

      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.RECEIVE_TOPOLOGIES:
      errorUrl = null;
      topologies = payload.topologies;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.RECEIVE_API_DETAILS:
      errorUrl = null;
      version = payload.version;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    case ActionTypes.ROUTE_TOPOLOGY:
      if (currentTopologyId !== payload.state.topologyId) {
        nodes = nodes.clear();
      }
      currentTopologyId = payload.state.topologyId;
      selectedNodeId = payload.state.selectedNodeId;
      AppStore.emit(AppStore.CHANGE_EVENT);
      break;

    default:
      break;

  }
};

AppStore.dispatchToken = AppDispatcher.register(AppStore.registeredCallback);

module.exports = AppStore;


text:
package zx.soft.apt.mapreduce;

import java.io.IOException;

import org.apache.avro.generic.GenericRecord;
import org.apache.avro.mapred.AvroKey;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Mapper;

public class Avro2ParquetMapper extends Mapper<AvroKey<GenericRecord>, NullWritable, Void, GenericRecord> {

	@Override
	protected void map(AvroKey<GenericRecord> key, NullWritable value, Context context) throws IOException,
	InterruptedException {
		context.write(null, key.datum());
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.graphql-java-kickstart</groupId>
    <artifactId>graphql-java-tools</artifactId>
    <version>12.0.2-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>GraphQL Java Tools</name>
    <description>Tools to help map a GraphQL schema to existing Java objects.</description>
    <url>https://github.com/graphql-java-kickstart/graphql-java-tools</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <kotlin.version>1.5.0</kotlin.version>
        <kotlin-coroutines.version>1.5.0-native-mt</kotlin-coroutines.version>
        <jackson.version>2.13.0</jackson.version>
        <graphql-java.version>17.3</graphql-java.version>

        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <useReleaseProfile>false</useReleaseProfile>
        <project.scm.id>github</project.scm.id>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- graphql-java defines this dependency as 'runtime', but we need it at compile time -->
            <dependency>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-runtime</artifactId>
                <scope>compile</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>kotlinx-coroutines-jdk8</artifactId>
            <version>${kotlin-coroutines.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>kotlinx-coroutines-core</artifactId>
            <version>${kotlin-coroutines.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>kotlinx-coroutines-reactive</artifactId>
            <version>${kotlin-coroutines.version}</version>
        </dependency>
        <dependency>
            <groupId>com.graphql-java</groupId>
            <artifactId>graphql-java</artifactId>
            <version>${graphql-java.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml</groupId>
            <artifactId>classmate</artifactId>
            <version>1.5.1</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-kotlin</artifactId>
            <version>${jackson.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-reflect</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-stdlib</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jdk8</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.12.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.30</version>
        </dependency>

        <!-- Optional for supporting spring proxies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>5.3.13</version>
            <scope>provided</scope>
        </dependency>

        <!-- Optional for supporting Javassist proxies -->
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.28.0-GA</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.7</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>3.3.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
            <version>3.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.reactivestreams</groupId>
            <artifactId>reactive-streams-tck</artifactId>
            <version>1.0.2</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>add-test-source</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/test/kotlin</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Compile Kotlin -->
            <plugin>
                <artifactId>kotlin-maven-plugin</artifactId>
                <groupId>org.jetbrains.kotlin</groupId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit4</artifactId>
                        <version>2.22.2</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <includes>
                        <include>**/*Test.*</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>test-jar</id>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Avoid dependency convergence -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <dependencyConvergence/>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.3.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <!-- Prevent gpg from using pinentry programs TDOD this may not be needed since v3 -->
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <developers>
        <developer>
            <name>Andrew Potter</name>
            <email>Andrew.Potter@coxautoinc.com</email>
            <organization>Cox Automotive</organization>
            <organizationUrl>http://www.coxautoinc.com</organizationUrl>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
    <scm>
        <connection>scm:git:https://github.com/graphql-java-kickstart/graphql-java-tools.git
        </connection>
        <developerConnection>scm:git:https://github.com/graphql-java-kickstart/graphql-java-tools.git
        </developerConnection>
        <url>https://github.com/graphql-java-kickstart/graphql-java-tools</url>
    </scm>
</project>


text:
/**
 * @file main.c
 * @author Junaith Ahemed Shahabdeen
 *
 * Entry point for the USB Loader application. The file provides
 * an interface to the lower level windows drivers which is
 * required to recieve notifications about changes at the lower level.
 *
 * The file actually creates and intializes a window with out displaying
 * one. The reason is because the notification registration for the
 * devices is possible only if the app is either a window based or a
 * service based. It is a future requirement to enable window
 * based applications hence a window based approach.
 */
#include <USBComm.h>
#include <USBMessageHandler.h>
#include <CommandLine.h>
#include <BinImageFile.h>
#include <sys/time.h>
#include <sys/signal.h>

#define MAX_FILE_NAME_SIZE 1024
pthread_t thread_rx, thread_cmd;
struct sigaction actions;
BOOLEAN ProgramMode = FALSE;
BOOLEAN STImage = FALSE;
BOOLEAN TestProgramMode = FALSE;
BOOLEAN CmdLineMode = FALSE;
BOOLEAN DownloadDone = FALSE;

char FileName [MAX_FILE_NAME_SIZE] = "\0";

HWND hwnd;
MSG Msg;
HDEVNOTIFY DeviceNotificationHandle;

struct timeval start, end;
unsigned long timeelapsed = 0, sec = 0, usec = 0;

struct timeval  now;            /* time when we started waiting        */
struct timespec timeout;        /* timeout value for the wait function */
int             done;           /* are we done waiting?                */
pthread_cond_t got_request = PTHREAD_COND_INITIALIZER;
pthread_mutex_t req_mutex = PTHREAD_MUTEX_INITIALIZER;

const char g_szClassName[] = "myWindowClass";

/**
 * print_help
 *
 * This function prints the help menu for the main app.
 */
void print_help ()
{
  printf ("out.exe [Options] [FileName]\n");
  printf ("Options:\n");
  printf (" -p FileName:\t Upload a binary file to the Device.\n");
  printf (" -tp FileName:\t Upload a binary file to the Device in\n");
  printf ("\t\t a interactively. The display guides the user about\n");
  printf ("\t\t the next action required. If the user has to send\n");
  printf ("\t\t a command with parameter, then the value of the\n");
  printf ("\t\t parameters are diplayed in stdout.\n");
  printf (" -c\t\t Place the Device in command line mode.\n");
  printf (" -pst\t\t FileName: Upload selftest image to the device.\n");
}

/**
 * Register_For_Device_Notifications
 *
 * Register a particular Class of device with the lover level
 * driver interface to get notifications about any changes in
 * the device status (attached, detached etc.)
 *
 * @param HidGuid GUID of a particular class.
 */
void Register_For_Device_Notifications(GUID HidGuid)
{
  // Request to receive messages when a device is attached or removed.
  // Also see WM_DEVICECHANGE in BEGIN_MESSAGE_MAP(CUsbhidiocDlg, CDialog).

  DEV_BROADCAST_DEVICEINTERFACE DevBroadcastDeviceInterface;

  ZeroMemory (&DevBroadcastDeviceInterface, sizeof(DevBroadcastDeviceInterface));
  DevBroadcastDeviceInterface.dbcc_size = sizeof(DevBroadcastDeviceInterface);
  DevBroadcastDeviceInterface.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
  DevBroadcastDeviceInterface.dbcc_classguid = HidGuid;

  DeviceNotificationHandle = RegisterDeviceNotification (hwnd,
			&DevBroadcastDeviceInterface, DEVICE_NOTIFY_WINDOW_HANDLE);

  if (!DeviceNotificationHandle)
  {
    printf ("Registration Failed = %lx\n", GetLastError());
  }
}

/**
 * WndProc
 *
 * Call back funciton registerd with the lower level driver which gets
 * invoked when there are any changes with the device attached or
 * events related to this process.
 *
 */
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
  switch(msg)
  {
    case WM_CREATE:
      //printf ("Window Created \n");
      break;
    case WM_CLOSE:
      DestroyWindow(hwnd);
      break;
    case WM_DESTROY:
      PostQuitMessage(0);
      break;
    case WM_DEVICECHANGE:
      switch (wParam)
      {
        case DBT_DEVICEARRIVAL:
          if (DownloadDone)
          {
            fprintf (stderr, "Booted New Application.\n");
            Exit_Application ();
          }
          if (DeviceNotificationHandle)
            UnregisterDeviceNotification (DeviceNotificationHandle);
          USB_Init ();
//#if DEBUG
         if (!TestProgramMode)
         {
//#endif
          if (ProgramMode)
          {
            uint8_t imgtyp = APPLICATION;
            if (STImage)
              imgtyp = SELFTEST;
            if (Send_USB_Command_Packet (RSP_USB_CODE_LOAD, 1, &imgtyp) == FAIL)
              fprintf (stderr, "Could not place the Device in upload mode\n");
          }
//#if DEBUG
         }
         else
           fprintf (stdout, "Start upload by sending the loadcode command\n");
//#endif
        // I dont have a very good way to set the correct BL State.
        if ((CmdLineMode) || (Is_Test_Program_Mode()))
	{
          uint8_t BLState = 8;
      	  Send_USB_Command_Packet (RSP_SET_BOOTLOADER_STATE, 1, &BLState);
	}
        break;
        case DBT_DEVICEREMOVECOMPLETE:
          break;
        default:
          break;
      }
      break;
    default:
      //printf ("Unkown event \n");
      return DefWindowProc(hwnd, msg, wParam, lParam);
  }
  return 0;
}

/**
 * WinMain
 *
 * Window Main function, The low level events from windows are
 * directly passed to a program if it is a service or a window
 * based application. Since at some point a window application
 * is required to be an extension of this applicaiton, it is
 * easier to create a window than a service based application.
 */
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow)
{
  WNDCLASSEX wc;
  bool detectUSB = TRUE;
  uint8_t NumTries = 0;

  //Step 1: Registering the Window Class
  wc.cbSize        = sizeof(WNDCLASSEX);
  wc.style         = 0;
  wc.lpfnWndProc   = WndProc;
  wc.cbClsExtra    = 0;
  wc.cbWndExtra    = 0;
  wc.hInstance     = hInstance;
  wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
  wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
  wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
  wc.lpszMenuName  = NULL;
  wc.lpszClassName = g_szClassName;
  wc.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);

  if (!RegisterClassEx(&wc))
  {
    printf ("Window Registration Failed! %lx \n", GetLastError ());
    return 0;
  }

  hwnd = CreateWindowEx (WS_EX_CLIENTEDGE, g_szClassName,
              "Code Loader", WS_OVERLAPPEDWINDOW,
              CW_USEDEFAULT, CW_USEDEFAULT, 240, 120,
              NULL, NULL, hInstance, NULL);

  if(hwnd == NULL)
  {
    printf ("Window Creation Failed! %lx \n", GetLastError ());
    return 0;
  }

  //ShowWindow(hwnd, nCmdShow);
  //UpdateWindow(hwnd);
  if (lpCmdLine [0] != '\0')
    Parse_Arguments (lpCmdLine);
  else
  {
    print_help ();
    exit (1);
  }

  if (ProgramMode)
  {
    if (strcmp(FileName, "\0") != 0)
    {
      fprintf (stdout, "Program Mode, File name = %s\n", FileName);
      if (Load_Binary_File (FileName) == FAIL)
      {
        ProgramMode = FALSE;
        fprintf (stderr, "Problem loading Binary file, exiting program mode \n");
	exit (1);
      }
    }
    else
    {
      ProgramMode = FALSE;
      fprintf (stderr, "Cannot enter Program Mode, no File specified \n");
      exit (1);
    }
  }

  while (detectUSB)
  {
    if (USB_Init () == SUCCESS)
    {
      detectUSB = FALSE;
      pthread_create (&thread_rx, NULL, (void*)Read_Input_Report, NULL);
//#if DEBUG
      //if (!Is_Test_Program_Mode ())
      //{
//#endif
        if (ProgramMode)
        {
          USBCommand cmdsend;
          cmdsend.type = RSP_REBOOT;
          Send_USB_Command (&cmdsend, sizeof (USBCommand));
        }
//#if DEBUG
      //}
//#endif
      if ((CmdLineMode) || (Is_Test_Program_Mode()))
      {
        uint8_t BLState = 8;
        Send_USB_Command_Packet (RSP_SET_BOOTLOADER_STATE, 1, &BLState);
        pthread_create (&thread_cmd, NULL, (void*)Command_Line, NULL);
      }
    }
    else
    {
      printf ("Device not connected to USB. Retry\n");
      if ((++ NumTries) < 3)
        Sleep (2000);
      else
      {
        detectUSB = FALSE;
        printf ("USB Communication Failed. Device not connected to USB.\n");
        exit (0);
      }
    }
  }

  while(GetMessage(&Msg, NULL, 0, 0) > 0)
  {
    TranslateMessage(&Msg);
    DispatchMessage(&Msg);
  }

  return Msg.wParam;
}

/**
 * Parse_Arguments
 *
 * Parse the arguments from the command line of the
 * terminal. The function passed each argument to CmdLine_Argument
 * function which will perform necessary action based
 * on the argument.
 *
 * @param argv The argument list passed through the command line
 */
void Parse_Arguments (LPSTR argv)
{
  if (argv [0] != '\0')
  {
    LPSTR p = argv;
    char* s = strtok (p, " ");
    CmdLine_Argument (s);
    while ((s = strtok (NULL, " ")) != '\0')
    {
      CmdLine_Argument (s);
    }
  }
}

/**
 * CmdLine_Argument
 *
 * This function identifies each argument from the argument list
 * passed through the command line and performs specific actions
 * based on the argument.
 *
 * @param par Parsed argument from Parse_Argument function.
 */
void CmdLine_Argument (char* par)
{
  if (strcmp (par, "-p") == 0)
    ProgramMode = TRUE;
  else if (strcmp (par, "-c") == 0)
    CmdLineMode = TRUE;
  else if (strcmp (par, "-pst") == 0)
  {
    ProgramMode = TRUE;
    STImage = TRUE;
  }
  else if (strcmp (par, "-help") == 0)
  {
    print_help ();
    exit (0);
  }
//#ifdef DEBUG
  else if (strcmp (par, "-tp") == 0)
  {
    TestProgramMode = TRUE;
    ProgramMode = TRUE;
  }
//#endif
  else if (par[0] != '-')
  {
    strncpy (FileName, par, MAX_FILE_NAME_SIZE);
  }
  else
  {
    fprintf (stderr, "Ignoring unknown argument %s.", par);
  }
}

/**
 * Is_STImage
 *
 * Check if we are downloading SELF Test Image to the
 * device. The function returns boolean variable
 * STImage.
 *
 * @return STImage TRUE | FALSE
 */
BOOLEAN Is_STImage ()
{
  return STImage;
}

/**
 * Is_Test_Program_Mode
 *
 * Returns the boolean variable TestProgramMode. If the application is
 * compiled with DEBUG flag then it accepts an extra command
 * line parameter '-tp' which provides step by step control to the user
 * over the communication with the bootloader.
 *
 * @return TestProgramMode = TRUE | FALSE
 */
BOOLEAN Is_Test_Program_Mode ()
{
  return TestProgramMode;
}

/**
 * Binary_Upload_Completed
 *
 * Reverts the programming mode. Checks if the application has to
 * stay in command line mode.
 */
void Binary_Upload_Completed ()
{
  ProgramMode = FALSE;
  DownloadDone = TRUE;
  //TestProgramMode = FALSE;
}

/**
 * Exit_Applicaiton
 *
 * This function provides a reliable way of exiting the application.
 * It makes sure that the threads are terminated before the exit
 * function is call. It is advisable to call this function for a
 * clean exit rather than using exit(0).
 */
void Exit_Application ()
{
  //pthread_kill (thread_rx, 0);
  //pthread_kill (thread_cmd, 0);
  pthread_cancel (thread_rx);
  pthread_cancel (thread_cmd);
  exit (0);
}


text:
package it.rainbowbreeze.picama.logic;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;

import it.rainbowbreeze.picama.common.ILogFacility;
import it.rainbowbreeze.picama.data.AppPrefsManager;

/**
 * Misc class for different pieces of logic, not easy to group elsewhere
 *
 * Created by alfredomorresi on 14/12/14.
 */
public class LogicManager {
    private static final String LOG_TAG = LogicManager.class.getSimpleName();
    public static final int REQUEST_SYNC = 10120;
    private final ILogFacility mLogFacility;
    private final AppPrefsManager mAppPrefsManager;

    public LogicManager(ILogFacility logFacility, AppPrefsManager appPrefsManager) {
        mLogFacility = logFacility;
        mAppPrefsManager = appPrefsManager;
    }

    /**
     * Schedules a new picture refresh, if needed
     *
     *  AlarmManager and setInexactRepeating(..)
     * http://www.accella.net/scheduling-code-execution-on-android/pote
     */
    public void schedulePicturesRefresh(Context appContext) {
        // First, checks if the picture refresh have to be scheduled
        if (!mAppPrefsManager.isSyncEnabled()) {
            mLogFacility.v(LOG_TAG, "No need to schedule a sync because the sync is off in the settings");
            return;
        }

        // Checks last sync time
        long lastSyncTime = mAppPrefsManager.getLastSyncTime();
        long syncIntervalInPref = 24 / Integer.parseInt(mAppPrefsManager.getSyncFrequency())
                * 3600 * 1000L; // milliseconds
        long currentTime = Calendar.getInstance().getTimeInMillis();
        long nextSyncInterval = 0;

        if (0 == lastSyncTime) {
            // Sync now
            mLogFacility.v(LOG_TAG, "Sync has never been done. Require one immediately");
            nextSyncInterval = 0;
        } else {
            long elapsedTimeFromLastSync = currentTime - lastSyncTime;

            if (elapsedTimeFromLastSync > syncIntervalInPref) {
                // Sync now if the time elapsed from last sync is greater than the expected sync interval
                mLogFacility.v(LOG_TAG, "Last sync has been done long time ago. Require one immediately");
                nextSyncInterval = 0;
            } else {
                nextSyncInterval = syncIntervalInPref - elapsedTimeFromLastSync;
                mLogFacility.v(LOG_TAG, "Next sync will happen in " + nextSyncInterval + " milliseconds from now");
             }
        }

        if (nextSyncInterval <= 0) {
            //ok... add some more seconds, useful during reboot, for example...
            //nextSyncInterval = 60000L;
        }

        long nextFinalDateInterval = currentTime + nextSyncInterval;
        mLogFacility.v(LOG_TAG, "Scheduling next sync at " + getFormattedDate(nextFinalDateInterval) +
                " and repeating every " + syncIntervalInPref + " milliseconds");
        PendingIntent pendingIntent = createSyncPendingIntent(appContext);
        AlarmManager alarmManager = (AlarmManager) appContext.getSystemService(Context.ALARM_SERVICE);
        /**
         * {@link android.app.AlarmManager#setInexactRepeating(int, long, long, android.app.PendingIntent)}
         * can be used only with pre-defined intervals: INTERVAL_DAY, INTERVAL_HALF_DAY,
         * INTERVAL_HOUR, INTERVAL_HALF_HOUR, INTERVAL_FIFTEEN_MINUTES. Otherwise, use
         * {@link android.app.AlarmManager#setRepeating(int, long, long, android.app.PendingIntent)}
         *
         * Source: https://developer.android.com/training/scheduling/alarms.html
         */
        if (AlarmManager.INTERVAL_DAY == syncIntervalInPref
                || AlarmManager.INTERVAL_HALF_DAY == syncIntervalInPref
                || AlarmManager.INTERVAL_HOUR == syncIntervalInPref
                || AlarmManager.INTERVAL_HALF_HOUR == syncIntervalInPref
                || AlarmManager.INTERVAL_FIFTEEN_MINUTES == syncIntervalInPref) {
            alarmManager.setInexactRepeating(
                    AlarmManager.RTC_WAKEUP,
                    nextFinalDateInterval,
                    syncIntervalInPref,
                    pendingIntent);
            mLogFacility.v(LOG_TAG, "Using an inexact repeating alarm");
        } else {
            alarmManager.setInexactRepeating(
                    AlarmManager.RTC_WAKEUP,
                    nextFinalDateInterval,
                    syncIntervalInPref,
                    pendingIntent);
            mLogFacility.v(LOG_TAG, "Using an exact repeating alarm");
        }
        mAppPrefsManager.setRepeatingSyncTime(nextFinalDateInterval);
    }

    /**
     * Disable picture refresh in the background, canceling an alarm already
     * in progress
     *
     * @param appContext
     */
    public void cancelPictureRefresh(Context appContext) {
        mLogFacility.v(LOG_TAG, "Removing background sync");
        PendingIntent pendingIntent = createSyncPendingIntent(appContext);
        AlarmManager alarmManager = (AlarmManager) appContext.getSystemService(Context.ALARM_SERVICE);
        alarmManager.cancel(pendingIntent);
        mAppPrefsManager.resetRepeatingSyncTime();
    }

    private PendingIntent createSyncPendingIntent(Context appContext) {
        Intent intent = new Intent(appContext, RefreshPicturesService.class);
        intent.setAction(RefreshPicturesService.ACTION_REFRESH_PICTURES);
        return PendingIntent.getService(appContext, REQUEST_SYNC, intent, PendingIntent.FLAG_UPDATE_CURRENT);
    }

    public boolean isSyncPendingIntentActive(Context appContext) {
        /**
         * {@link android.app.PendingIntent#FLAG_NO_CREATE}:
         *  Flag indicating that if the described PendingIntent does not already exist,
         *  then simply return null instead of creating it.
         */
        Intent intent = new Intent(appContext, RefreshPicturesService.class);
        intent.setAction(RefreshPicturesService.ACTION_REFRESH_PICTURES);
        return null == PendingIntent.getService(appContext, REQUEST_SYNC, intent, PendingIntent.FLAG_NO_CREATE)
                ? false  // null means that the PendingIntent doesn't exist
                : true;
    }

    /**
     * Returns a formatted date from an EPOC time
     * @param timeToFormat
     * @return
     */
    public String getFormattedDate(long timeToFormat) {
        if (timeToFormat > 0) {
            GregorianCalendar cal = new GregorianCalendar();
            cal.setTimeInMillis(timeToFormat);
            // http://developer.android.com/reference/java/text/SimpleDateFormat.html
            SimpleDateFormat ft = new SimpleDateFormat("yyyy.MM.dd',' HH:mm:ss");
            return ft.format(cal.getTime());
        } else {
            return "-";
        }
    }

}


text:
/* Note: Interix doesn't support user-written DLLs (use conventional
   shared libs (.so) instead).  Thus a lot of the stuff that might apply
   about dllimport/dllexport and the like does not apply here. */

#include <stdio.h>

/* Names to predefine in the preprocessor for this target machine.  */

#define DBX_DEBUGGING_INFO 1
#define SDB_DEBUGGING_INFO 1
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG

/* Our strategy for finding global constructors is a bit different, although
   not a lot.  */
#define DO_GLOBAL_CTORS_BODY						\
do {									\
  int i;								\
  unsigned long nptrs;							\
  func_ptr *p;								\
  asm(									\
       "     .section .ctor_head, \"rw\"\n"				\
       "1:\n"								\
       "     .text \n"							\
       ASM_LOAD_ADDR(1b,%0)						\
       : "=r" (p) : : "cc");						\
  for (nptrs = 0; p[nptrs] != 0; nptrs++);				\
  for (i = nptrs-1; i >= 0; i--)					\
    p[i] ();								\
} while (0)

#define DO_GLOBAL_DTORS_BODY						\
do {									\
  func_ptr *p;								\
  asm(									\
       "     .section .dtor_head, \"rw\"\n"				\
       "1:\n"								\
       "     .text \n"							\
       ASM_LOAD_ADDR(1b,%0)						\
       : "=r" (p) : : "cc");						\
  while (*p)								\
    {									\
      p++;								\
      (*(p-1)) ();							\
    }									\
} while (0)

/* We don't use the "usual" push-an-address solution. */
#undef TARGET_ASM_CONSTRUCTOR

#undef  SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{ "ms-bitfields", MASK_MS_BITFIELD_LAYOUT, N_("Use native (MS) bitfield layout") }, \
{ "no-ms-bitfields", -MASK_MS_BITFIELD_LAYOUT, N_("Use gcc default bitfield layout") },

#undef LIB_SPEC
#define LIB_SPEC "\
 %{!shared:%{!dynamic:-lc -lpsxdll \
 }} \
 %{!G:%{!dynamic:-lc -lpsxdll \
 }} \
 %{dynamic:-lc -lpsxdll \
 } \
 %{v}"

#undef LINK_SPEC
#define LINK_SPEC "%{!shared:-stack 0x4000000,0x10000} \
		   %{g} \
		   %{dynamic:-Bdynamic} \
		   %{static:-Bstatic} \
		   %{shared:--shared -Bdynamic} \
		   %{G:--shared -Bdynamic} \
		   %{symbolic:--shared -Bsymbolic -Bdynamic} \
   		   %{rpath*:--rpath %*} \
		   "

#undef STARTFILE_SPEC
#define STARTFILE_SPEC  \
  "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}} %{shared:crti%O%s}"

#define TARGET_DECLSPEC 1

/* cpp handles __STDC__ */
#define TARGET_OS_CPP_BUILTINS()					\
  do									\
    {									\
	builtin_define ("__INTERIX");					\
	builtin_define ("_M_IX86=300");					\
	builtin_define ("_X86_=1");					\
	builtin_define ("__stdcall=__attribute__((__stdcall__))");	\
	builtin_define ("__cdecl=__attribute__((__cdecl__))");		\
	builtin_define ("__declspec(x)=__attribute__((x))");		\
	builtin_assert ("system=unix");					\
	builtin_assert ("system=interix");				\
	if (preprocessing_asm_p ())					\
	  builtin_define_std ("LANGUAGE_ASSEMBLY");			\
	else								\
	  {								\
	     builtin_define_std ("LANGUAGE_C");				\
	     if (c_dialect_cxx ())					\
	       builtin_define_std ("LANGUAGE_C_PLUS_PLUS");		\
	     if (c_dialect_objc ())					\
	       builtin_define_std ("LANGUAGE_OBJECTIVE_C");		\
	  } 								\
    }									\
  while (0)

#undef CPP_SPEC
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"

#define SIZE_TYPE "unsigned int"
#define PTRDIFF_TYPE "int"
#define WCHAR_TYPE "short unsigned int"
#define WCHAR_TYPE_SIZE 16

/* Turn off long double being 96 bits.  */
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 64
#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64

/* The following are needed for us to be able to use winnt.c, but are not
   otherwise meaningful to Interix.  (The functions that use these are
   never called because we don't do DLLs.) */
#define TARGET_NOP_FUN_DLLIMPORT 1
#define drectve_section()  /* nothing */

#define EH_FRAME_IN_DATA_SECTION

#define READONLY_DATA_SECTION_ASM_OP	"\t.section\t.rdata,\"r\""

/* Define this macro if references to a symbol must be treated
   differently depending on something about the variale or
   function named by the symbol (such as what section it is in).  */

#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info
#undef  TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING  i386_pe_strip_name_encoding_full

/* Emit code to check the stack when allocating more that 4000
   bytes in one go.  */

#define CHECK_STACK_LIMIT 4000

/* By default, target has a 80387, uses IEEE compatible arithmetic,
   and returns float values in the 387 and needs stack probes
   We also align doubles to 64-bits forMSVC default compatibility
   Ditto for bitfields. */
#undef TARGET_SUBTARGET_DEFAULT
#define TARGET_SUBTARGET_DEFAULT \
   (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE | \
    MASK_ALIGN_DOUBLE | MASK_MS_BITFIELD_LAYOUT)

/* The MS compilers take alignment as a number of bytes, so we do as well */
#undef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
  if ((LOG)!=0) fprintf ((FILE), "\t.balign %d\n", 1<<(LOG))

/* Define this macro if in some cases global symbols from one translation
   unit may not be bound to undefined symbols in another translation unit
   without user intervention.  For instance, under Microsoft Windows
   symbols must be explicitly imported from shared libraries (DLLs).  */
/*
 * Old gcc(3.3) did not have 1 here
 */
#define MULTIPLE_SYMBOL_SPACES	1

extern void i386_pe_unique_section PARAMS ((tree, int));
#define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section

/* Switch into a generic section.  */
#define TARGET_ASM_NAMED_SECTION  default_pe_asm_named_section

/* Select attributes for named sections.  */
#define TARGET_SECTION_TYPE_FLAGS  i386_pe_section_type_flags

/* Write the extra assembler code needed to declare a function
   properly.  If we are generating SDB debugging information, this
   will happen automatically, so we only need to handle other cases.  */
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)			\
  do									\
    {									\
      if (write_symbols != SDB_DEBUG)					\
       i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL));	\
      ASM_OUTPUT_LABEL (FILE, NAME);       				\
    }									\
  while (0)

/* Add an external function to the list of functions to be declared at
   the end of the file.  */
#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME)				\
  do									\
    {									\
      if (TREE_CODE (DECL) == FUNCTION_DECL)				\
        i386_pe_record_external_function (DECL, NAME);			\
    }									\
  while (0)

/* Declare the type properly for any external libcall.  */
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
  i386_pe_declare_function_type (FILE, XSTR (FUN, 0), 1)

/* This says out to put a global symbol in the BSS section.  */
#undef ASM_OUTPUT_ALIGNED_BSS
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
  asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))

/* Don't assume anything about the header files.  */
#define NO_IMPLICIT_EXTERN_C

/* External function declarations.  */
extern void i386_pe_record_external_function (tree, const char *);
extern void i386_pe_declare_function_type (FILE *, const char *, int);
extern void i386_pe_record_exported_symbol (const char *, int);
extern void i386_pe_asm_file_end (FILE *);

/* For Win32 ABI compatibility */
#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 0

/* A bitfield declared as `int' forces `int' alignment for the struct.  */
#undef PCC_BITFIELD_TYPE_MATTERS
#define PCC_BITFIELD_TYPE_MATTERS 1

/* Enable alias attribute support.  */
#ifndef SET_ASM_OP
#define SET_ASM_OP "\t.set\t"
#endif

/* Note that there appears to be two different ways to support const
   sections at the moment.  You can either #define the symbol
   READONLY_DATA_SECTION (giving it some code which switches to the
   readonly data section) or else you can #define the symbols
   EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and
   SELECT_RTX_SECTION.  We do both here just to be on the safe side.  */

#define USE_CONST_SECTION 1

/* The linker will take care of this, and having them causes problems with
   ld -r (specifically -rU).  */
#define CTOR_LISTS_DEFINED_EXTERNALLY 1

/* Output a definition (implements alias) */
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)				\
do									\
{									\
    fputs (SET_ASM_OP, (FILE));						\
    assemble_name (FILE, LABEL1);					\
    fputc (',', (FILE));						\
    assemble_name (FILE, LABEL2);					\
    fputc ('\n', (FILE));						\
    }									\
while (0)

#define HOST_PTR_AS_INT unsigned long

/* The following two flags are usually "off" for i386, because some non-gnu
   tools (for the i386) don't handle them.  However, we don't have that
   problem, so....  */

/* Forward references to tags are allowed.  */
#define SDB_ALLOW_FORWARD_REFERENCES
/* Unknown tags are also allowed.  */
#define SDB_ALLOW_UNKNOWN_REFERENCES
/* DWARF2 Unwinding doesn't work with exception handling yet.  */
#define DWARF2_UNWIND_INFO 0
/* MSVC returns structs of up to 8 bytes via registers. */

#undef SUBTARGET_RETURN_IN_MEMORY
#define SUBTARGET_RETURN_IN_MEMORY(TYPE, FNTYPE) \
  (TYPE_MODE (TYPE) == BLKmode || \
     (AGGREGATE_TYPE_P (TYPE) && int_size_in_bytes(TYPE) > 8 ))

#define ASM_LOAD_ADDR(loc, reg)   "     leal " #loc "," #reg "\n"

/* The integer half of this list needs to be constant.  However, there's
   a lot of disagreement about what the floating point adjustments should
   be.  We pick one that works with gdb.  (The underlying problem is
   what to do about the segment registers.  Since we have access to them
   from /proc, we'll allow them to be accessed in gdb, even tho the
   gcc compiler can't generate them.  (There's some evidence that
   MSVC does, but possibly only for certain special "canned" sequences.)  */

#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) \
(TARGET_64BIT ? dbx64_register_map[n] \
 : (n) == 0 ? (int) 0 \
 : (n) == 1 ? (int) 2 \
 : (n) == 2 ? (int) 1 \
 : (n) == 3 ? (int) 3 \
 : (n) == 4 ? (int) 6 \
 : (n) == 5 ? (int) 7 \
 : (n) == 6 ? (int) 5 \
 : (n) == 7 ? (int) 4 \
 : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (int) (n)+8 \
 : (int) (-1))

#define EH_FRAME_IN_DATA_SECTION

/* the following are OSF linker (not gld) specific... we don't want them */
#undef HAS_INIT_SECTION
#undef LD_INIT_SWITCH
#undef LD_FINI_SWITCH

/* The following are needed for us to be able to use winnt.c, but are not
   otherwise meaningful to Interix.  (The functions that use these are
   never called because we don't do DLLs.) */
#define TARGET_NOP_FUN_DLLIMPORT 1
#define I386_PE_STRIP_ENCODING(SYM_NAME) \
  ((SYM_NAME) + ((SYM_NAME)[0] == '@' \
                 ? ((SYM_NAME)[3] == '*' ? 4 : 3) : 0) \
             + ((SYM_NAME)[0] == '*' ? 1 : 0))

#define drectve_section()  /* nothing */


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>ViennaCL - The Vienna Computing Library: entry_proxy< SCALARTYPE > Class Template Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

ViennaCL - The Vienna Computing Library
    1.3.1

Main Page

Namespaces

Data Structures

Files

Data Structures

Class Hierarchy

Data Fields

viennacl

entry_proxy

Public Member Functions

entry_proxy< SCALARTYPE > Class Template Reference

A proxy class for a single element of a vector or matrix. This proxy should not be noticed by end-users of the library.
 More...

#include <entry_proxy.hpp>

Public Member Functions

 	entry_proxy (unsigned int mem_offset, viennacl::ocl::handle< cl_mem > const &mem_handle)

 	The constructor for the proxy class. Declared explicit to avoid any surprises created by the compiler.

entry_proxy & 	operator+= (SCALARTYPE value)

 	Inplace addition of a CPU floating point value.

entry_proxy & 	operator-= (SCALARTYPE value)

 	Inplace subtraction of a CPU floating point value.

entry_proxy & 	operator*= (SCALARTYPE value)

 	Inplace multiplication with a CPU floating point value.

entry_proxy & 	operator/= (SCALARTYPE value)

 	Inplace division by a CPU floating point value.

entry_proxy & 	operator= (SCALARTYPE value)

 	Assignment of a CPU floating point value.

entry_proxy & 	operator= (scalar< SCALARTYPE > const &value)

 	Assignment of a GPU floating point value. Avoids unnecessary GPU->CPU->GPU transfers.

entry_proxy & 	operator= (entry_proxy const &other)

 	Assignment of another GPU value.

 	operator SCALARTYPE () const

 	Conversion to a CPU floating point value.

unsigned int 	index () const

 	Returns the index of the represented element.

viennacl::ocl::handle< cl_mem >

 const & 	handle () const

 	Returns the memory viennacl::ocl::handle.

Detailed Description

template<typename SCALARTYPE>

class viennacl::entry_proxy< SCALARTYPE >

A proxy class for a single element of a vector or matrix. This proxy should not be noticed by end-users of the library.

This proxy provides access to a single entry of a vector. If the element is assigned to a GPU object, no unnecessary transfers to the CPU and back to GPU are initiated.

Template Parameters:

SCALARTYPE	Either float or double

Constructor & Destructor Documentation

          entry_proxy
          (
          unsigned int
          mem_offset,

          viennacl::ocl::handle< cl_mem > const &
          mem_handle

          )
          	 [inline, explicit]

The constructor for the proxy class. Declared explicit to avoid any surprises created by the compiler.

Parameters:

mem_offset	The memory offset in multiples of sizeof(SCALARTYPE) relative to the memory pointed to by the handle

mem_handle	A viennacl::ocl::handle for the memory buffer on the GPU.

Member Function Documentation

          viennacl::ocl::handle<cl_mem> const& handle
          (
          	)
           const [inline]

Returns the memory viennacl::ocl::handle.

          unsigned int index
          (
          	)
           const [inline]

Returns the index of the represented element.

          operator SCALARTYPE
          (
          	)
           const [inline]

Conversion to a CPU floating point value.

This conversion allows to write something like double test = vector(4); However, one has to keep in mind that CPU<->GPU transfers are very slow compared to CPU<->CPU operations.

          entry_proxy& operator*=
          (
          SCALARTYPE
          value	)
           [inline]

Inplace multiplication with a CPU floating point value.

          entry_proxy& operator+=
          (
          SCALARTYPE
          value	)
           [inline]

Inplace addition of a CPU floating point value.

          entry_proxy& operator-=
          (
          SCALARTYPE
          value	)
           [inline]

Inplace subtraction of a CPU floating point value.

          entry_proxy& operator/=
          (
          SCALARTYPE
          value	)
           [inline]

Inplace division by a CPU floating point value.

          entry_proxy& operator=
          (
          SCALARTYPE
          value	)
           [inline]

Assignment of a CPU floating point value.

          entry_proxy& operator=
          (
          scalar< SCALARTYPE > const &
          value	)
           [inline]

Assignment of a GPU floating point value. Avoids unnecessary GPU->CPU->GPU transfers.

          entry_proxy& operator=
          (
          entry_proxy< SCALARTYPE > const &
          other	)
           [inline]

Assignment of another GPU value.

The documentation for this class was generated from the following file:

viennacl/tools/entry_proxy.hpp

<address class="footer">
Generated on Thu Aug 9 2012 19:49:11 for ViennaCL - The Vienna Computing Library by

 1.7.6.1
</address>


text:
/**
* Author: CZ cz.theng@gmail.com
 */

package bucket

import (
	"encoding/xml"
	"github.com/cz-it/aliyun-oss-golang-sdk/ossapi"
	"path"
	"strconv"
)

/*
// redifine in put_bucket_logging.go
type LoggingInfo struct {
	TargetBucket string
	TargetPrefix string
}
*/

// LoggingStatus is logging status struct
type LoggingStatus struct {
	XMLName        xml.Name `xml:"BucketLoggingStatus"`
	LoggingEnabled LoggingInfo
}

// QueryLogging Query bucket's Logging info
//@param name: name of bucket
//@param location: location of bucket
//@return info : Logging info of bucket
//@return ossapiError : nil on success
func QueryLogging(name, location string) (info *LoggingInfo, ossapiError *ossapi.Error) {
	host := name + "." + location + ".aliyuncs.com"
	resource := path.Join("/", name) + "/"
	req := &ossapi.Request{
		Host:     host,
		Path:     "/?logging",
		Method:   "GET",
		Resource: resource,
		SubRes:   []string{"logging"}}
	rsp, err := req.Send()
	if err != nil {
		if _, ok := err.(*ossapi.Error); !ok {
			ossapi.Logger.Error("GetService's Send Error:%s", err.Error())
			ossapiError = ossapi.OSSAPIError
			return
		}
	}
	if rsp.Result != ossapi.ErrSUCC {
		ossapiError = err.(*ossapi.Error)
		return
	}
	bodyLen, err := strconv.Atoi(rsp.HTTPRsp.Header["Content-Length"][0])
	if err != nil {
		ossapi.Logger.Error("GetService's Send Error:%s", err.Error())
		ossapiError = ossapi.OSSAPIError
		return
	}
	body := make([]byte, bodyLen)
	rsp.HTTPRsp.Body.Read(body)
	status := new(LoggingStatus)
	err = xml.Unmarshal(body, status)
	if err != nil {
		ossapi.Logger.Error("GetService's Send Error:%s", err.Error())
		ossapiError = ossapi.OSSAPIError
		return
	}
	if status.LoggingEnabled.TargetBucket == "" {
		info = nil
	} else {
		info = &status.LoggingEnabled
	}
	return
}


text:
"use strict";

// modified from https://github.com/es-shims/es5-shim
var has = Object.prototype.hasOwnProperty;
var toString = Object.prototype.toString;
var isArgs = require('./isArguments');
var hasDontEnumBug = !({ 'toString': null }).propertyIsEnumerable('toString');
var hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype');
var dontEnums = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"];

var keysShim = function keys(object) {
	var isObject = object !== null && typeof object === 'object';
	var isFunction = toString.call(object) === '[object Function]';
	var isArguments = isArgs(object);
	var isString = isObject && toString.call(object) === '[object String]';
	var theKeys = [];

	if (!isObject && !isFunction && !isArguments) {
		throw new TypeError("Object.keys called on a non-object");
	}

	var skipProto = hasProtoEnumBug && isFunction;
	if (isString && object.length > 0 && !has.call(object, 0)) {
		for (var i = 0; i < object.length; ++i) {
			theKeys.push(String(i));
		}
	}

	if (isArguments && object.length > 0) {
		for (var j = 0; j < object.length; ++j) {
			theKeys.push(String(j));
		}
	} else {
		for (var name in object) {
			if (!(skipProto && name === 'prototype') && has.call(object, name)) {
				theKeys.push(String(name));
			}
		}
	}

	if (hasDontEnumBug) {
		var ctor = object.constructor;
		var skipConstructor = ctor && ctor.prototype === object;

		for (var j = 0; j < dontEnums.length; ++j) {
			if (!(skipConstructor && dontEnums[j] === 'constructor') && has.call(object, dontEnums[j])) {
				theKeys.push(dontEnums[j]);
			}
		}
	}
	return theKeys;
};

keysShim.shim = function shimObjectKeys() {
	if (!Object.keys) {
		Object.keys = keysShim;
	}
	return Object.keys || keysShim;
};

module.exports = keysShim;

//# sourceMappingURL=index-compiled.js.map


text:
import pytz
import datetime
from django.conf import settings
from django.utils import six
from django.utils import timezone

def dt(value):
    """Convert 32/64 bits timestamp to datetime object.
    """
    try:
        return datetime.datetime.utcfromtimestamp(value)
    except ValueError:
        # TODO: need a better way to handle 64 bits timestamp.
        return datetime.datetime.utcfromtimestamp(value/1000000)

def value_to_db_datetime(value):
    if value is None:
        return None

    # MySQL doesn't support tz-aware datetimes
    if timezone.is_aware(value):
        if settings.USE_TZ:
            value = value.astimezone(timezone.utc).replace(tzinfo=None)
        else:
            raise ValueError("MySQL backend does not support timezone-aware datetimes when USE_TZ is False.")

    # MySQL doesn't support microseconds
    return six.text_type(value.replace(microsecond=0))

def utc_to_local(dt):
    # change from UTC timezone to current seahub timezone
    tz = timezone.get_default_timezone()
    utc = dt.replace(tzinfo=timezone.utc)
    local = timezone.make_naive(utc, tz)
    return local

def timestamp_to_isoformat_timestr(timestamp):
    try:
        dt_obj = datetime.datetime.fromtimestamp(timestamp)
    except ValueError:
        dt_obj = datetime.datetime.fromtimestamp(timestamp/1000000)

    dt_obj = dt_obj.replace(microsecond=0)
    pytz_obj = pytz.timezone(settings.TIME_ZONE)
    isoformat_timestr = pytz_obj.localize(dt_obj).isoformat()
    return isoformat_timestr

def datetime_to_isoformat_timestr(datetime):
    datetime = datetime.replace(microsecond=0)
    pytz_obj = pytz.timezone(settings.TIME_ZONE)
    isoformat_timestr = pytz_obj.localize(datetime).isoformat()
    return isoformat_timestr


text:
require 'yaml'

module Rouge
  module Lexers
    class Apache < RegexLexer
      title "Apache"
      desc 'configuration files for Apache web server'
      tag 'apache'
      mimetypes 'text/x-httpd-conf', 'text/x-apache-conf'
      filenames '.htaccess', 'httpd.conf'

      class << self
        attr_reader :keywords
      end
      # Load Apache keywords from separate YML file
      @keywords = ::YAML.load_file(Pathname.new(__FILE__).dirname.join('apache/keywords.yml')).tap do |h|
        h.each do |k,v|
          h[k] = Set.new v
        end
      end

      def name_for_token(token, kwtype, tktype)
        if self.class.keywords[kwtype].include? token
          tktype
        else
          Text
        end
      end

      state :whitespace do
        rule /\#.*/, Comment
        rule /\s+/m, Text
      end

      state :root do
        mixin :whitespace

        rule /(<\/?)(\w+)/ do |m|
          groups Punctuation, name_for_token(m[2].downcase, :sections, Name::Label)
          push :section
        end

        rule /\w+/ do |m|
          token name_for_token(m[0].downcase, :directives, Name::Class)
          push :directive
        end
      end

      state :section do
        # Match section arguments
        rule /([^>]+)?(>(?:\r\n?|\n)?)/ do |m|
          groups Literal::String::Regex, Punctuation
          pop!
        end

        mixin :whitespace
      end

      state :directive do
        # Match value literals and other directive arguments
        rule /\r\n?|\n/, Text, :pop!

        mixin :whitespace

        rule /\S+/ do |m|
          token name_for_token(m[0], :values, Literal::String::Symbol)
        end
      end
    end
  end
end


text:
<!--

The MIT License (MIT)
Copyright (c) 2014 DeNA Co., Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

-->

<!DOCTYPE html>
<html>
<head>
<title>SVG Test 3</title>
<script type="text/javascript">
window.onload = function(event) {
  // Create an <img> element.
  var image = document.createElement('img');
  image.onload = function(event) {
    // Draw the loaded image to the <canvas> element.
    var context = document.getElementById('test').getContext('2d');
    context.drawImage(event.target, 0, 0);
  };
  // Load an SVG image to the <img> element. Some browsers need to encode an SVG
  // image in Base64 to use it as the source of an <img> element.
  var src =
    '<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">' +
      '<circle cx="40" cy="40" r="40" fill="#000"/>' +
    '</svg>';
  image.src = 'data:image/svg+xml;base64,' + btoa(src);
  image.width = 80;
  image.height = 80;
};
</script>
</head>
<body>
<canvas id="test" width="80" height="80"></canvas>
</body>
</html>


text:
class wrapper:

    def __init__(self,fn):
        self.fn = fn

    def __call__(self,*args):
        return "(" + self.fn(*args) + ")"

def mydecorator(x):
    print("decorating " + str(x))
    return wrapper(x)

def describe():
    return "world"
describe = mydecorator(describe)

print(describe())