text:
<TITLE>Review for Scream 2 (1997)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Scream 2 (1997)

reviewed by
Lars Lindahl

By Lars Lindahl
(c) 2000 Lars Lindahl

Lars Attacks!
http://www.angelfire.com/ny3/larsattacks

"Scream 2" (1997)

Directed by Wes Craven
Written by Kevin Williamson

Starring Neve Campbell, Courtney Cox, David Arquette, Jamie Kennedy, Liev
Scheiber, Elise Neal, Jerry O'Connell, Laurie Metcalf, Jada Pinket, Omar Epps,
Timothy Olyphant, Duane Martin, Sarah Michelle Gellar, Rebecca Gayheart, Portia
de Rossi, Joshua Jackson, David Warner, Lewis Arquette, Heather Graham, Luke
Wilson, and Kevin Williamson.

Grade: **1/2 (out of four)

Similar to the release of Scream, I was skeptical about how good this movie
would turn out. As this sequel so blatantly proves through its horror - buff
college students, sequels are never better than the original. In fact, they
could not only be terrible, but they could also make a viewer doubtful of how
good the first one was. Scream 2 is certainly not better than Scream because it
lacks the perfect setting from the original. The teenagers living in your
traditional suburban neighborhood who attend your classic chaotic house parties
is a horror movie's dream setting. In Scream 2, the surviving kids from the
first one have grown up and now are attending a larger college. However, they
are still being attacked by a mysterious murderer in a "ghost face" mask. The
question is: who is the killer? Most of the characters have matured and now
share a stronger connection with adults living in the same town as them. The
maturity is what Scream 2 should have avoided. The fact that the kids were
nothing but "stoned dudes" in the first film made it so funny. The only real
contact the kids had to the adult world in Scream, besides the cops, was their
authoritative principal (the ubiquitous Henry Winkler) who didn't really care
about any of his students' safety. This is what was so funny about Scream, it
had your stereotypical trouble-maker teens and your basic adult who harshly
reminds these kids to behave. This is something we've seen many times before at
the theaters and can now laugh at how embarrassingly bad it is in this parody
of a horror movie.  In Scream 2, the only real adult introduced, besides cops
and reporters, is main character Sydney's drama teacher (David Warner). They
share a few pointless bonding scenes together that show that these once no good
kids are now respectable young adults. Who wants respectable young adults to be
your main characters? Not me.

Now that the kids have grown up and hold more responsibilities, the jokes just
aren't as funny as the original. The only amusing sections are when Randy
(Jamie Kennedy) recites the rules of a sequel; there are more deaths, they are
bloodier, and anyone can be a suspect, and even these parts seem tacked on and
unnecessary to the plot. I thought screenwriter Kevin Williamson could have
added more lines about how black characters never survive in the sequel. He had
the perfect opportunity with a cameraman (Duane Martin who shines in every
scene that he is in) but unfortunately is underused. The fact that the sequel
has a lot more violence could have diminished its script from completely
shining. Williamson has the potential of a witty screenwriter but whenever he
seemed to launch a grand punch line, an outburst of violence suddenly
interrupted his train of thought. When thought over a number of times, it could
be possible that Williamson made a dissatisfactory script on purpose to prove
that sequels are always worse. Intentionally bad or not, the script is still
overwhelmingly disappointing.

Wes Craven still makes Scream 2 a pleasing attempt. The violence that he uses
may hurt the script, but it is still incredibly intense, particularly a scene
involving a police car crash. The film never drags on, its quick pace, very
similar to that of Scream, never hits a bump in the road allowing for
edge-of-your-seat action throughout.

Scream 2 is a decent film placed at the middle of the Scream trilogy. Those
looking for mindless violence will find it, however those looking for a clever
script like the first one, may be let down.

Grade: **1/2 (out of four)

Lars Attacks!
http://www.angelfire.com/ny3/larsattacks

by Lars Lindahl
(c) 2000 Lars Lindahl

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using De.Osthus.Ambeth.Proxy;
using De.Osthus.Ambeth.Ioc.Factory;
using System.Collections;

namespace De.Osthus.Ambeth.Service
{
    public class RethrownException : Exception
    {
        public Exception Exception { get; private set; }

        public RethrownException(Exception e)
        {
            if (e is RethrownException)
            {
                e = ((RethrownException)e).Exception;
            }
            Exception = e;
        }

        public override bool Equals(Object obj)
        {
            if (!(obj is RethrownException))
            {
                return false;
            }
            RethrownException other = (RethrownException)obj;
            return Object.Equals(Exception, other.Exception);
        }

        public override int GetHashCode()
        {
            return Exception.GetHashCode();
        }

        public override string Message
        {
            get
            {
                return Exception.Message;
            }
        }

        public override string StackTrace
        {
            get
            {
                return Exception.StackTrace;
            }
        }

