text:
package cn.rongcloud.im.ui.fragment;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;

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

import cn.rongcloud.im.App;
import cn.rongcloud.im.R;
import cn.rongcloud.im.SealAppContext;
import cn.rongcloud.im.SealConst;
import cn.rongcloud.im.SealUserInfoManager;
import cn.rongcloud.im.db.Friend;
import cn.rongcloud.im.server.broadcast.BroadcastManager;
import cn.rongcloud.im.server.pinyin.CharacterParser;
import cn.rongcloud.im.server.pinyin.PinyinComparator;
import cn.rongcloud.im.server.pinyin.SideBar;
import cn.rongcloud.im.server.widget.SelectableRoundedImageView;
import cn.rongcloud.im.ui.activity.GroupListActivity;
import cn.rongcloud.im.ui.activity.NewFriendListActivity;
import cn.rongcloud.im.ui.activity.PublicServiceActivity;
import cn.rongcloud.im.ui.activity.UserDetailActivity;
import cn.rongcloud.im.ui.adapter.FriendListAdapter;
import io.rong.imageloader.core.ImageLoader;
import io.rong.imkit.RongIM;
import io.rong.imlib.model.UserInfo;

/**
 * tab 2 通讯录的 Fragment
 * Created by Bob on 2015/1/25.
 */
public class ContactsFragment extends Fragment implements View.OnClickListener {

    private SelectableRoundedImageView mSelectableRoundedImageView;
    private TextView mNameTextView;
    private TextView mNoFriends;
    private TextView mUnreadTextView;
    private View mHeadView;
    private EditText mSearchEditText;
    private ListView mListView;
    private PinyinComparator mPinyinComparator;
    private SideBar mSidBar;
    /**
     * 中部展示的字母提示
     */
    private TextView mDialogTextView;

    private List<Friend> mFriendList;
    private List<Friend> mFilteredFriendList;
    /**
     * 好友列表的 mFriendListAdapter
     */
    private FriendListAdapter mFriendListAdapter;
    /**
     * 汉字转换成拼音的类
     */
    private CharacterParser mCharacterParser;
    /**
     * 根据拼音来排列ListView里面的数据类
     */

    private String mId;
    private String mCacheName;

    private static final int CLICK_CONTACT_FRAGMENT_FRIEND = 2;

    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.activity_address, container, false);
        initView(view);
        initData();
        updateUI();
        refreshUIListener();
        return view;
    }

    private void startFriendDetailsPage(Friend friend) {
        Intent intent = new Intent(getActivity(), UserDetailActivity.class);
        intent.putExtra("type", CLICK_CONTACT_FRAGMENT_FRIEND);
        intent.putExtra("friend", friend);
        startActivity(intent);
    }

    private void initView(View view) {
        mSearchEditText = (EditText) view.findViewById(R.id.search);
        mListView = (ListView) view.findViewById(R.id.listview);
        mNoFriends = (TextView) view.findViewById(R.id.show_no_friend);
        mSidBar = (SideBar) view.findViewById(R.id.sidrbar);
        mDialogTextView = (TextView) view.findViewById(R.id.group_dialog);
        mSidBar.setTextView(mDialogTextView);
        LayoutInflater mLayoutInflater = LayoutInflater.from(getActivity());
        mHeadView = mLayoutInflater.inflate(R.layout.item_contact_list_header,
                                            null);
        mUnreadTextView = (TextView) mHeadView.findViewById(R.id.tv_unread);
        RelativeLayout newFriendsLayout = (RelativeLayout) mHeadView.findViewById(R.id.re_newfriends);
        RelativeLayout groupLayout = (RelativeLayout) mHeadView.findViewById(R.id.re_chatroom);
        RelativeLayout publicServiceLayout = (RelativeLayout) mHeadView.findViewById(R.id.publicservice);
        RelativeLayout selfLayout = (RelativeLayout) mHeadView.findViewById(R.id.contact_me_item);
        mSelectableRoundedImageView = (SelectableRoundedImageView) mHeadView.findViewById(R.id.contact_me_img);
        mNameTextView = (TextView) mHeadView.findViewById(R.id.contact_me_name);
        updatePersonalUI();
        mListView.addHeaderView(mHeadView);
        mNoFriends.setVisibility(View.VISIBLE);

        selfLayout.setOnClickListener(this);
        groupLayout.setOnClickListener(this);
        newFriendsLayout.setOnClickListener(this);
        publicServiceLayout.setOnClickListener(this);
        //设置右侧触摸监听
        mSidBar.setOnTouchingLetterChangedListener(new SideBar.OnTouchingLetterChangedListener() {

            @Override
            public void onTouchingLetterChanged(String s) {
                //该字母首次出现的位置
                int position = mFriendListAdapter.getPositionForSection(s.charAt(0));
                if (position != -1) {
                    mListView.setSelection(position);
                }

            }
        });
    }

    private void initData() {
        mFriendList = new ArrayList<>();
        FriendListAdapter adapter = new FriendListAdapter(getActivity(), mFriendList);
        mListView.setAdapter(adapter);
        mFilteredFriendList = new ArrayList<>();
        //实例化汉字转拼音类
        mCharacterParser = CharacterParser.getInstance();
        mPinyinComparator = PinyinComparator.getInstance();
    }

    @Override
    public void setUserVisibleHint(boolean isVisibleToUser) {
        super.setUserVisibleHint(isVisibleToUser);
        if (mDialogTextView != null) {
            mDialogTextView.setVisibility(View.INVISIBLE);
        }
    }

    /**
     * 根据输入框中的值来过滤数据并更新ListView
     *
     * @param filterStr 需要过滤的 String
     */
    private void filterData(String filterStr) {
        List<Friend> filterDateList = new ArrayList<>();

        try {
            if (TextUtils.isEmpty(filterStr)) {
                filterDateList = mFriendList;
            } else {
                filterDateList.clear();
                for (Friend friendModel : mFriendList) {
                    String name = friendModel.getName();
                    String displayName = friendModel.getDisplayName();
                    if (!TextUtils.isEmpty(displayName)) {
                        if (name.contains(filterStr) || mCharacterParser.getSpelling(name).startsWith(filterStr) || displayName.contains(filterStr) || mCharacterParser.getSpelling(displayName).startsWith(filterStr)) {
                            filterDateList.add(friendModel);
                        }
                    } else {
                        if (name.contains(filterStr) || mCharacterParser.getSpelling(name).startsWith(filterStr)) {
                            filterDateList.add(friendModel);
                        }
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

        // 根据a-z进行排序
        Collections.sort(filterDateList, mPinyinComparator);
        mFilteredFriendList = filterDateList;
        mFriendListAdapter.updateListView(filterDateList);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.re_newfriends:
                mUnreadTextView.setVisibility(View.GONE);
                Intent intent = new Intent(getActivity(), NewFriendListActivity.class);
                startActivityForResult(intent, 20);
                break;
            case R.id.re_chatroom:
                startActivity(new Intent(getActivity(), GroupListActivity.class));
                break;
            case R.id.publicservice:
                Intent intentPublic = new Intent(getActivity(), PublicServiceActivity.class);
                startActivity(intentPublic);
                break;
            case R.id.contact_me_item:
                RongIM.getInstance().startPrivateChat(getActivity(), mId, mCacheName);
                break;
        }
    }

    private void refreshUIListener() {
        BroadcastManager.getInstance(getActivity()).addAction(SealAppContext.UPDATE_FRIEND, new BroadcastReceiver() {
            @Override
            public void onReceive(Context context, Intent intent) {
                String command = intent.getAction();
                if (!TextUtils.isEmpty(command)) {
                    updateUI();
                }
            }
        });

        BroadcastManager.getInstance(getActivity()).addAction(SealAppContext.UPDATE_RED_DOT, new BroadcastReceiver() {
            @Override
            public void onReceive(Context context, Intent intent) {
                String command = intent.getAction();
                if (!TextUtils.isEmpty(command)) {
                    mUnreadTextView.setVisibility(View.INVISIBLE);
                }
            }
        });
        BroadcastManager.getInstance(getActivity()).addAction(SealConst.CHANGEINFO, new BroadcastReceiver() {
            @Override
            public void onReceive(Context context, Intent intent) {
                updatePersonalUI();
            }
        });
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        try {
            BroadcastManager.getInstance(getActivity()).destroy(SealAppContext.UPDATE_FRIEND);
            BroadcastManager.getInstance(getActivity()).destroy(SealAppContext.UPDATE_RED_DOT);
            BroadcastManager.getInstance(getActivity()).destroy(SealConst.CHANGEINFO);
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        }
    }

    private void updateUI() {
        SealUserInfoManager.getInstance().getFriends(new SealUserInfoManager.ResultCallback<List<Friend>>() {
            @Override
            public void onSuccess(List<Friend> friendsList) {
                updateFriendsList(friendsList);
            }

            @Override
            public void onError(String errString) {
                updateFriendsList(null);
            }
        });
    }

    private void updateFriendsList(List<Friend> friendsList) {
        if(friendsList == null){
            friendsList = new ArrayList<>();
        }
        //updateUI fragment初始化和好友信息更新时都会调用,isReloadList表示是否是好友更新时调用
        boolean isReloadList = false;
        if (mFriendList != null && mFriendList.size() > 0) {
            mFriendList.clear();
            isReloadList = true;
        }
        mFriendList = friendsList;
        if (mFriendList != null && mFriendList.size() > 0) {
            handleFriendDataForSort();
            mNoFriends.setVisibility(View.GONE);
        } else {
            mNoFriends.setVisibility(View.VISIBLE);
        }

        // 根据a-z进行排序源数据
        Collections.sort(mFriendList, mPinyinComparator);
        if (isReloadList) {
            mSidBar.setVisibility(View.VISIBLE);
            mFriendListAdapter.updateListView(mFriendList);
        } else {
            mSidBar.setVisibility(View.VISIBLE);
            mFriendListAdapter = new FriendListAdapter(getActivity(), mFriendList);

            mListView.setAdapter(mFriendListAdapter);
            mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                @Override
                public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                    if (mListView.getHeaderViewsCount() > 0) {
                        startFriendDetailsPage(mFriendList.get(position - 1));
                    } else {
                        startFriendDetailsPage(mFilteredFriendList.get(position));
                    }
                }
            });

            mListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
                @Override
                public boolean onItemLongClick(AdapterView<?> parent, View view, final int position, long id) {
                    Friend bean = mFriendList.get(position - 1);
                    startFriendDetailsPage(bean);
                    return true;
                }
            });
            mSearchEditText.addTextChangedListener(new TextWatcher() {
                @Override
                public void beforeTextChanged(CharSequence s, int start, int count, int after) {

                }

                @Override
                public void onTextChanged(CharSequence s, int start, int before, int count) {
                    //当输入框里面的值为空,更新为原来的列表,否则为过滤数据列表
                    filterData(s.toString());
                }

                @Override
                public void afterTextChanged(Editable s) {
                    if (s.length() != 0) {
                        if (mListView.getHeaderViewsCount() > 0) {
                            mListView.removeHeaderView(mHeadView);
                        }
                    } else {
                        if (mListView.getHeaderViewsCount() == 0) {
                            mListView.addHeaderView(mHeadView);
                        }
                    }
                }
            });
        }
    }

    private void updatePersonalUI() {
        SharedPreferences sp = SealAppContext.getInstance().getContext().getSharedPreferences("config", Context.MODE_PRIVATE);
        mId = sp.getString(SealConst.SEALTALK_LOGIN_ID, "");
        mCacheName = sp.getString(SealConst.SEALTALK_LOGIN_NAME, "");
        final String header = sp.getString(SealConst.SEALTALK_LOGING_PORTRAIT, "");
        mNameTextView.setText(mCacheName);
        if (!TextUtils.isEmpty(mId)) {
            UserInfo userInfo = new UserInfo(mId, mCacheName, Uri.parse(header));
            String portraitUri = SealUserInfoManager.getInstance().getPortraitUri(userInfo);
            ImageLoader.getInstance().displayImage(portraitUri, mSelectableRoundedImageView, App.getOptions());
        }
    }

    private void handleFriendDataForSort() {
        for (Friend friend : mFriendList) {
            if (friend.isExitsDisplayName()) {
                String letters = replaceFirstCharacterWithUppercase(friend.getDisplayNameSpelling());
                friend.setLetters(letters);
            } else {
                String letters = replaceFirstCharacterWithUppercase(friend.getNameSpelling());
                friend.setLetters(letters);
            }
        }
    }

    private String replaceFirstCharacterWithUppercase(String spelling) {
        if (!TextUtils.isEmpty(spelling)) {
            char first = spelling.charAt(0);
            char newFirst = first;
            if (first >= 'a' && first <= 'z') {
                newFirst -= 32;
            }
            return spelling.replaceFirst(String.valueOf(first), String.valueOf(newFirst));
        } else {
            return "#";
        }
    }
}


