text:
package io.jxcore.node;

import android.bluetooth.BluetoothSocket;
import android.util.Log;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import org.thaliproject.p2p.btconnectorlib.PeerProperties;

public class OutgoingSocketThreadMock extends OutgoingSocketThread {
    Long threadId = 1234L;
    int port;
    boolean closeCalled = false;
    InputStream tempInputStream = null;
    OutputStream tempOutputStream = null;
    boolean localStreamsCreatedSuccessfully = false;
    ServerSocket mServerSocket = null;
    int mListeningOnPortNumber = ConnectionHelper.NO_PORT_NUMBER;

    public OutgoingSocketThreadMock(BluetoothSocket bluetoothSocket, Listener listener,
                                    InputStream inputStream, OutputStream outputStream)
            throws IOException {
        super(bluetoothSocket, listener, inputStream, outputStream);
    }

    public void setPort(int _port){
        port = _port;
    }

    @Override
    public void close() {
        closeCalled = true;
    }

    @Override
    public long getId() {
        return threadId;
    }

    @Override
    public void run() {
        mIsClosing = false;

        try {
            mServerSocket = new ServerSocket(port);
            Log.d(mTag, "Server socket local port: " + mServerSocket.getLocalPort());
        } catch (IOException e) {
            Log.e(mTag, "Failed to create a server socket instance: " + e.getMessage(), e);
            mServerSocket = null;
            mListener.onDisconnected(this, "Failed to create a server socket instance: " +
                    e.getMessage());
        }

        if (mServerSocket != null) {
            try {
                Log.i(mTag, "Now accepting connections...");

                if (mListener != null) {
                    mListeningOnPortNumber = mServerSocket.getLocalPort();
                    mListener.onListeningForIncomingConnections(mListeningOnPortNumber);
                }

                mLocalhostSocket = mServerSocket.accept(); // Blocking call

                Log.i(mTag, "Incoming data from address: " + getLocalHostAddressAsString()
                        + ", port: " + mServerSocket.getLocalPort());

                tempInputStream = mLocalhostSocket.getInputStream();
                tempOutputStream = mLocalhostSocket.getOutputStream();
                localStreamsCreatedSuccessfully = true;
            } catch (IOException e) {
                if (!mIsClosing) {
                    String errorMessage =  "Failed to create local streams: " + e.getMessage();
                    Log.e(mTag, errorMessage, e);
                    mListener.onDisconnected(this, errorMessage);
                }
            }

            if (localStreamsCreatedSuccessfully) {
                Log.d(mTag, "Setting local streams and starting stream copying threads...");
                mLocalInputStream = tempInputStream;
                mLocalOutputStream = tempOutputStream;

                startStreamCopyingThreads(new ConnectionData(
                    new PeerProperties(PeerProperties.BLUETOOTH_MAC_ADDRESS_UNKNOWN), false));
            }
        }
    }
}


text:
package org.senkbeil.debugger.akka.messages

import org.senkbeil.debugger.akka.messages.structures._

trait WatchpointMessageLike
  extends LocatableMessageLike with MessageLike with Serializable
{
  val field:        Option[JDIField]
  val `object`:     Option[JDIObject]
  val valueCurrent: Option[JDIValue]
}

redpajama_set_name: RedPajamaGithub


text:
define([
    'jquery',
    'model-engine/js/enum',
    'model-engine/js/plugs/plugutil'
], function($, enu, util) {
    var ModelType = enu.ModelType,
        FormfieldPrefix = enu.FormfieldPrefix;

    /**
     * 创建复选按钮表单项。
     * @param o {ModelForm} 模型表单对象的实例。
     *      o.containers {Array} 表单项的容器的队列。
     *      o.controls {Object} 表单项的字典。
     * @param container {Element} 表单项的容器。
     * @param settings {Object} 表单项的配置数据。
     * @param ext {Object} 扩展配置。
     * @param func {Function} 处理下一级表单项的配置数据的回调函数。
     * @param def {String} 表单对象的默认值。
     */
    function create(o, container, settings, ext, def){
        var attributes = settings.attributes,
            form_name = o.getControlName(settings),
            controls = util.createHorizontalContainer(o.containers, container, settings, form_name, attributes['label']);

        var lbl_chb = $('<label class="checkbox">');
        controls.append(lbl_chb);
        var input = $('<input />');
        lbl_chb.append(input);
        input.attr('id', form_name);
        input.attr('name', form_name);
        input.attr('type', 'checkbox');
        if (attributes.hasOwnProperty('placeholder')) {
            lbl_chb.append(attributes['placeholder']);
        };

        if (def) {
            $(input).prop('checked', !!(def * 1));
        };
        o.controls[form_name] = { 'id': form_name, 'name': settings.name, 'type': ModelType.CHECKBOXINPUT, 'field': attributes.field };
    }

    return {
        'create': create
    };
});


