text:
package lucandra;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;

import org.apache.cassandra.thrift.Column;
import org.apache.cassandra.thrift.ColumnOrSuperColumn;
import org.apache.log4j.Logger;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermDocs;
import org.apache.lucene.index.TermEnum;
import org.apache.lucene.index.TermPositions;

public class LucandraTermDocs implements TermDocs, TermPositions {

    private IndexReader indexReader;
    private LucandraTermEnum termEnum;
    private List<ColumnOrSuperColumn> termDocs;
    private int docPosition;
    private int[] termPositionArray;
    private int termPosition;
    private int doc;
    private int freq;

    private static final Logger logger = Logger.getLogger(LucandraTermDocs.class);

    public LucandraTermDocs(IndexReader indexReader) {
        this.indexReader = indexReader;
        termEnum = new LucandraTermEnum(indexReader);
    }

    public void close() throws IOException {
        // TODO Auto-generated method stub

    }

    public int doc() {
        return doc;
    }

    private int getNextDoc() {
        if (docPosition < 0)
            docPosition = 0;

        int docid = indexReader.getDocumentNumber(termDocs.get(docPosition).getSuper_column().getName());

        return docid;
    }

    public int freq() {
        return freq;
    }

    public int getNextFreq() {

        //Find the termFrequency
        List<Column> columns  = termDocs.get(docPosition).getSuper_column().getColumns();
        Column termFrequency = null;
        Column positionVector = null;

        for(Column c : columns){
            if(Arrays.equals(CassandraUtils.termFrequencyKey.getBytes(), c.getName())){
                termFrequency = c;
            }

            if(Arrays.equals(CassandraUtils.positionVectorKey.getBytes(), c.getName())){
                positionVector = c;
            }
        }

        if(termFrequency == null){
            throw new RuntimeException("termFrequency is missing from supercolumn");
        }

        Integer freq      = CassandraUtils.byteArrayToInt(termFrequency.getValue());
        termPositionArray =  positionVector == null ? null : CassandraUtils.byteArrayToIntArray(positionVector.getValue());
        termPosition      = 0;

        return freq;
    }

    public boolean next() throws IOException {

        if (termDocs == null)
            return false;

        if (docPosition == termDocs.size()) {
            return false;
        } else {
            doc = getNextDoc();
            freq = getNextFreq();
            docPosition++;
            return true;
        }
    }

    public int read(int[] docs, int[] freqs) throws IOException {

        int i = 0;
        for (; (termDocs != null && docPosition < termDocs.size() && i < docs.length); i++, docPosition++) {
            doc = getNextDoc();
            freq = getNextFreq();
            docs[i] = doc();
            freqs[i] = freq();
        }

        return i;
    }

    public void seek(Term term) throws IOException {
        // on a new term so check cached
        LucandraTermEnum tmp = indexReader.checkTermCache(term);
        if (tmp == null) {

            if (termEnum.skipTo(term)) {
                if (termEnum.term().compareTo(term) == 0) {
                    termDocs = termEnum.getTermDocFreq();
                } else {
                    termDocs = null;
                }
            }
        } else {
            termEnum = tmp;
            if (termEnum.skipTo(term)) {

                if (termEnum.term().equals(term)) {
                    termDocs = termEnum.getTermDocFreq();
                } else {
                    termDocs = null;
                }
            } else {
                termDocs = null;
            }
        }

        docPosition = -1;
        doc = -1;
        freq = -1;
    }

    public void seek(TermEnum termEnum) throws IOException {
        if (termEnum instanceof LucandraTermEnum) {
            this.termEnum = (LucandraTermEnum) termEnum;
        } else {
            this.termEnum = (LucandraTermEnum) indexReader.terms(termEnum.term());
        }

        termDocs = this.termEnum.getTermDocFreq();
        docPosition = -1;
    }

    public List<ColumnOrSuperColumn> filteredSeek(Term term, List<String> docNums){

        termEnum.loadFilteredTerms(term, docNums);

        termDocs = termEnum.getTermDocFreq();

        docPosition = -1;
        return termDocs;
    }

    //this should be used to find a already loaded doc
    public boolean skipTo(int target) throws IOException {
        do {
            if (!next())
                return false;
        } while (target > doc());

        return true;
    }

    public byte[] getPayload(byte[] data, int offset) throws IOException {
        return null;
    }

    public int getPayloadLength() {
        return 0;
    }

    public boolean isPayloadAvailable() {
        return false;
    }

    public int nextPosition() throws IOException {

        if(termPositionArray == null)
            return -1;

        int pos = termPositionArray[termPosition];
        termPosition++;

        return pos;
    }

}


text:
<resources>

    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>
    <dimen name="dashboard_footer_top_margin">5dp</dimen>
    <dimen name="dashboard_footer_left_padding">5dp</dimen>
</resources>

redpajama_set_name: RedPajamaGithub


text:
from PyQt4 import QtGui
from ui.AppIcons import *

class BleListItem(QtGui.QListWidgetItem):

    def __init__(self, name, address, rssi):
        QtGui.QListWidgetItem.__init__(self)
        self.name, self.address, self.rssi = name, address, rssi
        self.setBleInfo(rssi)
        self.conflag = False

    def setConnected(self, flag):
        self.conflag = flag
        self.setBackgroundColor(QtGui.QColor(flag and 0x00ff00 or 0xffffff))

    def isConnected(self):
        return self.conflag

    def setBleInfo(self, rssi):
        iconPath = ":app/icons/app/sig_1.png"
        if rssi > -45:
            iconPath = ":app/icons/app/sig_4.png"
        elif rssi > -60:
            iconPath = ":app/icons/app/sig_3.png"
        elif rssi > -80:
            iconPath = ":app/icons/app/sig_2.png"

        self.setIcon(QtGui.QIcon(iconPath))
        self.setText("%s\n%s    %ddb\n" % (self.name, self.address, rssi))

    def updateRssi(self, rssi):
        self.setBleInfo(rssi)

    def getAddress(self):
        return self.address


text:
<?php

namespace Just2\BackendBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use JVJ\UserBundle\Entity\User;

/**
 * @ORM\Table(name="member")
 * @ORM\Entity()
 * @ORM\HasLifecycleCallbacks
 */
class Member {

    /**
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id()
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\OneToMany(targetEntity="DateJust", mappedBy="member")
     */
    protected $dateJusts;

    /**
     * @ORM\OneToMany(targetEntity="Bid", mappedBy="member")
     */
    protected $bids;

    /** @ORM\Column(type="string", length=255) */
    private $firstName;

    /** @ORM\Column(type="string", length=255) */
    private $lastName;

    /** @ORM\Column(type="string", length=255) */
    private $street;

    /**
     * @ORM\ManyToOne(targetEntity="JVJ\UtilBundle\Entity\Department")
     */
    private $state;

    /** @ORM\Column(type="string", length=255) */
    private $postCode;

    /**
     * @ORM\ManyToOne(targetEntity="JVJ\UtilBundle\Entity\Country")
     */
    private $country;

    /** @ORM\Column(type="string", length=255) */
    private $phone;

    /** @ORM\Column(type="string", length=255) */
    private $mobile;

    /** @ORM\Column(type="datetime")
     *
     * @Assert\DateTime
     */
    private $dateOfBirth;

    /** @ORM\Column(type="string", length=255) */
    private $gender;

    /** @ORM\Column(type="integer") */
    private $height;

    /** @ORM\Column(type="string", length=255) */
    private $eyeColour;

    /** @ORM\Column(type="string", length=255) */
    private $hairColour;

    /**
     * @var string $datePreference
     *
     * @ORM\Column(name="datePreference", type="string", length=255)
     */
    private $datePreference;

    /**
     * @var string $smoker
     *
     * @ORM\Column(name="smoker", type="string", length=255)
     */
    private $smoker;

    /**
     * @var string $children
     *
     * @ORM\Column(name="children", type="string", length=255)
     */
    private $children;

    /**
     * @var string $relationship
     *
     * @ORM\Column(name="relationship", type="string", length=255)
     */
    private $relationship;

    /**
     * @var string $profession
     *
     * @ORM\Column(name="profession", type="string", length=255)
     */
    private $profession;

    /**
     * @var string $personality
     *
     * @ORM\Column(name="personality", type="text")
     */
    private $personality;

    /**
     * @ORM\ManyToMany(targetEntity="Just2\BackendBundle\Entity\Interest")
     */
    private $interest;

    /**
     * @ORM\OneToOne(targetEntity="\JVJ\UserBundle\Entity\User", mappedBy="member")
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     */
    private $user;

    /**
    * @ORM\Column(name="image", type="string", length=255)
    */
    private $image;

    /**
     * @ORM\Column(type="string", length=255)
     */
    public $path;

    /**
    * @Assert\File(maxSize="6000000")
    */
    private $file;

    public function __toString() {
        return $this->getFirstName();
    }