text:
tinyMCE.addI18n('et.modxlink_dlg',{
title:"Sisesta muuda linki",
url:" URL\u2019i link",
target:"Sihtm\u00E4rk",
titlefield:"Pealkiri",
is_email:" URL, mille sisestasid, tundub olevat e-posti aadress, kas soovid sellele lisada mailto: funktsiooni?",
is_external:"URL, mille sisestasid, tundub olevat v\u00E4line link, kas soovid sellele lisada http://?",
list:"Linkide nimekiri",
general_tab:"\u00DCldine",
popup_tab:"Pop-up",
events_tab:"S\u00FCndmused",
advanced_tab:"P\u00F5hjalikum",
general_props:"\u00DCldised seadistused",
popup_props:"Pop-up\u2019i seadistus",
event_props:"S\u00FCndmused",
advanced_props:"\u00DCldised seadistused",
popup_opts:"Valikud",
anchor_names:"Ankrud",
target_same:"Ava selles aknas/raamis",
target_parent:"Ava pea-aknas/raamis",
target_top:"Ava k\u00F5rgeimas raamis (asenda k\u00F5ik raamid)",
target_blank:"Ava uues aknas",
popup:"Javascript\u2019i pop-up",
popup_url:"Pop-up\u2019i URL",
popup_name:"Akna nimi",
popup_return:"Sisesta 'tagasiminek eba\u00F5nnestus'",
popup_scrollbars:"N\u00E4ita kerimisribasid",
popup_statusbar:"N\u00E4ita staatuse riba",
popup_toolbar:"N\u00E4ita seadistusriba",
popup_menubar:"N\u00E4ita men\u00FC\u00FCriba",
popup_location:"N\u00E4ita asukohariba",
popup_resizable:"Muuda akna suurus muudetavaks",
popup_dependent:"S\u00F5ltuv (ainult Mozilla/Firefox)",
popup_size:"Suurus",
popup_position:"Positsioon (X/Y)",
id:"ID",
style:"Stiil",
classes:"Klassid",
target_name:"Sihtm\u00E4rgi nimi",
langdir:"Keele suund",
target_langcode:"Sihtm\u00E4rgi keel",
langcode:"Keele kood",
encoding:"Sihtm\u00E4rgi kodeering",
mime:"M\u00E4rgista MIME t\u00FC\u00FCp",
rel:"Seo leht sihtm\u00E4rgiga",
rev:"Seo sihtm\u00E4rk lehega",
tabindex:"Sisujuht",
accesskey:"Ligip\u00E4\u00E4suklahv",
ltr:"Vasakult paremale",
rtl:"Paremalt vasakule",
link_list:"Linkide list"
,pagetitle: 'Pagetitle'
,alias: 'Alias'
,search: 'Search'
});

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - Class IntegrationTest</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>

Class IntegrationTest

all >
default-package > IntegrationTest

2

tests

0

failures

0

ignored

0.338s

duration

100%

successful

Tests

Standard error

Tests

Test
Duration
Result

outputTest
0.321s
passed

rootTest
0.017s
passed

Standard error

[Thread-4] INFO spark.webserver.SparkServer - == Spark has ignited ...
[Thread-4] INFO spark.webserver.SparkServer - >> Listening on 0.0.0.0:4567
[Thread-4] INFO org.eclipse.jetty.server.Server - jetty-9.0.2.v20130417
[Thread-4] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@22cd570f{HTTP/1.1}{0.0.0.0:4567}
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
Jan 11, 2016 4:07:57 PM com.gargoylesoftware.htmlunit.html.InputElementFactory createElementNS
INFO: Bad input type: "number", creating a text input
[Test worker] INFO spark.webserver.SparkServer - >>> Spark shutting down ...
[Test worker] INFO org.eclipse.jetty.server.Server - Graceful shutdown org.eclipse.jetty.server.Server@70c0a2f2 by
[Test worker] INFO org.eclipse.jetty.server.ServerConnector - Stopped ServerConnector@22cd570f{HTTP/1.1}{0.0.0.0:4567}
[Test worker] INFO spark.webserver.SparkServer - done

Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>

Generated by
Gradle 2.9 at Jan 11, 2016 4:07:57 PM


text: export const test = 42;


text:
#include "GUI_Protected.h"

int GUI_SetTextAlign(int Align) {
  int r;
  GUI_LOCK();
  r = GUI_Context.TextAlign;
  GUI_Context.TextAlign = Align;
  GUI_UNLOCK();
  return r;
}


text:
require 'catmother/opcode_groups/no_operands'

module CatMother
  module Opcode
    class Aload_3
      MNEMONIC = "aload_3"
      OPCODE = 0x2d
      OPERANDS = 0
      POPS = 0
      PUSHES = 1
      SHORT_DESCRIPTION = "Load reference from array"
      DESCRIPTION = ""

      include CatMother::OpcodeGroup::NoOperands

      def initialize(io, pc)
        parse_operands(io, pc)
      end
    end
  end
end


text:
. ./helper.sh
magenta "## ALL tests"
sh ./environment.sh && sh ./checking.sh && sh ./coverage.sh && ./travis.sh
green "Success"


text:
package com.smartcodeltd.jenkinsci.plugins.buildmonitor.pipeline;

import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Set;

public abstract class BreadthFirstNodeTraversal<N> {

    private final Queue<N> nodesToAccess;
    private final Set<String> stages;

    public BreadthFirstNodeTraversal() {
        this.nodesToAccess = new LinkedList<N>();
        this.stages = new LinkedHashSet<String>();
    }

    public void start(List<N> nodes) {
        nodesToAccess.addAll(nodes);
        while (!nodesToAccess.isEmpty()) {
            N node = nodesToAccess.remove();
            if (isStageStep(node)) {
                stages.add(getDisplayName(node));
            } else {
                nodesToAccess.addAll(getParents(node));
            }
        }
    }

    protected abstract boolean isStageStep(N node);

    protected abstract String getDisplayName(N node);

    protected abstract Collection<N> getParents(N node);

    public List<String> getStages() {
        return new ArrayList<String>(stages);
    }
}


text:
namespace gloperate
{

PolygonalGeometry::PolygonalGeometry()
: m_materialIndex(0)
{
}

PolygonalGeometry::~PolygonalGeometry()
{
}

const std::vector<unsigned int> & PolygonalGeometry::indices() const
{
    return m_indices;
}

void PolygonalGeometry::setIndices(const std::vector<unsigned int> & indices)
{
    m_indices = indices;
}

void PolygonalGeometry::setIndices(std::vector<unsigned int> && indices)
{
    m_indices = std::move(indices);
}

const std::vector<glm::vec3> & PolygonalGeometry::vertices() const
{
    return m_vertices;
}

void PolygonalGeometry::setVertices(const std::vector<glm::vec3> & vertices)
{
    m_vertices = vertices;
}

void PolygonalGeometry::setVertices(std::vector<glm::vec3> && vertices)
{
    m_vertices = std::move(vertices);
}

bool PolygonalGeometry::hasNormals() const
{
    return !m_normals.empty();
}

const std::vector<glm::vec3> & PolygonalGeometry::normals() const
{
    return m_normals;
}

void PolygonalGeometry::setNormals(const std::vector<glm::vec3> & normals)
{
    m_normals = normals;
}

void PolygonalGeometry::setNormals(std::vector<glm::vec3> && normals)
{
    m_normals = std::move(normals);
}

bool PolygonalGeometry::hasTextureCoordinates() const
{
	return !m_textureCoordinates.empty();
}

const std::vector<glm::vec3> & PolygonalGeometry::textureCoordinates() const
{
	return m_textureCoordinates;
}

void PolygonalGeometry::setTextureCoordinates(const std::vector<glm::vec3> & textureCoordinates)
{
	m_textureCoordinates = textureCoordinates;
}

void PolygonalGeometry::setTextureCoordinates(std::vector<glm::vec3> && textureCoordinates)
{
	m_textureCoordinates = std::move(textureCoordinates);
}

unsigned PolygonalGeometry::materialIndex() const
{
	return m_materialIndex;
}

void PolygonalGeometry::setMaterialIndex(const unsigned int materialIndex)
{
	m_materialIndex = materialIndex;
}

} // namespace gloperate