text:
<?php
namespace Sesshin\Tests\EntropyGenerator;

use Sesshin\EntropyGenerator\Uniq;

class UniqTest extends \PHPUnit_Framework_TestCase
{
    public function testGeneratesUniqueId()
    {
        $uniqGenerator = new Uniq();
        $this->assertRegExp('/\w+\.\w+/', $uniqGenerator->generate());
    }
}


text:
module.exports = function (math) {
  var util = require('../../util/index.js'),

      Complex = require('../../type/Complex.js'),
      collection = require('../../type/collection.js'),

      isNumBool = util.number.isNumBool,
      isCollection =collection.isCollection,
      isComplex = Complex.isComplex;

  /**
   * Get the imaginary part of a complex number.
   *
   *     im(x)
   *
   * For matrices, the function is evaluated element wise.
   *
   * @param {Number | Complex | Array | Matrix | Boolean} x
   * @return {Number | Array | Matrix} im
   */
  math.im = function im(x) {
    if (arguments.length != 1) {
      throw new util.error.ArgumentsError('im', arguments.length, 1);
    }

    if (isNumBool(x)) {
      return 0;
    }

    if (isComplex(x)) {
      return x.im;
    }

    if (isCollection(x)) {
      return collection.map(x, im);
    }

    if (x.valueOf() !== x) {
      // fallback on the objects primitive value
      return im(x.valueOf());
    }

    // return 0 for all non-complex values
    return 0;
  };
};


text:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             xmlns:app="http://schemas.android.com/apk/res-auto"
             xmlns:tools="http://schemas.android.com/tools"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:descendantFocusability="blocksDescendants"
             app:layout_behavior="@string/appbar_scrolling_view_behavior">

    <android.support.v4.widget.NestedScrollView
        android:id="@+id/product_detail_holder"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clipToPadding="false"
        android:paddingBottom="@dimen/dist_medium"
        android:visibility="gone"
        app:layout_scrollFlags="scroll"
        tools:visibility="visible">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <!-- Header Image -->
            <!--<include layout="@layout/layout_detail_header_user" />-->

            <!-- Section 1: Basic Info -->
            <include layout="@layout/layout_detail_info_user" />

            <!-- Section 2: Overview -->
            <include layout="@layout/layout_detail_overview_user" />

            <!-- Section 3: Crew -->
            <include layout="@layout/layout_detail_crew_user" />
            <include layout="@layout/layout_detail_edit_delete" />
            <!-- Section 4: Cast -->
            <!--<include layout="@layout/layout_detail_cast" />-->

        </LinearLayout>

    </android.support.v4.widget.NestedScrollView>

    <!-- Error message, loading circle and FAB -->
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <include
            android:id="@+id/error_message"
            layout="@layout/layout_error_message"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone" />

        <include
            android:id="@+id/progress_circle"
            layout="@layout/layout_progress_circle"
            android:layout_width="@dimen/progress_circle_width"
            android:layout_height="@dimen/progress_circle_height"
            android:layout_centerInParent="true"
            android:visibility="visible" />

    </RelativeLayout>

</FrameLayout>


text:
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

    <title>PHPXRef 0.7.1 : Unnamed Project : Detail view of array_helper.php</title>
    <link rel="stylesheet" href="../../../sample.css" type="text/css">
    <link rel="stylesheet" href="../../../sample-print.css" type="text/css" media="print">

    <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">

            [ Index ]