        public override IDictionary Data
        {
            get
            {
                return Exception.Data;
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
"""
saltflat is a flatfielding tool for salt images.  It reads
in the data, applies a flatfield, and then produces
flat images

Author                 Version      Date
-----------------------------------------------
SM Crawford (SAAO)    1.0       02 Feb 2009

TODO
-----------------------------------------------

Updates
-----------------------------------------------

"""

from __future__ import with_statement

import time, numpy
from pyraf import iraf

import saltsafekey as saltkey
import saltsafeio as saltio
from saltsafelog import logging, history

from salterror import SaltError

debug=True

# -----------------------------------------------------------
# core routine

def saltflat(images,outimages,outpref, flatimage,minflat=1, allext=False, clobber=False,     \
             logfile='salt.log',verbose=True):

   with logging(logfile,debug) as log:

       # Check the input images
       infiles = saltio.argunpack ('Input',images)

       # create list of output files
       outfiles=saltio.listparse('Outfile', outimages, outpref,infiles,'')

       #verify that the input and output lists are the same length
       saltio.comparelists(infiles,outfiles,'Input','output')

       # check flatfield image exists
       flaimage= flatimage.strip()
       saltio.fileexists(flatimage)

       flatstruct= saltio.openfits(flatimage)

       # Normalize the flat field image
       # This requires to go through each science extension and divide it by
       # mean of the image.  Things that have to be checked:
       # that data exist, that it is a science extension

       #determine the global mean
       fmean=0
       fcount=0
       #replace bad pixels
       for i in range(len(flatstruct)):
           if flatstruct[i].data is not None and (flatstruct[i].name=='SCI' or flatstruct[i].name=='PRIMARY'):
              data = flatstruct[i].data
              mask = (data > minflat)
              if (numpy.nan==flatstruct[i].data).sum() or (numpy.inf==flatstruct[i].data).sum():
                    message = '\nWARNING -- SALTFLAT: %s contains invalid values' % flatimage
                    log.warning(message,with_stdout=verbose)
              flatstruct[i].data[mask==0] = minflat
              flatstruct[i].data[flatstruct[i].data==numpy.inf] = minflat

              #determine the mean
              mask = (data > minflat)
              fmean += data[mask].sum()
              fcount += data[mask].size
       if fcount>0: fmean=fmean/fcount

       for i in range(len(flatstruct)):
           if flatstruct[i].name=='PRIMARY':
                #is it a flat--if not throw a warning
                try:
                    key_ccdtype=saltkey.get('CCDTYPE', flatstruct[i])
                except:
                    key_ccdtype=None
                if key_ccdtype!='FLAT':
                    message = '\nWARNING -- SALTFLAT: %s does not have CCDTYPE=FLAT' % flatimage
                    log.warning(message,with_stdout=verbose)

                #if there are data, normalize it
                if flatstruct[i].data is not None:
                    flatstruct[i].data=flatnormalize(flatstruct[i].data, minflat)

           #Noramlize the science extensions
           if flatstruct[i].name=='SCI':
                if flatstruct[i].data is not None:
                    if allext is False: fmean=flatstruct[i].data.mean()
                    flatstruct[i].data=flatnormalize(flatstruct[i].data, minflat, fmean)

           #Apply to the variance frames
           if saltkey.found('VAREXT', flatstruct[i]):
               varext=saltkey.get('VAREXT',flatstruct[i])
               flatstruct[varext].data=flatstruct[varext].data/fmean**2

       # open each raw image file
       for infile, outfile in zip(infiles,outfiles):
           struct = saltio.openfits(infile)

           # flat field correct the image
           outstruct = flat(struct, flatstruct)
           try:
               pass
           except Exception,e:
               msg='Unable to flatten %s because %s' % (infile, e)
               raise SaltError(msg)

           #add any header keywords like history
           fname, hist=history(level=1, wrap=False)
           saltkey.housekeeping(struct[0],'SFLAT', 'File flatfield corrected', hist)

           #write it out and close it
           saltio.writefits(outstruct,outfile,clobber=clobber)
           saltio.closefits(struct)

           #output the information
           log.message('Flatfields image %s using %s' % (infile, flatimage), with_header=False, with_stdout=verbose)

       #clost the flatfield image
       saltio.closefits(flatstruct)

# -----------------------------------------------------------
# Normalize the data

def flatnormalize(data, minflat, fmean=1):
    """Calculate the mean of the data and return a normalized data array
    """
    try:
        mask = (data < minflat) + (data == numpy.nan) + (data == numpy.inf)
        data[mask]=minflat
        data=data/fmean
    except Exception, e:
        message='ERROR--FLATNORMALIZE:  Data could not be normalized because %s' % e
        raise SaltError(message)

    return data

# -----------------------------------------------------------
# Flat field the data

def flat(struct,fstruct):
    """flat applies a flatfield to salt CCD data

       return  struct
    """
    # Determine the number of extensions
    nextend=len(struct)

    #flat field the data
    for i in range(nextend):
       if struct[i].name=='SCI' or len(struct)==1:
            #Account for variance frames
            if saltkey.found('VAREXT', struct[i]):
               varext=saltkey.get('VAREXT', struct[i])
               if saltkey.found('VAREXT', fstruct[i]):
                   fvarext=saltkey.get('VAREXT', fstruct[i])
                   fvar=fstruct[fvarext].data
               else:
                   fvar=0
               struct[varext].data=(struct[i].data/fstruct[i].data)*(struct[varext].data/struct[i].data**2+fvar/fstruct[i].data**2)

            #flatten the data
            struct[i].data = struct[i].data / fstruct[i].data

    return struct

# -----------------------------------------------------------
# main code
if not iraf.deftask('saltflat'):
   parfile = iraf.osfn("saltred$saltflat.par")
   t = iraf.IrafTaskFactory(taskname="saltflat",value=parfile,function=saltflat, pkgname='saltred')


text:
package shop.config;

import javax.servlet.Filter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.Scope;
import org.springframework.core.env.Environment;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;

@Configuration
@EnableWebSecurity
@PropertySource(value = {"classpath:verification.properties"})
@PropertySource(value = {"classpath:authentication.properties"})
public class SecurityConfig extends WebSecurityConfigurerAdapter {

    @Autowired
    private Environment enviroment;

    @Autowired
    public void configAuthentication(AuthenticationManagerBuilder auth) throws Exception {
        // создаем пользователя в heap'е JVM
        auth.inMemoryAuthentication()
                .withUser(enviroment.getRequiredProperty("authentication.username"))
                .password(enviroment.getRequiredProperty("authentication.password"))
                .roles("ADMIN");
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests()
                .antMatchers("/admin", "/admin/**")
                .fullyAuthenticated();

        // настройка аутентификации (формы логирования)
        http.formLogin()
                .defaultSuccessUrl("/admin")
                .loginPage("/login")
                .usernameParameter("username")
                .passwordParameter("password")
                .failureUrl("/login?error")
                .permitAll();

        // настройка логаута
        http.logout()
                .permitAll() // разрешаем делать логаут всем
                .logoutUrl("/logout") // указываем URL логаута
                .logoutSuccessUrl("/login?logout") // указываем URL при удачном логауте
                .invalidateHttpSession(true); // делаем не валидной текущую сессию

        // настройка защиты от csrf атак
        http.csrf()
                .disable();

        // добавляем дополнительный фильтр для проверки простого API-ключа
        http.addFilterBefore(tokenFilter(), BasicAuthenticationFilter.class);
    }

    @Bean("tokenFilter")
    @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
    public Filter tokenFilter() {
        return new TokenAuthenticationFilter(enviroment.getRequiredProperty("verification.key"))
                .setURL("/goods/uploadimg/**")
                .setURL("/goods/clearimg/**")
                .setURL("/goods/update")
                .setURL("/goods/updatelist")
                .setURL("/goods/delete/**")
                .setURL("/customers/list")
                .setURL("/customers/update")
                .setURL("/customers/updatelist")
                .setURL("/customers/delete/**");
    }

}


text:
package com.ninelephas.fabric.sdk.service;

import com.ninelephas.fabric.sdk.entity.UserEntity;
import org.hyperledger.fabric.sdk.*;
import java.util.*;
import java.util.concurrent.CompletableFuture;

/**
 * Created by zouwei on 2017/4/21.
 */
public interface ClientService {

    /**
     * 用户注册(包括管理员)
     * @param user
     * @return
     * @throws Exception
     */
    public boolean regist(UserEntity user)throws Exception;

    /**
     * 创建一个新的peer
     * @param peerName
     * @param peerLocation
     * @param properties
     * @return
     * @throws Exception
     */
    public Peer newPeer(String peerName, String peerLocation, Properties properties) throws Exception;

    /**
     * 创建一个新的orderer
     * @param orderName
     * @param orderLocation
     * @param properties
     * @return
     * @throws Exception
     */
    public Orderer newOrder(String orderName, String orderLocation, Properties properties) throws Exception;

    /**
     * 创建一个新的EventHub
     * @param eventHubName
     * @param eventHubLocation
     * @param properties
     * @return
     * @throws Exception
     */
    public EventHub newEventHub(String eventHubName, String eventHubLocation, Properties properties) throws Exception;

    /**
     * 获取chain
     * @param chainName
     * @return
     */
    public Chain getChain(String chainName);
    /**
     * 创建一个chain
     * @param admin
     * @param chainName
     * @param chainConfiguration
     * @param orders
     * @param peers
     * @param eventHubs
     * @return
     * @throws Exception
     */
    public Chain newChainAndInitialize(UserEntity admin, String chainName, ChainConfiguration chainConfiguration, Collection<Orderer> orders, Collection<Peer> peers, Collection<EventHub> eventHubs) throws Exception;

    /**
     * install
     * @param chain
     * @param chainCodeID
     * @param chainCodeSourceLocation
     * @param version
     * @param type
     * @return
     * @throws Exception
     */
    public Collection<ProposalResponse> install(UserEntity user, Chain chain, ChainCodeID chainCodeID, String chainCodeSourceLocation, String version, TransactionRequest.Type type) throws Exception;

    /**
     * 数据初始化
     * @param user
     * @param chain
     * @param chainCodeID
     * @param args
     * @param fromYamlFilePath
     * @return
     * @throws Exception
     */
    public Collection<ProposalResponse>  instantiate(UserEntity user, Chain chain, ChainCodeID chainCodeID, String[] args, String fromYamlFilePath) throws Exception;

    /**
     * 数据更新
     * @param user
     * @param chain
     * @param chainCodeID
     * @param args
     * @return
     * @throws Exception
     */
    public Collection<ProposalResponse>  update(UserEntity user, Chain chain, ChainCodeID chainCodeID, String[] args) throws Exception;

    /**
     * 数据查询
     * @param user
     * @param chain
     * @param chainCodeID
     * @param args
     * @return
     * @throws Exception
     */
    public Collection<ProposalResponse> query(UserEntity user, Chain chain, ChainCodeID chainCodeID, String[] args) throws Exception;

    public Set<String> queryChannels(Peer peer)throws Exception;
}


text:
#ifndef __OVMF_PLATFORMS_H__
#define __OVMF_PLATFORMS_H__

#include <Library/PciLib.h>
#include <IndustryStandard/Pci22.h>
#include <IndustryStandard/Q35MchIch9.h>
#include <IndustryStandard/I440FxPiix4.h>

//
// OVMF Host Bridge DID Address
//
#define OVMF_HOSTBRIDGE_DID \
  PCI_LIB_ADDRESS (0, 0, 0, PCI_DEVICE_ID_OFFSET)

//
// Values we program into the PM base address registers
//
#define PIIX4_PMBA_VALUE  0xB000
#define ICH9_PMBASE_VALUE 0x0600

//
// Common bits in same-purpose registers
//
#define PMBA_RTE BIT0

//
// Common IO ports relative to the Power Management Base Address
//
#define ACPI_TIMER_OFFSET 0x8

#endif


text:
package org.apache.metron.indexing.dao;

import static org.apache.metron.indexing.dao.IndexDao.COMMENTS_FIELD;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.NavigableMap;
import java.util.Optional;
import java.util.stream.Collectors;
import org.adrianwalker.multilinestring.Multiline;
import org.apache.commons.collections.MapUtils;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Result;
import org.apache.metron.common.Constants;
import org.apache.metron.common.utils.JSONUtils;
import org.apache.metron.hbase.mock.MockHTable;
import org.apache.metron.indexing.dao.search.AlertComment;
import org.apache.metron.indexing.dao.update.CommentAddRemoveRequest;
import org.apache.metron.indexing.dao.update.Document;
import org.apache.metron.indexing.dao.update.OriginalNotFoundException;
import org.apache.metron.indexing.dao.update.PatchRequest;
import org.apache.metron.indexing.dao.update.ReplaceRequest;
import org.junit.Assert;
import org.junit.Test;

public abstract class UpdateIntegrationTest {

  /**
   * {
   *   "comment":"New Comment",
   *   "username":"test_user",
   *   "timestamp":1526401584951
   *   }
   */
  @Multiline
  protected String commentOne;

  /**
   * {
   *   "comment":"New Comment 2",
   *   "username":"test_user_2",
   *   "timestamp":1526401584952
   *   }
   */
  @Multiline
  protected String commentTwo;

  private static final int MAX_RETRIES = 10;
  private static final int SLEEP_MS = 500;
  protected static final String SENSOR_NAME = "test";
  private static final String CF = "p";

  private MultiIndexDao dao;

  @Test
  public void test() throws Exception {
    List<Map<String, Object>> inputData = new ArrayList<>();
    for(int i = 0; i < 10;++i) {
      final String name = "message" + i;
      inputData.add(
          new HashMap<String, Object>() {{
            put("source.type", SENSOR_NAME);
            put("name" , name);
            put("timestamp", System.currentTimeMillis());
            put(Constants.GUID, name);
          }}
      );
    }
    addTestData(getIndexName(), SENSOR_NAME, inputData);
    List<Map<String,Object>> docs = null;
    for(int t = 0;t < MAX_RETRIES;++t, Thread.sleep(SLEEP_MS)) {
      docs = getIndexedTestData(getIndexName(), SENSOR_NAME);
      if(docs.size() >= 10) {
        break;
      }
    }
    Assert.assertEquals(10, docs.size());
    //modify the first message and add a new field
    {
      Map<String, Object> message0 = new HashMap<String, Object>(inputData.get(0)) {{
        put("new-field", "metron");
      }};
      String guid = "" + message0.get(Constants.GUID);
      getDao().replace(new ReplaceRequest(){{
        setReplacement(message0);
        setGuid(guid);
        setSensorType(SENSOR_NAME);
        setIndex(getIndexName());
      }}, Optional.empty());

      Assert.assertEquals(1, getMockHTable().size());
      findUpdatedDoc(message0, guid, SENSOR_NAME);
      {
        //ensure hbase is up to date
        Get g = new Get(HBaseDao.Key.toBytes(new HBaseDao.Key(guid, SENSOR_NAME)));
        Result r = getMockHTable().get(g);
        NavigableMap<byte[], byte[]> columns = r.getFamilyMap(CF.getBytes());
        Assert.assertEquals(1, columns.size());
        Assert.assertEquals(message0
            , JSONUtils.INSTANCE.load(new String(columns.lastEntry().getValue())
                , JSONUtils.MAP_SUPPLIER)
        );
      }
      {
        //ensure ES is up-to-date
        long cnt = 0;
        for (int t = 0; t < MAX_RETRIES && cnt == 0; ++t, Thread.sleep(SLEEP_MS)) {
          docs = getIndexedTestData(getIndexName(), SENSOR_NAME);
          cnt = docs
              .stream()
              .filter(d -> message0.get("new-field").equals(d.get("new-field")))
              .count();
        }
        Assert.assertNotEquals("Data store is not updated!", cnt, 0);
      }
    }
    //modify the same message and modify the new field
    {
      Map<String, Object> message0 = new HashMap<String, Object>(inputData.get(0)) {{
        put("new-field", "metron2");
      }};
      String guid = "" + message0.get(Constants.GUID);
      getDao().replace(new ReplaceRequest(){{
        setReplacement(message0);
        setGuid(guid);
        setSensorType(SENSOR_NAME);
        setIndex(getIndexName());
      }}, Optional.empty());
      Assert.assertEquals(1, getMockHTable().size());
      Document doc = getDao().getLatest(guid, SENSOR_NAME);
      Assert.assertEquals(message0, doc.getDocument());
      findUpdatedDoc(message0, guid, SENSOR_NAME);
      {
        //ensure hbase is up to date
        Get g = new Get(HBaseDao.Key.toBytes(new HBaseDao.Key(guid, SENSOR_NAME)));
        Result r = getMockHTable().get(g);
        NavigableMap<byte[], byte[]> columns = r.getFamilyMap(CF.getBytes());
        Assert.assertEquals(2, columns.size());
        Assert.assertEquals(message0, JSONUtils.INSTANCE.load(new String(columns.lastEntry().getValue())
            , JSONUtils.MAP_SUPPLIER)
        );
        Assert.assertNotEquals(message0, JSONUtils.INSTANCE.load(new String(columns.firstEntry().getValue())
            , JSONUtils.MAP_SUPPLIER)
        );
      }
      {
        //ensure ES is up-to-date
        long cnt = 0;
        for (int t = 0; t < MAX_RETRIES && cnt == 0; ++t,Thread.sleep(SLEEP_MS)) {
          docs = getIndexedTestData(getIndexName(), SENSOR_NAME);
          cnt = docs
              .stream()
              .filter(d -> message0.get("new-field").equals(d.get("new-field")))
              .count();
        }

        Assert.assertNotEquals("Data store is not updated!", cnt, 0);
      }
    }
  }

  @Test
  public void testAddCommentAndPatch() throws Exception {
    Map<String, Object> fields = new HashMap<>();
    fields.put("guid", "add_comment");
    fields.put("source.type", SENSOR_NAME);

    Document document = new Document(fields, "add_comment", SENSOR_NAME, 1526306463050L);
    getDao().update(document, Optional.of(SENSOR_NAME));
    findUpdatedDoc(document.getDocument(), "add_comment", SENSOR_NAME);

    addAlertComment("add_comment", "New Comment", "test_user", 1526306463050L);
    // Ensure we have the first comment
    ArrayList<AlertComment> comments = new ArrayList<>();
    comments.add(new AlertComment("New Comment", "test_user", 1526306463050L));
    document.getDocument().put(COMMENTS_FIELD, comments.stream().map(AlertComment::asMap).collect(
        Collectors.toList()));
    findUpdatedDoc(document.getDocument(), "add_comment", SENSOR_NAME);

    List<Map<String, Object>> patchList = new ArrayList<>();
    Map<String, Object> patch = new HashMap<>();
    patch.put("op", "add");
    patch.put("path", "/project");
    patch.put("value", "metron");
    patchList.add(patch);

    PatchRequest pr = new PatchRequest();
    pr.setGuid("add_comment");
    pr.setIndex(SENSOR_NAME);
    pr.setSensorType(SENSOR_NAME);
    pr.setPatch(patchList);
    getDao().patch(getDao(), pr, Optional.of(new Date().getTime()));

    document.getDocument().put("project", "metron");
    findUpdatedDoc(document.getDocument(), "add_comment", SENSOR_NAME);
  }

  @Test
  @SuppressWarnings("unchecked")
  public void testRemoveComments() throws Exception {
    Map<String, Object> fields = new HashMap<>();
    fields.put("guid", "add_comment");
    fields.put("source.type", SENSOR_NAME);

    Document document = new Document(fields, "add_comment", SENSOR_NAME, 1526401584951L);
    getDao().update(document, Optional.of(SENSOR_NAME));
    findUpdatedDoc(document.getDocument(), "add_comment", SENSOR_NAME);

    addAlertComment("add_comment", "New Comment", "test_user", 1526401584951L);
    // Ensure we have the first comment
    ArrayList<AlertComment> comments = new ArrayList<>();
    comments.add(new AlertComment("New Comment", "test_user", 1526401584951L));
    document.getDocument().put(COMMENTS_FIELD, comments.stream().map(AlertComment::asMap).collect(
        Collectors.toList()));
    findUpdatedDoc(document.getDocument(), "add_comment", SENSOR_NAME);

    addAlertComment("add_comment", "New Comment 2", "test_user_2", 1526401584952L);
    // Ensure we have the second comment
    comments.add(new AlertComment("New Comment 2", "test_user_2", 1526401584952L));
    document.getDocument().put(COMMENTS_FIELD, comments.stream().map(AlertComment::asMap).collect(
        Collectors.toList()));
    findUpdatedDoc(document.getDocument(), "add_comment", SENSOR_NAME);

    removeAlertComment("add_comment", "New Comment 2", "test_user_2", 1526401584952L);
    // Ensure we only have the first comments
    comments = new ArrayList<>();
    comments.add(new AlertComment(commentOne));
    document.getDocument().put(COMMENTS_FIELD, comments.stream().map(AlertComment::asMap).collect(
        Collectors.toList()));
    findUpdatedDoc(document.getDocument(), "add_comment", SENSOR_NAME);

    removeAlertComment("add_comment", "New Comment", "test_user", 1526401584951L);
    // Ensure we have no comments
    document.getDocument().remove(COMMENTS_FIELD);
    findUpdatedDoc(document.getDocument(), "add_comment", SENSOR_NAME);
  }

  protected void addAlertComment(String guid, String comment, String username, long timestamp)
      throws IOException {
    CommentAddRemoveRequest request = buildAlertRequest(guid, comment, username, timestamp);
    getDao().addCommentToAlert(request);
  }

  protected void removeAlertComment(String guid, String comment, String username, long timestamp)
      throws IOException {
    CommentAddRemoveRequest request = buildAlertRequest(guid, comment, username, timestamp);
    getDao().removeCommentFromAlert(request);
  }

  private CommentAddRemoveRequest buildAlertRequest(String guid, String comment, String username,
      long timestamp) {
    CommentAddRemoveRequest request = new CommentAddRemoveRequest();
    request.setGuid(guid);
    request.setComment(comment);
    request.setUsername(username);
    request.setTimestamp(timestamp);
    request.setSensorType(SENSOR_NAME);
    return request;
  }

  protected void findUpdatedDoc(Map<String, Object> message0, String guid, String sensorType)
      throws InterruptedException, IOException, OriginalNotFoundException {
    for (int t = 0; t < MAX_RETRIES; ++t, Thread.sleep(SLEEP_MS)) {
      Document doc = getDao().getLatest(guid, sensorType);
      if (doc != null && message0.equals(doc.getDocument())) {
        return;
      }
      if (t == MAX_RETRIES -1) {
        MapUtils.debugPrint(System.out, "Expected", message0);
        MapUtils.debugPrint(System.out, "actual", doc.getDocument());
      }
    }
    throw new OriginalNotFoundException("Count not find " + guid + " after " + MAX_RETRIES + " tries");
  }

  protected IndexDao getDao() {
    return dao;
  }

  protected void setDao(MultiIndexDao dao) {
    this.dao = dao;
  }

  protected abstract String getIndexName();
  protected abstract MockHTable getMockHTable();
  protected abstract void addTestData(String indexName, String sensorType, List<Map<String,Object>> docs) throws Exception;
  protected abstract List<Map<String,Object>> getIndexedTestData(String indexName, String sensorType) throws Exception;
}


text:
from setuptools import setup

version = __import__('m2x_mqtt').version

LONG_DESCRIPTION = """
AT&T's M2X is a cloud-based fully managed data storage service for network
connected machine-to-machine (M2M) devices. python-m2x-mqtt is python client to
M2X MQTT API. API documentation at https://m2x.att.com/developer/documentation
"""

setup(
    name='m2x-mqtt',
    version=version,
    author='Citrusbyte',
    author_email='matia.saguirre@citrusbyte.com',
    description='M2X Python API client',
    license='BSD',
    keywords='m2x, mqtt, api',
    url='https://github.com/attm2x/m2x-python-mqtt',
    packages=[
        'm2x_mqtt',
        'm2x_mqtt.v2'
    ],
    long_description=LONG_DESCRIPTION,
    install_requires=[
        'iso8601==0.1.9',
        'paho-mqtt==1.0'
    ],
    classifiers=[
        'Development Status :: 4 - Beta',
        'Topic :: Internet',
        'License :: OSI Approved :: BSD License',
        'Intended Audience :: Developers',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3'
    ],
    zip_safe=False
)


text:
package com.drones.dimis.dronehud.common.otto.events;

import com.drones.dimis.dronehud.common.otto.base.BaseOttoDataEvent;
import com.o3dr.services.android.lib.drone.property.State;

public class VehicleStateEvent extends BaseOttoDataEvent<State> {
    @Override
    public Class<State> getDataClassType(){
        return State.class;
    }
}


text:
@interface LKBadgeView()
@property (nonatomic, copy) NSString* displayinText;
@property (nonatomic, assign) CGRect badgeFrame;
@end

@implementation LKBadgeView
@synthesize text = text_;
@synthesize textColor = textColor_;
@synthesize font = font_;
@synthesize badgeColor = badgeColor_;
@synthesize outlineColor;
@synthesize outlineWidth = outlineWidth_;
@synthesize outline = outline_;
@synthesize horizontalAlignment = horizontalAlignment_;
@synthesize widthMode = widthMode_;
@synthesize heightMode = heightMode_;
@synthesize displayinText;
@synthesize badgeFrame = badgeFrame_;
@synthesize shadow = shadow_;
@synthesize shadowOffset = shadowOffset_;
@synthesize shadowBlur = shadowBlur_;
@synthesize shadowColor = shadowColor_;
@synthesize shadowOfOutline = shadowOfOutline_;
@synthesize shadowOfText = shadowOfText_;
@synthesize textOffset = textOffset_;

#pragma mark - Privates

- (void)_setupBasics {
    self.backgroundColor = [UIColor clearColor];
    self.horizontalAlignment = LKBadgeViewHorizontalAlignmentCenter;
    self.widthMode = LKBadgeViewWidthModeStandard;
    self.heightMode = LKBadgeViewHeightModeStandard;
    self.text = nil;
    self.displayinText = nil;
    self.userInteractionEnabled = NO;

    self.shadowOffset = CGSizeMake(1.0, 1.0);
    self.shadowBlur = 2.0;
    self.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.5];
    self.font = [UIFont boldSystemFontOfSize:LK_BADGE_VIEW_FONT_SIZE];
    self.textOffset = CGSizeMake(0.0, 0.0);
}

- (void)_setupDefaultWithoutOutline {
    self.textColor = [UIColor whiteColor];
    self.badgeColor = [UIColor grayColor];

    outline_ = NO;
    outlineWidth_ = 2.0;
    self.outlineColor = [UIColor colorWithWhite:0.65 alpha:1.0];

    [self _setupBasics];
}

- (void)_setupDefaultWithOutline {
    self.textColor = [UIColor grayColor];
    self.badgeColor = [UIColor whiteColor];

    outline_ = YES;
    outlineWidth_ = 3.0;
    self.outlineColor = [UIColor colorWithWhite:0.65 alpha:1.0];

    [self _setupBasics];
}

- (void)_adjustBadgeFrameX {
    CGFloat realOutlineWith = outline_ ? outlineWidth_ : 0.0;
    switch (self.horizontalAlignment) {
        case LKBadgeViewHorizontalAlignmentLeft:
            badgeFrame_.origin.x = realOutlineWith;
            break;

        case LKBadgeViewHorizontalAlignmentCenter:
            badgeFrame_.origin.x = (self.bounds.size.width - badgeFrame_.size.width) / 2.0;
            break;

        case LKBadgeViewHorizontalAlignmentRight:
            badgeFrame_.origin.x = self.bounds.size.width - badgeFrame_.size.width - realOutlineWith;
            break;
    }
}

- (void)_adjustBadgeFrameWith {
    CGSize suffixSize = [LK_BADGE_VIEW_TRUNCATED_SUFFIX sizeWithFont:self.font];

    CGFloat paddinWidth = LK_BADGE_VIEW_HORIZONTAL_PADDING*2;
    CGSize size = [self.displayinText sizeWithFont:self.font];
    badgeFrame_.size.width = size.width + paddinWidth;

    if (badgeFrame_.size.width > self.bounds.size.width) {

        while (1) {
            size = [self.displayinText sizeWithFont:self.font];
            badgeFrame_.size.width = size.width + paddinWidth;
            if (badgeFrame_.size.width+suffixSize.width > self.bounds.size.width) {
                if ([self.displayinText length] > 1) {
                    self.displayinText = [self.displayinText substringToIndex:[self.displayinText length]-2];
                } else {
                    self.displayinText = @" ";
                    break;
                }
            } else {
                self.displayinText = [self.displayinText stringByAppendingString:LK_BADGE_VIEW_TRUNCATED_SUFFIX];
                badgeFrame_.size.width += suffixSize.width;
                break;
            }
        }
    }
    if (self.widthMode == LKBadgeViewWidthModeStandard) {
        if (badgeFrame_.size.width < LK_BADGE_VIEw_STANDARD_WIDTH) {
            badgeFrame_.size.width = LK_BADGE_VIEw_STANDARD_WIDTH;
        }
    }
}

- (void)_adjustBadgeFrame {
    badgeFrame_.size.height = [self badgeHeight];

    if (self.displayinText == nil || [self.displayinText length] == 0) {
        badgeFrame_.size.width = LK_BADGE_VIEW_MINUM_WIDTH;
    } else {
        [self _adjustBadgeFrameWith];
    }
    badgeFrame_.origin.y = (self.bounds.size.height - badgeFrame_.size.height) / 2.0;

    [self _adjustBadgeFrameX];
}

#pragma mark - Basics

- (id)init {
    self = [super init];
    if (self) {
        [self _setupDefaultWithoutOutline];
    }
    return self;
}

- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self _setupDefaultWithoutOutline];
    }
    return self;
}