text:
//
//  ISecurityGuardOpenDataCollection.h
//  SecurityGuardMain
//
//  Created by lifengzhong on 15/11/10.
//  Copyright © 2015年 Li Fengzhong. All rights reserved.
//

#ifndef ISecurityGuardOpenDataCollection_h
#define ISecurityGuardOpenDataCollection_h

#if TARGET_OS_WATCH
#import <SecurityGuardSDKWatch/Open/OpenDataCollection/IOpenDataCollectionComponent.h>
#import <SecurityGuardSDKWatch/Open/IOpenSecurityGuardPlugin.h>
#else
#import <SecurityGuardSDK/Open/OpenDataCollection/IOpenDataCollectionComponent.h>
#import <SecurityGuardSDK/Open/IOpenSecurityGuardPlugin.h>
#endif

@protocol ISecurityGuardOpenDataCollection <NSObject, IOpenDataCollectionComponent, IOpenSecurityGuardPluginInterface>

@end

#endif /* ISecurityGuardOpenDataCollection_h */


text:
module ActiveRecord
  module View
    module ViewMethods
      extend ActiveSupport::Concern

      module ClassMethods
        # Get the view's current definition query.
        #
        # @param [Boolean] raise_error
        # @return [String, nil]
        def view_definition(raise_error: false)
          ActiveRecord::View.definition_for self, raise_error: raise_error
        end
      end
    end
  end
end


text:
package org.wso2.security.tools.automation.manager.repository.productmanager;

import org.springframework.data.repository.CrudRepository;
import org.wso2.security.tools.automation.manager.entity.productmanager.cloudbased.CloudBasedProductManagerEntity;

/**
 * Repository methods for accessing persistent {@link CloudBasedProductManagerEntity}
 */
public interface CloudBasedProductManagerRepository extends CrudRepository<CloudBasedProductManagerEntity, Integer> {
    /**
     * Find a list of cloud based product managers by user id
     *
     * @param userId User id
     * @return List of {@code CloudBasedProductManagerEntity}
     */
    Iterable<CloudBasedProductManagerEntity> findByUserId(String userId);
}


text:
//
// Copyright 2022 Google LLC
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
//

using Google.Solutions.WWAuth.Adapters;
using Google.Solutions.WWAuth.Data;
using Google.Solutions.WWAuth.Util;
using System;
using System.ComponentModel;

namespace Google.Solutions.WWAuth.View
{
    [SkipCodeCoverage]
    internal partial class EditConfigurationDialog : PropertiesDialog
    {
        private readonly EditConfigurationViewModel viewModel;

        public EditConfigurationDialog(CredentialConfigurationFile file)
        {
            InitializeComponent();

            viewModel = new EditConfigurationViewModel(
                file,
                new ShellAdapter());

            this.BindReadonlyProperty(
                c => c.Text,
                viewModel,
                m => m.WindowTitle,
                this.Container);

            AddSheet(new AdfsConfigurationSheet(file));

            if (file.Configuration.PoolConfiguration is WorkloadIdentityPoolConfiguration)
            {
                AddSheet(new WorkloadIdentityConfigurationSheet(file));
            }
            else
            {
                throw new NotImplementedException(
                    "Unrecognized pool configuration: This tool only supports " +
                    "workload identity federation.");
            }
        }

        private void verifyButton_Click(object sender, EventArgs _)
            => InvokeAction(
                "Verifying configuration",
                () =>
                {
                    Validate();
                    this.viewModel.VerifyConfiguration(this);
                });

        private void verifyAsUserMenuItem_Click(object sender, EventArgs e)
            => InvokeAction(
                "Verifying configuration",
                () =>
                {
                    Validate();
                    this.viewModel.VerifyConfigurationAsUser(this);
                });

        private void gcloudMenuItem_Click(object sender, EventArgs e)
            => InvokeAction(
                "Launching gcloud",
                () => this.viewModel.LaunchGcloud());

        private void adcMenuItem_Click(object sender, EventArgs e)
            => InvokeAction(
                "Launching command line environment",
                () => this.viewModel.LaunchCommandLineEnvironment());

        private void showOutputMenuItem_Click(object sender, EventArgs e)
            => InvokeAction(
                "Launching executable command",
                () => this.viewModel.LaunchExecutableCommand());

        private void EditConfigurationDialog_HelpButtonClicked(object sender, CancelEventArgs e)
        {
            e.Cancel = true;
            using (var dialog = new AboutDialog())
            {
                dialog.ShowDialog(this);
            }
        }
    }
}


text:
function GazeData = ParseGazeData(LeftEyeArray, RightEyeArray)
%Turn left and right gaze arrays into structs

if ~isempty(LeftEyeArray)
    GazeData.left_eye_ucs.x = LeftEyeArray(:, 1);
    GazeData.left_eye_ucs.y = LeftEyeArray(:, 2);
    GazeData.left_eye_ucs.z = LeftEyeArray(:, 3);
    GazeData.left_eye_tcs.x = LeftEyeArray(:, 4);
    GazeData.left_eye_tcs.y = LeftEyeArray(:, 5);
    GazeData.left_eye_tcs.z = LeftEyeArray(:, 6);
    GazeData.left_gaze_acs.x = LeftEyeArray(:, 7);
    GazeData.left_gaze_acs.y = LeftEyeArray(:, 8);
    GazeData.left_gaze_ucs.x = LeftEyeArray(:, 9);
    GazeData.left_gaze_ucs.y = LeftEyeArray(:, 10);
    GazeData.left_gaze_ucs.z = LeftEyeArray(:, 11);
    GazeData.left_pupil_diameter = LeftEyeArray(:, 12);
    GazeData.left_validity = round(LeftEyeArray(:, 13));
end

if ~isempty(RightEyeArray)
    GazeData.right_eye_ucs.x = RightEyeArray(:, 1);
    GazeData.right_eye_ucs.y = RightEyeArray(:, 2);
    GazeData.right_eye_ucs.z = RightEyeArray(:, 3);
    GazeData.right_eye_tcs.x = RightEyeArray(:, 4);
    GazeData.right_eye_tcs.y = RightEyeArray(:, 5);
    GazeData.right_eye_tcs.z = RightEyeArray(:, 6);
    GazeData.right_gaze_acs.x = RightEyeArray(:, 7);
    GazeData.right_gaze_acs.y = RightEyeArray(:, 8);
    GazeData.right_gaze_ucs.x = RightEyeArray(:, 9);
    GazeData.right_gaze_ucs.y = RightEyeArray(:, 10);
    GazeData.right_gaze_ucs.z = RightEyeArray(:, 11);
    GazeData.right_pupil_diameter = RightEyeArray(:, 12);
    GazeData.right_validity = round(RightEyeArray(:, 13));
end

end


text:
.class public interface abstract Landroid/os/MessageQueue$IdleHandler;
.super Ljava/lang/Object;
.source "MessageQueue.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/os/MessageQueue;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x609
    name = "IdleHandler"
.end annotation

# virtual methods
.method public abstract queueIdle()Z
.end method


text:
package eu.smartenit.enduser.app.timers;

import java.util.Timer;
import java.util.TimerTask;

import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.NetworkInfo;
import android.net.wifi.WifiManager;
import android.os.AsyncTask;
import android.os.Binder;
import android.os.IBinder;
import eu.smartenit.enduser.app.ctm.Log;
import eu.smartenit.enduser.app.energyreport.ReportStats;

/**
 * Background timer for periodically energy updates. Runs as service.
 *
 * @author Robert Reinecke
 *
 */
public class EnergyTimer extends Service {
	private final IBinder mBinder = new EnergyTimerBinder();
	private Timer periodicReport;
	private long reportInterval = 1000;
	private static boolean isRunning;
	private ReportStats task;

	private BroadcastReceiver mWifiChangeReceiver = new BroadcastReceiver() {

		@Override
		public void onReceive(Context arg0, Intent intent) {
			NetworkInfo info = intent
					.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
			if (info != null) {
				if (info.isConnected()) {
					ReportStats.setRegisterRequired(true);
				}
			}
		}
	};

	@Override
	public void onCreate() {
		super.onCreate();
		Log.d("EnergyService", "started");
		startRunning();
	}

	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		return Service.START_STICKY;
	}

	@Override
	public IBinder onBind(Intent intent) {
		registerService();

		if (!isRunning) {
			startRunning();
		}
		return mBinder;
	}

	private void registerService() {
		IntentFilter intentFilter = new IntentFilter();
		intentFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
		registerReceiver(mWifiChangeReceiver, intentFilter);
	}

	public class EnergyTimerBinder extends Binder {
		public EnergyTimer getService() {
			// Return this instance of WifiScanTimer so clients can
			// call public methods
			return EnergyTimer.this;
		}
	}

	@Override
	public void onDestroy() {
		stopRunning();
		super.onDestroy();
	}

	@Override
	public boolean onUnbind(Intent intent) {
		Log.d(this.getClass().getName(), "UNBIND");
		return true;
	}

	public void startRunning() {
		Log.d("periodicEnergyData", "started");

		registerService();

		periodicReport = new Timer();
		TimerTask periodicScan = new TimerTask() {

			@Override
			public void run() {

				sendData();
			}
		};
		periodicReport.scheduleAtFixedRate(periodicScan, reportInterval,
				reportInterval);
		isRunning = true;
	}

	public void stopRunning() {
		periodicReport.cancel();
		isRunning = false;
		Log.d("periodicEnergyData", "stoped");
	}

	public boolean isRunning() {
		return isRunning;
	}

	protected void sendData() {
		String android_id = android.provider.Settings.Secure.getString(
				getBaseContext().getContentResolver(),
				android.provider.Settings.Secure.ANDROID_ID);
		boolean f = false;
		task = new ReportStats(android_id);
		task.execute();
	}
}


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

	<textarea id="xooki-source">