PHP Cross Reference of Unnamed Project

[ Show Explorer ]
[ Hide Navbar ]

title

Body

[close]

/bonfire/codeigniter/helpers/ -> array_helper.php (summary)

[Source view]
[Print]
[Project Stats]

CodeIgniter An open source application development framework for PHP 5.1.6 or newer

Author: 	ExpressionEngine Dev Team

Copyright: 	Copyright (c) 2008 - 2011, EllisLab, Inc.

License: 	http://codeigniter.com/user_guide/license.html

File Size: 	119 lines (3 kb)

Included or required:	0 times

Referenced: 	0 times

Includes or requires: 	0 files

Defines 3 functions

  element()

  random_element()

  elements()

Functions

Functions that are not part of a class:

element($item, $array, $default = FALSE)
X-Ref

Element

Lets you determine whether an array index is set and whether it has a value.

If the element is empty it returns FALSE (or whatever you specify as the default value.)

param: string

param: array

param: mixed

return: mixed    depends on what the array contains

random_element($array)
X-Ref

Random Element - Takes an array as input and returns a random element

param: array

return: mixed    depends on what the array contains

elements($items, $array, $default = FALSE)
X-Ref

Elements

Returns only the array items specified.  Will return a default value if

it is not set.

param: array

param: array

param: mixed

return: mixed    depends on what the array contains

Generated: Thu Oct 23 19:15:14 2014
	Cross-referenced by PHPXref 0.7.1


text:
layout: post
title:  "Lotor Keyboard"
name: "Lotor-Keyboard"
date:   2016-05-28 22:15:18 -0500
status: 1
category: side-project
tags: keyboard embedded C
---

 The Lotor Keyboard is a project that I've been working on for the past year or so. The idea behind the keyboard is a interface that suits my needs as a programmer, normal computer user, and computer gamer. The form factor that I developed for the keyboard is based upon the Ortholinear style of keyboards that you can learn more about [here](http://www.ortholinearkeyboards.com) and [here.](http://www.reddit.com/r/olkb)