- (id)initWithCoder:(NSCoder *)coder {
    self = [super initWithCoder:coder];
    if (self) {
        [self _setupDefaultWithoutOutline];
    }
    return self;
}
- (void)dealloc {
    self.badgeColor = nil;
}

#pragma mark - Overrides

- (void)drawRect:(CGRect)rect {
    if (self.displayinText == nil || [self.displayinText length] == 0) {
        return;
    }

    // draw badge
    UIBezierPath* outlinePath = [UIBezierPath bezierPath];

    CGSize size = badgeFrame_.size;
    CGFloat unit = size.height/2.0;

    CGPoint bp = badgeFrame_.origin;

    CGPoint c1 = CGPointMake(bp.x + unit, bp.y);
    [outlinePath moveToPoint:c1];
    c1.y +=unit;
    [outlinePath addArcWithCenter:c1
                           radius:unit
                       startAngle:3*M_PI/2 endAngle:M_PI/2
                        clockwise:NO];

    [outlinePath addLineToPoint:CGPointMake(bp.x + size.width - unit,
                                            bp.y + size.height)];

    CGPoint c2 = CGPointMake(bp.x + size.width - unit, bp.y + unit);
    [outlinePath addArcWithCenter:c2
                           radius:unit
                       startAngle:M_PI/2 endAngle:-M_PI/2
                        clockwise:NO];

    [outlinePath addLineToPoint:CGPointMake(bp.x + unit, bp.y)];

    [self.outlineColor setStroke];
    [self.badgeColor setFill];

    CGContextRef context = UIGraphicsGetCurrentContext();

    if (self.shadow) {
        CGContextSaveGState(context);
        CGContextSetShadowWithColor(context, self.shadowOffset, self.shadowBlur, self.shadowColor.CGColor);
        [outlinePath fill];
        CGContextRestoreGState(context);
    } else {
        [outlinePath fill];
    }

    if (outline_) {
        [outlinePath setLineWidth:outlineWidth_];

        if (self.shadowOfOutline) {
            CGContextSaveGState(context);
            CGContextSetShadowWithColor(context, self.shadowOffset, self.shadowBlur, self.shadowColor.CGColor);
            [outlinePath stroke];
            CGContextRestoreGState(context);
        } else {
            [outlinePath stroke];
        }
    }

    // draw text
    if (self.text != nil || [self.text length] > 0) {
        [self.textColor setFill];
        CGSize size = [self.displayinText sizeWithFont:self.font];
        CGPoint p = CGPointMake(bp.x + (badgeFrame_.size.width - size.width)/2.0 + textOffset_.width,
                                bp.y + (badgeFrame_.size.height - size.height)/2.0 + textOffset_.height);

        if (self.shadowOfText) {
            CGContextSaveGState(context);
            CGContextSetShadowWithColor(context, self.shadowOffset, self.shadowBlur, self.shadowColor.CGColor);
            [self.displayinText drawAtPoint:p withFont:self.font];
            CGContextRestoreGState(context);
        } else {
            [self.displayinText drawAtPoint:p withFont:self.font];
        }
    }

}