Tag	ivyrep

Handle latest	yes, at least if the repository server is apache based

Handle publish	no

This resolver usually uses an URL based repository usually similar in structure to ivyrep to find ivy files, and ibiblio to find artifacts.
It can also be configured to use other similar repositories.

Since ivyrep is not maintained anymore, the ivyroot attribute is mandatory, and the use of this resolver is not recommended (we recommend using [[resolver/url url resolver]] as replacement in most cases).

Attributes

This resolver shares the common attributes of standard resolvers.

Attribute	Description	Required

ivyroot	the root of the ivy repository.
        Yes, but may be provided through ${ivy.ivyrep.default.ivy.root} since 2.0

ivypattern	a pattern describing the layout of the ivy repository.
        No, defaults to ${ivy.ivyrep.default.ivy.pattern}

artroot	the root of the artifacts repository.
        No, defaults to ${ivy.ivyrep.default.artifact.root}

artpattern	a pattern describing the layout of the artifacts repository.
        No, defaults to ${ivy.ivyrep.default.artifact pattern}

Examples

<ivyrep name="ivyrep" ivyroot="http://ivyrep.mycompany.com"/>

Looks for ivy files on and ivyrep like web site located at http://ivyrep.mycompany.com.

	</textarea>


text:
package org.apache.ignite.internal.processors.hadoop.impl.igfs;

import java.util.ArrayList;
import java.util.List;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteFileSystem;
import org.apache.ignite.configuration.FileSystemConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem;
import org.apache.ignite.igfs.IgfsEventsAbstractSelfTest;
import org.apache.ignite.igfs.IgfsIpcEndpointConfiguration;
import org.apache.ignite.igfs.IgfsIpcEndpointType;
import org.apache.ignite.igfs.IgfsMode;
import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryServerEndpoint;
import org.apache.ignite.internal.util.typedef.G;
import org.apache.ignite.testframework.junits.DynamicSuite;
import org.jetbrains.annotations.Nullable;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.model.InitializationError;

import static org.apache.ignite.igfs.IgfsMode.DUAL_ASYNC;
import static org.apache.ignite.igfs.IgfsMode.DUAL_SYNC;
import static org.apache.ignite.igfs.IgfsMode.PRIMARY;

/**
 * Test suite for IGFS event tests.
 */
@RunWith(DynamicSuite.class)
public class IgfsEventsTestSuite {
    /**
     * @return Test suite.
     * @throws ClassNotFoundException If the class was not found by class loader.
     */
    public static List<Class<?>> suite() throws ClassNotFoundException {
        ClassLoader ldr = IgfsEventsTestSuite.class.getClassLoader();

        List<Class<?>> suite = new ArrayList<>();

        suite.add(ldr.loadClass(ShmemPrimary.class.getName()));
        suite.add(ldr.loadClass(ShmemDualSync.class.getName()));
        suite.add(ldr.loadClass(ShmemDualAsync.class.getName()));

        suite.add(ldr.loadClass(LoopbackPrimary.class.getName()));
        suite.add(ldr.loadClass(LoopbackDualSync.class.getName()));
        suite.add(ldr.loadClass(LoopbackDualAsync.class.getName()));

        return suite;
    }

    /**
     * @return Test suite with only tests that are supported on all platforms.
     * @throws ClassNotFoundException If the class was not found by class loader.
     */
    private static List<Class<?>> suiteNoarchOnly() throws ClassNotFoundException {
        ClassLoader ldr = IgfsEventsTestSuite.class.getClassLoader();

        List<Class<?>> suite = new ArrayList<>();

        suite.add(ldr.loadClass(LoopbackPrimary.class.getName()));
        suite.add(ldr.loadClass(LoopbackDualSync.class.getName()));
        suite.add(ldr.loadClass(LoopbackDualAsync.class.getName()));

        return suite;
    }

    /** */
    @RunWith(IgfsEventsTestSuite.IgfsEventsNoarchOnlyTestSuite.class)
    public static class IgfsEventsNoarchOnlyTest {
    }

    /** */
    public static class IgfsEventsNoarchOnlyTestSuite extends Suite {
        /** */
        public IgfsEventsNoarchOnlyTestSuite(Class<?> cls) throws ClassNotFoundException, InitializationError {
            super(cls, suiteNoarchOnly().toArray(new Class<?>[] {null}));
        }
    }

    /**
     * Shared memory IPC in PRIVATE mode.
     */
    public static class ShmemPrimary extends IgfsEventsAbstractSelfTest {
        /** {@inheritDoc} */
        @Override protected FileSystemConfiguration getIgfsConfiguration() throws IgniteCheckedException {
            FileSystemConfiguration igfsCfg = super.getIgfsConfiguration();

            igfsCfg.setDefaultMode(IgfsMode.PRIMARY);

            IgfsIpcEndpointConfiguration endpointCfg = new IgfsIpcEndpointConfiguration();

            endpointCfg.setType(IgfsIpcEndpointType.SHMEM);
            endpointCfg.setPort(IpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + 1);

            igfsCfg.setIpcEndpointConfiguration(endpointCfg);

            return igfsCfg;
        }
    }

    /**
     * Loopback socket IPS in PRIVATE mode.
     */
    public static class LoopbackPrimary extends IgfsEventsAbstractSelfTest {
        /** {@inheritDoc} */
        @Override protected FileSystemConfiguration getIgfsConfiguration() throws IgniteCheckedException {
            FileSystemConfiguration igfsCfg = super.getIgfsConfiguration();

            igfsCfg.setDefaultMode(IgfsMode.PRIMARY);

            IgfsIpcEndpointConfiguration endpointCfg = new IgfsIpcEndpointConfiguration();

            endpointCfg.setType(IgfsIpcEndpointType.TCP);
            endpointCfg.setPort(IpcSharedMemoryServerEndpoint.DFLT_IPC_PORT + 1);

            igfsCfg.setIpcEndpointConfiguration(endpointCfg);

            return igfsCfg;
        }
    }

    /**
     * Base class for all IGFS tests with primary and secondary file system.
     */
    public abstract static class PrimarySecondaryTest extends IgfsEventsAbstractSelfTest {
        /** Secondary file system. */
        private static IgniteFileSystem igfsSec;

        /** {@inheritDoc} */
        @Override protected FileSystemConfiguration getIgfsConfiguration() throws IgniteCheckedException {
            FileSystemConfiguration igfsCfg = super.getIgfsConfiguration();

            //noinspection deprecation
            igfsCfg.setSecondaryFileSystem(new IgniteHadoopIgfsSecondaryFileSystem(
                "igfs://igfs-secondary@127.0.0.1:11500/",
                "modules/core/src/test/config/hadoop/core-site-secondary.xml"));

            return igfsCfg;
        }

        /**
         * @return IGFS configuration for secondary file system.
         */
        protected FileSystemConfiguration getSecondaryIgfsConfiguration() throws IgniteCheckedException {
            FileSystemConfiguration igfsCfg = super.getIgfsConfiguration();

            igfsCfg.setName("igfs-secondary");
            igfsCfg.setDefaultMode(PRIMARY);

            IgfsIpcEndpointConfiguration endpointCfg = new IgfsIpcEndpointConfiguration();

            endpointCfg.setType(IgfsIpcEndpointType.TCP);
            endpointCfg.setPort(11500);

            igfsCfg.setIpcEndpointConfiguration(endpointCfg);

            return igfsCfg;
        }

        /** {@inheritDoc} */
        @Override protected void beforeTestsStarted() throws Exception {
            igfsSec = startSecondary();

            super.beforeTestsStarted();
        }

        /** {@inheritDoc} */
        @Override protected void afterTestsStopped() {
            G.stopAll(true);
        }

        /** {@inheritDoc} */
        @Override protected void afterTest() throws Exception {
            super.afterTest();

            // Clean up secondary file system.
            igfsSec.clear();
        }

        /**
         * Start a grid with the secondary file system.
         *
         * @return Secondary file system handle.
         * @throws Exception If failed.
         */
        @Nullable private IgniteFileSystem startSecondary() throws Exception {
            IgniteConfiguration cfg = getConfiguration("grid-secondary", getSecondaryIgfsConfiguration());

            cfg.setLocalHost("127.0.0.1");
            cfg.setPeerClassLoadingEnabled(false);

            Ignite secG = G.start(cfg);

            return secG.fileSystem("igfs-secondary");
        }
    }

    /**
     * Shared memory IPC in DUAL_SYNC mode.
     */
    public static class ShmemDualSync extends PrimarySecondaryTest {
        /** {@inheritDoc} */
        @Override protected FileSystemConfiguration getIgfsConfiguration() throws IgniteCheckedException {
            FileSystemConfiguration igfsCfg = super.getIgfsConfiguration();

            igfsCfg.setDefaultMode(DUAL_SYNC);

            return igfsCfg;
        }
    }

    /**
     * Shared memory IPC in DUAL_SYNC mode.
     */
    public static class ShmemDualAsync extends PrimarySecondaryTest {
        /** {@inheritDoc} */
        @Override protected FileSystemConfiguration getIgfsConfiguration() throws IgniteCheckedException {
            FileSystemConfiguration igfsCfg = super.getIgfsConfiguration();

            igfsCfg.setDefaultMode(DUAL_ASYNC);

            return igfsCfg;
        }
    }

    /**
     * Loopback socket IPC with secondary file system.
     */
    public abstract static class LoopbackPrimarySecondaryTest extends PrimarySecondaryTest {
        /** {@inheritDoc} */
        @Override protected FileSystemConfiguration getIgfsConfiguration() throws IgniteCheckedException {
            FileSystemConfiguration igfsCfg = super.getIgfsConfiguration();

            igfsCfg.setDefaultMode(IgfsMode.PRIMARY);

            //noinspection deprecation
            igfsCfg.setSecondaryFileSystem(new IgniteHadoopIgfsSecondaryFileSystem(
                "igfs://igfs-secondary@127.0.0.1:11500/",
                "modules/core/src/test/config/hadoop/core-site-loopback-secondary.xml"));

            return igfsCfg;
        }