<img src="{{site.baseurl}}/images/projects/Lotor-Keyboard.png" />

 The design for the case, PCB, cover, and layout were designed and developed by me. You can learn more about them at my Github page for the project, [here.](http://www.github.com/abborg/keyboard)


text:
<?php

namespace Troopers\MangopayBundle\Helper;

use Doctrine\ORM\EntityManager;
use MangoPay\UserNatural;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Troopers\MangopayBundle\Entity\UserInterface;
use Troopers\MangopayBundle\Entity\UserLegalInterface;
use Troopers\MangopayBundle\Entity\UserNaturalInterface;
use Troopers\MangopayBundle\Event\UserEvent;
use Troopers\MangopayBundle\TroopersMangopayEvents;

/**
 * ref: troopers_mangopay.user_helper.
 **/
class UserHelper
{
    private $mangopayHelper;
    private $entityManager;
    private $dispatcher;
    private $userLegalHelper;

    public function __construct(MangopayHelper $mangopayHelper, EntityManager $entityManager, EventDispatcherInterface $dispatcher, UserLegalHelper $userLegalHelper)
    {
        $this->mangopayHelper = $mangopayHelper;
        $this->entityManager = $entityManager;
        $this->dispatcher = $dispatcher;
        $this->userLegalHelper = $userLegalHelper;
    }

    /**
     * @param UserInterface $user
     * @param bool $inLiveCycleCallback
     * @return \MangoPay\UserLegal|UserNatural
     */
    public function findOrCreateMangoUser(UserInterface $user, $inLiveCycleCallback = false)
    {
        $mangoUser = null;

        if ($mangoUserId = $user->getMangoUserId()) {
            $mangoUser = $this->mangopayHelper->Users->get($mangoUserId);
        } elseif (!$inLiveCycleCallback) {
            if ($user instanceof UserNaturalInterface) {
                $mangoUser = $this->createMangoUser($user, $inLiveCycleCallback);
            } elseif ($user instanceof UserLegalInterface) {
                $mangoUser = $this->userLegalHelper->createMangoUserLegal($user, $inLiveCycleCallback);
            }
        }

        return $mangoUser;
    }

    /**
     * @param UserNaturalInterface $user
     * @param bool $inLiveCycleCallback
     * @return \MangoPay\UserLegal|UserNatural
     */
    public function createMangoUser(UserNaturalInterface $user, $inLiveCycleCallback = false)
    {
        $birthday = null;
        if ($user->getBirthDay() instanceof \Datetime) {
            $birthday = $user->getBirthDay()->getTimestamp();
        }
        $mangoUser = new UserNatural();
        $mangoUser->Email = $user->getEmail();
        $mangoUser->FirstName = $user->getFirstname();
        $mangoUser->LastName = $user->getLastname();
        $mangoUser->Birthday = $birthday;
        $mangoUser->Nationality = $user->getNationalityCode();
        $mangoUser->CountryOfResidence = $user->getCountryCode();
        $mangoUser->Tag = 'N_'.$user->getId();

        $mangoUser->Address = $user->getMangoAddress();

        $mangoUser = $this->mangopayHelper->Users->Create($mangoUser);

        $user->setMangoUserId($mangoUser->Id);

        $event = new UserEvent($user, $mangoUser);
        $this->dispatcher->dispatch(TroopersMangopayEvents::NEW_USER, $event);

        if (!$inLiveCycleCallback) {
            $this->entityManager->persist($user);
            $this->entityManager->flush();
        }

        return $mangoUser;
    }

    /**
     * @param UserNaturalInterface $user
     * @param bool $inLiveCycleCallback
     * @return \MangoPay\UserLegal|UserNatural
     */
    public function findOrCreateMangoUserNatural(UserNaturalInterface $user, $inLiveCycleCallback = false)
    {
        $mangoUser = null;

        if ($mangoUserId = $user->getMangoUserId()) {
            $mangoUser = $this->mangopayHelper->Users->GetNatural($mangoUserId);
        } elseif (!$inLiveCycleCallback) {
            $mangoUser = $this->createMangoUser($user, $inLiveCycleCallback);
        }

        return $mangoUser;
    }

    /**
     * @param UserNaturalInterface $user
     * @return \MangoPay\UserLegal|UserNatural
     */
    public function updateOrPersistMangoUserNatural(UserNaturalInterface $user)
    {
        if (!$user->getId() || !$user->getMangoUserId()) {
            return $this->createMangoUser($user, true);
        } else {
            return $this->updateMangoUser($user, true);
        }
    }

    /**
     * @param UserNaturalInterface $user
     * @param bool $inLiveCycleCallback
     * @return \MangoPay\UserLegal|UserNatural
     */
    public function updateMangoUser(UserNaturalInterface $user, $inLiveCycleCallback = false)
    {
        $birthday = null;
        if ($user->getBirthDay() instanceof \Datetime) {
            $birthday = $user->getBirthDay()->getTimestamp();
        }
        $mangoUserId = $user->getMangoUserId();
        $mangoUser = $this->mangopayHelper->Users->GetNatural($mangoUserId);

        $mangoUser->Email = $user->getEmail();
        $mangoUser->FirstName = $user->getFirstname();
        $mangoUser->LastName = $user->getLastname();
        $mangoUser->Birthday = $birthday;
        $mangoUser->Nationality = $user->getNationalityCode();
        $mangoUser->CountryOfResidence = $user->getCountryCode();
        $mangoUser->Tag = 'N_'.$user->getId();

        $mangoUser->Address = $user->getMangoAddress();

        $mangoUser = $this->mangopayHelper->Users->Update($mangoUser);

        if (!$inLiveCycleCallback) {
            $this->entityManager->persist($user);
            $this->entityManager->flush();
        }

        return $mangoUser;
    }

    /**
     * @param UserInterface $user
     * @return \MangoPay\UserLegal|UserNatural
     */
    public function updateOrPersistMangoUser(UserInterface $user)
    {

        if (!$user->getId() || !$user->getMangoUserId()) {
            if ($user instanceof UserNaturalInterface) {
                return $this->createMangoUser($user, true);
            } elseif ($user instanceof UserLegalInterface) {
                return $this->userLegalHelper->createMangoUserLegal($user, true);
            }
        } else {
            if ($user instanceof UserNaturalInterface) {
                return $this->updateMangoUser($user, true);
            } elseif ($user instanceof UserLegalInterface) {
                return $this->userLegalHelper->updateMangoUserLegal($user, true);
            }
        }

        return null;
    }

    public function getTransactions($userId)
    {
        return $this->mangopayHelper->Users->GetTransactions($userId);
    }

    public function getWallets($userId)
    {
        return $this->mangopayHelper->Users->GetWallets($userId);
    }

    public function getBankAccounts($userId)
    {
        return $this->mangopayHelper->Users->GetBankAccounts($userId);
    }
}


text:
from __future__ import absolute_import

from sentry.models import ServiceHook
from sentry.testutils import AcceptanceTestCase

class ProjectServiceHooksTest(AcceptanceTestCase):
    def setUp(self):
        super(ProjectServiceHooksTest, self).setUp()
        self.user = self.create_user("foo@example.com")
        self.org = self.create_organization(name="Rowdy Tiger", owner=None)
        self.team = self.create_team(organization=self.org, name="Mariachi Band")
        self.project = self.create_project(organization=self.org, teams=[self.team], name="Bengal")
        self.create_member(user=self.user, organization=self.org, role="owner", teams=[self.team])

        self.login_as(self.user)
        self.list_hooks_path = u"/settings/{}/projects/{}/hooks/".format(
            self.org.slug, self.project.slug
        )
        self.new_hook_path = u"/settings/{}/projects/{}/hooks/new/".format(
            self.org.slug, self.project.slug
        )

    def test_simple(self):
        with self.feature("projects:servicehooks"):
            self.browser.get(self.list_hooks_path)
            self.browser.wait_until_not(".loading-indicator")
            self.browser.snapshot("project settings - service hooks - empty list")
            # click "New"
            self.browser.click('[data-test-id="new-service-hook"]')

            self.browser.wait_until_not(".loading-indicator")
            assert self.browser.current_url == u"{}{}".format(
                self.browser.live_server_url, self.new_hook_path
            )
            self.browser.snapshot("project settings - service hooks - create")
            self.browser.element('input[name="url"]').send_keys("https://example.com/hook")
            # click "Save Changes"
            self.browser.click('form [data-test-id="form-submit"]')

            self.browser.wait_until_not(".loading-indicator")
            assert self.browser.current_url == u"{}{}".format(
                self.browser.live_server_url, self.list_hooks_path
            )
            self.browser.snapshot("project settings - service hooks - list with entries")

            hook = ServiceHook.objects.get(project_id=self.project.id)
            assert hook.url == "https://example.com/hook"
            assert not hook.events

            # hopefully click the first service hook
            self.browser.click('[data-test-id="project-service-hook"]')
            self.browser.wait_until_not(".loading-indicator")
            assert self.browser.current_url == u"{}{}".format(
                self.browser.live_server_url,
                u"/settings/{}/projects/{}/hooks/{}/".format(
                    self.org.slug, self.project.slug, hook.guid
                ),
            )
            self.browser.snapshot("project settings - service hooks - details")


text:
package plugin

// deriveDeepCopy recursively copies the contents of src into dst.
func deriveDeepCopy(dst, src *Plugin) {
	dst.Name = src.Name
	if src.Commands == nil {
		dst.Commands = nil
	} else {
		if dst.Commands != nil {
			if len(src.Commands) > len(dst.Commands) {
				if cap(dst.Commands) >= len(src.Commands) {
					dst.Commands = (dst.Commands)[:len(src.Commands)]
				} else {
					dst.Commands = make([]Command, len(src.Commands))
				}
			} else if len(src.Commands) < len(dst.Commands) {
				dst.Commands = (dst.Commands)[:len(src.Commands)]
			}
		} else {
			dst.Commands = make([]Command, len(src.Commands))
		}
		copy(dst.Commands, src.Commands)
	}
	dst.dir = src.dir
}


text:
package org.apereo.cas.adaptors.x509.authentication;

import org.apereo.cas.adaptors.x509.authentication.revocation.RevokedCertificateException;

import lombok.val;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.security.cert.X509CRLEntry;
import java.util.Date;

import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;

/**
 * This is {@link RevokedCertificateExceptionTests}.
 *
 * @author Misagh Moayyed
 * @since 6.4.0
 */
@Tag("X509")
@SuppressWarnings("JavaUtilDate")
public class RevokedCertificateExceptionTests {
    @Test
    public void verifyReason() {
        val entry = mock(X509CRLEntry.class);
        when(entry.hasExtensions()).thenReturn(Boolean.TRUE);
        when(entry.getSerialNumber()).thenReturn(BigInteger.ONE);
        when(entry.getRevocationDate()).thenReturn(new Date());
        when(entry.getExtensionValue(anyString())).thenReturn("3".getBytes(StandardCharsets.UTF_8));
        val results = new RevokedCertificateException(entry);
        assertNotNull(results.getReason());
        assertNotNull(results.getMessage());
    }
}


text:
const { app, BrowserWindow, ipcMain } = require('electron')

let mainWindow = null

function createWindow () {
  const windowOptions = {
    width: 600,
    height: 400,
    title: 'Synchronous Messages',
    webPreferences: {
      nodeIntegration: true
    }
  }

  mainWindow = new BrowserWindow(windowOptions)
  mainWindow.loadFile('index.html')

  mainWindow.on('closed', () => {
    mainWindow = null
  })
}

app.whenReady().then(() => {
  createWindow()
})

ipcMain.on('synchronous-message', (event, arg) => {
    event.returnValue = 'pong'
})


text:
<?php

namespace Google\AdsApi\Dfp\v201611;

/**
 * This file was generated from WSDL. DO NOT EDIT.
 */
abstract class BaseImageCreative extends \Google\AdsApi\Dfp\v201611\HasDestinationUrlCreative
{

    /**
     * @var boolean $overrideSize
     */
    protected $overrideSize = null;

    /**
     * @var \Google\AdsApi\Dfp\v201611\CreativeAsset $primaryImageAsset
     */
    protected $primaryImageAsset = null;

    /**
     * @param int $advertiserId
     * @param int $id
     * @param string $name
     * @param \Google\AdsApi\Dfp\v201611\Size $size
     * @param string $previewUrl
     * @param string $policyViolations
     * @param \Google\AdsApi\Dfp\v201611\AppliedLabel[] $appliedLabels
     * @param \Google\AdsApi\Dfp\v201611\DateTime $lastModifiedDateTime
     * @param \Google\AdsApi\Dfp\v201611\BaseCustomFieldValue[] $customFieldValues
     * @param string $destinationUrl
     * @param string $destinationUrlType
     * @param boolean $overrideSize
     * @param \Google\AdsApi\Dfp\v201611\CreativeAsset $primaryImageAsset
     */
    public function __construct($advertiserId = null, $id = null, $name = null, $size = null, $previewUrl = null, $policyViolations = null, array $appliedLabels = null, $lastModifiedDateTime = null, array $customFieldValues = null, $destinationUrl = null, $destinationUrlType = null, $overrideSize = null, $primaryImageAsset = null)
    {
      parent::__construct($advertiserId, $id, $name, $size, $previewUrl, $policyViolations, $appliedLabels, $lastModifiedDateTime, $customFieldValues, $destinationUrl, $destinationUrlType);
      $this->overrideSize = $overrideSize;
      $this->primaryImageAsset = $primaryImageAsset;
    }

    /**
     * @return boolean
     */
    public function getOverrideSize()
    {
      return $this->overrideSize;
    }

    /**
     * @param boolean $overrideSize
     * @return \Google\AdsApi\Dfp\v201611\BaseImageCreative
     */
    public function setOverrideSize($overrideSize)
    {
      $this->overrideSize = $overrideSize;
      return $this;
    }

    /**
     * @return \Google\AdsApi\Dfp\v201611\CreativeAsset
     */
    public function getPrimaryImageAsset()
    {
      return $this->primaryImageAsset;
    }

    /**
     * @param \Google\AdsApi\Dfp\v201611\CreativeAsset $primaryImageAsset
     * @return \Google\AdsApi\Dfp\v201611\BaseImageCreative
     */
    public function setPrimaryImageAsset($primaryImageAsset)
    {
      $this->primaryImageAsset = $primaryImageAsset;
      return $this;
    }

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Ramalina thrausta f. arboricola Räsänen

### Remarks
null


text:
package org.sleuthkit.autopsy.imagegallery.actions;

import org.sleuthkit.autopsy.imagegallery.ImageGalleryController;
import org.sleuthkit.autopsy.imagegallery.datamodel.Category;

/**
 *
 */
public class CategorizeSelectedFilesAction extends CategorizeAction {

    public CategorizeSelectedFilesAction(Category cat, ImageGalleryController controller) {
        super(controller, cat, null);
        setEventHandler(actionEvent ->
                addCatToFiles(controller.getSelectionModel().getSelected())
        );
    }
}


text:
```
rake compile
```

## pack gem

```
rake package
```

## just run the code

make sure you use jruby (via rbenv, rvm, etc)
```
jruby test.rb
```


text:
#ifndef UART_H
#define UART_H

#include <stdarg.h>
#include <uart_hw.h>

void ICACHE_FLASH_ATTR uart0_putchar(char c);
void ICACHE_FLASH_ATTR uart1_putchar(char c);
void ICACHE_FLASH_ATTR uart_init(UartBautRate uart0_br, UartBautRate uart1_br);
void ICACHE_FLASH_ATTR uart_task_init(void);
int ICACHE_FLASH_ATTR uart0_vprintf(const char *format, va_list ap);
int ICACHE_FLASH_ATTR uart0_printf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));