- (void)setFrame:(CGRect)frame {
    [super setFrame:frame];
    [self _adjustBadgeFrame];
}

#pragma mark - Properties

- (void)setText:(NSString *)text {
    text_ = text;

    self.displayinText = text;

    [self _adjustBadgeFrame];
    [self setNeedsDisplay];
}

- (void)setHorizontalAlignment:(LKBadgeViewHorizontalAlignment)horizontalAlignment {
    horizontalAlignment_ = horizontalAlignment;
    [self _adjustBadgeFrameX];
    [self setNeedsDisplay];
}

- (void)setWidthMode:(LKBadgeViewWidthMode)widthMode {
    widthMode_ = widthMode;
    [self _adjustBadgeFrameWith];
    [self setNeedsDisplay];
}

- (void)setOutlineWidth:(CGFloat)outlineWidth {
    outlineWidth_ = outlineWidth;
    [self _adjustBadgeFrame];
    [self setNeedsDisplay];
}

- (void)setOutline:(BOOL)outline {
    outline_ = outline;
    [self setNeedsDisplay];
}

- (void)setShadow:(BOOL)shadow {
    shadow_ = shadow;
    [self setNeedsDisplay];
}

- (void)setShadowOfOutline:(BOOL)shadowOfOutline {
    shadowOfOutline_ = shadowOfOutline;
    [self setNeedsDisplay];
}