        /** {@inheritDoc} */
        @Override protected FileSystemConfiguration getSecondaryIgfsConfiguration() throws IgniteCheckedException {
            FileSystemConfiguration igfsCfg = super.getSecondaryIgfsConfiguration();

            igfsCfg.setName("igfs-secondary");
            igfsCfg.setDefaultMode(PRIMARY);

            IgfsIpcEndpointConfiguration endpointCfg = new IgfsIpcEndpointConfiguration();

            endpointCfg.setType(IgfsIpcEndpointType.TCP);
            endpointCfg.setPort(11500);

            igfsCfg.setIpcEndpointConfiguration(endpointCfg);

            return igfsCfg;
        }
    }

    /**
     * Loopback IPC in DUAL_SYNC mode.
     */
    public static class LoopbackDualSync extends LoopbackPrimarySecondaryTest {
        /** {@inheritDoc} */
        @Override protected FileSystemConfiguration getIgfsConfiguration() throws IgniteCheckedException {
            FileSystemConfiguration igfsCfg = super.getIgfsConfiguration();

            igfsCfg.setDefaultMode(DUAL_SYNC);

            return igfsCfg;
        }
    }

    /**
     * Loopback socket IPC in DUAL_ASYNC mode.
     */
    public static class LoopbackDualAsync extends LoopbackPrimarySecondaryTest {
        /** {@inheritDoc} */
        @Override protected FileSystemConfiguration getIgfsConfiguration() throws IgniteCheckedException {
            FileSystemConfiguration igfsCfg = super.getIgfsConfiguration();

            igfsCfg.setDefaultMode(DUAL_ASYNC);

            return igfsCfg;
        }
    }
}


text:
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/slab.h>
#include <asm/div64.h>

#include "berlin2-div.h"
#include "berlin2-pll.h"

struct berlin2_pll {
	struct clk_hw hw;
	void __iomem *base;
	struct berlin2_pll_map map;
};

#define to_berlin2_pll(hw) container_of(hw, struct berlin2_pll, hw)

#define SPLL_CTRL0	0x00
#define SPLL_CTRL1	0x04
#define SPLL_CTRL2	0x08
#define SPLL_CTRL3	0x0c
#define SPLL_CTRL4	0x10

#define FBDIV_MASK	0x1ff
#define RFDIV_MASK	0x1f
#define DIVSEL_MASK	0xf

/*
 * The output frequency formula for the pll is:
 * clkout = fbdiv / refdiv * parent / vcodiv
 */
static unsigned long
berlin2_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
{
	struct berlin2_pll *pll = to_berlin2_pll(hw);
	struct berlin2_pll_map *map = &pll->map;
	u32 val, fbdiv, rfdiv, vcodivsel, vcodiv;
	u64 rate = parent_rate;

	val = readl_relaxed(pll->base + SPLL_CTRL0);
	fbdiv = (val >> map->fbdiv_shift) & FBDIV_MASK;
	rfdiv = (val >> map->rfdiv_shift) & RFDIV_MASK;
	if (rfdiv == 0) {
		pr_warn("%s has zero rfdiv\n", clk_hw_get_name(hw));
		rfdiv = 1;
	}

	val = readl_relaxed(pll->base + SPLL_CTRL1);
	vcodivsel = (val >> map->divsel_shift) & DIVSEL_MASK;
	vcodiv = map->vcodiv[vcodivsel];
	if (vcodiv == 0) {
		pr_warn("%s has zero vcodiv (index %d)\n",
			clk_hw_get_name(hw), vcodivsel);
		vcodiv = 1;
	}

	rate *= fbdiv * map->mult;
	do_div(rate, rfdiv * vcodiv);

	return (unsigned long)rate;
}

static const struct clk_ops berlin2_pll_ops = {
	.recalc_rate	= berlin2_pll_recalc_rate,
};

struct clk * __init
berlin2_pll_register(const struct berlin2_pll_map *map,
		     void __iomem *base, const char *name,
		     const char *parent_name, unsigned long flags)
{
	struct clk_init_data init;
	struct berlin2_pll *pll;

	pll = kzalloc(sizeof(*pll), GFP_KERNEL);
	if (!pll)
		return ERR_PTR(-ENOMEM);

	/* copy pll_map to allow __initconst */
	memcpy(&pll->map, map, sizeof(*map));
	pll->base = base;
	pll->hw.init = &init;
	init.name = name;
	init.ops = &berlin2_pll_ops;
	init.parent_names = &parent_name;
	init.num_parents = 1;
	init.flags = flags;

	return clk_register(NULL, &pll->hw);
}


text:
CC = gcc
PROF = gprof
LEX = flex
YACC = bison
MEMCHECK = valgrind
SRC_FOLDER = src/
COMPILER_FOLDER = $(SRC_FOLDER)compiler/

BASEDIR = $(CURDIR)

#Specific defines
APP_NAME = fgs
COMPILER = $(APP_NAME)_comp

#Options and flags
PROF_CCFLAGS = -pg
CCFLAGS = -ansi
DEBUG_CCFLAGS = -g -Wall
TEST_FLAGS = -t

HEADERS_FLAG = -Isrc/headers

#Deliverables
COMPILER_HEADER = fgs_comp.h
OPERATIONS = ops.h

SRCL = $(COMPILER).l
CL = $(COMPILER)_l.c
OBJL = $(COMPILER)_l.o

SRCY = $(COMPILER).y
CY = $(COMPILER)_y.c
OBJY = $(COMPILER)_y.o

#Target rules
all : test_compile
	@echo Finished compilation of test!

test : test.exe
	@echo Executing test with -t
	./test.exe -t

testv : test.exe
	@echo Executing test with -tv
	./test.exe -vt

test.exe : test_compile

test_compile : interpreter
	$(CC) $(HEADERS_FLAG) -ansi -o test.exe src/test.c build/*.o

debug_compile : tmp/$(CL) tmp/$(CY) build/
	$(CC) -ansi $(HEADERS_FLAG) -g -o testd.exe src/fgs*.c src/test.c tmp/fgs*.c

interpreter : compiler
	$(CC) -c $(HEADERS_FLAG) $(CCFLAGS) src/fgs*.c
	mv fgs*.o build/
#	rm build/$(APP_NAME).a
#	ar -cvq build/$(APP_NAME).a build/*.o

profiling : interpreter

valgrind : compiler
	$(MEMCHECK) --tool=memcheck --leak-check=yes ./$(TEST) $(TEST_FLAGS)

compiler : tmp/$(CL) tmp/$(CY) build/
	$(CC) -ansi $(HEADERS_FLAG) -g -c src/fgs_comp_symtab.c src/fgs_comp.c tmp/fgs_comp*.c
	mv fgs_comp*.o build/

tmp/$(CL) : tmp/
	flex -n -o tmp/$(CL) src/$(SRCL)

tmp/$(CY) : tmp/
	bison -d -o tmp/$(CY) src/$(SRCY)

build/ :
	mkdir build

tmp/ :
	mkdir tmp

clean :
	rm -r -f tmp
	rm -r -f build


text:
using Itenso.TimePeriod;

namespace Itenso.TimePeriodDemo
{

	// ------------------------------------------------------------------------
	public class BroadcastWeekDemo : TimePeriodDemo
	{

		// ----------------------------------------------------------------------
		public static void ShowAll( int year, int weekOfYear )
		{
			WriteLine( "Input: year={0}, week={1}", year, weekOfYear );
			WriteLine();

			BroadcastWeek week = new BroadcastWeek( year, weekOfYear );

			BroadcastWeek previousWeek = week.GetPreviousWeek();
			BroadcastWeek nextWeek = week.GetNextWeek();

			ShowWeek( week );
			ShowCompactWeek( previousWeek, "Previous BroadcastWeek" );
			ShowCompactWeek( nextWeek, "Next BroadcastWeek" );
			WriteLine();

			foreach ( Day day in week.GetDays() )
			{
				DayDemo.ShowCompactDay( day );
			}
			WriteLine();
		} // ShowAll

		// ----------------------------------------------------------------------
		public static void ShowCompactWeek( BroadcastWeek week, string caption = "BroadcastWeek" )
		{
			WriteLine( "{0}: {1}", caption, week );
		} // ShowCompactWeek

		// ----------------------------------------------------------------------
		public static void ShowWeek( BroadcastWeek week, string caption = "BroadcastWeek" )
		{
			WriteLine( "{0}: {1}", caption, week );
			WriteIndentLine( "Year: {0}", week.Year );
			WriteIndentLine( "Week: {0}", week.Week );
			WriteIndentLine( "FirstDayStart: {0}", Format( week.FirstDayStart ) );
			WriteIndentLine( "LastDayStart: {0}", Format( week.LastDayStart ) );
			WriteLine();
		} // ShowWeek

	} // class BroadcastWeekDemo

} // namespace Itenso.TimePeriodDemo
// -- EOF -------------------------------------------------------------------


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="#">

    <title>Bravo - Multipurpose HTML Templates</title>

    <link href="assets/css/style.css" rel="stylesheet">

									bravo

											Home

													Home-1

													Home-2

													Home-3

											Projects

											About

											Contact

											Pages

													Blog

													Blog Single

Digital solutions led by clarity, simplicity & honesty

EXPLORE

Different ways to Organize your Content.

Our long standing vision has been to bypass the usual admin dashboard structure, and move forward with a more sophisticated yet simple framework that would create a credible impact on the many conventional dashboard users.

						Work With Us

						Small. Vibrant. Passionate.

Daniel Avery

Founder & CEO. Having worked in some of New York's biggest agencies, Daniel's radical vision required a newfound venture.

Daniel Avery

Founder & CEO. Having worked in some of New York's biggest agencies, Daniel's radical vision required a newfound venture.

Daniel Avery

Founder & CEO. Having worked in some of New York's biggest agencies, Daniel's radical vision required a newfound venture.

We help businesses to create and implement exceptional experiences for their customers. We specialise in online multi-channel technology services.

Visualise

Awesome notepad app. It gives you a quick and simple notepad editing experience when you write notes.

Research

Awesome notepad app. It gives you a quick and simple notepad editing experience when you write notes.

Develop

Awesome notepad app. It gives you a quick and simple notepad editing experience when you write notes.

Manage

Awesome notepad app. It gives you a quick and simple notepad editing experience when you write notes.

Interested in our full business solutions?

						Contact Us

Latest Works

Wig Agency Templates

We invest time, money and passion to learn by doing – creating products for ourselves and the world. Whether our iconic game Monument Valley or innovative technical platform Wayfindr, we create products with passion from conception to launch and beyond.

						See Project

Another Phone App

We invest time, money and passion to learn by doing – creating products for ourselves and the world. Whether our iconic game Monument Valley or innovative technical platform Wayfindr, we create products with passion from conception to launch and beyond.

						See Project

Clients

Don't miss any news. Subscribe below to be updated.

            <form role="form" action="http://demo.pokojan.my.id/bravo/register.php" method="post" enctype="plain">
              <input type="email" name="email" class="subscribe-input" placeholder="Enter your e-mail address..." required>
              <button class='btn btn-red' type="submit">Subscribe</button>
            </form>

Headquarters

                  Some Avenue, 987

                  New York

                  United States.

hello@yoursite.com

Event Site

                  Main Avenue, 224

                  San Francisco

                  United States.

event@yoursite.com

Bravo


text:
<?php

namespace VEBERArnaud\SqsBundle\Tests\App;

use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;

/**
 * app kernel
 *
 * @author VEBER Arnaud <https://github.com/VEBERArnaud>
 */