#endif /* UART_H */


text:
    Evènement
    <input type="text" ng-model="searchParam" class="form-control" placeholder="Mot clé">

0">

            {{suggestion}}

        <button type="button" class="btn btn-default" ng-click="searchParam = ''"></button>


text:
package com.github.dozermapper.core.builder.model.elengine;

import java.util.ArrayList;
import java.util.stream.Collectors;

import com.github.dozermapper.core.builder.model.jaxb.FieldDefinition;
import com.github.dozermapper.core.builder.model.jaxb.MappingDefinition;
import com.github.dozermapper.core.builder.model.jaxb.MappingsDefinition;
import com.github.dozermapper.core.classmap.ClassMap;
import com.github.dozermapper.core.classmap.Configuration;
import com.github.dozermapper.core.config.BeanContainer;
import com.github.dozermapper.core.el.ELEngine;
import com.github.dozermapper.core.factory.DestBeanCreator;
import com.github.dozermapper.core.propertydescriptor.PropertyDescriptorFactory;

import org.apache.commons.lang3.StringUtils;

/**
 * {@inheritDoc}
 */
public class ELMappingDefinition extends MappingDefinition {

    private final ELEngine elEngine;

    public ELMappingDefinition(ELEngine elEngine, MappingDefinition copy) {
        this(elEngine, (MappingsDefinition)null);

        if (copy != null) {
            this.classA = new ELClassDefinition(elEngine, copy.getClassA());
            this.classB = new ELClassDefinition(elEngine, copy.getClassB());

            if (copy.getFieldOrFieldExclude() != null && copy.getFieldOrFieldExclude().size() > 0) {
                this.fieldOrFieldExclude = copy.getFieldOrFieldExclude()
                        .stream()
                        .map(f -> f instanceof FieldDefinition
                                ? new ELFieldDefinition(elEngine, (FieldDefinition)f)
                                : f)
                        .collect(Collectors.toList());
            }

            this.dateFormat = copy.getDateFormat();
            this.stopOnErrors = copy.getStopOnErrors();
            this.wildcard = copy.getWildcard();
            this.wildcardCaseInsensitive = copy.getWildcardCaseInsensitive();
            this.trimStrings = copy.getTrimStrings();
            this.mapNull = copy.getMapNull();
            this.mapEmptyString = copy.getMapEmptyString();
            this.beanFactory = copy.getBeanFactory();
            this.type = copy.getType();
            this.relationshipType = copy.getRelationshipType();
            this.mapId = copy.getMapId();
        }
    }

