text:
package com.liulishuo.filedownloader.download;

import android.app.Application;
import android.content.Context;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;

import com.liulishuo.filedownloader.FileDownloader;
import com.liulishuo.filedownloader.IThreadPoolMonitor;
import com.liulishuo.filedownloader.database.FileDownloadDatabase;
import com.liulishuo.filedownloader.exception.FileDownloadNetworkPolicyException;
import com.liulishuo.filedownloader.model.FileDownloadHeader;
import com.liulishuo.filedownloader.model.FileDownloadModel;
import com.liulishuo.filedownloader.model.FileDownloadStatus;
import com.liulishuo.filedownloader.util.FileDownloadHelper;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

import java.util.Iterator;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.robolectric.RuntimeEnvironment.application;

@RunWith(RobolectricTestRunner.class)
@Config(manifest = Config.NONE)
public class DownloadLaunchRunnableTest {

    @Test
    public void onRetry_validRetryTimesDecrease_only1() {
        final DownloadLaunchRunnable launchRunnable = DownloadLaunchRunnable
                .createForTest(mock(DownloadStatusCallback.class),
                        mock(FileDownloadModel.class), mock(FileDownloadHeader.class),
                        mock(IThreadPoolMonitor.class),
                        1000, 100, false,
                        true, 3);
        launchRunnable.onRetry(mock(Exception.class));
        assertThat(launchRunnable.validRetryTimes).isEqualTo(2);
        launchRunnable.onRetry(mock(Exception.class));
        assertThat(launchRunnable.validRetryTimes).isEqualTo(1);
        launchRunnable.onRetry(mock(Exception.class));
        assertThat(launchRunnable.validRetryTimes).isEqualTo(0);
    }

    @Test
    public void run_noWifiButRequired_callbackNetworkError() {
        // init context
        final Application spyApplication = spy(application);
        when(spyApplication.getApplicationContext()).thenReturn(spyApplication);
        FileDownloader.setupOnApplicationOnCreate(spyApplication)
                .database(getMockNonOptDatabaseMaker())
                .commit();

        // no wifi state
        mockContextNoWifiState(spyApplication);

        // pending model
        final FileDownloadModel model = mock(FileDownloadModel.class);
        when(model.getId()).thenReturn(1);
        when(model.getStatus()).thenReturn(FileDownloadStatus.pending);

        // mock launch runnable.
        final DownloadStatusCallback callback = mock(DownloadStatusCallback.class);
        final DownloadLaunchRunnable launchRunnable = DownloadLaunchRunnable.createForTest(callback,
                model, mock(FileDownloadHeader.class), mock(IThreadPoolMonitor.class),
                1000, 100, false,
                true, 0);

        launchRunnable.run();

        verify(callback).onErrorDirectly(any(FileDownloadNetworkPolicyException.class));
    }

    private static void mockContextNoWifiState(Context context) {
        when(context.checkCallingOrSelfPermission(anyString()))
                .thenReturn(PackageManager.PERMISSION_GRANTED);
        final ConnectivityManager connectivityManager = mock(ConnectivityManager.class);
        when(context.getSystemService(Context.CONNECTIVITY_SERVICE))
                .thenReturn(connectivityManager);

        // not wifi.
        when(connectivityManager.getActiveNetworkInfo()).thenReturn(null);
    }

    private static FileDownloadHelper.DatabaseCustomMaker getMockNonOptDatabaseMaker() {
        final FileDownloadDatabase database = mock(FileDownloadDatabase.class);
        when(database.maintainer()).thenReturn(new FileDownloadDatabase.Maintainer() {
            @Override
            public void onFinishMaintain() {
            }

            @Override
            public void onRemovedInvalidData(FileDownloadModel model) {
            }

            @Override
            public void onRefreshedValidData(FileDownloadModel model) {
            }

            @Override
            public void changeFileDownloadModelId(int oldId, FileDownloadModel modelWithNewId) {
            }

            @Override
            public Iterator<FileDownloadModel> iterator() {
                return new Iterator<FileDownloadModel>() {
                    @Override
                    public boolean hasNext() {
                        return false;
                    }

                    @Override
                    public FileDownloadModel next() {
                        return null;
                    }
                };
            }
        });

        return new FileDownloadHelper.DatabaseCustomMaker() {
            @Override
            public FileDownloadDatabase customMake() {
                return database;
            }
        };
    }
}


text:
#include "CaptureDeviceImpl.h"

#include "logging.h"

#include <exception>

using namespace tcam;

struct bad_device : std::exception
{
    const char* what() const noexcept final
    {
        return "Device did not comply with commands.";
    }
};

CaptureDeviceImpl::CaptureDeviceImpl(const DeviceInfo& device_desc)
{
    device_ = openDeviceInterface(device_desc);
    if (device_ == nullptr)
    {
        throw bad_device();
    }

    available_output_formats_ = device_->get_available_video_formats();
    if (available_output_formats_.empty())
    {
        SPDLOG_ERROR("Device '{}-{}-{}' has no video formats",
                     device_desc.get_name(),
                     device_desc.get_serial(),
                     device_desc.get_device_type_as_string());
        throw bad_device();
    }

    property_filter_.setup(device_->get_properties(), available_output_formats_);

    const auto serial = device_->get_device_description().get_serial();
    index_.register_device_lost(deviceindex_lost_cb, this, serial);
}

CaptureDeviceImpl::~CaptureDeviceImpl()
{
    stop_stream();

    available_output_formats_.clear();

    device_.reset();
}

bool CaptureDeviceImpl::is_device_open() const
{
    return device_ != nullptr;
}

DeviceInfo CaptureDeviceImpl::get_device() const
{
    return device_->get_device_description();
}

bool CaptureDeviceImpl::register_device_lost_callback(tcam_device_lost_callback callback,
                                                      void* user_data)
{
    device_lost_callback_data_ = { callback, user_data };

    return device_->register_device_lost_callback(callback, user_data);
}

void CaptureDeviceImpl::deviceindex_lost_cb(const DeviceInfo& info, void* user_data)
{
    auto self = (CaptureDeviceImpl*)user_data;

    auto data = self->device_lost_callback_data_;
    if (data.callback)
    {
        const auto i = info.get_info();

        (*data.callback)(&i, data.user_data);
    }
}

std::vector<std::shared_ptr<tcam::property::IPropertyBase>> CaptureDeviceImpl::get_properties()
{
    return property_filter_.getProperties();
}

std::vector<VideoFormatDescription> CaptureDeviceImpl::get_available_video_formats() const
{
    return available_output_formats_;
}

bool CaptureDeviceImpl::set_video_format(const VideoFormat& new_format)
{
    return device_->set_video_format(new_format);
}

VideoFormat CaptureDeviceImpl::get_active_video_format() const
{
    return device_->get_active_video_format();
}

bool CaptureDeviceImpl::start_stream(const std::shared_ptr<ImageSink>& sink)
{
    if (sink == nullptr)
    {
        SPDLOG_ERROR("No viable sink passed.");
        return false;
    }

    if (!sink->start_stream(device_))
    {
        return false;
    }

    auto buffer_list = sink->get_buffer_collection();
    if (buffer_list.empty())
    {
        SPDLOG_ERROR("CaptureDeviceImpl has no image buffers!");
        return false;
    }

    property_filter_.setVideoFormat(device_->get_active_video_format());

    device_->initialize_buffers(buffer_list);

    sink_ = sink;

    if (!device_->start_stream(shared_from_this()))
    {
        SPDLOG_ERROR("Unable to start stream from device.");

        stop_stream();

        return false;
    }
    return true;
}

void CaptureDeviceImpl::stop_stream()
{
    device_->stop_stream();
    device_->release_buffers();
    sink_.reset();
}

void CaptureDeviceImpl::set_drop_incomplete_frames(bool b)
{
    device_->set_drop_incomplete_frames(b);
}

void CaptureDeviceImpl::push_image(const std::shared_ptr<ImageBuffer>& buffer)
{
    property_filter_.apply(*buffer);

    sink_->push_image(buffer);
}

outcome::result<tcam::framerate_info> CaptureDeviceImpl::get_framerate_info(const VideoFormat& fmt)
{
    return device_->get_framerate_info(fmt);
}

redpajama_set_name: RedPajamaGithub


text:
namespace rtmp {

AmfUtil::ReadStatus EventNotify::DecodeBody(io::MemoryStream* in,
    AmfUtil::Version v) {
  Clear();
  const AmfUtil::ReadStatus err = name_.Decode(in, rtmp::AmfUtil::AMF0_VERSION);
  if ( err != rtmp::AmfUtil::READ_OK ) {
    return err;
  }
  while ( !in->IsEmpty() ) {
    CObject* obj = NULL;
    const AmfUtil::ReadStatus err = Amf0Util::ReadNextObject(in, &obj);
    if ( err != AmfUtil::READ_OK ) {
      return err;
    }
    values_.push_back(obj);
  }
  return AmfUtil::READ_OK;
}

void EventNotify::EncodeBody(io::MemoryStream* out, AmfUtil::Version v) const {
  name_.Encode(out, v);
  for ( int i = 0; i < values_.size(); ++i ) {
    values_[i]->Encode(out, v);
  }
}
}


text:
namespace base {
class MessageLoopProxy;
}

namespace net {
class IOBuffer;
}

namespace device {

class HidConnectionMac : public HidConnection {
 public:
  explicit HidConnectionMac(HidDeviceInfo device_info);

 private:
  virtual ~HidConnectionMac();