class AppKernel extends Kernel
{
    /**
     * register bundles
     *
     * @return \Symfony\Component\HttpKernel\Bundle\BundleInterface[]
     */
    public function registerBundles()
    {
        return [
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new \VEBERArnaud\SqsBundle\SqsBundle(),
        ];
    }

    /**
     * register container configuration
     *
     * @param \Symfony\Component\Config\Loader\LoaderInterface $loader
     *
     * @return void
     */
    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__.'/config.yml');
    }
}


text:
'use strict';

angular.module('privateTheaterApp')
  .controller('AdminReportsCtrl', ['$scope', '$rootScope', 'MediaError', function ($scope, $rootScope, MediaError) {
    $scope.statusFilter = 'open';
    $scope.statusClasses = {
      open: '',
      closed: 'success',
      discarted: 'active'
    };
    $scope.statusLabels = {
      open: 'label-info',
      closed: 'label-success',
      discarted: 'label-danger'
    };
    if(!$rootScope.reports){
      $rootScope.reports = MediaError.query();
    }
    $scope.reports = $rootScope.reports;
    $scope.updateStatus = function (report, status){
      //TODO: Restore previous status if update fails
      // var prevStatus = report.status;
      report.status = status;
      report.$update();
    };
    $scope.isFilterActive = function(filter){
      return ($scope.statusFilter === filter);
    };
  }]);


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">

<title>Documentation for GrowlInstallationPrompt.h</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="generator" content="HeaderDoc">

[Top]

Header:

GrowlInstallationPrompt.h

<nobr>Introduction</nobr>

Functions

<nobr>      showInstallationPrompt</nobr>
<nobr>      showUpdatePromptForVersion:</nobr>


text:
Szu-Wen (Steven) Huang
Szu-Wen (Steven) Huang
Szu-Wen (Steven) T. Huang


text:
package org.apache.webbeans.test.component.binding;

import org.apache.webbeans.test.annotation.binding.ParameterBinding1;
import org.apache.webbeans.test.annotation.binding.ParameterBinding2;
import org.apache.webbeans.test.annotation.binding.ParameterBinding3;

@ParameterBinding1
@ParameterBinding2
@ParameterBinding3
public class NonAnyBindingComponent {

}


text:
import React from 'react';

import VideoListItem from './video-list-item';

const VideoList = ({videos, onVideoSelect}) => {

    let videoItems = videos.map((video) => {
        return <VideoListItem key={video.etag} video={video} onVideoSelect={onVideoSelect} />
    });

    return (

                { videoItems }

    );

};

export default VideoList;


text:
package net.qiujuer.powerback.ankey.ui.adapter.callback;

import java.util.UUID;

/**
 * Created by qiujuer
 * on 15/10/29.
 */
public interface InfoListAdapterCallback {
    void onItemSelected(UUID id);

    void showLoading();

    void hideLoading();

    void showNull();

    void hideNull();
}


text:
import io
import re

class Counter:
    def __init__(self,path):
        """
        :param path: file path
        """
        self.mapping = dict()
        with io.open(path,encoding="utf-8")as f:
            data = f.read()
            print data
            words= [s.lower() for s in re.findall("\w+",data)]
            for word in words:
                print word
                self.mapping[word]=self.mapping.get(word,0)+1

    def most_common(self,n):
        assert n>0,"n should be large than 0"
        return sorted(self.mapping.items(),key=lambda item:item[1],reverse=True)[:n]

if __name__=='__main__':
    most_common_5 = Counter("import_this.txt").most_common(10)
    for item in most_common_5:
        print(item)


text:
package com.github.jinahya.codec.commons;

/**
 *
 * @author Jin Kwon <jinahya at gmail.com>
 */
public class RareStringEncoderProxy
    extends StringEncoderProxy<RareStringEncoder> {

    public static Object newInstance(final RareStringEncoder encoder) {

        if (encoder == null) {
            throw new NullPointerException("encoder");
        }

        return newInstance(
            RareStringEncoderProxy.class, RareStringEncoder.class, encoder);
    }

    public static Object newInstance() {

        return newInstance(new RareStringEncoder());
    }

    protected RareStringEncoderProxy(final RareStringEncoder encoder) {

        super(encoder);
    }

    @Override
    protected Object encode(final Object source) throws Throwable {

        return super.encode(source);
    }

    @Override
    protected String encode(final String source) throws Throwable {

        return encoder.encode(source);
    }

}


text:
<?php
session_start();

$header['css'][] = 'bootstrap-datepicker.min';

$header['js'][] = 'bootstrap-datepicker.min';
$header['js'][] = 'bootstrap-datepicker.es.min';
$header['js'][] = 'alta_empleado';

$contenido = 'administrador/usuarios/alta_empleado';

$data = array(
		'header' => $header,
		'contenido' => $contenido
);

Flight::render('template/layout', $data);
?>


text:
package com.boylesoftware.web.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
import java.util.regex.Pattern;

import javax.servlet.ServletContext;
import javax.servlet.UnavailableException;

import org.apache.commons.logging.LogFactory;

import com.boylesoftware.web.spi.ControllerMethodArgHandlerProvider;
import com.boylesoftware.web.spi.Route;
import com.boylesoftware.web.spi.Script;
import com.boylesoftware.web.spi.ViewSender;
import com.boylesoftware.web.util.StringUtils;

/**
 * {@link Route} implementation.
 *
 * @author Lev Himmelfarb
 */