    public ELMappingDefinition(ELEngine elEngine, MappingsDefinition parent) {
        super(parent);

        this.elEngine = elEngine;
    }

    @Override
    public FieldDefinition withField() {
        if (getFields() == null) {
            setFields(new ArrayList<>());
        }

        ELFieldDefinition field = new ELFieldDefinition(elEngine, this);
        getFields().add(field);

        return field;
    }

    @Override
    public ClassMap build(Configuration configuration, BeanContainer beanContainer, DestBeanCreator destBeanCreator, PropertyDescriptorFactory propertyDescriptorFactory) {
        if (!StringUtils.isBlank(beanFactory)) {
            setBeanFactory(elEngine.resolve(beanFactory));
        }

        return super.build(configuration, beanContainer, destBeanCreator, propertyDescriptorFactory);
    }
}


text:
Crashbreak.configure do |config|
  config.api_key = '<%= token %>'

  # Use Crashbreak::ForkExceptionNotifier if you want to use fork for sending exception data.
  config.exception_notifier = Crashbreak::ExceptionNotifier.new

  # Serialize an exception in the best way for your project, add custom tabs, change default summary.
  config.error_serializers = [Crashbreak::DefaultSummarySerializer.new, Crashbreak::EnvironmentVariablesSerializer.new]

  # Specify dumpers list for future restoring process.
  config.dumpers = [Crashbreak::RequestDumper.new] # Crashbreak::DatabaseDumper.new requires additional setup (check README)

  # Config for all dumpers (aws is required for DatabaseDumper)
  config.dumper_options = {
      aws_bucket_name: 'bucket-name-here',
      aws_region: 'us-east-1',      # default: ENV['AWS_REGION']
      aws_access_key_id: 'xxx',     # default: ENV['AWS_ACCESS_KEY_ID']
      aws_secret_access_key: 'xxx', # default: ENV['AWS_SECRET_ACCESS_KEY']
  }

  # Config for GitHub integration
  config.github_integration = false
  config.github_login = ENV['GITHUB_USER']
  config.github_password = ENV['GITHUB_PASSWORD']
  config.github_repo_name = ENV['GITHUB_REPO_NAME']