  // HidConnection implementation.
  virtual void PlatformRead(const ReadCallback& callback) OVERRIDE;
  virtual void PlatformWrite(scoped_refptr<net::IOBuffer> buffer,
                             size_t size,
                             const WriteCallback& callback) OVERRIDE;
  virtual void PlatformGetFeatureReport(uint8_t report_id,
                                        const ReadCallback& callback) OVERRIDE;
  virtual void PlatformSendFeatureReport(
      scoped_refptr<net::IOBuffer> buffer,
      size_t size,
      const WriteCallback& callback) OVERRIDE;

  static void InputReportCallback(void* context,
                                  IOReturn result,
                                  void* sender,
                                  IOHIDReportType type,
                                  uint32_t report_id,
                                  uint8_t* report_bytes,
                                  CFIndex report_length);

  void WriteReport(IOHIDReportType type,
                   scoped_refptr<net::IOBuffer> buffer,
                   size_t size,
                   const WriteCallback& callback);

  void Flush();
  void ProcessInputReport(scoped_refptr<net::IOBufferWithSize> buffer);
  void ProcessReadQueue();

  base::ScopedCFTypeRef<IOHIDDeviceRef> device_;
  scoped_refptr<base::MessageLoopProxy> message_loop_;
  std::vector<uint8_t> inbound_buffer_;

  std::queue<PendingHidReport> pending_reports_;
  std::queue<PendingHidRead> pending_reads_;

  DISALLOW_COPY_AND_ASSIGN(HidConnectionMac);
};

}  // namespace device

#endif  // DEVICE_HID_HID_CONNECTION_MAC_H_


text:
<resources>
    <string name="app_name">Yosee</string>
    <string name="enter_your_id">아이디를 입력하세요</string>
    <string name="enter_your_password">비밀번호를 입력하세요</string>

    <!-- TODO: Remove or change this placeholder text -->
    <string name="hello_blank_fragment">Hello blank fragment</string>
    <string name="tool_bar_title">오늘의 레시피</string>
    <string name="action_post">글쓰기</string>
    <string name="settings">settings</string>
    <string name="step">STEP</string>
    <string name="please_insert_recipe">설명을 입력해주세요(필수)</string>
    <string name="next_step">Next Step</string>
    <string name="minute">분</string>
    <string name="amount">인분</string>
    <string name="materials_to_prepare">준비재료</string>
    <string name="please_insert_tip">팁이 있으면 적어주세요</string>
</resources>


text:
<?php

namespace Tusbol\SlideshowModule\Test\Unit\Slideshow;

class SlideshowFormBuilderTest extends \TestCase
{

}


text:
require 'json'
require 'net/https'
require 'uri'

#This class holds the methods for consuming the Whitepages API
class Whitepages

  #Initialize the Whitepages class
  # * api_key - The API key obtained from the Whitpages Developer website
  def initialize(api_key)
    api_version = "1.0"

    @api_key = api_key
    @base_uri = "http://api.whitepages.com/"
    @find_person_uri = @base_uri + "find_person/" + api_version + "/?"
    @reverse_phone_uri = @base_uri + "reverse_phone/" + api_version + "/?"
    @reverse_address_uri = @base_uri + "reverse_address/" + api_version + "/?"

    @uri = URI.parse(@base_uri)
    @http = Net::HTTP.new(@uri.host, @uri.port)
  end

  #Retrieves contact information about a person, such as a telephone number and address
  #Accepts a hash:
  # * firstname - First Name
  # * lastname - Last Name (*REQUIRED*)
  # * house - May take a range, in the form [start-end]
  # * apt - Apartment
  # * street - Street
  # * city - City
  # * state - State
  # * zip - ZipCode/PostalCode
  # * areacode - AreaCode
  # * metro - Whether or not to expand the search to the metro area
  #More details may be found here: http://developer.whitepages.com/docs/Methods/find_person
  def find_person(options)
    resp, data = @http.get(build_uri(options, "find_person"))
    if resp.code== 200
      return JSON.parse(data)
    else
      raise Exception,"code",resp.code
    end

  end

  #Retrieves contact information about a telephone number
  #Accepts a hash:
  # * phone - May be 7 digits if state provided otherwise 10 (*REQUIRED*)
  # * state - Two digit code for the state
  #More details may be found here: http://developer.whitepages.com/docs/Methods/reverse_phone
  def reverse_phone(options)
    resp, data = @http.get(build_uri(options, "reverse_phone"))

    if resp.code== 200
      return JSON.parse(data)
    else
      raise Exception,"code",resp.code
    end

  end

  #Retrieves contact information about the people at an address
  # * house - May take a range, in the form [start-end]
  # * apt - Apartment
  # * street - Street (*REQUIRED*)
  # * city - City
  # * state - State
  # * zip - ZipCode/PostalCode
  # * areacode - AreaCode
  #More details may be found here: http://developer.whitepages.com/docs/Methods/reverse_address
  def reverse_address(options)
    resp, data = @http.get(build_uri(options, "reverse_address"))
    if resp.code== 200
      return JSON.parse(data)
    else
      raise Exception,"code",resp.code
    end
  end

  private

  #Build the appropriate URL
  def build_uri(options, type)
    case type
    when "reverse_phone"
      built_uri = @reverse_phone_uri
    when "reverse_address"
      built_uri = @reverse_address_uri
    when "find_person"
      built_uri = @find_person_uri
    end

    options.each do |key,value|
      if value != nil
        built_uri = built_uri + key + "=" + value.gsub(' ', '%20') + ";"
      end
    end

    built_uri = built_uri + "api_key=" + @api_key + ";outputtype=JSON"
    return built_uri
  end

end


text:
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * Class CreateEmailsTable
 */
class CreateStatusesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('statuses', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->text('description');
            $table->string('color_rgb');
            $table->string('unique_name');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('statuses');
    }
}


text:
package client

import (
	"fmt"
	"io"

	"github.com/keybase/client/go/libkb"
	"github.com/keybase/client/go/protocol/keybase1"
	"golang.org/x/net/context"
)

type contactSettingsAPIHandler struct {
	libkb.Contextified
	accountClient keybase1.AccountClient
	teamsClient   keybase1.TeamsClient
	indent        bool
}

func newContactSettingsAPIHandler(g *libkb.GlobalContext, indentOutput bool) *contactSettingsAPIHandler {
	return &contactSettingsAPIHandler{Contextified: libkb.NewContextified(g), indent: indentOutput}
}

func (t *contactSettingsAPIHandler) handle(ctx context.Context, c Call, w io.Writer) error {
	switch c.Params.Version {
	case 0, 1:
		return t.handleV1(ctx, c, w)
	default:
		return ErrInvalidVersion{version: c.Params.Version}
	}
}

const (
	getMethod = "get"
	setMethod = "set"
)

var validContactSettingsMethodsV1 = map[string]bool{
	getMethod: true,
	setMethod: true,
}

func (t *contactSettingsAPIHandler) handleV1(ctx context.Context, c Call, w io.Writer) error {
	if !validContactSettingsMethodsV1[c.Method] {
		return ErrInvalidMethod{name: c.Method, version: 1}
	}

	accountClient, err := GetAccountClient(t.G())
	if err != nil {
		return err
	}
	t.accountClient = accountClient

	teamsClient, err := GetTeamsClient(t.G())
	if err != nil {
		return err
	}
	t.teamsClient = teamsClient

	switch c.Method {
	case getMethod:
		return t.get(ctx, c, w)
	case setMethod:
		return t.set(ctx, c, w)
	default:
		return ErrInvalidMethod{name: c.Method, version: 1}
	}
}

type TeamContactSettingsWithTeamName struct {
	TeamName string `json:"team_name"`
	Enabled  bool   `json:"enabled"`
}

type ContactSettingsWithTeamNames struct {
	AllowFolloweeDegrees int                               `json:"allow_followee_degrees"`
	AllowGoodTeams       bool                              `json:"allow_good_teams"`
	Enabled              bool                              `json:"enabled"`
	Teams                []TeamContactSettingsWithTeamName `json:"teams"`
}

func (t *contactSettingsAPIHandler) get(ctx context.Context, c Call, w io.Writer) error {
	res, err := t.accountClient.UserGetContactSettings(ctx)
	if err != nil {
		return t.encodeErr(c, err, w)
	}
	cliRes := ContactSettingsWithTeamNames{
		AllowFolloweeDegrees: res.AllowFolloweeDegrees,
		AllowGoodTeams:       res.AllowGoodTeams,
		Enabled:              res.Enabled,
		Teams:                make([]TeamContactSettingsWithTeamName, len(res.Teams)),
	}
	for i, team := range res.Teams {
		name, err := t.teamsClient.GetTeamName(ctx, team.TeamID)
		if err != nil {
			return t.encodeErr(c,
				fmt.Errorf("Unexpected error resolving team ID (%v) to name", team.TeamID), w)
		}
		nameStr := name.String()
		cliRes.Teams[i] = TeamContactSettingsWithTeamName{
			TeamName: nameStr,
			Enabled:  team.Enabled,
		}
	}
	return t.encodeResult(c, cliRes, w)
}

type setOptions struct {
	Settings ContactSettingsWithTeamNames `json:"settings"`
}

func (a *setOptions) Check() error {
	// expect server-side checks
	return nil
}