class RouteImpl
	implements Route {

	/**
	 * Route id.
	 */
	private final String id;

	/**
	 * Request URI pattern.
	 */
	private final Pattern uriPattern;

	/**
	 * Names of parameters extracted from the URI pattern.
	 */
	private final String[] uriParamNames;

	/**
	 * Request URI template.
	 */
	private final String uriTemplate;

	/**
	 * Security mode.
	 */
	private final SecurityMode securityMode;

	/**
	 * Script associated with the mapping, or {@code null}.
	 */
	private final Script script;

	/**
	 * Associated controller handler, or {@code null}.
	 */
	private final ControllerHandlerImpl controllerHandler;

	/**
	 * Associated view handler.
	 */
	private final ViewHandlerImpl viewHandler;

	/**
	 * Number of times this mapping has been matched.
	 */
	private AtomicLong numMatched;

	/**
	 * Create new mapping.
	 *
	 * @param sc Servlet context.
	 * @param id Route id, or {@code null} to auto-generate based on the URI
	 * pattern.
	 * @param uriPattern Request URI pattern, which is a server root relative
	 * URI that can optionally contain URI parameter placeholders. Each
	 * placeholder is an expression surrounded by curly braces. Inside curly
	 * braces there is the parameter name and optionally, separated by a colon,
	 * the value regular expression. The regular expression must not contain any
	 * capturing groups and if the expression contains curly braces, they must
	 * be balanced. If the parameter name is empty, the value is not converted
	 * to a request parameter. If the regular expression is unspecified, regular
	 * expression that matches anything except "/" is used. Each URI parameter
	 * is converted to a regular request parameter with the specified name.
	 * @param securityMode Security mode.
	 * @param commonScript Additional logic associated with the mapping, or
	 * {@code null} if none. If specified, the script is executed each time for
	 * the matched request before the controller is called and the view is sent
	 * back to the client.
	 * @param controller Controller, or {@code null} if no controller is
	 * associated with the mapped resource.
	 * @param argHandlerProvider Controller method argument handler provider to
	 * use.
	 * @param viewIdPattern Mapped resource view id. The id may contain
	 * placeholders for request attributes and parameters in curly braces with
	 * the attribute or parameter name inside. Attributes take precedence over
	 * parameters.
	 * @param viewSender View sender to use to send the view to the client.
	 * @param viewScript Additional logic associated with the view, or
	 * {@code null} if none. If specified, the script is executed each time
	 * before the view is sent to the client. The script's purpose it to prepare
	 * data used by the view.
	 *
	 * @throws UnavailableException If an error happens.
	 */
	RouteImpl(final ServletContext sc, final String id,
			final String uriPattern, final SecurityMode securityMode,
			final Script commonScript, final Object controller,
			final ControllerMethodArgHandlerProvider argHandlerProvider,
			final String viewIdPattern, final ViewSender viewSender,
			final Script viewScript)
		throws UnavailableException {

		// parse URI pattern and template
		final StringBuilder uriTemplateSB = new StringBuilder();
		final StringBuilder uriPatternSB = new StringBuilder();
		final List<String> uriParamNamesList = new ArrayList<>();
		final StringBuilder paramNameSB = new StringBuilder();
		final StringBuilder paramPatternSB = new StringBuilder();
		final int patternLen = uriPattern.length();
		uriPatternSB.append("\\Q");
		for (int cInd = 0; cInd < patternLen; cInd++) {
			final char c = uriPattern.charAt(cInd);
			if (c == '{') {

				try {
					paramNameSB.setLength(0);
					paramPatternSB.setLength(0);
					StringBuilder curSB = paramNameSB;
					int balance = 1;
					while (balance > 0) {
						final char c1 = uriPattern.charAt(++cInd);
						switch (c1) {
						case '{':
							balance++;
							curSB.append(c1);
							break;
						case '}':
							if (--balance > 0)
								curSB.append(c1);
							break;
						case ':':
							if (curSB != paramPatternSB)
								curSB = paramPatternSB;
							else
								curSB.append(c1);
							break;
						default:
							curSB.append(c1);
						}
					}
				} catch (final IndexOutOfBoundsException e) {
					LogFactory.getLog(this.getClass()).error(
							"error parsing mapping URI pattern", e);
					throw new UnavailableException(
							"Unbalanced curly braces in URI pattern \"" +
							uriPattern + "\" at position " + cInd + ".");
				}

				uriParamNamesList.add(paramNameSB.length() > 0 ?
						paramNameSB.toString() : null);

				uriPatternSB.append("\\E(")
				.append(paramPatternSB.length() > 0 ? paramPatternSB : "[^/]+")
				.append(")\\Q");

				uriTemplateSB.append("%");

			} else { // character outside parameter placeholder
				uriPatternSB.append(c);
				uriTemplateSB.append(c);
			}
		}
		uriPatternSB.append("\\E");
		this.uriPattern = Pattern.compile(uriPatternSB.toString());
		this.uriParamNames =
			uriParamNamesList.toArray(new String[uriParamNamesList.size()]);
		this.uriTemplate = uriTemplateSB.toString();

		// route id
		this.id = (id != null ? id :
			this.uriTemplate.substring(
					StringUtils.emptyIfNull(sc.getContextPath()).length()));

		// save security mode
		this.securityMode = securityMode;

		// save the script
		this.script = commonScript;

		// create controller handler
		this.controllerHandler = (controller != null ?
				new ControllerHandlerImpl(sc, controller, argHandlerProvider) :
					null);

		// create view handler
		this.viewHandler =
			new ViewHandlerImpl(viewIdPattern, viewScript, viewSender);

		// initially the mapping has not been matched
		this.numMatched = new AtomicLong();
	}

	/**
	 * Create new mapping using an existing mapping, but with a different
	 * security mode.
	 *
	 * @param baseMapping Base mapping.
	 * @param securityMode New security mode.
	 */
	RouteImpl(final RouteImpl baseMapping, final SecurityMode securityMode) {

		this.id = baseMapping.id;
		this.uriPattern = baseMapping.uriPattern;
		this.uriParamNames = baseMapping.uriParamNames;
		this.uriTemplate = baseMapping.uriTemplate;
		this.script = baseMapping.script;
		this.controllerHandler = baseMapping.controllerHandler;
		this.viewHandler = baseMapping.viewHandler;

		this.numMatched = new AtomicLong();

		this.securityMode = securityMode;
	}

	/**
	 * Atomically get number of times this mapping has been matched.
	 *
	 * @return Number of times this mapping has been matched.
	 */
	long getNumMatched() {

		return this.numMatched.get();
	}

	/**
	 * Atomically increment the number of times this mapping has been matched.
	 *
	 * @return The new value.
	 */
	long incrementNumMatched() {

		return this.numMatched.incrementAndGet();
	}

	/**
	 * Get route id.
	 *
	 * @return Route id.
	 */
	String getId() {

		return this.id;
	}

	/**
	 * Get pattern for matching against the request URI.
	 *
	 * @return Request URI pattern.
	 */
	Pattern getURIPattern() {

		return this.uriPattern;
	}

	/**
	 * Get URI parameter name for the specified index.
	 *
	 * @param ind Zero-based parameter index.
	 *
	 * @return Parameter name, or {@code null} if placeholder in the URI pattern
	 * does not contain a name.
	 */
	String getURIParamName(final int ind) {

		return this.uriParamNames[ind];
	}

	/**
	 * Get number of URI parameters in the URI pattern.
	 *
	 * @return Number of URI parameters.
	 */
	int getNumURIParams() {

		return this.uriParamNames.length;
	}

	/**
	 * Get URI template, which the is the URI pattern with all URI parameter
	 * placeholders, if any, replaced with "%". The template may be used to
	 * construct request URIs that would match the mapping.
	 *
	 * @return The URI template.
	 */
	String getURITemplate() {

		return this.uriTemplate;
	}

	/* (non-Javadoc)
	 * @see com.boylesoftware.web.spi.Route#getScript()
	 */
	@Override
	public Script getScript() {

		return this.script;
	}

	/* (non-Javadoc)
	 * @see com.boylesoftware.web.spi.Route#getControllerHandler()
	 */
	@Override
	public ControllerHandlerImpl getControllerHandler() {

		return this.controllerHandler;
	}

	/* (non-Javadoc)
	 * @see com.boylesoftware.web.spi.Route#getViewHandler()
	 */
	@Override
	public ViewHandlerImpl getViewHandler() {

		return this.viewHandler;
	}

	/* (non-Javadoc)
	 * @see com.boylesoftware.web.spi.Route#getSecurityMode()
	 */
	@Override
	public SecurityMode getSecurityMode() {

		return this.securityMode;
	}
}


text:
package cz.hrnr.matroskabatch.track;

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

/**
 * Represents track's mediatype.
 *
 * track is either one of supported types in Matroska (video, audio, subtitles) or
 * Matroska container itself.
 *
 */
public enum TrackType {

	CONTAINER(0, Arrays.asList("")),
	VIDEO(1, Arrays.asList("-A", "-S", "-d")),
	AUDIO(2, Arrays.asList("-D", "-S", "-a")),
	SUBTITLES(3, Arrays.asList("-D", "-A", "-s"));

//	see #getNumVal
	private final int numVal;
//	arguments for mkvmerge to catch on this track
	private final List<String> cmdVal;

	TrackType(int numVal, List<String> cmdVal) {
		this.numVal = numVal;
		this.cmdVal = cmdVal;
	}

	/**
	 * Gets numeric representation. Has no direct relation
	 * with Matroska representation, but may be used for consistent sorting etc.
	 *
	 * @return non-negative integer representing order
	 */
	public int getNumVal() {
		return numVal;
	}

	/**
	 * Converts to mkvmerge cmdline representation.
	 *
	 * @param trackID mkvmerge trackID
	 * {@link http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvmerge.html#mkvmerge.track_ids}
	 * @return mkvmerge cmdline arguments
	 */
	public List<String> toCmdLine(int trackID) {
		List<String> l = new ArrayList<>(cmdVal);
		l.add(Integer.toString(trackID));

		return l;
	}

	@Override
	public String toString() {
		return super.toString().toLowerCase();
	}
}


text:
layout: base
title:  'Tokenization'
permalink: cs/overview/tokenization.html
---

# Tokenization