    /**
     * Constructor
     */
    public function __construct() {
        $this->dates = new \Doctrine\Common\Collections\ArrayCollection();
        $this->bids = new \Doctrine\Common\Collections\ArrayCollection();
        $this->auctions = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Get dates
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getDates() {
        return $this->dates;
    }

    /**
     * Add bids
     *
     * @param \Just2\BackendBundle\Entity\Bid $bids
     * @return Member
     */
    public function addBid(\Just2\BackendBundle\Entity\Bid $bids) {
        $this->bids[] = $bids;

        return $this;
    }

    /**
     * Remove bids
     *
     * @param \Just2\BackendBundle\Entity\Bid $bids
     */
    public function removeBid(\Just2\BackendBundle\Entity\Bid $bids) {
        $this->bids->removeElement($bids);
    }

    /**
     * Get bids
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getBids() {
        return $this->bids;
    }

    /**
     * Add auctions
     *
     * @param \Just2\BackendBundle\Entity\Auction $auctions
     * @return Member
     */
    public function addAuction(\Just2\BackendBundle\Entity\Auction $auctions) {
        $this->auctions[] = $auctions;

        return $this;
    }

    /**
     * Remove auctions
     *
     * @param \Just2\BackendBundle\Entity\auction $auctions
     */
    public function removeAuction(\Just2\BackendBundle\Entity\Auction $auctions) {
        $this->auctions->removeElement($auctions);
    }

    /**
     * Get auctions
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getAuctions() {
        return $this->auctions;
    }

    /**
     * Set firstName
     *
     * @param string $firstName
     * @return Member
     */
    public function setFirstName($firstName) {
        $this->firstName = $firstName;

        return $this;
    }

    /**
     * Get firstName
     *
     * @return string
     */
    public function getFirstName() {
        return $this->firstName;
    }

    /**
     * Set lastName
     *
     * @param string $lastName
     * @return Member
     */
    public function setLastName($lastName) {
        $this->lastName = $lastName;

        return $this;
    }

    /**
     * Get lastName
     *
     * @return string
     */
    public function getLastName() {
        return $this->lastName;
    }

    /**
     * Set street
     *
     * @param string $street
     * @return Member
     */
    public function setStreet($street) {
        $this->street = $street;

        return $this;
    }

    /**
     * Get street
     *
     * @return string
     */
    public function getStreet() {
        return $this->street;
    }

    /**
     * Set postCode
     *
     * @param string $postCode
     * @return Member
     */
    public function setPostCode($postCode) {
        $this->postCode = $postCode;

        return $this;
    }

    /**
     * Get postCode
     *
     * @return string
     */
    public function getPostCode() {
        return $this->postCode;
    }

    /**
     * Set phone
     *
     * @param string $phone
     * @return Member
     */
    public function setPhone($phone) {
        $this->phone = $phone;

        return $this;
    }

    /**
     * Get phone
     *
     * @return string
     */
    public function getPhone() {
        return $this->phone;
    }

    /**
     * Set mobile
     *
     * @param string $mobile
     * @return Member
     */
    public function setMobile($mobile) {
        $this->mobile = $mobile;

        return $this;
    }

    /**
     * Get mobile
     *
     * @return string
     */
    public function getMobile() {
        return $this->mobile;
    }

    /**
     * Set gender
     *
     * @param string $gender
     * @return Member
     */
    public function setGender($gender) {
        $this->gender = $gender;

        return $this;
    }

    /**
     * Get gender
     *
     * @return string
     */
    public function getGender() {
        return $this->gender;
    }

    /**
     * Set state
     *
     * @param \JVJ\UtilBundle\Entity\Department $state
     * @return Member
     */
    public function setState(\JVJ\UtilBundle\Entity\Department $state = null) {
        $this->state = $state;

        return $this;
    }

    /**
     * Get state
     *
     * @return \JVJ\UtilBundle\Entity\Department
     */
    public function getState() {
        return $this->state;
    }

    /**
     * Set country
     *
     * @param \JVJ\UtilBundle\Entity\Country $country
     * @return Member
     */
    public function setCountry(\JVJ\UtilBundle\Entity\Country $country = null) {
        $this->country = $country;

        return $this;
    }

    /**
     * Get country
     *
     * @return \JVJ\UtilBundle\Entity\Country
     */
    public function getCountry() {
        return $this->country;
    }

    /**
     * Set dateOfBirth
     *
     * @param \DateTime $dateOfBirth
     * @return Member
     */
    public function setDateOfBirth($dateOfBirth) {
        $this->dateOfBirth = $dateOfBirth;

        return $this;
    }

    /**
     * Get dateOfBirth
     *
     * @return \DateTime
     */
    public function getDateOfBirth() {
        return $this->dateOfBirth;
    }

    /**
     * Add dateJusts
     *
     * @param \Just2\BackendBundle\Entity\DateJust $dateJusts
     * @return Member
     */
    public function addDateJust(\Just2\BackendBundle\Entity\DateJust $dateJusts) {
        $this->dateJusts[] = $dateJusts;

        return $this;
    }

    /**
     * Remove dateJusts
     *
     * @param \Just2\BackendBundle\Entity\DateJust $dateJusts
     */
    public function removeDateJust(\Just2\BackendBundle\Entity\DateJust $dateJusts) {
        $this->dateJusts->removeElement($dateJusts);
    }

    /**
     * Get dateJusts
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getDateJusts() {
        return $this->dateJusts;
    }

    /**
     * Set height
     *
     * @param integer $height
     * @return Member
     */
    public function setHeight($height) {
        $this->height = $height;

        return $this;
    }

    /**
     * Get height
     *
     * @return integer
     */
    public function getHeight() {
        return $this->height;
    }

    /**
     * Set eyeColour
     *
     * @param string $eyeColour
     * @return Member
     */
    public function setEyeColour($eyeColour) {
        $this->eyeColour = $eyeColour;

        return $this;
    }

    /**
     * Get eyeColour
     *
     * @return string
     */
    public function getEyeColour() {
        return $this->eyeColour;
    }

    /**
     * Set hairColour
     *
     * @param string $hairColour
     * @return Member
     */
    public function setHairColour($hairColour) {
        $this->hairColour = $hairColour;

        return $this;
    }

    /**
     * Get hairColour
     *
     * @return string
     */
    public function getHairColour() {
        return $this->hairColour;
    }

    /**
     * Set datePreference
     *
     * @param string $datePreference
     * @return Attributes
     */
    public function setDatePreference($datePreference)
    {
        $this->datePreference = $datePreference;

        return $this;
    }

    /**
     * Get datePreference
     *
     * @return string
     */
    public function getDatePreference()
    {
        return $this->datePreference;
    }

    /**
     * Set smoker
     *
     * @param string $smoker
     * @return Attributes
     */
    public function setSmoker($smoker)
    {
        $this->smoker = $smoker;

        return $this;
    }

    /**
     * Get smoker
     *
     * @return string
     */
    public function getSmoker()
    {
        return $this->smoker;
    }

    /**
     * Set children
     *
     * @param string $children
     * @return Attributes
     */
    public function setChildren($children)
    {
        $this->children = $children;

        return $this;
    }

    /**
     * Get children
     *
     * @return string
     */
    public function getChildren()
    {
        return $this->children;
    }

    /**
     * Set relationship
     *
     * @param string $relationship
     * @return Attributes
     */
    public function setRelationship($relationship)
    {
        $this->relationship = $relationship;

        return $this;
    }

    /**
     * Get relationship
     *
     * @return string
     */
    public function getRelationship()
    {
        return $this->relationship;
    }

    /**
     * Set profession
     *
     * @param string $profession
     * @return Attributes
     */
    public function setProfession($profession)
    {
        $this->profession = $profession;

        return $this;
    }

    /**
     * Get profession
     *
     * @return string
     */
    public function getProfession()
    {
        return $this->profession;
    }

    /**
     * Set personality
     *
     * @param string $personality
     * @return Attributes
     */
    public function setPersonality($personality)
    {
        $this->personality = $personality;

        return $this;
    }

    /**
     * Get personality
     *
     * @return string
     */
    public function getPersonality()
    {
        return $this->personality;
    }

    /**
     * Set interest
     *
     * @param \Just2\BackendBundle\Entity\Interest $interest
     * @return Member
     */
    public function setInterest(\Just2\BackendBundle\Entity\Interest $interest = null) {
        $this->interest = $interest;

        return $this;
    }

    /**
     * Get interest
     *
     * @return \Just2\BackendBundle\Entity\Interest
     */
    public function getInterest() {
        return $this->interest;
    }

    /**
     * Set image
     *
     * @param string $image
     * @return Member
     */
    public function setImage($image)
    {
        $this->image = $image;

        return $this;
    }

    /**
     * Get image
     *
     * @return string
     */
    public function getImage()
    {
        return $this->image;
    }

    /**
     * file
     */
    // public function getAbsolutePath()
    // {
    //     return null === $this->path
    //         ? null
    //         : $this->getUploadRootDir().'/'.$this->id.'.'.$this->path;
    // }

    // public function getWebPath()
    // {
    //     return null === $this->path
    //         ? null
    //         : $this->getUploadDir().'/'.$this->path;
    // }

    // protected function getUploadRootDir()
    // {
    //     // the absolute directory path where uploaded
    //     // documents should be saved
    //     return __DIR__.'/../../../../web/'.$this->getUploadDir();
    // }

    // protected function getUploadDir()
    // {
    //     // get rid of the __DIR__ so it doesn't screw up
    //     // when displaying uploaded doc/image in the view.
    //     return 'uploads/documents';
    // }

    public function getPath()
    {
        return $this->path;
    }

    public function setPath($path)
    {
        $this->path = $path;
        return $this;
    }

    public function getFile()
    {
        return $this->file;
    }

    public function setFile($file)
    {
        $this->file = $file;
    }

    // a property used temporarily while deleting
    private $filenameForRemove;

    /**
     * @ORM\PrePersist()
     * @ORM\PreUpdate()
     */
    public function preUpload()
    {
        if (null !== $this->file) {
            // do whatever you want to generate a unique name
            $filename = $this->id;
            $this->path = $filename.'.'.$this->file->guessExtension();
            // $this->path = $filename.'.png';
        }
    }

    /**
     * @ORM\PostPersist()
     * @ORM\PostUpdate()
     */
    public function upload()
    {
        if (null === $this->file) {
            return;
        }

        // if there is an error when moving the file, an exception will
        // be automatically thrown by move(). This will properly prevent
        // the entity from being persisted to the database on error
        $this->file->move('images_user', $this->path);

        unset($this->file);
    }

    /**
     * @ORM\PostRemove()
     */
    public function removeUpload()
    {
        if ($file = $this->getAbsolutePath()) {
            unlink($file);
        }
    }

    /**
     * Set user
     *
     * @param \JVJ\UserBundle\Entity\User $user
     * @return Member
     */
    public function setUser(\JVJ\UserBundle\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \JVJ\UserBundle\Entity\User
     */
    public function getUser()
    {
        return $this->user;
    }
}


text:
@interface S2CollapsibleTableView : S2TableView

+ (id)new;

- (BOOL)sectionIsExpanding:(int)section;

- (void)expandSection:(int)section animated:(BOOL)animated;

- (void)shrinkSection:(int)section animated:(BOOL)animated;

@end

@protocol S2CollapsibleTableViewDelegate <UITableViewDelegate>

- (void)tableView:(S2CollapsibleTableView*)tableView didSelectSectionHeaderAtSection:(int)section;

@end


text:
package org.garywzh.quumiibox.eventbus;

/**
 * Created by garywzh on 2016/3/22.
 */
public class UserReplyResponseEvent {
    public final String response;

    public UserReplyResponseEvent(String response) {
        this.response = response;
    }
}


text:
<?php

//vmdebug('we have here ',$viewData['product']->prices,$viewData['method']);
$currency = $viewData['currency'];
if(!empty($viewData['method']->countries) and is_array($viewData['method']->countries) and count($viewData['method']->countries)>0){
	$countryM = VmModel::getModel('country');
	echo vmText::_('VMSHIPMENT_WEIGHT_COUNTRIES_SHIP_TO');
	foreach($viewData['method']->countries as $virtuemart_country_id){
		$country = $countryM->getData($virtuemart_country_id);
		echo $country->country_name;
		//vmdebug('my country ',$country);
	}
	echo '<br/>';
}

echo vmtext::sprintf('VMSHIPMENT_WEIGHT_COUNTRIES_WITH_SHIPMENT', $viewData['method']->shipment_name, $currency->priceDisplay($viewData['product']->prices['shipmentPrice']));
?>


text:
package com.sequenceiq.redbeams.service.stack;

import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;

import javax.inject.Inject;

import org.springframework.stereotype.Service;

import com.sequenceiq.cloudbreak.cloud.model.CloudResource;
import com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus;
import com.sequenceiq.cloudbreak.cloud.model.ResourceStatus;
import com.sequenceiq.common.api.type.CommonStatus;
import com.sequenceiq.common.api.type.ResourceType;
import com.sequenceiq.redbeams.converter.spi.DBResourceToCloudResourceConverter;
import com.sequenceiq.redbeams.domain.stack.DBResource;
import com.sequenceiq.redbeams.repository.DBResourceRepository;

@Service
public class DBResourceService {

    @Inject
    private DBResourceRepository dbResourceRepository;

    @Inject
    private DBResourceToCloudResourceConverter dbResourceTocloudResourceConverter;

    public List<CloudResourceStatus> getAllAsCloudResourceStatus(Long dbStackId) {
        return getAllAsCloudResource(dbStackId).stream()
                .map(r -> new CloudResourceStatus(r, ResourceStatus.CREATED))
                .collect(Collectors.toList());
    }

    public List<CloudResource> getAllAsCloudResource(Long dbStackId) {
        return dbResourceRepository.findAllByStackId(dbStackId).stream()
            .map(r -> dbResourceTocloudResourceConverter.convert(r)).collect(Collectors.toList());
    }

    public DBResource save(DBResource resource) {
        return dbResourceRepository.save(resource);
    }

    public void delete(DBResource resource) {
        dbResourceRepository.delete(resource);
    }

    public Optional<DBResource> findByStackAndNameAndType(Long id, String name, ResourceType resourceType) {
        return dbResourceRepository.findByStackIdAndNameAndType(id, name, resourceType);
    }

    public boolean existsByStackAndNameAndType(Long dbStackId, String name, ResourceType type) {
        return dbResourceRepository.existsByStackAndNameAndType(dbStackId, name, type);
    }

    public Optional<DBResource> findByStatusAndTypeAndStack(CommonStatus status, ResourceType resourceType, Long stackId) {
        return dbResourceRepository.findByResourceStatusAndResourceTypeAndDbStack(status, resourceType, stackId);
    }
}


text:
layout: post
title: Guia de Privacidade Digital para Casais
date: '2018-01-02 14:42'
tags:
  - redes sociais
  - relacionamento
  - privacidade
  - privacidade Digital
  - celular
  - Smartphone
  - senhas
  - nudes
  - Facebook
  - Sex tape
  - aplicativo
author:
  display_name: Rogerio de Oliveira
  first_name: Rogerio
  last_name: de Oliveira
image:
  feature: Capa Artigo Guia de Privacidade Digital para Casais.png
---

Se você está em um relacionamento com alguma pessoa, é muito provável que você tenha se "abdicado" de sua privacidade.

Como casal, provavelmente você está compartilhando várias informações com seu parceiro(a).

Mas e sua privacidade Digital?

Você compartilha seu celular, contas em redes sociais, senhas ou então envia nudes?

Neste post eu vou dar algumas orientações sobre privacidade digital para casais.

## Orientação número 1
**Nunca compartilhe suas senhas!**

Compartilhar senhas entre casais tem se tornado uma atitude comum. Porém não é uma boa prática. As **senhas** devem ser **individuais**.

[Gerenciador de Senhas][ac56056f]

  [ac56056f]: https://tecnologiacominformacao.com/blog/gerador_de_senha/ "Senhas"

## Orientação número 2
**Não compartilhe suas contas em Redes Sociais!**

Outro costume bem comum entre casais é um ter **acesso** a conta um do outro em perfis nas **redes sociais**, como Facebook por exemplo. Assim como a primeira orientação, isso também **não é uma boa prática**.

Para **novos** casais, que ainda estão se conhecendo eu recomendo que cada um **fique com seu perfil social particular**.

[Guia básico de privacidade do Facebook][83c1f77f]

  [83c1f77f]: https://tecnologiacominformacao.com/blog/guia-de-privacidade/ "Privacidade do Facebook"

Para aqueles que já **estão há um bom tempo juntos**, uma outra dica é criar um perfil para o casal.
Caso os 2 tenham perfis, ambos podem desativá-los (não precisa excluir o perfil)
O casal pode criar uma conta onde os 2 podem administrar.

[10 Cuidados que você deve ter nas Redes Sociais][c6bd4aaa]

  [c6bd4aaa]: https://tecnologiacominformacao.com/blog/cuidados-nas-redes-sociais/ "10 Cuidados que Você e Sua Família devem ter nas Redes Sociais"

A duas orientações anteriores são válidas para manter a privacidade individual, porém elas devem ser adotadas pelo casal.

Isto significa que **ambos devem entender e compreender a importância de seguir estas orientações**.
O principal objetivo da 1º e da 2º orientação é que em uma possível futura separação (mesmo que temporária) do casal um não poderá utilizar-se de má fé das informações do outro.

[O polêmico assunto 'Privacidade Digital'][f9bc2f1b]

  [f9bc2f1b]: https://tecnologiacominformacao.com/blog/privacidade-digital/ "Privacidade Digital"

## Orientação número 3
**Não faça Sextape ou nudes!**

A recomendação é de **nunca** tirar **nudes** ou gravar **vídeos íntimos** do casal.
Lembre-se de que as imagens podem vazar na internet, seja propositalmente, conhecida como pornografia da vingança ou então seu dispositivo pode ser invadido e ter as imagens divulgadas.

### Mas caso o casal decida realizar esta prática, ambos devem tomar alguns cuidados.

#### O primeiro é o manter o anonimato.

Ao fazer imagens você deve **eliminar tudo que possa identificar você**, como por exemplo, seu rosto, tatuagens, marcas de nascença ou qualquer característica única em você.
Deve se ter **cuidado** também com o **ambiente**.
Você pode ser identificado(a) pelo local e objetos presentes na imagem.

#### O segundo cuidado é utilizar tecnologias que irão minimizar os riscos na hora de enviar as imagens.

O aplicativo mais conhecido para enviar **nudes** é o Snapchat, porém existem alternativas "melhores" como por exemplo o **Wickr**.

#### O terceiro é guardar tudo em um local seguro.

Mantenha seu Smartphone **sempre protegido** com uma **senha forte**.
Instale um aplicativo que protege imagens com por exemplo o **Valt**.
E instale um **antivírus**.

[Mantendo a Privacidade do Seu Smartphone][4c25875f]

  [4c25875f]: https://tecnologiacominformacao.com/blog/privacidade-no-smartphone/ "Mantendo a Privacidade no Smartphone"

**O ideal é não manter as imagens no Smartphone.**

Salve as imagens de preferência em um HD Externo, **(não recomendo pen drive ou cartão SD por serem mais fáceis de perder**).
**Mas não deixe as imagens desprotegidas**, você pode compactá-las com senha utilizando o Winrar por exemplo, ou então criptografá-las utilizando programas como por exemplo o Cryptomator.


text:
from rest_framework import authentication, renderers
from rest_framework.response import Response
from rest_framework.views import APIView

class MockView(APIView):
    authentication_classes = (authentication.SessionAuthentication,)
    renderer_classes = (renderers.BrowsableAPIRenderer, renderers.JSONRenderer)

    def get(self, request):
        return Response({'a': 1, 'b': 2, 'c': 3})


text:
<?php

declare(strict_types=1);

namespace Comely\Kernel\Toolkit;

/**
 * Class Number
 * @package Comely\Kernel\Toolkit
 */
class Number
{
    /**
     * Check if specified number is with in specified range
     *
     * @param int $num
     * @param int $from
     * @param int $to
     * @return bool
     */
    public static function Range(int $num, int $from, int $to): bool
    {
        return ($num >= $from && $num <= $to) ? true : false;
    }

    /**
     * Check if specified number is with in specified range (using BCMath)
     *
     * @param string $num
     * @param string $from
     * @param string $to
     * @param int $scale
     * @return bool
     */
    public static function BcRange(string $num, string $from, string $to, int $scale = 0): bool
    {
        if (!preg_match('/^[0-9]+(\.[0-9]+)?$/', $num)) {
            return false;
        }

        if (bccomp($num, $from, $scale) !== -1) {
            if (bccomp($num, $to, $scale) !== 1) {
                return true;
            }
        }

        return false;
    }
}


text:
package annis.sqlgen;

import static annis.sqlgen.TableAccessStrategy.NODE_TABLE;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import annis.model.QueryNode;
import annis.ql.parser.QueryData;
import annis.service.internal.QueryServiceImpl;
import annis.service.objects.OrderType;
import static annis.sqlgen.AbstractSqlGenerator.TABSTOP;
import annis.sqlgen.extensions.LimitOffsetQueryData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Generates identifers for salt which are needed for the
 * {@link QueryServiceImpl#subgraph(java.lang.String, java.lang.String, java.lang.String)}
 *
 * @author Benjamin Weißenfels
 * @author Thomas Krause <krauseto@hu-berlin.de>
 */
public class SolutionSqlGenerator extends AbstractUnionSqlGenerator
  implements SelectClauseSqlGenerator<QueryData>,
  OrderByClauseSqlGenerator<QueryData>,
  GroupByClauseSqlGenerator<QueryData>
{

  private static final Logger log = LoggerFactory.getLogger(
    SolutionSqlGenerator.class);

  private boolean outputToplevelCorpus = true;

  private boolean outputNodeName = true;

  private AnnotationConditionProvider annoCondition;

  @Override
  public String selectClause(QueryData queryData, List<QueryNode> alternative,
    String indent)
  {
    int maxWidth = queryData.getMaxWidth();
    Validate.isTrue(alternative.size() <= maxWidth,
      "BUG: nodes.size() > maxWidth");

    List<String> cols = new ArrayList<>();
    int i = 0;

    boolean needsDistinct = isDistinctNeeded(alternative);

    for (QueryNode node : alternative)
    {
      ++i;

      TableAccessStrategy tblAccessStr = tables(node);
      cols.add(tblAccessStr.aliasedColumn(NODE_TABLE, "id") + " AS id" + i);
      if (annoCondition != null)
      {
        if (node.getNodeAnnotations().isEmpty())
        {
          // If a query node is not using annotations, fallback to NULL as the value.
          // This is important for the DISTINCT clause, since we don't want to match
          // the annotation itself but the node.
          cols.add("NULL::int AS cat" + i);
        }
        else
        {
          cols.add(
            tblAccessStr.aliasedColumn("node_annotation", "category") + " AS cat" + i);
        }
      }
      if (outputNodeName)
      {

        if(needsDistinct)
        {
          cols.add("min(" + tblAccessStr.aliasedColumn(NODE_TABLE, "salt_id")
            + ") AS salt_id" + i);
        }
        else
        {
          cols.add(tblAccessStr.aliasedColumn(NODE_TABLE, "salt_id") + " AS salt_id" + i);
        }
      }
    }

    // add additional empty columns in or clauses with different node sizes
    for (i = alternative.size() + 1; i <= maxWidth; ++i)
    {
      cols.add("NULL::bigint AS id" + i);
      cols.add("NULL::integer AS cat" + i);
      if (outputNodeName)
      {
        cols.add("NULL::varchar AS salt_id" + i);
      }
    }

    if (!alternative.isEmpty() && outputNodeName)
    {

      TableAccessStrategy tblAccessStr = tables(alternative.get(0));

      String corpusRefAlias = tblAccessStr.aliasedColumn(NODE_TABLE,
        "corpus_ref");

      if(needsDistinct)
      {
        cols.add(
          "(SELECT c.path_name FROM corpus AS c WHERE c.id = min(" + corpusRefAlias
          + ") LIMIT 1) AS path_name");
      }
      else
      {
        cols.add(
          "(SELECT c.path_name FROM corpus AS c WHERE c.id = " + corpusRefAlias
          + " LIMIT 1) AS path_name");
      }
    }

    if (outputToplevelCorpus)
    {
      if(needsDistinct)
      {
        cols.add("min(" + tables(alternative.get(0)).aliasedColumn(NODE_TABLE,
          "toplevel_corpus")
          + ") AS toplevel_corpus");
      }
      else
      {
        cols.add(tables(alternative.get(0)).aliasedColumn(NODE_TABLE,
          "toplevel_corpus")
          + " AS toplevel_corpus");
      }
    }

    if(needsDistinct)
    {
      cols.add("min(" + tables(alternative.get(0)).aliasedColumn(NODE_TABLE,
        "corpus_ref")
        + ") AS corpus_ref");
    }
    else
    {
      cols.add(tables(alternative.get(0)).aliasedColumn(NODE_TABLE,
        "corpus_ref")
        + " AS corpus_ref");
    }

    if(queryData.getCorpusList().size() > 1)
    {
      if(needsDistinct)
      {
        cols.add("min(" + tables(alternative.get(0)).aliasedColumn(TableAccessStrategy.FACTS_TABLE, "sourceIdx")
          +  ") AS sourceIdx");
      }
      else
      {
        cols.add(tables(alternative.get(0)).aliasedColumn(TableAccessStrategy.FACTS_TABLE, "sourceIdx") +  " AS sourceIdx");
      }
    }

    String colIndent = indent + TABSTOP + TABSTOP;

    return "\n" + colIndent + StringUtils.join(cols, ",\n" + colIndent);
  }

  @Override
  public String orderByClause(QueryData queryData, List<QueryNode> alternative,
    String indent)
  {
    OrderType order = OrderType.ascending;

    List<LimitOffsetQueryData> ext = queryData.getExtensions(
      LimitOffsetQueryData.class);

    if(!ext.isEmpty())
    {
      order = ext.get(0).getOrder();
    }

    if(order == OrderType.random)
    {
      return "random()";
    }
    else
    {
      String appendix = "";
      if(order == OrderType.descending)
      {
        appendix = " DESC";
      }
      else if(order == OrderType.ascending)
      {
        appendix = " ASC";
      }

      List<Long> corpusList = queryData.getCorpusList();
      List<String> ids = new ArrayList<>();

      if(corpusList.size() > 1)
      {
        // add the artificial "source index" which corresponds to the toplevel corpus name
        ids.add("sourceIdx");
      }
      // add the node ID for each output node an the category ID
      for (int i = 1; i <= queryData.getMaxWidth(); ++i)
      {
        ids.add("id" + i +  appendix);
        if (annoCondition != null)
        {
          ids.add("cat" + i + appendix);
        }
      }
      return StringUtils.join(ids, ", ");
    }
  }

  @Override
  public String groupByAttributes(QueryData queryData,
    List<QueryNode> alternative)
  {
    if(isDistinctNeeded(alternative))
    {
      List<String> ids = new ArrayList<>();
      for (int i = 1; i <= queryData.getMaxWidth(); ++i)
      {
        ids.add("id" + i);
        if (annoCondition != null)
        {
          ids.add("cat" + i);
        }
      }
      return StringUtils.join(ids, ", ");
    }
    else
    {
      return null;
    }
  }

  private boolean isDistinctNeeded(List<QueryNode> alternative)
  {

    /*
    If no node uses the rank table we can assume the result is already
    distinct. Of course this only works as long the SampleWhereClause generator
    is active and filters out node annotation duplicates.
    */
    for(QueryNode node : alternative)
    {
      TableAccessStrategy tas = tables(node);
      if(tas.usesRankTable())
      {
        return true;
      }
    }
    return false;
  }

  public boolean isOutputToplevelCorpus()
  {
    return outputToplevelCorpus;
  }

  public void setOutputToplevelCorpus(boolean outputToplevelCorpus)
  {
    this.outputToplevelCorpus = outputToplevelCorpus;
  }

  public AnnotationConditionProvider getAnnoCondition()
  {
    return annoCondition;
  }

  public void setAnnoCondition(AnnotationConditionProvider annoCondition)
  {
    this.annoCondition = annoCondition;
  }

  public boolean isOutputNodeName()
  {
    return outputNodeName;
  }

  public void setOutputNodeName(boolean outputNodeName)
  {
    this.outputNodeName = outputNodeName;
  }

}


text:
package org.pitest.mutationtest.build.intercept.kotlin;

import org.pitest.mutationtest.build.InterceptorParameters;
import org.pitest.mutationtest.build.MutationInterceptor;
import org.pitest.mutationtest.build.MutationInterceptorFactory;
import org.pitest.plugin.Feature;

public class KotlinFilterFactory implements MutationInterceptorFactory {

  @Override
  public String description() {
    return "Kotlin junk mutations filter";
  }

  @Override
  public MutationInterceptor createInterceptor(InterceptorParameters params) {
    return new KotlinFilter();
  }

  @Override
  public Feature provides() {
    return Feature.named("FKOTLIN")
        .withDescription("Filters out junk mutations in bytecode created by compiler for kotlin language features")
        .withOnByDefault(true);
  }

}


text:
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Stations.Models;
using Stations.Models.Enums;

namespace Stations.DataProcessor.Dto.Import
{
    public class TrainDto
    {
        [Required]
        [MaxLength(10)]
        public string TrainNumber { get; set; }

        public string Type { get; set; } = "HighSpeed";

        public SeatDto[] Seats { get; set; } = new SeatDto[0];

    }
}


text:
/*********************************************************************************************************************/
/*   File Name: input_binary_file.cpp                                                                                */
/*   Author: Ing. Jesus Rocha <chuyangel.rm@gmail.com>, July 2016.                                                   */
/*   Copyright (C) Angsys, - All Rights Reserved                                                                     */
/*   Confidential Information of Angsys. Not for disclosure or distribution without the author's prior written       */
/*   consent. This file contains code, techniques and know-how which is confidential and proprietary to Jesus Rocha  */
/*                                                                                */
/*********************************************************************************************************************/

#include "pch.h"
#include <ang/core/files.h>
#include "format_parser.h"

using namespace ang;
using namespace ang::streams;
using namespace ang::core::files;

input_binary_file::input_binary_file()
	: base()
{
}

input_binary_file::input_binary_file(cstr_t path)
	: base()
{
	open(path);
}

input_binary_file::~input_binary_file()
{

}

ANG_IMPLEMENT_OBJECT_RUNTIME_INFO(ang::core::files::input_binary_file)
ANG_IMPLEMENT_OBJECT_CLASS_INFO(ang::core::files::input_binary_file, file, streams::ibinary_input_stream);
ANG_IMPLEMENT_OBJECT_QUERY_INTERFACE(ang::core::files::input_binary_file, file, streams::ibinary_input_stream);

bool input_binary_file::open(cstr_t path)
{
	if (is_valid())
		return false;
	if (!create(path, open_flags::access_in + open_flags::open_exist + open_flags::format_text))
		return false;
	return true;
}

bool input_binary_file::is_eos()const
{
	return m_hfile.is_empty() ? true : m_hfile->is_eof();
}

text::encoding_t input_binary_file::format()const
{
	return m_hfile.is_empty() ? text::encoding::none : m_hfile->format().get();
}

file_offset_t input_binary_file::cursor()const
{
	return m_hfile.is_empty() ? 0 : m_hfile->cursor();
}

bool input_binary_file::cursor(file_offset_t offset, stream_reference_t ref)
{
	return m_hfile.is_empty() ? false : m_hfile->cursor(offset, ref);
}

file_offset_t input_binary_file::size()const
{
	return m_hfile.is_empty() ? 0 : m_hfile->size();
}

stream_mode_t input_binary_file::mode()const
{
	return stream_mode::out;
}

bool input_binary_file::map(function<bool(ibuffer_view_t)> func, wsize sz, file_offset_t offset)
{
	ibuffer_t buff = file::map(min((wsize)size(), sz), min(size(), offset));
	if (buff.is_empty())
		return false;
	func(buff.get());
	unmap(buff, min((wsize)size(), sz));
	return true;
}

//bool input_binary_file::map(function<bool(text::istring_view_t)> func, wsize sz, file_offset_t offset)
//{
//	ibuffer_t buff = file::map(min(size(), sz), min(size(), offset));
//	if (buff.is_empty())
//		return false;
//	func(text::istring_factory::get_factory(format())->create_wrapper((ibuffer_view*)buff.get()));
//	unmap(buff, min(size(), sz));
//	return true;
//}

bool input_binary_file::read(function<bool(streams::ibinary_input_stream_t)> func)
{
	return func(this);
}

wsize input_binary_file::read(pointer ptr, wsize sz)
{
	if (m_hfile.is_empty() || ptr == null || sz == 0)
		return 0U;
	auto current = m_hfile->cursor();
	return m_hfile->read(sz, ptr) - current;
}

wsize input_binary_file::read(ibuffer_t buff)
{
	if (m_hfile.is_empty() || buff.is_empty())
		return 0U;
	auto current = m_hfile->cursor();
	return m_hfile->read(buff->buffer_size(), buff->buffer_ptr()) - current;
}

#define FUNCX_BINARY_READ(A0) if(type.type_id() == type_of<A0>().type_id()) { return read(ptr, size_of<A0>()); }
#define BINARY_READ_SWITCH(...) { ANG_EXPAND(APPLY_FUNCX_N(FUNCX_BINARY_READ, ELSE_SEPARATOR,##__VA_ARGS__)) }

wsize input_binary_file::read(pointer ptr, const rtti_t& type)
{
	BINARY_READ_SWITCH(
		char,
		byte,
		wchar_t,
		char16_t,
		char32_t,
		short,
		ushort,
		int,
		uint,
		long,
		ulong,
		long64,
		ulong64,
		float,
		double
	);
	return 0;
}


text:
using System;
using System.Runtime.InteropServices;

namespace Noesis
{

[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct Sizei {

  [MarshalAs(UnmanagedType.U4)]
  private uint _w;

  [MarshalAs(UnmanagedType.U4)]
  private uint _h;

  public uint Width {
    get { return this._w; }
    set { this._w = value; }
  }

  public uint Height {
    get { return this._h; }
    set { this._h = value; }
  }

  public static Sizei Zero {
    get { return new Sizei(0, 0); }
  }

  public static Sizei Infinite {
    get { return new Sizei(UInt32.MaxValue, UInt32.MaxValue); }
  }

  public Sizei(uint w, uint h) {
    this._w = w;
    this._h = h;
  }

  public Sizei(Size size) : this((uint)size.Width, (uint)size.Height) {
  }

  public Sizei(Pointi point) : this((uint)point.X, (uint)point.Y) {
  }

  public static Sizei operator+(Sizei v0, Sizei v1) {
    return new Sizei(v0.Width + v1.Width, v0.Height + v1.Height);
  }

  public static Sizei operator-(Sizei v0, Sizei v1) {
    return new Sizei(v0.Width - v1.Width, v0.Height - v1.Height);
  }

  public static Sizei operator*(Sizei v, uint f) {
    return new Sizei(v.Width * f, v.Height * f);
  }

  public static Sizei operator*(uint f, Sizei v) {
    return v * f;
  }

  public static Sizei operator/(Sizei v, uint f) {
    if (f == 0) { throw new DivideByZeroException(); }
    return new Sizei(v.Width / f, v.Height / f);
  }

  public static bool operator==(Sizei v0, Sizei v1) {
    return v0.Width == v1.Width && v0.Height == v1.Height;
  }

  public static bool operator!=(Sizei v0, Sizei v1) {
    return !(v0 == v1);
  }

  public override bool Equals(Object obj) {
    return obj is Sizei && this == (Sizei)obj;
  }

  public bool Equals(Sizei v) {
    return this == v;
  }

  public override int GetHashCode() {
    return (int)Width ^ (int)Height;
  }

  public override string ToString() {
    return String.Format("{0},{1}", Width, Height);
  }

  public void Expand(Sizei size) {
    Width = Math.Max(Width, size.Width);
    Height = Math.Max(Height, size.Height);
  }

  public void Scale(uint scaleX, uint scaleY) {
    Width *= scaleX;
    Height *= scaleY;
  }

  public static Sizei Parse(string str) {
    Sizei size;
    if (Sizei.TryParse(str, out size)) {
      return size;
    }
    throw new ArgumentException("Cannot create Sizei from '" + str + "'");
  }

  public static bool TryParse(string str, out Sizei result) {
    bool ret = NoesisGUI_PINVOKE.Sizei_TryParse(str != null ? str : string.Empty, out result);
    if (NoesisGUI_PINVOKE.SWIGPendingException.Pending) throw NoesisGUI_PINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}


text:
package org.apache.causeway.viewer.wicket.ui.pages.accmngt.signup;

import javax.inject.Inject;

import org.apache.wicket.request.mapper.parameter.PageParameters;

import org.apache.causeway.viewer.wicket.model.models.PageType;
import org.apache.causeway.viewer.wicket.ui.errors.ExceptionModel;
import org.apache.causeway.viewer.wicket.ui.pages.PageNavigationService;
import org.apache.causeway.viewer.wicket.ui.pages.accmngt.AccountManagementPageAbstract;

/**
 * A page for self-registering a new user after confirmation of her email account.
 */
public class RegistrationFormPage extends AccountManagementPageAbstract {

    private static final long serialVersionUID = 1L;

    @Inject private PageNavigationService pageNavigationService;

    public RegistrationFormPage(final PageParameters parameters) {
        this(parameters, getAndClearExceptionModelIfAny());
    }

    private RegistrationFormPage(final PageParameters parameters, ExceptionModel exceptionModel) {
        super(parameters, exceptionModel);

        boolean suppressSignUp = getWicketViewerSettings().isSuppressSignUp();
        if(suppressSignUp) {
            pageNavigationService.interceptAndRestartAt(PageType.SIGN_IN);
        }

    }

    @Override
    protected void onInitialize() {
        super.onInitialize();

        addRegistrationFormPanel();
    }

    protected RegistrationFormPanel addRegistrationFormPanel() {
        final RegistrationFormPanel registrationFormPanel = new RegistrationFormPanel("registrationFormPanel");
        addOrReplace(registrationFormPanel);
        return registrationFormPanel;
    }
}


text:
class CreateEvents < ActiveRecord::Migration
  def change
    create_table :events do |t|
      t.date :date_on
      t.string :name
      t.string :category
      t.text :summary

      t.timestamps null: false
    end
  end
end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Class org.apache.cassandra.db.index.SecondaryIndexSearcher (apache-cassandra API)</title>
<meta name="date" content="2016-04-28">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
org.apache.cassandra.db.index.SecondaryIndexSearcher

Packages that use SecondaryIndexSearcher

Package
Description

org.apache.cassandra.db

org.apache.cassandra.db.index

org.apache.cassandra.db.index.composites

org.apache.cassandra.db.index.keys

Uses of SecondaryIndexSearcher in org.apache.cassandra.db

Fields in org.apache.cassandra.db declared as SecondaryIndexSearcher

Modifier and Type
Field and Description

SecondaryIndexSearcher
AbstractRangeCommand.searcher

Uses of SecondaryIndexSearcher in org.apache.cassandra.db.index

Methods in org.apache.cassandra.db.index that return SecondaryIndexSearcher

Modifier and Type
Method and Description

protected abstract SecondaryIndexSearcher
SecondaryIndex.createSecondaryIndexSearcher(java.util.Set<java.nio.ByteBuffer> columns)

Called at query time
 Creates a implementation specific searcher instance for this index type

SecondaryIndexSearcher
SecondaryIndexManager.getHighestSelectivityIndexSearcher(java.util.List<IndexExpression> clause)

Methods in org.apache.cassandra.db.index that return types with arguments of type SecondaryIndexSearcher

Modifier and Type
Method and Description

java.util.List<SecondaryIndexSearcher>
SecondaryIndexManager.getIndexSearchersForQuery(java.util.List<IndexExpression> clause)

Get a list of IndexSearchers from the union of expression index types

Uses of SecondaryIndexSearcher in org.apache.cassandra.db.index.composites

Subclasses of SecondaryIndexSearcher in org.apache.cassandra.db.index.composites

Modifier and Type
Class and Description

class
CompositesSearcher

Methods in org.apache.cassandra.db.index.composites that return SecondaryIndexSearcher

Modifier and Type
Method and Description

SecondaryIndexSearcher
CompositesIndex.createSecondaryIndexSearcher(java.util.Set<java.nio.ByteBuffer> columns)

Uses of SecondaryIndexSearcher in org.apache.cassandra.db.index.keys

Subclasses of SecondaryIndexSearcher in org.apache.cassandra.db.index.keys

Modifier and Type
Class and Description

class
KeysSearcher

Methods in org.apache.cassandra.db.index.keys that return SecondaryIndexSearcher

Modifier and Type
Method and Description

SecondaryIndexSearcher
KeysIndex.createSecondaryIndexSearcher(java.util.Set<java.nio.ByteBuffer> columns)

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2016 The Apache Software Foundation


text:
name: Smart Watch Q18

shopify_product_id: 153055592492

shopify_product_component_id: product-component-1516392559541

styles:
  - name: Grey
    color: '#808080'
    image: /images/products/anti-theft-backpack/grey.jpg
  - name: Black
    color: '#000000'
    image: /images/products/anti-theft-backpack/black.jpg
  - name: Blue
    color: '#39589e'
    image: /images/products/anti-theft-backpack/blue.jpg
  - name: Purple
    color: '#800080'
    image: /images/products/anti-theft-backpack/purple.jpg
---

Q18: https://www.youtube.com/watch?v=wl3S_Zmi9cs

https://www.youtube.com/watch?v=cjWzYrJWWig

 its like a normal phone. but in a watch form
it has call recorder?
 is this rechargeable
 It doesn't have a headphone jack, but you can pair a bluetooth headset to it.
 micro sim ?? can you use the one out of your phone
Can you send sms text messages!? Can you reply to text!? Can you set up quick responses for texts!?

I bought this for work so I don't have to keep pulling my phone out my pocket. I only need the bluetooth notifications feature, texting and some time answer or make calls (through my phone). The other features I can really do without

I was hoping you'd show if it can reply and send texts , and show how!

Liten to music via loudspeaker on the watch or thru bluetooth headset.

Can you put a text in notepad? Cheating on tests and stuff like that.

Can you send sms text messages!? Can you reply to text!? Can you set up quick responses for texts!?


text:
package io.crpdevs.demo.rs.exception.error;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class ApiGlobalError {

    private String code;
}


text:
namespace Ui {
class MNRow;
}

class MNRow : public QWidget
{
    Q_OBJECT

public:
    explicit MNRow(QWidget *parent = nullptr);
    ~MNRow();

    void updateView(QString address, const QString& label, QString status, bool wasCollateralAccepted);

Q_SIGNALS:
    void onMenuClicked();
private:
    Ui::MNRow *ui;
};

#endif // MNROW_H


text:
// .NAME vtkAxis - takes care of drawing 2D axes
//
// .SECTION Description
// The vtkAxis is drawn in screen coordinates. It is usually one of the last
// elements of a chart to be drawn. It renders the axis label, tick marks and
// tick labels.

#ifndef __vtkAxis_h
#define __vtkAxis_h

#include "vtkChartsCoreModule.h" // For export macro
#include "vtkContextItem.h"
#include "vtkSmartPointer.h" // For vtkSmartPointer
#include "vtkVector.h"       // For position variables
#include "vtkRect.h"         // For bounding rect
#include "vtkStdString.h"    // For vtkStdString ivars

class vtkContext2D;
class vtkPen;
class vtkFloatArray;
class vtkDoubleArray;
class vtkStringArray;
class vtkTextProperty;

class VTKCHARTSCORE_EXPORT vtkAxis : public vtkContextItem
{
public:
  vtkTypeMacro(vtkAxis, vtkContextItem);
  virtual void PrintSelf(ostream &os, vtkIndent indent);

  // Description:
  // Enumeration of the axis locations in a conventional XY chart. Other
  // layouts are possible.
  enum {
    LEFT = 0,
    BOTTOM,
    RIGHT,
    TOP,
    PARALLEL
  };

  enum {
    TICK_SIMPLE = 0,
    TICK_WILKINSON_EXTENDED
  };

  // Description:
  // Creates a 2D Chart object.
  static vtkAxis *New();

  // Description:
  // Get/set the position of the axis (LEFT, BOTTOM, RIGHT, TOP, PARALLEL).
  virtual void SetPosition(int position);
  vtkGetMacro(Position, int);

  // Description:
  // Set point 1 of the axis (in pixels), this is usually the origin.
  void SetPoint1(const vtkVector2f& pos);
  void SetPoint1(float x, float y);

  // Description:
  // Get point 1 of the axis (in pixels), this is usually the origin.
  vtkGetVector2Macro(Point1, float);
  vtkVector2f GetPosition1();

  // Description:
  // Set point 2 of the axis (in pixels), this is usually the terminus.
  void SetPoint2(const vtkVector2f& pos);
  void SetPoint2(float x, float y);

  // Description:
  // Get point 2 of the axis (in pixels), this is usually the terminus.
  vtkGetVector2Macro(Point2, float);
  vtkVector2f GetPosition2();

  // Description:
  // Set the number of tick marks for this axis. Default is -1, which leads to
  // automatic calculation of nicely spaced tick marks.
  vtkSetMacro(NumberOfTicks, int);

  // Description:
  // Get the number of tick marks for this axis.
  vtkGetMacro(NumberOfTicks, int);

  // Description:
  // Get the vtkTextProperty that governs how the axis lables are displayed.
  // Note that the alignment properties are not used.
  vtkGetObjectMacro(LabelProperties, vtkTextProperty);

  // Description:
  // Set the logical minimum value of the axis, in plot coordinates.
  virtual void SetMinimum(double minimum);

  // Description:
  // Get the logical minimum value of the axis, in plot coordinates.
  vtkGetMacro(Minimum, double);

  // Description:
  // Set the logical maximum value of the axis, in plot coordinates.
  virtual void SetMaximum(double maximum);

  // Description:
  // Get the logical maximum value of the axis, in plot coordinates.
  vtkGetMacro(Maximum, double);

  // Description:
  // Set the logical range of the axis, in plot coordinates.
  virtual void SetRange(double minimum, double maximum);
  virtual void SetRange(double range[2]);

  // Description:
  // Get the logical range of the axis, in plot coordinates.
  virtual void GetRange(double *range);

  // Description:
  // Set the logical lowest possible value for \a Minimum, in plot coordinates.
  virtual void SetMinimumLimit(double lowest);

  // Description:
  // Get the logical lowest possible value for \a Minimum, in plot coordinates.
  vtkGetMacro(MinimumLimit, double);

  // Description:
  // Set the logical highest possible value for \a Maximum, in plot coordinates.
  virtual void SetMaximumLimit(double highest);

  // Description:
  // Get the logical highest possible value for \a Maximum, in plot coordinates.
  vtkGetMacro(MaximumLimit, double);

  // Description:
  // Get the margins of the axis, in pixels.
  vtkGetVector2Macro(Margins, int);

  // Description:
  // Set the margins of the axis, in pixels.
  vtkSetVector2Macro(Margins, int);

  // Description:
  // Get/set the title text of the axis.
  virtual void SetTitle(const vtkStdString &title);
  virtual vtkStdString GetTitle();

  // Description:
  // Get the vtkTextProperty that governs how the axis title is displayed.
  vtkGetObjectMacro(TitleProperties, vtkTextProperty);

  // Description:
  // Get/set whether the axis should use a log scale, default is false.
  vtkSetMacro(LogScale, bool);
  vtkGetMacro(LogScale, bool);

  // Description:
  // Get/set whether the axis grid lines should be drawn, default is true.
  vtkSetMacro(GridVisible, bool);
  vtkGetMacro(GridVisible, bool);

  // Description:
  // Get/set whether the axis labels should be visible.
  vtkSetMacro(LabelsVisible, bool);
  vtkGetMacro(LabelsVisible, bool);

  // Description:
  // Get/set whether the tick marks should be visible.
  vtkSetMacro(TicksVisible, bool);
  vtkGetMacro(TicksVisible, bool);

  // Description:
  // Get/set the numerical precision to use, default is 2.
  virtual void SetPrecision(int precision);
  vtkGetMacro(Precision, int);

  // Description:
  // Enumeration of the axis notations available.
  enum {
    STANDARD_NOTATION = 0,
    SCIENTIFIC_NOTATION,
    FIXED_NOTATION,

    // deprecated, use the *_NOTATION versions above
    STANDARD = STANDARD_NOTATION,
    SCIENTIFIC = SCIENTIFIC_NOTATION,
    MIXED = FIXED_NOTATION
  };

  // Description:
  // Get/set the numerical notation, standard, scientific or mixed (0, 1, 2).
  virtual void SetNotation(int notation);
  vtkGetMacro(Notation, int);

  // Description:
  // Enumeration of the axis behaviors.
  enum {
    AUTO = 0,
    FIXED,
    CUSTOM
  };

  // Description:
  // Get/set the behavior of the axis (auto, fixed, custom). Default is 0 (auto).
  vtkSetMacro(Behavior, int);
  vtkGetMacro(Behavior, int);

  // Description:
  // Get a pointer to the vtkPen object that controls the way this axis is drawn.
  vtkGetObjectMacro(Pen, vtkPen);

  // Description:
  // Get a pointer to the vtkPen object that controls the way this axis is drawn.
  vtkGetObjectMacro(GridPen, vtkPen);

  // Description:
  // Get/set the tick label algorithm that is used to calculate the min, max
  // and tick spacing. There are currently two algoriths, vtkAxis::TICK_SIMPLE
  // is the default and uses a simple algorithm. The second option is
  // vtkAxis::TICK_WILKINSON which uses an extended Wilkinson algorithm to find
  // the optimal range, spacing and font parameters.
  vtkSetMacro(TickLabelAlgorithm, int)
  vtkGetMacro(TickLabelAlgorithm, int)

  // Description:
  // Update the geometry of the axis. Takes care of setting up the tick mark
  // locations etc. Should be called by the scene before rendering.
  virtual void Update();

  // Description:
  // Paint event for the axis, called whenever the axis needs to be drawn.
  virtual bool Paint(vtkContext2D *painter);

  // Description:
  // Use this function to autoscale the axes after setting the minimum and
  // maximum values. This will cause the axes to select the nicest numbers
  // that enclose the minimum and maximum values, and to select an appropriate
  // number of tick marks.
  virtual void AutoScale();

  // Description:
  // Recalculate the spacing of the tick marks - typically useful to do after
  // scaling the axis.
  virtual void RecalculateTickSpacing();

  // Description:
  // An array with the positions of the tick marks along the axis line.
  // The positions are specified in the plot coordinates of the axis.
  virtual vtkDoubleArray* GetTickPositions();

  // Description:
  // Set the tick positions (in plot coordinates).
  virtual void SetTickPositions(vtkDoubleArray* positions);

  // Description:
  // An array with the positions of the tick marks along the axis line.
  // The positions are specified in scene coordinates.
  virtual vtkFloatArray* GetTickScenePositions();

  // Description:
  // A string array containing the tick labels for the axis.
  virtual vtkStringArray* GetTickLabels();

  // Description:
  // Set the tick labels for the axis.
  virtual void SetTickLabels(vtkStringArray* labels);

  // Description:
  // Request the space the axes require to be drawn. This is returned as a
  // vtkRectf, with the corner being the offset from Point1, and the width/
  // height being the total width/height required by the axis. In order to
  // ensure the numbers are correct, Update() should be called on the axis.
  vtkRectf GetBoundingRect(vtkContext2D* painter);

//BTX
protected:
  vtkAxis();
  ~vtkAxis();

  // Description:
  // Calculate and assign nice labels/logical label positions.
  void GenerateTickLabels(double min, double max);

  // Description:
  // Generate tick labels from the supplied double array of tick positions.
  void GenerateTickLabels();

  void GenerateLabelFormat(int notation, double n);

  // Description:
  // Calculate the next "nicest" numbers above and below the current minimum.
  // \return the "nice" spacing of the numbers.
  double CalculateNiceMinMax(double &min, double &max);

  // Description:
  // Return a "nice number", often defined as 1, 2 or 5. If roundUp is true then
  // the nice number will be rounded up, false it is rounded down. The supplied
  // number should be between 0.0 and 9.9.
  double NiceNumber(double number, bool roundUp);

  // Description:
  // Return a tick mark for a logarithmic axis.
  // If roundUp is true then the upper tick mark is returned.
  // Otherwise the lower tick mark is returned.
  // Tick marks will be: ... 0.1 0.2 .. 0.9 1 2 .. 9 10 20 .. 90 100 ...
  // Parameter nicevalue will be set to true if tick mark is in:
  // ... 0.1 0.2 0.5 1 2 5 10 20 50 100 ...
  // Parameter order is set to the detected order of magnitude of the number.
  double LogScaleTickMark(double number,
                          bool roundUp,
                          bool &niceValue,
                          int &order);

  // Description:
  // Generate tick marks for logarithmic scale for specific order of magnitude.
  // Mark generation is limited by parameters min and max.
  // Tick marks will be: ... 0.1 0.2 .. 0.9 1 2 .. 9 10 20 .. 90 100 ...
  // Tick labels will be: ... 0.1 0.2 0.5 1 2 5 10 20 50 100 ...
  // If Parameter detaillabels is disabled tick labels will be:
  // ... 0.1 1 10 100 ...
  // If min/max is not in between 1.0 and 9.0 defaults will be used.
  // If min and max do not differ 1 defaults will be used.
  void GenerateLogScaleTickMarks(int order,
                                 double min = 1.0,
                                 double max = 9.0,
                                 bool detailLabels = true);

  int Position;        // The position of the axis (LEFT, BOTTOM, RIGHT, TOP)
  float *Point1;       // The position of point 1 (usually the origin)
  float *Point2;       // The position of point 2 (usually the terminus)
  vtkVector2f Position1, Position2;
  double TickInterval; // Interval between tick marks in plot space
  int NumberOfTicks;   // The number of tick marks to draw
  vtkTextProperty* LabelProperties; // Text properties for the labels.
  double Minimum;      // Minimum value of the axis
  double Maximum;      // Maximum values of the axis
  double MinimumLimit; // Lowest possible value for Minimum
  double MaximumLimit; // Highest possible value for Maximum
  int Margins[2];      // Horizontal/vertical margins for the axis
  vtkStdString Title;  // The text label drawn on the axis
  vtkTextProperty* TitleProperties; // Text properties for the axis title
  bool LogScale;       // Should the axis use a log scale
  bool GridVisible;    // Whether the grid for the axis should be drawn
  bool LabelsVisible;  // Should the axis labels be visible
  bool TicksVisible;   // Should the tick marks be visible.
  int Precision;       // Numerical precision to use, defaults to 2.
  int Notation;        // The notation to use (standard, scientific, mixed)
  int Behavior;        // The behaviour of the axis (auto, fixed, custom).
  float MaxLabel[2];   // The widest/tallest axis label.
  bool TitleAppended;  // Track if the title is updated when the label formats
                       // are changed in the Extended Axis Labeling algorithm

  // Description:
  // This object stores the vtkPen that controls how the axis is drawn.
  vtkPen* Pen;

  // Description:
  // This object stores the vtkPen that controls how the grid lines are drawn.
  vtkPen* GridPen;

  // Description:
  // Position of tick marks in screen coordinates
  vtkSmartPointer<vtkDoubleArray> TickPositions;

  // Description:
  // Position of tick marks in screen coordinates
  vtkSmartPointer<vtkFloatArray> TickScenePositions;

  // Description:
  // The labels for the tick marks
  vtkSmartPointer<vtkStringArray> TickLabels;

  // Description:
  // Hint as to whether a nice min/max was set, otherwise labels may not be
  // present at the top/bottom of the axis.
  bool UsingNiceMinMax;

  // Description:
  // Mark the tick labels as dirty when the min/max value is changed.
  bool TickMarksDirty;

  // Description:
  // Flag to indicate that the axis has been resized.
  bool Resized;

  // Description:
  // Hint as to whether a logarithmic scale is reasonable or not.
  bool LogScaleReasonable;

  // Description:
  // The algorithm being used to tick label placement.
  int TickLabelAlgorithm;

  // Description:
  // The point cache is marked dirty until it has been initialized.
  vtkTimeStamp BuildTime;

private:
  vtkAxis(const vtkAxis &); // Not implemented.
  void operator=(const vtkAxis &);   // Not implemented.
//ETX
};

#endif //__vtkAxis_h


text:
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Core;
using UnityEditor;
using UnityEngine;
using Event = UnityEngine.Event;

namespace UnityTest
{
    public class GroupLine : UnitTestRendererLine
    {
        public static List<string> FoldMarkers;

        protected static GUIContent s_GUIExpandAll = new GUIContent("Expand all");
        protected static GUIContent s_GUICollapseAll = new GUIContent("Collapse all");
        private readonly List<UnitTestRendererLine> m_Children = new List<UnitTestRendererLine>();

        public GroupLine(TestSuite suite)
            : base(suite)
        {
            if (suite is NamespaceSuite) m_RenderedName = m_FullName;
        }

        private bool Folded
        {
            get { return FoldMarkers.Contains(m_FullName); }

            set
            {
                if (value)
                    FoldMarkers.Add(m_FullName);
                else
                    FoldMarkers.RemoveAll(s => s == m_FullName);
            }
        }

        public void AddChildren(UnitTestRendererLine[] children)
        {
            m_Children.AddRange(children);
        }

        protected internal override void Render(int indend, RenderingOptions options)
        {
            if (!AnyVisibleChildren(options)) return;
            base.Render(indend, options);
            if (!Folded)
                foreach (var child in m_Children)
                    child.Render(indend + 1, options);
        }

        private bool AnyVisibleChildren(RenderingOptions options)
        {
            return m_Children.Any(l => l.IsVisible(options));
        }

        protected internal override bool IsVisible(RenderingOptions options)
        {
            return AnyVisibleChildren(options);
        }

        protected override void DrawLine(bool isSelected, RenderingOptions options)
        {
            var resultIcon = GetResult().HasValue ? GuiHelper.GetIconForResult(GetResult().Value) : Icons.UnknownImg;

            var guiContent = new GUIContent(m_RenderedName, resultIcon, m_FullName);

            var rect = GUILayoutUtility.GetRect(guiContent, Styles.foldout, GUILayout.MaxHeight(16));

            OnLeftMouseButtonClick(rect);
            OnContextClick(rect);

            EditorGUI.BeginChangeCheck();
            var expanded = !EditorGUI.Foldout(rect, !Folded, guiContent, false, isSelected ? Styles.selectedFoldout : Styles.foldout);
            if (EditorGUI.EndChangeCheck()) Folded = expanded;
        }

        protected internal override TestResultState ? GetResult()
        {
            TestResultState? tempResult = null;

            foreach (var child in m_Children)
            {
                var childResultState = child.GetResult();

                if (childResultState == TestResultState.Failure || childResultState == TestResultState.Error)
                {
                    tempResult = TestResultState.Failure;
                    break;
                }
                if (childResultState == TestResultState.Success)
                    tempResult = TestResultState.Success;
                else if (childResultState == TestResultState.Ignored)
                    tempResult = TestResultState.Ignored;
            }
            if (tempResult.HasValue) return tempResult.Value;

            return null;
        }

        private void OnLeftMouseButtonClick(Rect rect)
        {
            if (rect.Contains(Event.current.mousePosition) && Event.current.type == EventType.mouseDown && Event.current.button == 0)
            {
                OnSelect();
            }
        }

        private void OnContextClick(Rect rect)
        {
            if (rect.Contains(Event.current.mousePosition) && Event.current.type == EventType.ContextClick)
            {
                PrintGroupContextMenu();
            }
        }

        private void PrintGroupContextMenu()
        {
            var multilineSelection = SelectedLines.Count() > 1;
            var m = new GenericMenu();
            if (multilineSelection)
            {
                m.AddItem(s_GUIRunSelected,
                          false,
                          data => RunTests(SelectedLines.Select(line => line.m_Test.TestName).ToArray()),
                          "");
            }
            if (!string.IsNullOrEmpty(m_FullName))
            {
                m.AddItem(s_GUIRun,
                          false,
                          data => RunTests(new[] { m_Test.TestName }),
                          "");
            }
            if (!multilineSelection)
            {
                m.AddSeparator("");

                m.AddItem(Folded ? s_GUIExpandAll : s_GUICollapseAll,
                          false,
                          data => ExpandOrCollapseAll(Folded),
                          "");
            }
            m.ShowAsContext();
        }

        private void ExpandOrCollapseAll(bool expand)
        {
            Folded = !expand;
            foreach (var child in m_Children)
            {
                if (child is GroupLine) (child as GroupLine).ExpandOrCollapseAll(expand);
            }
        }
    }
}


text:
package com.oce.springboot.training.d03s03;

import com.oce.springboot.training.d03s03.model.Product;
import com.oce.springboot.training.d03s03.repository.ProductRepository;
import com.oce.springboot.training.d03s03.service.ProductService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsNot.not;
import static org.junit.Assert.*;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Mockito.*;

@RunWith(MockitoJUnitRunner.class)
public class ProductServiceTest {

    @Mock
    private ProductRepository productRepository;

    // the tested service; also called 'system under test'
    @InjectMocks
    private ProductService productService;

    @Test
    public void shouldGetProductsWhenThereAreAvailableProducts() {
        // arrange
        final List<Product> products = Arrays.asList(new Product(1, "Asus"), new Product(2, "Dell"));
        when(productRepository.findAll()).thenReturn(products);

        // act
        final List<Product> resulted = productService.getProducts();

        // assert
        assertNotNull(resulted);
        assertThat(resulted.size(), is(products.size()));
    }

    @Test
    public void shouldNotGetAnyProductsWhenThereAreNoAvailableProducts() {
        when(productRepository.findAll()).thenReturn(new ArrayList<>());

        final List<Product> resulted = productService.getProducts();

        assertThat(resulted.size(), is(0));
    }

    @Test
    public void shouldGetAProductByIdWhenTheProductExists() {
        Product product = mock(Product.class);
        final String mockedName = "mocked name";
        when(product.getName()).thenReturn(mockedName);
        when(product.getId()).thenReturn(20);

        when(productRepository.findOne(anyInt())).thenReturn(product);

        final Product resulted = productService.getProduct(25);

        assertNotNull(resulted);
        assertThat(resulted.getName(), is(mockedName));
        assertThat(resulted.getId(), not(0));
    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldGetAProductByIdWhenTheProductDoesNotExist() {
        when(productRepository.findOne(anyInt())).thenReturn(null);

        final Product resulted = productService.getProduct(13);

        assertNull(resulted);
    }

    @Test
    public void shouldSaveAProduct() {
        Product product = mock(Product.class);
        final String mockedName = "mocked name";
        when(product.getName()).thenReturn(mockedName);

        final String response = productService.saveProduct(product);

        verify(productRepository, times(1)).save(product);

        assertNotNull(response);
        assertThat(response.length(), not(0));
    }
}