end


text:
```mermaid
%% STEPS TO GENERATE IMAGE
%% =======================
%% 1. Install mermaid CLI (see https://github.com/mermaid-js/mermaid-cli/blob/master/README.md)
%% 2. Run command: mmdc -i DefaultAzureCredentialAuthFlow.md -o DefaultAzureCredentialAuthFlow.svg

flowchart LR;
    A(Environment):::deployed ==> B(Managed Identity):::deployed ==> C(Azure CLI):::developer ==> D(Azure PowerShell):::developer ==> E(Interactive browser):::interactive;

    subgraph CREDENTIAL TYPES;
        direction LR;
        Deployed(Deployed service):::deployed ==> Developer(Developer):::developer ==> Interactive(Interactive developer):::interactive;

        %% Hide links between boxes in the legend by setting width to 0. The integers after "linkStyle" represent link indices.
        linkStyle 4 stroke-width:0px;
        linkStyle 5 stroke-width:0px;
    end;

    %% Define styles for credential type boxes
    classDef deployed fill:#95C37E, stroke:#71AD4C;
    classDef developer fill:#F5AF6F, stroke:#EB7C39;
    classDef interactive fill:#A5A5A5, stroke:#828282;

    %% Add API ref links to credential type boxes
    click A "https://docs.microsoft.com/python/api/azure-identity/azure.identity.environmentcredential?view=azure-python" _blank;
    click B "https://docs.microsoft.com/python/api/azure-identity/azure.identity.managedidentitycredential?view=azure-python" _blank;
    click C "https://docs.microsoft.com/python/api/azure-identity/azure.identity.azureclicredential?view=azure-python" _blank;
    click D "https://docs.microsoft.com/python/api/azure-identity/azure.identity.azurepowershellcredential?view=azure-python" _blank;
    click E "https://docs.microsoft.com/python/api/azure-identity/azure.identity.interactivebrowsercredential?view=azure-python" _blank;
```