func (t *contactSettingsAPIHandler) set(ctx context.Context, c Call, w io.Writer) error {
	var opts setOptions
	if err := unmarshalOptions(c, &opts); err != nil {
		return t.encodeErr(c, err, w)
	}
	cliArgs := opts.Settings
	args := keybase1.ContactSettings{
		AllowFolloweeDegrees: cliArgs.AllowFolloweeDegrees,
		AllowGoodTeams:       cliArgs.AllowGoodTeams,
		Enabled:              cliArgs.Enabled,
		Teams:                make([]keybase1.TeamContactSettings, len(cliArgs.Teams)),
	}
	for i, team := range cliArgs.Teams {
		// resolve team name
		tid, err := t.teamsClient.GetTeamID(ctx, team.TeamName)
		if err != nil {
			return t.encodeErr(c, fmt.Errorf("Failed to get team ID from team name %v", team.TeamName), w)
		}
		args.Teams[i] = keybase1.TeamContactSettings{
			TeamID:  tid,
			Enabled: team.Enabled}
	}
	err := t.accountClient.UserSetContactSettings(ctx, args)
	if err != nil {
		return t.encodeErr(c, err, w)
	}
	return t.get(ctx, c, w)
}

func (t *contactSettingsAPIHandler) encodeResult(call Call, result interface{}, w io.Writer) error {
	return encodeResult(call, result, w, t.indent)
}