The low-level tokenization of the Czech UD treebank follows the tokenization of the
[Prague Dependency Treebank 3.0](http://ufal.mff.cuni.cz/pdt3.0) (PDT):

* In general, tokens are delimited by whitespace.
* Punctuation (recognized by the corresponding Unicode property) that is conventionally written adjacent to the preceding or following word is separated during tokenization.
  Some special cases worth mentioning:
  * An abbreviation marked by a period, as in *atd.* "etc.", becomes two tokens, *atd* and *.*. The same holds for ordinal numbers *(1.)*
  * A compound containing a hyphen becomes three tokens (two words and the hyphen), as in *česko-slovenský* "Czech-Slovak", *česko-německý* "Czech-German" or *německo-český* "German-Czech".
    In these cases, the first token is a special form of adjective that never occurs independently.
    Compounds without a hyphen are not split, thus _středopravý_ "right-centrist" is one token but _středo-pravý_ would be three tokens.
    Another common case of splitting-on-hyphen is the conjunction _li_ "if", attached to verbs as in _bude-li_ "if will be".
  * Exception: Decimal numbers are normalized (the Czech decimal comma is converted to the English decimal point) and kept as one token, e.g. *2.1*.
* Most of the time, every punctuation character constitutes a token of its own. Thus *...* will become three tokens.

## Words and Tokens

In Czech there are fused words that correspond to multiple syntactic words.
The original PDT data use special part-of-speech tags to identify fused words,
nevertheless the fused token is not split in PDT and it corresponds to just one node in the dependency tree.
(Note: An exception was the splitting of *aby* and *kdyby* in PDT 1.0 but it was abandoned in later versions.)

In contrast, the UD format requires that certain types of fused words be split.
We say that there is a multi-word token consisting of several syntactic words, each having its own node in the tree
(see also universal tokenization).

### Preposition + Personal Pronoun *on* in the Accusative *(něj)*

* _proň_ = _pro něj_ = "for him"
* _naň_ = _na něj_ = "on him"
* _oň_ = _o něj_ = "about him"
* _zaň_ = _za něj_ = "behind/for him"

This category covers words that would be tagged by the PDT tag `P0-------------`.
However, no such word occurs in the PDT 3.0 data.

### Preposition + Interrogative/Relative Pronoun *co* in the Accusative

* _nač_ = _na co_ = "on what"
* _oč_ = _o co_ = "about what"
* _zač_ = _za co_ = "behind/for what"

This category covers words that would be tagged by the PDT tag `PY-------------`.
No such word occurs in the PDT 3.0 data but there are a few occurrences in the CAC 2.0 data.

Note: There is another analogically fused word, _proč_ "why". In contrast to the above, _proč_ has grammaticalized
into an interrogative/relative adverb. It is more frequent than the three fusions listed above but it is not used
to replace a prepositional object. We do not split it into _pro co_.

### Participle, Pronoun or Subordinating Conjunction + the Auxiliary *být* in the 2nd Person Singular *(jsi)*

* _udělals_ = _udělal jsi_ = "you have done"
* _tys_ = _ty jsi_ = "you have"
* _ses_ = _jsi se (se jsi)_ = "you have … yourself"
* _sis_ = _jsi si (si jsi)_ = "you have … yourself"
* _cos_ = _co jsi_ = "what you have"
* _tos_ = _to jsi_ = "you have … that"
* _žes_ = _že jsi_ = "that you have"

Note: This rule does not include the words _bys, abys_ and _kdybys._
They resemble the words above but _bys_ is an independent form of the auxiliary verb _být_ "to be",
and _abys_ and _kdybys_ are in fact fused words, but they were formed using _bys,_ not _jsi._

This category does not have its own tag in PDT.
The _ses, sis_ pronouns are `P7.*` pronouns with the second person.
The _tys_ pronoun can be distinguished by having more verbal features in its tag (`PP-S1--2P-AA---`) than _ty_ (`PP-S1--2-------`).
The _žes_ conjunction is tagged `J,-S---2-------` while _že_ is tagged `J,-------------`.
The participles can be distinguished by the value of person:
normal participle _udělal_ does not inflect for person (`VpYS---XR-AA---`)
while participle fused with _jsi_, i.e. _udělals_, is tagged as being in the second person (`VpYS---2R-AA---`).
None of these occur in the PDT 3.0 data.

### Subordinating Conjunction *aby* or *kdyby*

* _abych_ = _aby bych_ = "so that I would"
* _abys_ = _aby bys_ = "so that you would"
* _aby_ = _aby by_ = "so that he/she/it/they would"
* _abychom_ = _aby bychom_ = "so that we would"
* _abyste_ = _aby byste_ = "so that you would"
* _kdybych_ = _když bych_ = "if I were"
* _kdybys_ = _když bys_ = "if you were"
* _kdyby_ = _když by_ = "if he/she/it/they were"
* _kdybychom_ = _když bychom_ = "if we were"
* _kdybyste_ = _když byste_ = "if you were"

Note: It is not clear even to a native speaker what exactly the first word should be _(aby, až, kdyby_ or _když);_
in any case, it is a conjunction.
However, it is clear that the second word is a conditional form of _být._

Heuristic to transform the tree if only surface tokens are desired as nodes:
attach the fused token (e.g. _abychom_) to the parent and with the label of the first part _(aby)_.
Tag it as subordinating conjunction and merge the features of both parts:

3-4   abychom   _      _      _                 _                                            _   _      _   _
3     aby       aby   SCONJ   J,-------------   _                                            7   mark   _   _
4     bychom    být   AUX     Vc-P---1-------   Mood=Cnd|Number=Plur|Person=1|VerbForm=Fin   7   aux    _   _

will be transformed to

3     abychom   aby   SCONJ   J,-P---1-------   Mood=Cnd|Number=Plur|Person=3|VerbForm=Fin   6   mark   _   _

### Verb + Conjunction _neboť_

* _dělámť_ = _neboť dělám_ = "because I do"
* _děláť_ = _neboť dělá_ = "because he/she/it does"
* _dělalť_ = _neboť dělal_ = "because he did"

The word forms in this group can be considered archaic.

There is only one occurrence in the PDT 3.0 data of the word _neníť_ "because it is not" (tagged `Vt-S---3P-NA--2`).


text:
'use strict';

// Usuarios controller
angular.module('usuarios').controller('UsuariosController', ['$scope', '$stateParams', '$location', 'Authentication', 'Usuarios',
	function($scope, $stateParams, $location, Authentication, Usuarios) {
		$scope.authentication = Authentication;

		// Create new Usuario
		$scope.create = function() {
			// Create new Usuario object
			var usuario = new Usuarios ({
				name: this.name
			});

			// Redirect after save
			usuario.$save(function(response) {
				$location.path('usuarios/' + response._id);

				// Clear form fields
				$scope.name = '';
			}, function(errorResponse) {
				$scope.error = errorResponse.data.message;
			});
		};

		// Remove existing Usuario
		$scope.remove = function(usuario) {
			if ( usuario ) {
				usuario.$remove();

				for (var i in $scope.usuarios) {
					if ($scope.usuarios [i] === usuario) {
						$scope.usuarios.splice(i, 1);
					}
				}
			} else {
				$scope.usuario.$remove(function() {
					$location.path('usuarios');
				});
			}
		};

		// Update existing Usuario
		$scope.update = function() {
			var usuario = $scope.usuario;

			usuario.$update(function() {
				$location.path('usuarios/' + usuario._id);
			}, function(errorResponse) {
				$scope.error = errorResponse.data.message;
			});
		};

		// Find a list of Usuarios
		$scope.find = function() {
			$scope.usuarios = Usuarios.query();
		};

		// Find existing Usuario
		$scope.findOne = function() {
			$scope.usuario = Usuarios.get({
				usuarioId: $stateParams.usuarioId
			});
		};

                // Find existing Usuario
		$scope.jnMi_json = {
                    strSaludo: "Hola mundo"
                };
	}
]);


text:
'use strict';
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var ts = require('typescript');
var Lint = require('tslint/lib/lint');
var abstractRule_1 = require('tslint/lib/language/rule/abstractRule');
exports.REQUIRED = 'required';
var NO_WHITESPACE_ALLOWED = 'No whitespace allowed between function or method name and parameters.';
var WHITESPACE_REQUIRED = 'Missing whitespace between function or method name and parameters.';
var Rule = (function (_super) {
    __extends(Rule, _super);
    function Rule() {
        _super.apply(this, arguments);
    }
    Rule.prototype.apply = function (sourceFile) {
        return this.applyWithWalker(new MethodSpaceWalker(sourceFile, this.getOptions()));
    };
    return Rule;
}(abstractRule_1.AbstractRule));
exports.Rule = Rule;
var MethodSpaceWalker = (function (_super) {
    __extends(MethodSpaceWalker, _super);
    function MethodSpaceWalker(sourceFile, options) {
        _super.call(this, sourceFile, options);
        this.banSpace = !this.hasOption(exports.REQUIRED);
        this.message = this.banSpace ? NO_WHITESPACE_ALLOWED : WHITESPACE_REQUIRED;
    }
    MethodSpaceWalker.prototype.visitMethodDeclaration = function (node) {
        this.checkForWhitespace(node);
        _super.prototype.visitMethodDeclaration.call(this, node);
    };
    MethodSpaceWalker.prototype.visitMethodSignature = function (node) {
        this.checkForWhitespace(node);
        _super.prototype.visitMethodSignature.call(this, node);
    };
    MethodSpaceWalker.prototype.visitFunctionDeclaration = function (node) {
        this.checkForWhitespace(node);
        _super.prototype.visitFunctionDeclaration.call(this, node);
    };
    MethodSpaceWalker.prototype.visitFunctionExpression = function (node) {
        this.checkForWhitespace(node);
        _super.prototype.visitFunctionExpression.call(this, node);
    };
    MethodSpaceWalker.prototype.visitSetAccessor = function (node) {
        this.checkForWhitespace(node);
        _super.prototype.visitSetAccessor.call(this, node);
    };
    MethodSpaceWalker.prototype.visitGetAccessor = function (node) {
        this.checkForWhitespace(node);
        _super.prototype.visitGetAccessor.call(this, node);
    };
    MethodSpaceWalker.prototype.createScanner = function (text) {
        return ts.createScanner(ts.ScriptTarget.ES5, false, ts.LanguageVariant.Standard, text);
    };
    MethodSpaceWalker.prototype.checkForWhitespace = function (node) {
        var scanner = this.createScanner(node.getText());
        var positionOfOpenParens = node.getChildren().map(function (child) { return child.kind; }).indexOf(ts.SyntaxKind.OpenParenToken);
        var lastNodeBeforeParens = node.getChildAt(positionOfOpenParens - 1);
        scanner.setTextPos(lastNodeBeforeParens.getEnd() - node.getStart());
        var isWhitespace = scanner.scan() === ts.SyntaxKind.WhitespaceTrivia;
        if (this.banSpace === isWhitespace) {
            _super.prototype.addFailure.call(this, this.createFailure(lastNodeBeforeParens.getEnd(), 1, this.message));
        }
    };
    MethodSpaceWalker.total = 0;
    return MethodSpaceWalker;
}(Lint.RuleWalker));


text:
layout: post
title: "AWS Certificate Exam Preparation"
excerpt: ""
categories: [programmer, AWS]
tags: [AWS]
---

## Resources
* [AWS_Whitepapers][]

## Study Guide
* [Cloud Guru suggestion](https://acloud.guru/learn/aws-certification-preparation) Free course
* Get the book from Amazon: [AWS Certified Solutions Architect Official Study Guide][study_guide]. It is also available on Safari

The path is suitable for both certificate exams and interviews.

1. You need to understand the concepts, and explain some use cases that suit moving to cloud computing.
1. explain the terms, rules.
1. demo the ability to answer questions, troubleshooting.
1. build real world examples.

## Certificate Difficulty
1. Certified Cloud Practitioner
1. Solutions Architect Associate
1. Developer Associate
1. Sysops Administrator Associate
1. Security Specialty
1. Big Data Specialty
1. Advanced Networking Specialty
1. Machine Learning Specialty
1. Devops Professional
1. Solutions Architect Professional

Cloud Practitioner

This one is good for non-technical people: such as business analyst, product owner, scrum master, maybe a manager as well.

For technical people, you can study all three (SA, Dev, Sysops) associates together.
Two professionals usually take another 6 weeks to prepare.
You need to understand many core cocepts: such as IAM, VPC, S3, EC2, RDS, Dynamo, EBean, SQS, SNS, Cloudwatch, and so on.

## Suggested Steps
1. take an AWS training class
1. review exam guide and sample questions
1. practice with labs and exam prep quest
1. study AWS whitepapers
1. review AWS FAQs
1. take exam prep workshop
1. take practice exam
1. schedule your exam and get certified

###
This site has many questions to practice.
http://jayendrapatil.com/aws-dynamodb/

### FAQs
* Is in-classroom training necessary?
    Not absolute needed in my opinion. Too expensive, too little details.

* What about online courses?
    Amazon provides some free online courses. Good to watch, but not enough.

    Third-party websites such as "A Cloud Guru" and "Cloud Academy" are great.
    "A Cloud Guru" annual membership $300/year.
    "Cloud Academy" $79/month.
    Qwiklabs provides excellent labs too.
    Pro:
        * You can adjust play speed
        * review multiple times
        * check out exam tips
        * exam simulator is an excellent practice before shooting real target

* Whitepapers
    * You don't have to read them all.
    * read all overview/big picture ones, e.g. "Architecting for the cloud: AWS best practices", "AWS secruity best practices"
    * read topics you are not familiar.

* Videos
    * AWS event videos on youtube: re:Invent sessions
        * youtube.com/user/AmazonWebServices/playlists
        * foundation videos
        * 400-level are very useful
        * slideshare hosts the slides in video sessions

* Case studies
    * google "aws case studies", on amazon.com too.

[AWS_Whitepapers]: https://aws.amazon.com/whitepapers/
[study_guide]: https://www.amazon.com/Certified-Solutions-Architect-Official-Study/dp/1119138558