- (void)setShadowOfText:(BOOL)shadowOfText {
    shadowOfText_ = shadowOfText;
    [self setNeedsDisplay];
}

- (void)setBadgeColor:(UIColor *)badgeColor {
    badgeColor_ = badgeColor;

    [self setNeedsDisplay];
}

- (void)setTextColor:(UIColor *)textColor {
    textColor_ = textColor;

    [self setNeedsDisplay];
}

- (void)setFont:(UIFont *)font {
    font_ = font;

    [self _adjustBadgeFrame];
    [self setNeedsDisplay];
}

#pragma mark - API (@depricated)

+ (CGFloat)badgeHeight {
    return LK_BADGE_VIEW_STANDARD_HEIGHT;
}

- (CGFloat)badgeHeight {
    CGFloat height;
    switch (self.heightMode) {
        case LKBadgeViewHeightModeStandard:
            height = LK_BADGE_VIEW_STANDARD_HEIGHT;
            break;

        case LKBadgeViewHeightModeLarge:
            height = LK_BADGE_VIEW_LARGE_HEIGHT;
            break;

        default:
            break;
    }
    return height;
}

@end


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
J. Linn. Soc. , Bot. 10(no. 45): 283 (1868)

#### Original name
Agaricus sordescens Berk. & M.A. Curtis

### Remarks
null


text:
package   com.lite.android.launcher3;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;
import android.view.ViewGroup;

public class ClickShadowView extends View {

    private static final int SHADOW_SIZE_FACTOR = 3;
    private static final int SHADOW_LOW_ALPHA = 30;
    private static final int SHADOW_HIGH_ALPHA = 60;

    private final Paint mPaint;

    private final float mShadowOffset;
    private final float mShadowPadding;

    private Bitmap mBitmap;

    public ClickShadowView(Context context) {
        super(context);
        mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
        mPaint.setColor(Color.BLACK);

        mShadowPadding = getResources().getDimension(R.dimen.blur_size_click_shadow);
        mShadowOffset = getResources().getDimension(R.dimen.click_shadow_high_shift);
    }

    /**
     * @return extra space required by the view to show the shadow.
     */
    public int getExtraSize() {
        return (int) (SHADOW_SIZE_FACTOR * mShadowPadding);
    }

    /**
     * Applies the new bitmap.
     * @return true if the view was invalidated.
     */
    public boolean setBitmap(Bitmap b) {
        if (b != mBitmap){
            mBitmap = b;
            invalidate();
            return true;
        }
        return false;
    }

    @Override
    protected void onDraw(Canvas canvas) {
        if (mBitmap != null) {
            mPaint.setAlpha(SHADOW_LOW_ALPHA);
            canvas.drawBitmap(mBitmap, 0, 0, mPaint);
            mPaint.setAlpha(SHADOW_HIGH_ALPHA);
            canvas.drawBitmap(mBitmap, 0, mShadowOffset, mPaint);
        }
    }

    public void animateShadow() {
        setAlpha(0);
        animate().alpha(1)
            .setDuration(FastBitmapDrawable.CLICK_FEEDBACK_DURATION)
            .setInterpolator(FastBitmapDrawable.CLICK_FEEDBACK_INTERPOLATOR)
            .start();
    }

    /**
     * Aligns the shadow with {@param view}
     * @param viewParent immediate parent of {@param view}. It must be a sibling of this view.
     */
    public void alignWithIconView(BubbleTextView view, ViewGroup viewParent) {
        float leftShift = view.getLeft() + viewParent.getLeft() - getLeft();
        float topShift = view.getTop() + viewParent.getTop() - getTop();
        int iconWidth = view.getRight() - view.getLeft();
        int iconHSpace = iconWidth - view.getCompoundPaddingRight() - view.getCompoundPaddingLeft();
        float drawableWidth = view.getIcon().getBounds().width();

        setTranslationX(leftShift
                + viewParent.getTranslationX()
                + view.getCompoundPaddingLeft() * view.getScaleX()
                + (iconHSpace - drawableWidth) * view.getScaleX() / 2  /* drawable gap */
                + iconWidth * (1 - view.getScaleX()) / 2  /* gap due to scale */
                - mShadowPadding  /* extra shadow size */
                );
        setTranslationY(topShift
                + viewParent.getTranslationY()
                + view.getPaddingTop() * view.getScaleY()  /* drawable gap */
                + view.getHeight() * (1 - view.getScaleY()) / 2  /* gap due to scale */
                - mShadowPadding  /* extra shadow size */
                );
    }
}


text:
import logging
import json

from django.utils.translation import ugettext as _
from django.views.decorators.http import require_POST

from desktop.lib.django_util import JsonResponse
from desktop.lib.i18n import force_unicode

from metadata.workload_analytics_client import WorkfloadAnalyticsClient

LOG = logging.getLogger(__name__)

def error_handler(view_fn):
  def decorator(*args, **kwargs):
    try:
      return view_fn(*args, **kwargs)
    except Exception, e:
      LOG.exception(e)
      response = {
        'status': -1,
        'message': force_unicode(e)
      }
    return JsonResponse(response, status=500)
  return decorator

@require_POST
@error_handler
def get_operation_execution_details(request):
  response = {'status': -1}

  operation_id = json.loads(request.POST.get('operation_id'))

  client = WorkfloadAnalyticsClient(request.user)
  data = client.get_operation_execution_details(operation_id=operation_id)

  if data:
    response['status'] = 0
    response['data'] = data
  else:
    response['message'] = 'Workload Analytics: %s' % data['details']

  return JsonResponse(response)


text:
layout: post
title: Refund
categories: FREE
tags: халява интернет
img: https://img.tglab.uz/129366914/15157849675a590b07b41dc.jpg
---

Что такое Refund или бесплатный шопинг

Рефанд (англ. refund) - добровольный возврат торговой точкой покупателю платежа, произведенного им ранее по карте в счет покупки. Осуществляется по просьбе покупателя.

Если объяснять простым языком, то вы заказываете товар в интернет магазине, ждете момента его получения. Желательно обращаться к специалисту по возврату средств, чем пытаться сделать это лично, иначе шанс что вам вернут деньги очень мал. За работу они берут не больше 15% от суммы, после успешного возврата средств. Найти этих специалистов можно на теневых рынках, так же можете обратиться ко мне в лс Musalini

Что бы глупых вопросов не возникало сразу говорю: Да, сначала вы оплачиваете все покупки со своего кармана, но при грамотном подходе они вернутся к вам на карту в течение недели! Придерживайтесь моих советов, и все пройдет гладко.

Самые актуальные магазины на мой взгляд, которые проходят на УРА на момент написания статьи:

Apple.com - до 5000$. Условия по оф. сайту Apple - адреса посреднических компаний для заказа не подойдут. Ни при каких обстоятельствах. Только кристально чистые Американские/Канадские адреса. Никуда кроме Америки и Канады не отправляют. Строго одна вещь в заказе. Строго до 5000$. Макбуки, Айфоны, Аймаки и остальные прелести жизни. Стафф не вскрывается и, разумеется, не включается до получения возврата. Расписываться за получение посылки можно, но не ставить Pre-Sign (кнопка в письме от Apple на почту об успешной отправке вашего девайса)!

Магазины одежды:

ASOS.com - до 50000₽

Victoriassecret.com - до 500$

Abercrombie.com - до 400$

С них можно смело отправлять в РУ на свой адрес, друга, подруги и т.п. Главное не бейте одни и те же адреса больше 1 посылки.

Ну и самое ходовое в этом деле, это конечно же Амазон, на данный момент лучше всех проходит Франция и Италия:

Во франции (amazon.fr) подходящие для возврата товары выглядят так:

Expédié et vendu par Amazon. - подходит

Vendu par (название магазина) et expédié par Amazon. - подходит

Expédié et vendu par (название магазина). - не подходит

В Италии (amazon.it) подходящие для возврата товары выглядят вот так:

Venduto e spedito da Amazon. - подходит

Venduto da (название магазина) e spedito da Amazon. - подходит

Venduto e spedito da (название магазина). - не подходит

Дабы облегчить поиск товаров, подходящих для возврата, после ввода интересующего названия в строку поиска в амазоне, в менюшке слева нажимаем на голубую иконку с желтой галочкой - Prime

На amazon.fr она пишется немного иначе - Premium

В этом случае, в результатах поиска должно сократиться количество товаров, и останутся преимущественно только те, что подходят для возврата

Так же советую поставить выбор по марке производителя, например, если ищем айфон - ставим бренд Apple. Для того, чтобы в результаты поиска не лезли всякие чехлы, шнурки и остальные ненужные аксессуары

Теперь хочу поделиться своим мнением, какие нюансы нужно учесть при оформлении вашего заказа на амазоне, которые должны уменьшить вероятность холда!

Заходим на сайт амазона, щелкаем товары. Спустя минут 20-30, регистрируемся (вводим имейл, имя на аккаунте, и дважды повторяем пароль). Оставляем аккаунт на некоторое время в покое, затем возвращаемся на амазон и продолжаем активность! Перед вашим возвращением, не забудьте еще раз залогиниться в аккаунт, если вас из него выбило. Добавляем что-то в корзину, создаём виш-лист (список желаний) и добавляем товары в него. Откладываем товары из корзины на потом. Вообщем, создаем видимость активного поиска и выбора товара.

Если аккаунт регистрировали, к примеру утром, вечером вводим адрес доставки в настройках аккаунта. Если регистрировали вечером, вводим адрес доставки на след. день

Вообщем, поддерживать эту активность я бы посоветовал в течение пары дней.

Обязательно всегда следите за тем, что вы находитесь в аккаунте. Проверить это можно путем перехода в аккаунт, и, например, в графу изменения адреса или проверки гифт-баланса. При таких перемещениях всегда попросит повторно залогиниться в систему, если вы не залогинены

После грамотного прогрева аккаунта в течение 2-3 дней описанными выше методами, в конце-концов убираем из корзины все ненужное, и приступаем к оформлению товара!

Всегда выбирайте экспресс доставку, чем быстрее товар доберется до вас или посредника, тем быстрее вы вернете свои деньги!

Всем удачных покупок!


text:
.class final Lcom/android/server/hdmi/NewDeviceAction;
.super Lcom/android/server/hdmi/HdmiCecFeatureAction;
.source "NewDeviceAction.java"

# static fields
.field static final STATE_WAITING_FOR_DEVICE_VENDOR_ID:I = 0x2

.field static final STATE_WAITING_FOR_SET_OSD_NAME:I = 0x1

.field private static final TAG:Ljava/lang/String; = "NewDeviceAction"

# instance fields
.field private final mDeviceLogicalAddress:I

.field private final mDevicePhysicalAddress:I

.field private final mDeviceType:I

.field private mDisplayName:Ljava/lang/String;

.field private mTimeoutRetry:I

.field private mVendorId:I

# direct methods
.method constructor <init>(Lcom/android/server/hdmi/HdmiCecLocalDevice;III)V
    .locals 1
    .param p1, "source"    # Lcom/android/server/hdmi/HdmiCecLocalDevice;
    .param p2, "deviceLogicalAddress"    # I
    .param p3, "devicePhysicalAddress"    # I
    .param p4, "deviceType"    # I

    .prologue
    .line 66
    invoke-direct {p0, p1}, Lcom/android/server/hdmi/HdmiCecFeatureAction;-><init>(Lcom/android/server/hdmi/HdmiCecLocalDevice;)V

    .line 67
    iput p2, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    .line 68
    iput p3, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDevicePhysicalAddress:I

    .line 69
    iput p4, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceType:I

    .line 70
    const v0, 0xffffff

    iput v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mVendorId:I

    .line 71
    return-void
.end method