func (t *contactSettingsAPIHandler) encodeErr(call Call, err error, w io.Writer) error {
	return encodeErr(call, err, w, t.indent)
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">

    <string name="button_cancel">Одустани</string>
    <string name="button_enter_details">Унесите детаље</string>
    <string name="button_scan_qr">Скенирај QR код</string>
    <string name="button_save">Сачувај</string>
    <string name="button_new_tag">Нова ознака</string>
    <string name="button_settings">Подешавања</string>
    <string name="button_all_tags">Све ознаке</string>
    <string name="button_no_tags">Без ознаке</string>
    <string name="button_qr_from_image">QR кôд са слике</string>
    <string name="button_accept">Прихватам</string>

    <string name="format_custom_period">%d сек</string>

    <string name="hint_label">Ознака</string>
    <string name="hint_secret">Тајна</string>

    <string name="label_hidden">Сакривено</string>
    <string name="label_type">Тип</string>
    <string name="label_secret">Тајна</string>
    <string name="label_period">Интервал</string>
    <string name="label_digits">Цифре</string>
    <string name="label_counter">Бројач</string>
    <string name="label_issuer">Издавач</string>
    <string name="label_label">Ознака</string>
    <string name="label_algorithm">Алгоритам</string>
    <string name="label_tags">Ознаке</string>
    <string name="label_advanced">Напредне опције</string>

    <string name="drawer_open">Прикажи ознаке</string>
    <string name="drawer_close">Сакриј ознаке</string>

    <string name="menu_main_about">О апликацији</string>
    <string name="menu_main_backup">Резервна копија</string>
    <string name="menu_main_search">Претрага</string>
    <string name="menu_main_settings">Подешавања</string>
    <string name="menu_main_sort">Сортирај</string>
    <string name="menu_sort_none">Несортирано</string>
    <string name="menu_sort_issuer">Издавач</string>
    <string name="menu_sort_label">Ознака</string>
    <string name="menu_sort_last_used">Последњи пут коришћен</string>
    <string name="menu_sort_most_used">Најкоришћенији</string>
    <string name="menu_popup_edit">Уреди</string>
    <string name="menu_popup_change_image">Промени слику</string>
    <string name="menu_popup_remove">Уклони</string>
    <string name="menu_popup_show_qr_code">Прикажи QR кôд</string>
    <string name="menu_popup_establish_pin">Унети ПИН</string>
    <string name="menu_send_keystrokes">Делити као унос са тастера</string>

    <string name="button_card_options">Више опција</string>
    <string name="button_card_options_format">Више опција за %1$s</string>
    <string name="button_card_copy">Копирај жетон</string>
    <string name="button_card_copy_format">Копирај %1$s жетон</string>
    <string name="button_add">Додај нови налог</string>
    <string name="button_close_menu">Затвори мени</string>

    <string name="toast_auth_failed">Аутентификација није успела, покушајте поново!</string>
    <string name="toast_auth_failed_fatal">Аутентификација није успела, затварање andOTP-а!</string>
    <string name="toast_copied_to_clipboard">Копирано у остави</string>
    <string name="toast_entry_exists">Овај унос већ постоји</string>
    <string name="toast_invalid_qr_code">Неважећи QR кôд</string>
    <string name="toast_encryption_key_empty">Кључ за шифровање није учитан</string>
    <string name="toast_intent_creation_failed">Неважећи код послала апликација</string>
    <string name="toast_intent_creation_succeeded">Додат код што је послала апликација</string>
    <string name="toast_file_load_error">Не могу отворити датотеку</string>
    <string name="toast_qr_error">Није могуће пронаћи/потврдити QR кôд</string>
    <string name="toast_qr_checksum_exception">Верификација контролне суме није успела током декодирања QR кода</string>
    <string name="toast_qr_format_error">Грешка у формату QR кода</string>
    <string name="toast_qr_unsuported">QR кôд није подржан</string>
    <string name="toast_qr_failed_to_generate">Генерисање кода није успело</string>

    <string name="error_invalid_secret">Неважећа тајна</string>

    <string name="dialog_title_auth">Аутентификација</string>
    <string name="dialog_title_manual_entry">Унесите детаље</string>
    <string name="dialog_title_remove">Уклони</string>
    <string name="dialog_title_rename">Преименуј</string>
    <string name="dialog_title_counter">Бројач</string>
    <string name="dialog_title_used_tokens">Употреба жетона</string>
    <string name="dialog_title_keystore_error">KeyStore грешка</string>
    <string name="dialog_title_qr_code">QR кôд</string>
    <string name="dialog_title_pin">ПИН</string>
    <string name="dialog_title_enter_password">Унеси лозинку</string>
    <string name="dialog_title_auto_time">Аутоматско време</string>
    <string name="dialog_label_enter_password">Унеси лозинку</string>
    <string name="dialog_label_confirm_password">Потврди лозинку</string>
    <string name="dialog_msg_auth">Унесите акредитиве уређаја да бисте покренули andOTP.</string>
    <string name="dialog_msg_confirm_delete">Сигурно уклонити налог "%1$s"?</string>
    <string name="dialog_msg_used_tokens">andOTP ће пратити када користите своје жетоне (помоћу функције
        "Додирни за откривање" или копирања у оставу) да би их могао сортирати према
        "Најкоришћенији" или "Последњи пут коришћени".\n\nОва порука се неће поново приказивати.</string>
    <string name="dialog_msg_keystore_error">Неуспешно учитавање кључа за шифровање из KeyStore.
        Сви уноси који се додају биће изгубљени.\n\nДа бисте наставили да користите andOTP, можете отићи
        на Подешавања и да пребаците Шифровање базе на Лозинка/ПИН.</string>
    <string name="dialog_msg_auto_time">Омогућите опцију аутоматског датума и времена у подешавањима телефона како бисте осигурали исправно генерисање временских лозинки заснованих на време (TOTP).</string>
    <string name="dialog_hint_dont_show_again">Не приказуј ову поруку поново.</string>
    <string name="yes">Да</string>
    <string name="no">Не</string>

    <string name="shortcut_name_scan_qr">Скенирај QR кôд</string>
    <string name="shortcut_name_import_qr">Увоз QR кода</string>
    <string name="shortcut_name_enter_details">Унесите детаље</string>

    <string name="empty_list_view_text">Почните да додате своје жетоне притиском на \"+\" на дну</string>
</resources>


text:
from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
import six
import numpy as np
from scipy.ndimage.filters import uniform_filter1d
from scipy.ndimage.fourier import fourier_gaussian

from .utils import print_update, validate_tuple

# When loading module, try to use pyFFTW ("Fastest Fourier Transform in the
# West") if it is available.
try:
    import pyfftw
except ImportError:
    # Use numpy.
    USING_FFTW = False
    fftn = np.fft.fftn
    ifftn = np.fft.ifftn
else:
    USING_FFTW = True
    pyfftw.interfaces.cache.enable()
    planned = False

    def fftn(a):
        global planned
        if not planned:
            print_update("Note: FFTW is configuring itself. This will take " +
                         "several seconds, but subsequent calls will run " +
                         "*much* faster.")
            planned = True
        a = pyfftw.n_byte_align(a, a.dtype.alignment)
        return pyfftw.interfaces.numpy_fft.fftn(a).astype(np.complex128)

    def ifftn(a):
        a = pyfftw.n_byte_align(a, a.dtype.alignment)
        return pyfftw.interfaces.numpy_fft.ifftn(a)

def bandpass(image, lshort, llong, threshold=None):
    """Convolve with a Gaussian to remove short-wavelength noise,
    and subtract out long-wavelength variations,
    retaining features of intermediate scale.
    Parmeters
    ---------
    image : ndarray
    lshort : small-scale cutoff (noise)
    llong : large-scale cutoff
    for both lshort and llong:
        give a tuple value for different sizes per dimension
        give int value for same value for all dimensions
        when 2*lshort >= llong, no noise filtering is applied
    threshold : float or integer
        By default, 1 for integer images and 1/256. for float images.
    Returns
    -------
    ndarray, the bandpassed image
    """
    lshort = validate_tuple(lshort, image.ndim)
    llong = validate_tuple(llong, image.ndim)
    if np.any([x*2 >= y for (x, y) in zip(lshort, llong)]):
        raise ValueError("The smoothing length scale must be more" +
                         "than twice the noise length scale.")
    if threshold is None:
        if np.issubdtype(image.dtype, np.integer):
            threshold = 1
        else:
            threshold = 1/256.
    # Perform a rolling average (boxcar) with kernel size = 2*llong + 1
    boxcar = np.asarray(image)
    for (axis, size) in enumerate(llong):
        boxcar = uniform_filter1d(boxcar, size*2+1, axis, mode='nearest',
                                  cval=0)
    # Perform a gaussian filter
    gaussian = ifftn(fourier_gaussian(fftn(image), lshort)).real

    result = gaussian - boxcar
    return np.where(result > threshold, result, 0)

def scalefactor_to_gamut(image, original_dtype):
    return np.iinfo(original_dtype).max / image.max()

def scale_to_gamut(image, original_dtype, scale_factor=None):
    if scale_factor is None:
        scale_factor = scalefactor_to_gamut(image, original_dtype)
    scaled = (scale_factor * image.clip(min=0.)).astype(original_dtype)
    return scaled


text:
package org.apache.cloudstack.api.command.admin.account;

import java.util.Collection;
import java.util.Map;

import javax.inject.Inject;

import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
import org.apache.cloudstack.api.BaseCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.AccountResponse;
import org.apache.cloudstack.api.response.DomainResponse;
import org.apache.cloudstack.region.RegionService;
import org.apache.log4j.Logger;

import com.cloud.user.Account;

@APICommand(name = "updateAccount", description="Updates account information for the authenticated user", responseObject=AccountResponse.class)
public class UpdateAccountCmd extends BaseCmd{
    public static final Logger s_logger = Logger.getLogger(UpdateAccountCmd.class.getName());
    private static final String s_name = "updateaccountresponse";

    /////////////////////////////////////////////////////
    //////////////// API parameters /////////////////////
    /////////////////////////////////////////////////////

    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=AccountResponse.class,
            description="Account id")
    private Long id;

    @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="the current account name")
    private String accountName;

    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class,
            description="the ID of the domain where the account exists")
    private Long domainId;

    @Parameter(name=ApiConstants.NEW_NAME, type=CommandType.STRING, required=true, description="new name for the account")
    private String newName;

    @Parameter(name=ApiConstants.NETWORK_DOMAIN, type=CommandType.STRING, description="Network domain for the account's networks; empty string will update domainName with NULL value")
    private String networkDomain;

    @Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "details for account used to store specific parameters")
    private Map details;

    @Inject RegionService _regionService;

    /////////////////////////////////////////////////////
    /////////////////// Accessors ///////////////////////
    /////////////////////////////////////////////////////

    public Long getId() {
        return id;
    }

    public String getAccountName() {
        return accountName;
    }

    public Long getDomainId() {
        return domainId;
    }

    public String getNewName() {
        return newName;
    }

    public String getNetworkDomain() {
        return networkDomain;
    }

    public Map getDetails() {
        if (details == null || details.isEmpty()) {
            return null;
        }

        Collection paramsCollection = details.values();
        Map params = (Map) (paramsCollection.toArray())[0];
        return params;
    }

    /////////////////////////////////////////////////////
    /////////////// API Implementation///////////////////
    /////////////////////////////////////////////////////

    @Override
    public String getCommandName() {
        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        Account account = _entityMgr.findById(Account.class, getId());
        if (account != null) {
            return account.getAccountId();
        }
        account = _accountService.getActiveAccountByName(getAccountName(), getDomainId());
        if (account != null) {
            return account.getAccountId();
        }

        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
    }

    @Override
    public void execute(){
        Account result = _regionService.updateAccount(this);
        if (result != null){
            AccountResponse response = _responseGenerator.createAccountResponse(result);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update account");
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Oranikle.Studio.Controls
{
    public partial class CtrlTip : UserControl
    {
        public CtrlTip()
        {
            //if (!DesignMode)
            LP.Validate();
            InitializeComponent();
        }

        public string TipText
        {
            get { return lblText.Text; }
            set { lblText.Text = value; }
        }

        public Color TipBorderColor
        {
            get { return ctrlUIBase.BorderColor; }
            set { ctrlUIBase.BorderColor = value; }
        }

        public Color TipForeColor
        {
            get { return lblText.ForeColor; }
            set { lblText.ForeColor = value; }
        }

        public Color TipBackColor
        {
            get { return ctrlUIBase.BackColor; }
            set {
                lblText.BackColor = value;
                ctrlUIBase.BackColor = value; }
        }

        public BorderStyle TipBorderStyle
        {
            get {
                return ctrlUIBase.BorderStyle;
            }
            set
            {
                ctrlUIBase.BorderStyle = value;
            }
        }
    }
}


text:
package org.lwjgl.openvr;

import javax.annotation.*;

import java.nio.*;

import org.lwjgl.*;
import org.lwjgl.system.*;

import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.MemoryStack.*;

/**
 *
Layout

 *
 *

 * struct RenderModel_t {
 *     {@link RenderModelVertex RenderModel_Vertex_t} const * {@link #rVertexData};
 *     uint32_t {@link #unVertexCount};
 *     uint16_t const * {@link #IndexData};
 *     uint32_t {@link #unTriangleCount};
 *     TextureID_t {@link #diffuseTextureId};
 * }

 */
@NativeType("struct RenderModel_t")
public class RenderModel extends Struct implements NativeResource {

    /** The struct size in bytes. */
    public static final int SIZEOF;

    /** The struct alignment in bytes. */
    public static final int ALIGNOF;

    /** The struct member offsets. */
    public static final int
        RVERTEXDATA,
        UNVERTEXCOUNT,
        INDEXDATA,
        UNTRIANGLECOUNT,
        DIFFUSETEXTUREID;

    static {
        Layout layout = __struct(
            Platform.get() == Platform.LINUX || Platform.get() == Platform.MACOSX ? 4 : DEFAULT_PACK_ALIGNMENT, DEFAULT_ALIGN_AS,
            __member(POINTER_SIZE),
            __member(4),
            __member(POINTER_SIZE),
            __member(4),
            __member(4)
        );

        SIZEOF = layout.getSize();
        ALIGNOF = layout.getAlignment();

        RVERTEXDATA = layout.offsetof(0);
        UNVERTEXCOUNT = layout.offsetof(1);
        INDEXDATA = layout.offsetof(2);
        UNTRIANGLECOUNT = layout.offsetof(3);
        DIFFUSETEXTUREID = layout.offsetof(4);
    }

    /**
     * Creates a {@code RenderModel} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be
     * visible to the struct instance and vice versa.
     *
     *
The created instance holds a strong reference to the container object.

     */
    public RenderModel(ByteBuffer container) {
        super(memAddress(container), __checkContainer(container, SIZEOF));
    }

    @Override
    public int sizeof() { return SIZEOF; }

    /** Vertex data for the mesh */
    @NativeType("RenderModel_Vertex_t const *")
    public RenderModelVertex.Buffer rVertexData() { return nrVertexData(address()); }
    /** Number of vertices in the vertex data */
    @NativeType("uint32_t")
    public int unVertexCount() { return nunVertexCount(address()); }
    /** Indices into the vertex data for each triangle */
    @NativeType("uint16_t const *")
    public ShortBuffer IndexData() { return nIndexData(address()); }
    /** Number of triangles in the mesh. Index count is 3 * TriangleCount. */
    @NativeType("uint32_t")
    public int unTriangleCount() { return nunTriangleCount(address()); }
    /** Session unique texture identifier. Rendermodels which share the same texture will have the same id. 0 == texture not present. */
    @NativeType("TextureID_t")
    public int diffuseTextureId() { return ndiffuseTextureId(address()); }

    // -----------------------------------

    /** Returns a new {@code RenderModel} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */
    public static RenderModel malloc() {
        return wrap(RenderModel.class, nmemAllocChecked(SIZEOF));
    }

    /** Returns a new {@code RenderModel} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */
    public static RenderModel calloc() {
        return wrap(RenderModel.class, nmemCallocChecked(1, SIZEOF));
    }

    /** Returns a new {@code RenderModel} instance allocated with {@link BufferUtils}. */
    public static RenderModel create() {
        ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF);
        return wrap(RenderModel.class, memAddress(container), container);
    }

    /** Returns a new {@code RenderModel} instance for the specified memory address. */
    public static RenderModel create(long address) {
        return wrap(RenderModel.class, address);
    }

    /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static RenderModel createSafe(long address) {
        return address == NULL ? null : wrap(RenderModel.class, address);
    }

    /**
     * Returns a new {@link RenderModel.Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static RenderModel.Buffer malloc(int capacity) {
        return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity);
    }

    /**
     * Returns a new {@link RenderModel.Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static RenderModel.Buffer calloc(int capacity) {
        return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity);
    }

    /**
     * Returns a new {@link RenderModel.Buffer} instance allocated with {@link BufferUtils}.
     *
     * @param capacity the buffer capacity
     */
    public static RenderModel.Buffer create(int capacity) {
        ByteBuffer container = __create(capacity, SIZEOF);
        return wrap(Buffer.class, memAddress(container), capacity, container);
    }

    /**
     * Create a {@link RenderModel.Buffer} instance at the specified memory.
     *
     * @param address  the memory address
     * @param capacity the buffer capacity
     */
    public static RenderModel.Buffer create(long address, int capacity) {
        return wrap(Buffer.class, address, capacity);
    }

    /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static RenderModel.Buffer createSafe(long address, int capacity) {
        return address == NULL ? null : wrap(Buffer.class, address, capacity);
    }

    // -----------------------------------

    /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */
    @Deprecated public static RenderModel mallocStack() { return malloc(stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */
    @Deprecated public static RenderModel callocStack() { return calloc(stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */
    @Deprecated public static RenderModel mallocStack(MemoryStack stack) { return malloc(stack); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */
    @Deprecated public static RenderModel callocStack(MemoryStack stack) { return calloc(stack); }
    /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */
    @Deprecated public static RenderModel.Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */
    @Deprecated public static RenderModel.Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */
    @Deprecated public static RenderModel.Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */
    @Deprecated public static RenderModel.Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); }

    /**
     * Returns a new {@code RenderModel} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack the stack from which to allocate
     */
    public static RenderModel malloc(MemoryStack stack) {
        return wrap(RenderModel.class, stack.nmalloc(ALIGNOF, SIZEOF));
    }

    /**
     * Returns a new {@code RenderModel} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack the stack from which to allocate
     */
    public static RenderModel calloc(MemoryStack stack) {
        return wrap(RenderModel.class, stack.ncalloc(ALIGNOF, 1, SIZEOF));
    }

    /**
     * Returns a new {@link RenderModel.Buffer} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static RenderModel.Buffer malloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity);
    }

    /**
     * Returns a new {@link RenderModel.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static RenderModel.Buffer calloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity);
    }

    // -----------------------------------

    /** Unsafe version of {@link #rVertexData}. */
    public static RenderModelVertex.Buffer nrVertexData(long struct) { return RenderModelVertex.create(memGetAddress(struct + RenderModel.RVERTEXDATA), nunVertexCount(struct)); }
    /** Unsafe version of {@link #unVertexCount}. */
    public static int nunVertexCount(long struct) { return UNSAFE.getInt(null, struct + RenderModel.UNVERTEXCOUNT); }
    /** Unsafe version of {@link #IndexData() IndexData}. */
    public static ShortBuffer nIndexData(long struct) { return memShortBuffer(memGetAddress(struct + RenderModel.INDEXDATA), (nunTriangleCount(struct) * 3)); }
    /** Unsafe version of {@link #unTriangleCount}. */
    public static int nunTriangleCount(long struct) { return UNSAFE.getInt(null, struct + RenderModel.UNTRIANGLECOUNT); }
    /** Unsafe version of {@link #diffuseTextureId}. */
    public static int ndiffuseTextureId(long struct) { return UNSAFE.getInt(null, struct + RenderModel.DIFFUSETEXTUREID); }

    // -----------------------------------

    /** An array of {@link RenderModel} structs. */
    public static class Buffer extends StructBuffer<RenderModel, Buffer> implements NativeResource {

        private static final RenderModel ELEMENT_FACTORY = RenderModel.create(-1L);

        /**
         * Creates a new {@code RenderModel.Buffer} instance backed by the specified container.
         *
         * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
         * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
         * by {@link RenderModel#SIZEOF}, and its mark will be undefined.
         *
         *
The created buffer instance holds a strong reference to the container object.

         */
        public Buffer(ByteBuffer container) {
            super(container, container.remaining() / SIZEOF);
        }

        public Buffer(long address, int cap) {
            super(address, null, -1, 0, cap, cap);
        }

        Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) {
            super(address, container, mark, pos, lim, cap);
        }

        @Override
        protected Buffer self() {
            return this;
        }

        @Override
        protected RenderModel getElementFactory() {
            return ELEMENT_FACTORY;
        }

        /** @return a {@link RenderModelVertex.Buffer} view of the struct array pointed to by the {@link RenderModel#rVertexData} field. */
        @NativeType("RenderModel_Vertex_t const *")
        public RenderModelVertex.Buffer rVertexData() { return RenderModel.nrVertexData(address()); }
        /** @return the value of the {@link RenderModel#unVertexCount} field. */
        @NativeType("uint32_t")
        public int unVertexCount() { return RenderModel.nunVertexCount(address()); }
        /** @return a {@link ShortBuffer} view of the data pointed to by the {@link RenderModel#IndexData} field. */
        @NativeType("uint16_t const *")
        public ShortBuffer IndexData() { return RenderModel.nIndexData(address()); }
        /** @return the value of the {@link RenderModel#unTriangleCount} field. */
        @NativeType("uint32_t")
        public int unTriangleCount() { return RenderModel.nunTriangleCount(address()); }
        /** @return the value of the {@link RenderModel#diffuseTextureId} field. */
        @NativeType("TextureID_t")
        public int diffuseTextureId() { return RenderModel.ndiffuseTextureId(address()); }

    }

}


text:
package org.factcenter.pathORam;

public class LocalServerFactory implements ServerFactory
{

	private int bucketSize;

	public LocalServerFactory(int bucketSize)
	{
		this.bucketSize = bucketSize;
	}

	@Override
	public PathORamServer createPathORamServer(int blocksCount, int blockSize) {
		return new LocalServer(blocksCount, blockSize, bucketSize);
	}

}


text:
"""
    Default Controllers
"""

module = "default"

# -----------------------------------------------------------------------------
def call():
    "Call an XMLRPC, JSONRPC or RSS service"
    # If webservices don't use sessions, avoid cluttering up the storage
    #session.forget()
    return service()

# -----------------------------------------------------------------------------
def download():
    """ Download a file """

    # Load the Model
    tablename = request.args[0].split(".", 1)[0]
    table = s3db[tablename]

    return response.download(request, db)

# =============================================================================
def register_validation(form):
    """ Validate the fields in registration form """

    vars = form.vars
    # Mobile Phone
    if "mobile" in vars and vars.mobile:
        import re
        regex = re.compile(single_phone_number_pattern)
        if not regex.match(vars.mobile):
            form.errors.mobile = T("Invalid phone number")
    elif settings.get_auth_registration_mobile_phone_mandatory():
        form.errors.mobile = T("Phone number is required")

    org = settings.get_auth_registration_organisation_id_default()
    if org:
        # Add to default organisation
        vars.organisation_id = org

    return

# -----------------------------------------------------------------------------
auth.settings.register_onvalidation = register_validation

# =============================================================================
def index():
    """ Main Home Page """

    page = request.args(0)
    if page:
        # Go to a custom page
        # Arg 1 = function in /private/templates/<template>/controllers.py
        # other Args & Vars passed through
        controller = "applications.%s.private.templates.%s.controllers" % \
                            (appname, settings.get_template())
        try:
            exec("import %s as custom" % controller)
        except ImportError, e:
            # No Custom Page available, continue with the default
            page = "private/templates/%s/controllers.py" % \
                        settings.get_template()
            s3base.s3_debug("File not loadable: %s, %s" % (page, e.message))
        else:
            if page in custom.__dict__:
                exec ("output = custom.%s()()" % page)
                return output
            else:
                raise(HTTP(404, "Function not found: %s()" % page))
    elif settings.get_template() != "default":
        # Try a Custom Homepage
        controller = "applications.%s.private.templates.%s.controllers" % \
                            (appname, settings.get_template())
        try:
            exec("import %s as custom" % controller)
        except ImportError, e:
            # No Custom Page available, continue with the default
            # @ToDo: cache this result in session
            s3base.s3_debug("Custom homepage cannot be loaded: %s" % e.message)
        else:
            if "index" in custom.__dict__:
                output = custom.index()()
                return output

    # Default Homepage
    title = settings.get_system_name()
    response.title = title

    item = ""
    has_module = settings.has_module
    if has_module("cms"):
        table = s3db.cms_post
        item = db(table.module == module).select(table.body,
                                                 limitby=(0, 1)).first()
        if item:
            item = DIV(XML(item.body))
        else:
            item = ""

    if has_module("cr"):
        table = s3db.cr_shelter
        SHELTERS = s3.crud_strings["cr_shelter"].title_list
    else:
        SHELTERS = ""

    # Menu Boxes
    menu_btns = [#div, label, app, function
                ["facility", T("Facilities"), "org", "facility"],
                ["facility", T("Hospitals"), "hms", "hospital"],
                ["facility", T("Offices"), "org", "office"],
                ["facility", SHELTERS, "cr", "shelter"],
                ["facility", T("Warehouses"), "inv", "warehouse"],
                ["sit", T("Staff"), "hrm", "staff"],
                ["sit", T("Volunteers"), "vol", "volunteer"],
                ["sit", T("Incidents"), "irs", "ireport"],
                ["sit", T("Assessments"), "survey", "series"],
                ["sit", T("Assets"), "asset", "asset"],
                ["sit", T("Inventory Items"), "inv", "inv_item"],
                #["dec", T("Gap Map"), "project", "gap_map"],
                #["dec", T("Gap Report"), "project", "gap_report"],
                ["dec", T("Requests"), "req", "req"],
                ["res", T("Projects"), "project", "project"],
                ["res", T("Commitments"), "req", "commit"],
                ["res", T("Sent Shipments"), "inv", "send"],
                ["res", T("Received Shipments"), "inv", "recv"]
                ]

    # Change to (Mitigation)/Preparedness/Response/Recovery?
    menu_divs = {"facility": DIV( H3(T("Facilities")),
                                 _id = "facility_box", _class = "menu_box"),
                 "sit": DIV( H3(T("Situation")),
                              _id = "menu_div_sit", _class = "menu_div"),
                 "dec": DIV( H3(T("Decision")),
                              _id = "menu_div_dec", _class = "menu_div"),
                 "res": DIV( H3(T("Response")),
                              _id = "menu_div_res", _class = "menu_div"),
                }

    for div, label, app, function in menu_btns:
        if has_module(app):
            # @ToDo: Also check permissions (e.g. for anonymous users)
            menu_divs[div].append(A(DIV(label,
                                        _class = "menu-btn-r"),
                                    _class = "menu-btn-l",
                                    _href = URL(app, function)
                                    )
                                 )

    div_arrow = DIV(IMG(_src = "/%s/static/img/arrow_blue_right.png" % \
                                 appname),
                    _class = "div_arrow")
    sit_dec_res_box = DIV(menu_divs["sit"],
                          div_arrow,
                          menu_divs["dec"],
                          div_arrow,
                          menu_divs["res"],
                          _id = "sit_dec_res_box",
                          _class = "menu_box fleft swidth"
                     #div_additional,
                    )
    facility_box  = menu_divs["facility"]
    facility_box.append(A(IMG(_src = "/%s/static/img/map_icon_128.png" % \
                                       appname),
                          _href = URL(c="gis", f="index"),
                          _title = T("Map")
                          )
                        )

    datatable_ajax_source = ""

    # Check logged in AND permissions
    roles = session.s3.roles
    if AUTHENTICATED in roles and \
       auth.s3_has_permission("read", s3db.org_organisation):
        org_items = organisation()
        datatable_ajax_source = "/%s/default/organisation.aadata" % \
                                appname
        s3.actions = None
        response.view = "default/index.html"
        auth.permission.controller = "org"
        auth.permission.function = "site"
        permitted_facilities = auth.permitted_facilities(redirect_on_error=False)
        manage_facility_box = ""
        if permitted_facilities:
            facility_list = s3base.s3_represent_facilities(db, permitted_facilities,
                                                           link=False)
            facility_list = sorted(facility_list, key=lambda fac: fac[1])
            facility_opts = [OPTION(opt[1], _value = opt[0])
                             for opt in facility_list]
            if facility_list:
                manage_facility_box = DIV(H3(T("Manage Your Facilities")),
                                          SELECT(_id = "manage_facility_select",
                                                 _style = "max-width:400px;",
                                                 *facility_opts
                                                 ),
                                          A(T("Go"),
                                            _href = URL(c="default", f="site",
                                                        args=[facility_list[0][0]]),
                                            #_disabled = "disabled",
                                            _id = "manage_facility_btn",
                                            _class = "action-btn"
                                            ),
                                          _id = "manage_facility_box",
                                          _class = "menu_box fleft"
                                          )
                s3.jquery_ready.append(
'''$('#manage_facility_select').change(function(){
 $('#manage_facility_btn').attr('href',S3.Ap.concat('/default/site/',$('#manage_facility_select').val()))
})''')
            else:
                manage_facility_box = DIV()

        org_box = DIV(H3(T("Organizations")),
                      A(T("Add Organization"),
                        _href = URL(c="org", f="organisation",
                                    args=["create"]),
                        _id = "add-btn",
                        _class = "action-btn",
                        _style = "margin-right: 10px;"),
                      org_items,
                      _id = "org_box",
                      _class = "menu_box fleft"
                      )
    else:
        manage_facility_box = ""
        org_box = ""

    # Login/Registration forms
    self_registration = settings.get_security_self_registration()
    registered = False
    login_form = None
    login_div = None
    register_form = None
    register_div = None
    if AUTHENTICATED not in roles:
        # This user isn't yet logged-in
        if request.cookies.has_key("registered"):
            # This browser has logged-in before
            registered = True

        if self_registration:
            # Provide a Registration box on front page
            register_form = auth.register()
            register_div = DIV(H3(T("Register")),
                               P(XML(T("If you would like to help, then please %(sign_up_now)s") % \
                                        dict(sign_up_now=B(T("sign-up now"))))))

             # Add client-side validation
            s3base.s3_register_validation()

            if request.env.request_method == "POST":
                post_script = \
'''$('#register_form').removeClass('hide')
$('#login_form').addClass('hide')'''
            else:
                post_script = ""
            register_script = \
'''$('#register-btn').attr('href','#register')
$('#login-btn').attr('href','#login')
%s
$('#register-btn').click(function(){
 $('#register_form').removeClass('hide')
 $('#login_form').addClass('hide')
})
$('#login-btn').click(function(){
 $('#register_form').addClass('hide')
 $('#login_form').removeClass('hide')
})''' % post_script
            s3.jquery_ready.append(register_script)

        # Provide a login box on front page
        request.args = ["login"]
        auth.messages.submit_button = T("Login")
        login_form = auth()
        login_div = DIV(H3(T("Login")),
                        P(XML(T("Registered users can %(login)s to access the system" % \
                                dict(login=B(T("login")))))))

    if settings.frontpage.rss:
        s3.external_stylesheets.append("http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css")
        s3.scripts.append("http://www.google.com/jsapi?key=notsupplied-wizard")
        s3.scripts.append("http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js")
        counter = 0
        feeds = ""
        for feed in settings.frontpage.rss:
            counter += 1
            feeds = "".join((feeds,
                             "{title:'%s',\n" % feed["title"],
                             "url:'%s'}" % feed["url"]))
            # Don't add a trailing comma for old IEs
            if counter != len(settings.frontpage.rss):
                feeds += ",\n"
        # feedCycleTime: milliseconds before feed is reloaded (5 minutes)
        feed_control = "".join(('''
function LoadDynamicFeedControl(){
 var feeds=[
  ''', feeds, '''
 ]
 var options={
  feedCycleTime:300000,
  numResults:5,
  stacked:true,
  horizontal:false,
  title:"''', str(T("News")), '''"
 }
 new GFdynamicFeedControl(feeds,'feed-control',options)
}
google.load('feeds','1')
google.setOnLoadCallback(LoadDynamicFeedControl)'''))
        s3.js_global.append(feed_control)

    return dict(title = title,
                item = item,
                sit_dec_res_box = sit_dec_res_box,
                facility_box = facility_box,
                manage_facility_box = manage_facility_box,
                org_box = org_box,
                r = None, # Required for dataTable to work
                datatable_ajax_source = datatable_ajax_source,
                self_registration=self_registration,
                registered=registered,
                login_form=login_form,
                login_div=login_div,
                register_form=register_form,
                register_div=register_div
                )

# -----------------------------------------------------------------------------
def organisation():
    """
        Function to handle pagination for the org list on the homepage
    """

    from s3.s3utils import S3DataTable

    resource = s3db.resource("org_organisation")
    totalrows = resource.count()
    table = resource.table

    list_fields = ["id", "name"]
    limit = int(request.get_vars["iDisplayLength"]) if request.extension == "aadata" else 1
    rfields = resource.resolve_selectors(list_fields)[0]
    (orderby, filter) = S3DataTable.getControlData(rfields, request.vars)
    resource.add_filter(filter)
    filteredrows = resource.count()
    if isinstance(orderby, bool):
        orderby = table.name
    rows = resource.select(list_fields,
                           orderby=orderby,
                           start=0,
                           limit=limit,
                           )
    data = resource.extract(rows,
                            list_fields,
                            represent=True,
                            )
    dt = S3DataTable(rfields, data)
    dt.defaultActionButtons(resource)
    s3.no_formats = True
    if request.extension == "html":
        items = dt.html(totalrows,
                        filteredrows,
                        "org_list_1",
                        dt_displayLength=10,
                        dt_ajax_url=URL(c="default",
                                        f="organisation",
                                        extension="aadata",
                                        vars={"id": "org_list_1"},
                                        ),
                       )
    elif request.extension.lower() == "aadata":
        limit = resource.count()
        if "sEcho" in request.vars:
            echo = int(request.vars.sEcho)
        else:
            echo = None
        items = dt.json(totalrows,
                        filteredrows,
                        "org_list_1",
                        echo)
    else:
        raise HTTP(501, s3mgr.ERROR.BAD_FORMAT)
    return items

# -----------------------------------------------------------------------------
def site():
    """
        @todo: Avoid redirect
    """
    s3db.table("org_site")
    if len(request.args):
        site_id = request.args[0]
        site_r = db.org_site[site_id]
        tablename = site_r.instance_type
        table = s3db.table(tablename)
        if table:
            query = (table.site_id == site_id)
            id = db(query).select(db[tablename].id,
                                  limitby = (0, 1)).first().id
            cf = tablename.split("_", 1)
            redirect(URL(c = cf[0],
                         f = cf[1],
                         args = [id]))
    raise HTTP(404)

# -----------------------------------------------------------------------------
def message():
    #if "verify_email_sent" in request.args:
    title = T("Account Registered - Please Check Your Email")
    message = T( "%(system_name)s has sent an email to %(email)s to verify your email address.\nPlease check your email to verify this address. If you do not receive this email please check you junk email or spam filters." )\
                 % {"system_name": settings.get_system_name(),
                    "email": request.vars.email}
    image = "email_icon.png"
    return dict(title = title,
                message = message,
                image_src = "/%s/static/img/%s" % (appname, image)
                )

# -----------------------------------------------------------------------------
def rapid():
    """ Set/remove rapid data entry flag """

    val = request.vars.get("val", True)
    if val == "0":
        val = False
    else:
        val = True
    session.s3.rapid_data_entry = val

    response.view = "xml.html"
    return dict(item=str(session.s3.rapid_data_entry))

# -----------------------------------------------------------------------------
def user():
    """ Auth functions based on arg. See gluon/tools.py """

    arg = request.args(0)
    auth.settings.on_failed_authorization = URL(f="error")

    auth.configure_user_fields()

    _table_user = auth.settings.table_user

    auth.settings.profile_onaccept = auth.s3_user_profile_onaccept

    self_registration = settings.get_security_self_registration()
    login_form = register_form = None

    if request.args:
        arg = request.args(0)
    else:
        arg = None

    if arg == "login":
        # @ToDo: move this code to /modules/s3/s3aaa.py:def login?
        auth.messages.submit_button = T("Login")
        form = auth()
        #form = auth.login()
        login_form = form
        if s3.crud.submit_style:
            form[0][-1][1][0]["_class"] = s3.crud.submit_style
    elif arg == "register":
        # @ToDo: move this code to /modules/s3/s3aaa.py:def register?
        if not self_registration:
            session.error = T("Registration not permitted")
            redirect(URL(f="index"))

        form = auth.register()
        register_form = form
        # Add client-side validation
        s3base.s3_register_validation()
    elif arg == "change_password":
        form = auth()
    elif arg == "profile":
        # @ToDo: move this code to /modules/s3/s3aaa.py:def profile?
        form = auth.profile()
        # add an opt in clause to receive emails depending on the deployment settings

    else:
        # Retrieve Password / Logout
        form = auth()

    # Use Custom Ext views
    # Best to not use an Ext form for login: can't save username/password in browser & can't hit 'Enter' to submit!
    #if request.args(0) == "login":
    #    response.title = T("Login")
    #    response.view = "auth/login.html"

    return dict(form=form,
                login_form=login_form,
                register_form=register_form,
                self_registration=self_registration)

# -----------------------------------------------------------------------------
def person():
    """
        Profile to show:
         - User Details
         - Person Details
         - HRM

    """

    # Set to current user
    user_person_id  = str(s3_logged_in_person())
    if not request.args or request.args[0] != user_person_id:
        request.args = [str(user_person_id)]

    # Custom Method for User
    def auth_profile_method(r, **attr):
        # Custom View
        response.view = "update.html"
        current.menu.breadcrumbs = None

        # RHeader for consistency
        rheader = attr.get("rheader", None)
        if callable(rheader):
            rheader = rheader(r)

        table = auth.settings.table_user
        tablename = table._tablename

        next = URL(c = "default",
                   f = "person",
                   args = [str(user_person_id), "user"])
        onaccept = lambda form: auth.s3_approve_user(form.vars),
        form = auth.profile(next = next,
                            onaccept = onaccept)

        return dict(
                title = T("User Profile"),
                rheader = rheader,
                form = form,
            )

    set_method = s3db.set_method

    set_method("pr", "person",
               method="user",
               action=auth_profile_method)

    # Custom Method for Contacts
    set_method("pr", "person",
               method="contacts",
               action=s3db.pr_contacts)

    if settings.has_module("asset"):
        # Assets as component of people
        s3db.add_component("asset_asset",
                           pr_person="assigned_to_id")

    group = request.get_vars.get("group", "staff")

    # Configure person table
    tablename = "pr_person"
    table = s3db[tablename]
    if (group == "staff" and settings.get_hrm_staff_experience() == "programme") or \
       (group == "volunteer" and settings.get_hrm_vol_experience() == "programme"):
        table.virtualfields.append(s3db.hrm_programme_person_virtual_fields())
    #s3db.configure(tablename,
    #               deletable=False)

    # Configure for personal mode
    s3.crud_strings[tablename].update(
        title_display = T("Personal Profile"),
        title_update = T("Personal Profile"))

    # CRUD pre-process
    def prep(r):
        if r.interactive and r.method != "import":
            if r.component:
                if r.component_name == "physical_description":
                    # Hide all but those details that we want
                    # Lock all the fields
                    table = r.component.table
                    for field in table.fields:
                        table[field].writable = False
                        table[field].readable = False
                    # Now enable those that we want
                    table.ethnicity.writable = True
                    table.ethnicity.readable = True
                    table.blood_type.writable = True
                    table.blood_type.readable = True
                    table.medical_conditions.writable = True
                    table.medical_conditions.readable = True
                    table.other_details.writable = True
                    table.other_details.readable = True
            else:
                table = r.table
                # No point showing the 'Occupation' field - that's the Job Title in the Staff Record
                table.occupation.readable = False
                table.occupation.writable = False
                table.pe_label.readable = False
                table.pe_label.writable = False
                table.missing.readable = False
                table.missing.writable = False
                table.age_group.readable = False
                table.age_group.writable = False
                # Assume volunteers only between 12-81
                table.date_of_birth.widget = S3DateWidget(past=972, future=-144)
            return True
        else:
            # Disable non-interactive & import
            return False
    s3.prep = prep

    # CRUD post-process
    def postp(r, output):
        if r.interactive and r.component:
            if r.component_name == "human_resource":
                # Set the minimum end_date to the same as the start_date
                s3.jquery_ready.append(
'''S3.start_end_date('hrm_human_resource_start_date','hrm_human_resource_end_date')''')
            if r.component_name == "experience":
                # Set the minimum end_date to the same as the start_date
                s3.jquery_ready.append(
'''S3.start_end_date('hrm_experience_start_date','hrm_experience_end_date')''')
            elif r.component_name == "asset":
                # Provide a link to assign a new Asset
                # @ToDo: Proper Widget to do this inline
                output["add_btn"] = A(T("Assign Asset"),
                                      _href=URL(c="asset", f="asset"),
                                      _id="add-btn",
                                      _class="action-btn")
        return output
    s3.postp = postp

    output = s3_rest_controller("pr", "person",
                                native=False,
                                rheader = lambda r: \
                                    s3db.hrm_rheader(r, profile=True),
                                )
    return output

# -----------------------------------------------------------------------------
def facebook():
    """ Login using Facebook """

    if not auth.settings.facebook:
        redirect(URL(f="user", args=request.args, vars=request.vars))

    from s3oauth import FaceBookAccount
    auth.settings.login_form = FaceBookAccount()
    form = auth()

    return dict(form=form)

# -----------------------------------------------------------------------------
def google():
    """ Login using Google """

    if not auth.settings.google:
        redirect(URL(f="user", args=request.args, vars=request.vars))

    from s3oauth import GooglePlusAccount
    auth.settings.login_form = GooglePlusAccount()
    form = auth()

    return dict(form=form)

# -----------------------------------------------------------------------------
# About Sahana
def apath(path=""):
    """ Application path """

    from gluon.fileutils import up
    opath = up(request.folder)
    # @ToDo: This path manipulation is very OS specific.
    while path[:3] == "../": opath, path=up(opath), path[3:]
    return os.path.join(opath,path).replace("\\", "/")

def about():
    """
        The About page provides details on the software dependencies and
        versions available to this instance of Sahana Eden.
    """

    response.title = T("About")
    if settings.get_template() != "default":
        # Try a Custom View
        view = os.path.join(request.folder, "private", "templates",
                            settings.get_template(), "views", "about.html")
        if os.path.exists(view):
            try:
                # Pass view as file not str to work in compiled mode
                response.view = open(view, "rb")
            except IOError:
                from gluon.http import HTTP
                raise HTTP("404", "Unable to open Custom View: %s" % view)

    import sys
    import subprocess
    import string

    python_version = sys.version
    web2py_version = open(apath("../VERSION"), "r").read()[8:]
    sahana_version = open(os.path.join(request.folder, "VERSION"), "r").read()
    # Database
    sqlite_version = None
    mysql_version = None
    mysqldb_version = None
    pgsql_version = None
    psycopg_version = None
    if db_string[0].find("sqlite") != -1:
        try:
            import sqlite3
            sqlite_version = sqlite3.version
        except:
            sqlite_version = T("Unknown")
    elif db_string[0].find("mysql") != -1:
        try:
            import MySQLdb
            mysqldb_version = MySQLdb.__revision__
        except:
            mysqldb_version = T("Not installed or incorrectly configured.")
            mysql_version = T("Unknown")
        else:
            #mysql_version = (subprocess.Popen(["mysql", "--version"], stdout=subprocess.PIPE).communicate()[0]).rstrip()[10:]
            con = MySQLdb.connect(host=settings.database.get("host", "localhost"),
                                  port=settings.database.get("port", None) or 3306,
                                  db=settings.database.get("database", "sahana"),
                                  user=settings.database.get("username", "sahana"),
                                  passwd=settings.database.get("password", "password")
                                  )
            cur = con.cursor()
            cur.execute("SELECT VERSION()")
            mysql_version = cur.fetchone()
    else:
        # Postgres
        try:
            import psycopg2
            psycopg_version = psycopg2.__version__
        except:
            psycopg_version = T("Not installed or incorrectly configured.")
            pgsql_version = T("Unknown")
        else:
            #pgsql_reply = (subprocess.Popen(["psql", "--version"], stdout=subprocess.PIPE).communicate()[0])
            #pgsql_version = string.split(pgsql_reply)[2]
            con = psycopg2.connect(host=settings.database.get("host", "localhost"),
                                   port=settings.database.get("port", None) or 5432,
                                   database=settings.database.get("database", "sahana"),
                                   user=settings.database.get("username", "sahana"),
                                   password=settings.database.get("password", "password")
                                   )
            cur = con.cursor()
            cur.execute("SELECT version()")
            pgsql_version = cur.fetchone()

    # Libraries
    try:
        import reportlab
        reportlab_version = reportlab.Version
    except:
        reportlab_version = T("Not installed or incorrectly configured.")
    try:
        import xlwt
        xlwt_version = xlwt.__VERSION__
    except:
        xlwt_version = T("Not installed or incorrectly configured.")
    return dict(
                python_version=python_version,
                sahana_version=sahana_version,
                web2py_version=web2py_version,
                sqlite_version=sqlite_version,
                mysql_version=mysql_version,
                mysqldb_version=mysqldb_version,
                pgsql_version=pgsql_version,
                psycopg_version=psycopg_version,
                reportlab_version=reportlab_version,
                xlwt_version=xlwt_version
                )

# -----------------------------------------------------------------------------
def help():
    """ Custom View """

    if settings.get_template() != "default":
        # Try a Custom View
        view = os.path.join(request.folder, "private", "templates",
                            settings.get_template(), "views", "help.html")
        if os.path.exists(view):
            try:
                # Pass view as file not str to work in compiled mode
                response.view = open(view, "rb")
            except IOError:
                from gluon.http import HTTP
                raise HTTP("404", "Unable to open Custom View: %s" % view)

    response.title = T("Help")
    return dict()

# -----------------------------------------------------------------------------
def privacy():
    """ Custom View """

    if settings.get_template() != "default":
        # Try a Custom View
        view = os.path.join(request.folder, "private", "templates",
                            settings.get_template(), "views", "privacy.html")
        if os.path.exists(view):
            try:
                # Pass view as file not str to work in compiled mode
                response.view = open(view, "rb")
            except IOError:
                from gluon.http import HTTP
                raise HTTP("404", "Unable to open Custom View: %s" % view)

    response.title = T("Privacy")
    return dict()

# -----------------------------------------------------------------------------
def contact():
    """
        Give the user options to contact the site admins.
        Either:
            An internal Support Requests database
        or:
            Custom View
    """

    if auth.is_logged_in() and settings.has_module("support"):
        # Provide an internal Support Requests ticketing system.
        prefix = "support"
        resourcename = "req"
        tablename = "%s_%s" % (prefix, resourcename)
        table = s3db[tablename]

        # Pre-processor
        def prep(r):
            if r.interactive:
                # Only Admins should be able to update ticket status
                status = table.status
                actions = table.actions
                if not auth.s3_has_role(ADMIN):
                    status.writable = False
                    actions.writable = False
                if r.method != "update":
                    status.readable = False
                    status.writable = False
                    actions.readable = False
                    actions.writable = False
            return True
        s3.prep = prep

        output = s3_rest_controller(prefix, resourcename)
        return output
    elif settings.get_template() != "default":
        # Try a Custom View
        view = os.path.join(request.folder, "private", "templates",
                            settings.get_template(), "views", "contact.html")
        if os.path.exists(view):
            try:
                # Pass view as file not str to work in compiled mode
                response.view = open(view, "rb")
            except IOError:
                from gluon.http import HTTP
                raise HTTP("404", "Unable to open Custom View: %s" % view)

    response.title = T("Contact us")
    return dict()

# END =========================================================================


text:
import { RcButton } from '@ringcentral-integration/rcui';
import React, { FunctionComponent, useState } from 'react';
import BackHeader from 'ringcentral-widgets/components/BackHeaderV2';
import { DialPad } from 'ringcentral-widgets/components/Rcui/DialPad';
import { RecipientsInput } from 'ringcentral-widgets/components/Rcui/RecipientsInput';

import {
  EvTransferCallUIFunctions,
  EvTransferCallUIProps,
} from '../../interfaces';
import i18n from './i18n';
import styles from './styles.scss';
import { Dialer } from '../DialerPanel';

export type ManualEntryPanelProps = Pick<
  EvTransferCallUIProps & EvTransferCallUIFunctions,
  | 'currentLocale'
  | 'goBack'
  | 'transferRecipientCountryId'
  | 'changeRecipientNumber'
  | 'changeRecipientCountryId'
  | 'transferCountryOptions'
  | 'transferRecipientNumber'
  | 'allowManualInternationalTransfer'
>;

const ManualEntryPanel: FunctionComponent<ManualEntryPanelProps> = ({
  currentLocale,
  goBack,
  transferRecipientCountryId,
  changeRecipientNumber,
  changeRecipientCountryId,
  transferCountryOptions,
  transferRecipientNumber,
  allowManualInternationalTransfer,
}) => {
  const [inputFocus, setInputFocus] = useState(false);
  const [inputValue, setInputValue] = useState(transferRecipientNumber);
  return (
    <>
      <BackHeader
        currentLocale={currentLocale}
        title={i18n.getString('callRecipient', currentLocale)}
        onBackClick={goBack}
        className={styles.backHeader}
      />
      {/* Note: Now temporarily don't support the international number  */}
      {/* {allowManualInternationalTransfer && (
          <PickList
            data-sign="transferCountry"
            options={transferCountryOptions}
            label={i18n.getString('transferCountry', currentLocale)}
            optionValueKey="countryId"
            renderItem={({ countryName }) => countryName}
            value={transferRecipientCountryId}
            onChange={(countryId) => {
              changeRecipientCountryId(countryId);
            }}
          />
        )} */}
      <Dialer
        value={inputValue}
        setValue={setInputValue}
        placeholder={i18n.getString('dialPlaceholder', currentLocale)}
      >

            <RcButton
              data-sign="nextButton"
              size="medium"
              fullWidth
              disabled={!inputValue}
              onClick={() => changeRecipientNumber(inputValue)}
            >
              {i18n.getString('next', currentLocale)}
            </RcButton>

      </Dialer>
    </>
  );
};

export { ManualEntryPanel };


text:
<?php

namespace Collections;

interface Map extends \ArrayAccess, \Countable, Enumerable {

    /**
     * @param $key
     *
     * @return mixed
     * @throws KeyException when the $key does not exist.
     */
    function get($key);

    /**
     * Store a value into the Map with the specified key, overwriting a previous value if already present.
     *
     * @param $key
     * @param mixed $value
     *
     * @return void
     */
    function set($key, $value);

    /**
     * @param $key
     *
     * @return mixed
     */
    function remove($key);

}


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>My Project: nn_fsm_owner Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

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

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

My Project

Main Page

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Members

Public Attributes |
List of all members

nn_fsm_owner Struct Reference

#include <fsm.h>

Collaboration diagram for nn_fsm_owner:

<map name="nn__fsm__owner_coll__map" id="nn__fsm__owner_coll__map">
<area shape="rect" id="node2" href="structnn__fsm.html" title="{nn_fsm\n|+ state\l+ src\l+ srcptr\l|}" alt="" coords="648,1088,715,1195"/>
<area shape="rect" id="node3" href="structnn__fsm__event.html" title="{nn_fsm_event\n|+ src\l+ srcptr\l+ type\l|}" alt="" coords="737,1259,841,1365"/>
<area shape="rect" id="node4" href="structnn__queue__item.html" title="{nn_queue_item\n||}" alt="" coords="725,213,835,291"/>
<area shape="rect" id="node7" href="structnn__queue.html" title="{nn_queue\n||}" alt="" coords="741,443,819,520"/>
<area shape="rect" id="node9" href="structnn__worker.html" title="{nn_worker\n|+ cp\l|}" alt="" coords="440,651,523,728"/>
<area shape="rect" id="node5" href="structnn__ctx.html" title="{nn_ctx\n||}" alt="" coords="641,947,703,1024"/>
<area shape="rect" id="node6" href="structnn__mutex.html" title="{nn_mutex\n|+ mutex\l|}" alt="" coords="551,443,629,520"/>
<area shape="rect" id="node8" href="structnn__pool.html" title="{nn_pool\n||}" alt="" coords="561,805,628,883"/>
<area shape="rect" id="node10" href="structnn__poller__hndl.html" title="{nn_poller_hndl\n|+ fd\l+ events\l+ events\l+ index\l|}" alt="" coords="113,6,217,127"/>
<area shape="rect" id="node12" href="structnn__poller_1_1nn__hndls__item.html" title="{nn_poller::nn_hndls_item\n|+ prev\l+ next\l|}" alt="" coords="5,206,171,298"/>
<area shape="rect" id="node11" href="structnn__poller.html" title="{nn_poller\n|+ ep\l+ nevents\l+ index\l+ events\l+ kq\l+ events\l+ size\l+ capacity\l+ pollset\l+ removed\l|}" alt="" coords="67,377,151,586"/>
<area shape="rect" id="node13" href="structnn__timerset.html" title="{nn_timerset\n||}" alt="" coords="436,443,527,520"/>
<area shape="rect" id="node14" href="structnn__clock.html" title="{nn_clock\n|+ last_tsc\l+ last_time\l|}" alt="" coords="399,206,485,298"/>
<area shape="rect" id="node15" href="structnn__list.html" title="{nn_list\n||}" alt="" coords="510,213,569,291"/>
<area shape="rect" id="node16" href="structnn__list__item.html" title="{nn_list_item\n||}" alt="" coords="494,28,585,105"/>
<area shape="rect" id="node17" href="structnn__efd.html" title="{nn_efd\n|+ efd\l+ r\l+ w\l+ r\l+ w\l+ fds\l|}" alt="" coords="247,406,308,557"/>
<area shape="rect" id="node18" href="structnn__thread.html" title="{nn_thread\n|+ routine\l+ arg\l+ handle\l+ handle\l|}" alt="" coords="333,421,411,542"/>
</map>

Public Attributes

int 	src

struct nn_fsm * 	fsm

Member Data Documentation

          struct nn_fsm* nn_fsm_owner::fsm

          int nn_fsm_owner::src

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

src/aio/fsm.h

<address class="footer">
Generated by

 1.8.11
</address>