.method private addDeviceInfo()V
    .locals 7

    .prologue
    .line 167
    invoke-virtual {p0}, Lcom/android/server/hdmi/NewDeviceAction;->tv()Lcom/android/server/hdmi/HdmiCecLocalDeviceTv;

    move-result-object v1

    iget v2, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    iget v3, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDevicePhysicalAddress:I

    invoke-virtual {v1, v2, v3}, Lcom/android/server/hdmi/HdmiCecLocalDeviceTv;->isInDeviceList(II)Z

    move-result v1

    if-nez v1, :cond_1

    .line 168
    const-string v1, "NewDeviceAction"

    const-string v2, "Device not found (%02x, %04x)"

    const/4 v3, 0x2

    new-array v3, v3, [Ljava/lang/Object;

    const/4 v4, 0x0

    iget v5, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    aput-object v5, v3, v4

    const/4 v4, 0x1

    iget v5, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDevicePhysicalAddress:I

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    aput-object v5, v3, v4

    invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 188
    :cond_0
    :goto_0
    return-void

    .line 172
    :cond_1
    iget-object v1, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDisplayName:Ljava/lang/String;

    if-nez v1, :cond_2

    .line 173
    iget v1, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    invoke-static {v1}, Lcom/android/server/hdmi/HdmiUtils;->getDefaultDeviceName(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDisplayName:Ljava/lang/String;

    .line 175
    :cond_2
    new-instance v0, Landroid/hardware/hdmi/HdmiDeviceInfo;

    iget v1, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    iget v2, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDevicePhysicalAddress:I

    invoke-virtual {p0}, Lcom/android/server/hdmi/NewDeviceAction;->tv()Lcom/android/server/hdmi/HdmiCecLocalDeviceTv;

    move-result-object v3

    iget v4, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDevicePhysicalAddress:I

    invoke-virtual {v3, v4}, Lcom/android/server/hdmi/HdmiCecLocalDeviceTv;->getPortId(I)I

    move-result v3

    iget v4, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceType:I

    iget v5, p0, Lcom/android/server/hdmi/NewDeviceAction;->mVendorId:I

    iget-object v6, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDisplayName:Ljava/lang/String;

    invoke-direct/range {v0 .. v6}, Landroid/hardware/hdmi/HdmiDeviceInfo;-><init>(IIIIILjava/lang/String;)V

    .line 179
    .local v0, "deviceInfo":Landroid/hardware/hdmi/HdmiDeviceInfo;
    invoke-virtual {p0}, Lcom/android/server/hdmi/NewDeviceAction;->tv()Lcom/android/server/hdmi/HdmiCecLocalDeviceTv;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/android/server/hdmi/HdmiCecLocalDeviceTv;->addCecDevice(Landroid/hardware/hdmi/HdmiDeviceInfo;)V

    .line 182
    invoke-virtual {p0}, Lcom/android/server/hdmi/NewDeviceAction;->tv()Lcom/android/server/hdmi/HdmiCecLocalDeviceTv;

    move-result-object v1

    iget v2, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    invoke-virtual {v1, v2}, Lcom/android/server/hdmi/HdmiCecLocalDeviceTv;->processDelayedMessages(I)V

    .line 184
    iget v1, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    invoke-static {v1}, Lcom/android/server/hdmi/HdmiUtils;->getTypeFromAddress(I)I

    move-result v1

    const/4 v2, 0x5

    if-ne v1, v2, :cond_0

    .line 186
    invoke-virtual {p0}, Lcom/android/server/hdmi/NewDeviceAction;->tv()Lcom/android/server/hdmi/HdmiCecLocalDeviceTv;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/android/server/hdmi/HdmiCecLocalDeviceTv;->onNewAvrAdded(Landroid/hardware/hdmi/HdmiDeviceInfo;)V

    goto :goto_0
.end method

.method private mayProcessCommandIfCached(II)Z
    .locals 2
    .param p1, "destAddress"    # I
    .param p2, "opcode"    # I

    .prologue
    .line 142
    invoke-virtual {p0}, Lcom/android/server/hdmi/NewDeviceAction;->getCecMessageCache()Lcom/android/server/hdmi/HdmiCecMessageCache;

    move-result-object v1

    invoke-virtual {v1, p1, p2}, Lcom/android/server/hdmi/HdmiCecMessageCache;->getMessage(II)Lcom/android/server/hdmi/HdmiCecMessage;

    move-result-object v0

    .line 143
    .local v0, "message":Lcom/android/server/hdmi/HdmiCecMessage;
    if-eqz v0, :cond_0

    .line 144
    invoke-virtual {p0, v0}, Lcom/android/server/hdmi/NewDeviceAction;->processCommand(Lcom/android/server/hdmi/HdmiCecMessage;)Z

    move-result v1

    .line 146
    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method

.method private requestOsdName(Z)V
    .locals 2
    .param p1, "firstTry"    # Z

    .prologue
    .line 80
    if-eqz p1, :cond_0

    .line 81
    const/4 v0, 0x0

    iput v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mTimeoutRetry:I

    .line 83
    :cond_0
    const/4 v0, 0x1

    iput v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mState:I

    .line 84
    iget v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    const/16 v1, 0x47

    invoke-direct {p0, v0, v1}, Lcom/android/server/hdmi/NewDeviceAction;->mayProcessCommandIfCached(II)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 91
    :goto_0
    return-void

    .line 88
    :cond_1
    invoke-virtual {p0}, Lcom/android/server/hdmi/NewDeviceAction;->getSourceAddress()I

    move-result v0

    iget v1, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    invoke-static {v0, v1}, Lcom/android/server/hdmi/HdmiCecMessageBuilder;->buildGiveOsdNameCommand(II)Lcom/android/server/hdmi/HdmiCecMessage;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/android/server/hdmi/NewDeviceAction;->sendCommand(Lcom/android/server/hdmi/HdmiCecMessage;)V

    .line 90
    iget v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mState:I

    const/16 v1, 0x7d0

    invoke-virtual {p0, v0, v1}, Lcom/android/server/hdmi/NewDeviceAction;->addTimer(II)V

    goto :goto_0
.end method

.method private requestVendorId(Z)V
    .locals 2
    .param p1, "firstTry"    # Z

    .prologue
    .line 150
    if-eqz p1, :cond_0

    .line 151
    const/4 v0, 0x0

    iput v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mTimeoutRetry:I

    .line 154
    :cond_0
    const/4 v0, 0x2

    iput v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mState:I

    .line 156
    iget v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    const/16 v1, 0x87

    invoke-direct {p0, v0, v1}, Lcom/android/server/hdmi/NewDeviceAction;->mayProcessCommandIfCached(II)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 163
    :goto_0
    return-void

    .line 160
    :cond_1
    invoke-virtual {p0}, Lcom/android/server/hdmi/NewDeviceAction;->getSourceAddress()I

    move-result v0

    iget v1, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    invoke-static {v0, v1}, Lcom/android/server/hdmi/HdmiCecMessageBuilder;->buildGiveDeviceVendorIdCommand(II)Lcom/android/server/hdmi/HdmiCecMessage;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/android/server/hdmi/NewDeviceAction;->sendCommand(Lcom/android/server/hdmi/HdmiCecMessage;)V

    .line 162
    iget v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mState:I

    const/16 v1, 0x7d0

    invoke-virtual {p0, v0, v1}, Lcom/android/server/hdmi/NewDeviceAction;->addTimer(II)V

    goto :goto_0
.end method

# virtual methods
.method public handleTimerEvent(I)V
    .locals 4
    .param p1, "state"    # I

    .prologue
    const/4 v3, 0x5

    const/4 v2, 0x1

    const/4 v1, 0x0

    .line 192
    iget v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mState:I

    if-eqz v0, :cond_0

    iget v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mState:I

    if-eq v0, p1, :cond_1

    .line 211
    :cond_0
    :goto_0
    return-void

    .line 195
    :cond_1
    if-ne p1, v2, :cond_3

    .line 196
    iget v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mTimeoutRetry:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mTimeoutRetry:I

    if-ge v0, v3, :cond_2

    .line 197
    invoke-direct {p0, v1}, Lcom/android/server/hdmi/NewDeviceAction;->requestOsdName(Z)V

    goto :goto_0

    .line 201
    :cond_2
    invoke-direct {p0, v2}, Lcom/android/server/hdmi/NewDeviceAction;->requestVendorId(Z)V

    goto :goto_0

    .line 202
    :cond_3
    const/4 v0, 0x2

    if-ne p1, v0, :cond_0

    .line 203
    iget v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mTimeoutRetry:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mTimeoutRetry:I

    if-ge v0, v3, :cond_4

    .line 204
    invoke-direct {p0, v1}, Lcom/android/server/hdmi/NewDeviceAction;->requestVendorId(Z)V

    goto :goto_0

    .line 208
    :cond_4
    invoke-direct {p0}, Lcom/android/server/hdmi/NewDeviceAction;->addDeviceInfo()V

    .line 209
    invoke-virtual {p0}, Lcom/android/server/hdmi/NewDeviceAction;->finish()V

    goto :goto_0
.end method

.method isActionOf(Lcom/android/server/hdmi/HdmiCecLocalDevice$ActiveSource;)Z
    .locals 2
    .param p1, "activeSource"    # Lcom/android/server/hdmi/HdmiCecLocalDevice$ActiveSource;

    .prologue
    .line 214
    iget v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    iget v1, p1, Lcom/android/server/hdmi/HdmiCecLocalDevice$ActiveSource;->logicalAddress:I

    if-ne v0, v1, :cond_0

    iget v0, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDevicePhysicalAddress:I

    iget v1, p1, Lcom/android/server/hdmi/HdmiCecLocalDevice$ActiveSource;->physicalAddress:I

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public processCommand(Lcom/android/server/hdmi/HdmiCecMessage;)Z
    .locals 9
    .param p1, "cmd"    # Lcom/android/server/hdmi/HdmiCecMessage;

    .prologue
    const/4 v5, 0x0

    const/4 v6, 0x1

    .line 99
    invoke-virtual {p1}, Lcom/android/server/hdmi/HdmiCecMessage;->getOpcode()I

    move-result v1

    .line 100
    .local v1, "opcode":I
    invoke-virtual {p1}, Lcom/android/server/hdmi/HdmiCecMessage;->getSource()I

    move-result v4

    .line 101
    .local v4, "src":I
    invoke-virtual {p1}, Lcom/android/server/hdmi/HdmiCecMessage;->getParams()[B

    move-result-object v2

    .line 103
    .local v2, "params":[B
    iget v7, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDeviceLogicalAddress:I

    if-eq v7, v4, :cond_1

    .line 138
    :cond_0
    :goto_0
    return v5

    .line 107
    :cond_1
    iget v7, p0, Lcom/android/server/hdmi/NewDeviceAction;->mState:I

    if-ne v7, v6, :cond_3

    .line 108
    const/16 v7, 0x47

    if-ne v1, v7, :cond_2

    .line 110
    :try_start_0
    new-instance v5, Ljava/lang/String;

    const-string v7, "US-ASCII"

    invoke-direct {v5, v2, v7}, Ljava/lang/String;-><init>([BLjava/lang/String;)V

    iput-object v5, p0, Lcom/android/server/hdmi/NewDeviceAction;->mDisplayName:Ljava/lang/String;
    :try_end_0
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_0} :catch_0

    .line 114
    :goto_1
    invoke-direct {p0, v6}, Lcom/android/server/hdmi/NewDeviceAction;->requestVendorId(Z)V

    move v5, v6

    .line 115
    goto :goto_0

    .line 111
    :catch_0
    move-exception v0

    .line 112
    .local v0, "e":Ljava/io/UnsupportedEncodingException;
    const-string v5, "NewDeviceAction"

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    const-string v8, "Failed to get OSD name: "

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v0}, Ljava/io/UnsupportedEncodingException;->getMessage()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v5, v7}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1

    .line 116
    .end local v0    # "e":Ljava/io/UnsupportedEncodingException;
    :cond_2
    if-nez v1, :cond_0

    .line 117
    aget-byte v7, v2, v5

    and-int/lit16 v3, v7, 0xff

    .line 118
    .local v3, "requestOpcode":I
    const/16 v7, 0x46

    if-ne v3, v7, :cond_0

    .line 119
    invoke-direct {p0, v6}, Lcom/android/server/hdmi/NewDeviceAction;->requestVendorId(Z)V

    move v5, v6

    .line 120
    goto :goto_0

    .line 123
    .end local v3    # "requestOpcode":I
    :cond_3
    iget v7, p0, Lcom/android/server/hdmi/NewDeviceAction;->mState:I

    const/4 v8, 0x2

    if-ne v7, v8, :cond_0

    .line 124
    const/16 v7, 0x87

    if-ne v1, v7, :cond_4

    .line 125
    invoke-static {v2}, Lcom/android/server/hdmi/HdmiUtils;->threeBytesToInt([B)I

    move-result v5

    iput v5, p0, Lcom/android/server/hdmi/NewDeviceAction;->mVendorId:I

    .line 126
    invoke-direct {p0}, Lcom/android/server/hdmi/NewDeviceAction;->addDeviceInfo()V

    .line 127
    invoke-virtual {p0}, Lcom/android/server/hdmi/NewDeviceAction;->finish()V

    move v5, v6

    .line 128
    goto :goto_0

    .line 129
    :cond_4
    if-nez v1, :cond_0

    .line 130
    aget-byte v7, v2, v5

    and-int/lit16 v3, v7, 0xff

    .line 131
    .restart local v3    # "requestOpcode":I
    const/16 v7, 0x8c

    if-ne v3, v7, :cond_0

    .line 132
    invoke-direct {p0}, Lcom/android/server/hdmi/NewDeviceAction;->addDeviceInfo()V

    .line 133
    invoke-virtual {p0}, Lcom/android/server/hdmi/NewDeviceAction;->finish()V

    move v5, v6

    .line 134
    goto :goto_0
.end method

.method public start()Z
    .locals 1

    .prologue
    const/4 v0, 0x1

    .line 75
    invoke-direct {p0, v0}, Lcom/android/server/hdmi/NewDeviceAction;->requestOsdName(Z)V

    .line 76
    return v0
.end method


text:
"""Illustrates how to perform asynchronous requests using the MutateJobService.

The LoadFromStorage method is pulling credentials and properties from a
"googleads.yaml" file. By default, it looks for this file in your home
directory. For more information, see the "Caching authentication information"
section of our README.

"""

import random
import re
import time

from googleads import adwords
from googleads import errors

RETRY_INTERVAL = 10
RETRIES_COUNT = 30
PLACEMENT_NUMBER = 100
INDEX_REGEX = r'operations\[(\d+)\].operand'

AD_GROUP_ID = 'INSERT_AD_GROUP_ID_HERE'

def main(client, ad_group_id):
  # Initialize appropriate service.
  mutate_job_service = client.GetService('MutateJobService', version='v201409')

  # Create list of all operations for the job.
  operations = []

    # Create AdGroupCriterionOperations to add placements.
  for i in range(PLACEMENT_NUMBER):
    url = 'www.example.com/mars%d' % i
    if random.randint(1, 10) == 1:
      url = 'NOT_@_URL'
    operations.append({
        'xsi_type': 'AdGroupCriterionOperation',
        'operator': 'ADD',
        'operand': {
            'xsi_type': 'BiddableAdGroupCriterion',
            'adGroupId': ad_group_id,
            'criterion': {
                'xsi_type': 'Placement',
                'url': url
            }
        }
    })

  # You can specify up to 3 job IDs that must successfully complete before
  # this job can be processed.
  policy = {
      'prerequisiteJobIds': []
  }

  # Call mutate to create a new job.
  response = mutate_job_service.mutate(operations, policy)

  if not response:
    raise errors.GoogleAdsError('Failed to submit a job; aborting.')

  job_id = response['id']
  print 'Job with ID %s was successfully created.' % job_id

  # Create selector to retrieve job status and wait for it to complete.
  selector = {
      'xsi_type': 'BulkMutateJobSelector',
      'jobIds': [job_id]
  }

  time.sleep(RETRY_INTERVAL)
  # Poll for job status until it's finished.
  print 'Retrieving job status...'
  for i in range(RETRIES_COUNT):
    job_status_response = mutate_job_service.get(selector)
    status = job_status_response[0]['status']
    if status in ('COMPLETED', 'FAILED'):
      break
    print ('[%d] Current status is \'%s\', waiting %d seconds to retry...' %
           (i, status, RETRY_INTERVAL))
    time.sleep(RETRY_INTERVAL)

  if status == 'FAILED':
    raise errors.GoogleAdsError('Job failed with reason: \'%s\'' %
                                job_status_response[0]['failure_reason'])
  if status in ('PROCESSING', 'PENDING'):
    raise errors.GoogleAdsError('Job did not complete within %d seconds' %
                                (RETRY_INTERVAL * (RETRIES_COUNT - 1)))

  # Status must be COMPLETED.
  # Get the job result. Here we re-use the same selector.
  result_response = mutate_job_service.getResult(selector)

  # Output results.
  index = 0
  for result in result_response['SimpleMutateResult']['results']:
    if 'PlaceHolder' in result:
      print 'Operation [%d] - FAILED' % index
    else:
      print 'Operation [%d] - SUCCEEDED' % index
    index += 1

  # Output errors
  for error in result_response['SimpleMutateResult']['errors']:
    index = int(re.search(INDEX_REGEX, error['fieldPath']).group(1))
    reason = error['reason']
    url = operations[index]['operand']['criterion']['url']
    print ('ERROR - placement \'%s\' failed due to \'%s\'' %
           (url, reason))

if __name__ == '__main__':
  # Initialize client object.
  adwords_client = adwords.AdWordsClient.LoadFromStorage()

  main(adwords_client, AD_GROUP_ID)


text:
var Tapestry = {
    on: function(target, type, listener){
        if(target.length > 1){

            for (var i = 0; i < target.length; i++) {
                Tapestry._on(target[i], type, listener);
            }
        }else{
            Tapestry._on(target, type, listener);
        }
    },

    _on: function(target, type, listener){
        if ("addEventListener" in window) {
            target.addEventListener(type, listener, false);
        }
        else {
            target.attachEvent("on" + type, function(){
                listener(window.event);
            });
        }
    },

    hasClass: function(target, className){
        var classes = target.className.split(' ');
        for(var i = 0; i < classes.length; i++){
            if(classes[i] == className){return true;}
        }
        return false;
    },

    addClass: function(target, className){
        if(!target){return;}
        if(!className){return;}
        if(!target.className){return;}
        var classes = target.className;
        classes += (classes != '' ? ' ' : '') + className;
        target.className = classes.replace(new RegExp('  '), ' ');
    },

    removeClass: function(target, className){
        if(!target){return;}
        if(!className){return;}
        if(!target.className){return;}
        var classes = target.className.replace(new RegExp(className), '').replace(new RegExp('  '), ' ');

        target.className = classes;
    },

    getChildrenByTagName: function(target, tagname){
        var elem = target.firstChild;
        var children = [];
        while (elem != null) {
            if(elem.tagName){
                if (elem.tagName.toLowerCase() == tagname.toLowerCase()) {
                    children.push(elem);
                }
            }

            elem = elem.nextSibling;
        }
        return children;
    }
};

Tapestry.menu = {
    _clickTimer:null,

    click: function(){
        var p = this;
        if(Tapestry.menu._clickTimer != null){return false;}
        Tapestry.menu._clickTimer = setTimeout(function(){Tapestry.menu._clickTimer = null;}, 100);
        if(p){
            var submenu = p.querySelector('ul.menu');
            if(submenu){
                if(Tapestry.hasClass(submenu, 'expanded') == true){
                    Tapestry.menu.collapse(submenu);
                    return false;
                }
            }
        }
        Tapestry.menu.expand(submenu);
        return false;
    },

    expand: function(submenu){
        Tapestry.addClass(submenu, 'expanded');
    },

    collapse: function(submenu){
        Tapestry.removeClass(submenu, 'expanded');
    }
};


text:
* radioactive beings - produce a glow and dangerous radiation, requiring
either that non-resistant beings wear suits or that ksena wear suits (more
common)
* light level form-shifting - can choose number of appendages, location of
most sensory organs, main body size
* glow colours are arbitrary but solid on the visual spectrum (any sort
of patterns or texturing is in the NUV and EUV ranges)
* glow intensity is controlled as easily as blinking - can range from
a faint fuzz in front of an otherwise pitch black background to about 40
lumens (?)
* high-desnity atmo - in atmospheres closer to our pressure, ksena tend to
be less "focused" and will often tend to have tendrils or other portions
shearing off and flaking around (after a brief period will reattach as if
via a magnet. nobody really knows how this works)
* decentralised nervous system - not to the extent of a hydra, but still
less central than a human
* anatomy continuously regenerates, allowing for rapid healing/increased
tolerance of normally hostile environs
* pretty long-lived (centuries)
* relatively resistant to EM radiation but electrocution is a srs problem
(static electricity shocks can cause an area to be numb for hrs)

## habits
* generally quiet, withdrawn (more mournful than scornful but not Emo TM
about it)
* often come off as angry, bitter, venomous, curt
* odd day length on home world leads to extended on/off binges

## locations
* mostly limited to certain chunks of KT space that appear to have nothing
in common, but are in high concentrations in those areas
* lots of skyhooks/general Cloud City style-stuff in the atmospheres of
gas giants or entire space stations to themselves
* when living on a planet with lower atmo pressure, tend to be very isolated
from other ksenae

## perceptions

### of self
* common theme is wanderlust mixed with frustration at low pressure atmos
and generally uncomfortable environments - some dislike/flippancy at own
species comes of this

### of others
* often envoious of ability to live in what seems to be the extraordinarily
common earth-like atmos for extended periods of time
* not condescending/patronising though, regardless of terse communication
patterns
* tend to act as long-term drivers of goals (cf. Gandalf/the Istari in
general in LOTR)

### by others
* sometimes referred to as "reapers", "wraiths", "Old Ones"; affectionately
as "Watchers", "Kyriotetes"
* superstitious sects tend to view ksena as guardian angels (relative lack
of spread means that many members of these sects won't have seen a ksena
in the flesh)