text:
/******************************************************************************
 * ring.h
 *
 * Shared producer-consumer ring macros.
 *
 * Tim Deegan and Andrew Warfield November 2004.
 */

#ifndef __XEN_PUBLIC_IO_RING_H__
#define __XEN_PUBLIC_IO_RING_H__

typedef unsigned int RING_IDX;

/* Round a 32-bit unsigned constant down to the nearest power of two. */
#define __RD2(_x)  (((_x) & 0x00000002) ? 0x2		       : ((_x) & 0x1))
#define __RD4(_x)  (((_x) & 0x0000000c) ? __RD2((_x)>>2)<<2    : __RD2(_x))
#define __RD8(_x)  (((_x) & 0x000000f0) ? __RD4((_x)>>4)<<4    : __RD4(_x))
#define __RD16(_x) (((_x) & 0x0000ff00) ? __RD8((_x)>>8)<<8    : __RD8(_x))
#define __RD32(_x) (((_x) & 0xffff0000) ? __RD16((_x)>>16)<<16 : __RD16(_x))

/*
 * Calculate size of a shared ring, given the total available space for the
 * ring and indexes (_sz), and the name tag of the request/response structure.
 * A ring contains as many entries as will fit, rounded down to the nearest
 * power of two (so we can mask with (size-1) to loop around).
 */
#define __CONST_RING_SIZE(_s, _sz)				\
	(__RD32(((_sz) - offsetof(struct _s##_sring, ring)) /	\
		sizeof(((struct _s##_sring *)0)->ring[0])))

/*
 * The same for passing in an actual pointer instead of a name tag.
 */
#define __RING_SIZE(_s, _sz)						\
	(__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0])))

/*
 * Macros to make the correct C datatypes for a new kind of ring.
 *
 * To make a new ring datatype, you need to have two message structures,
 * let's say struct request, and struct response already defined.
 *
 * In a header where you want the ring datatype declared, you then do:
 *
 *     DEFINE_RING_TYPES(mytag, struct request, struct response);
 *
 * These expand out to give you a set of types, as you can see below.
 * The most important of these are:
 *
 *     struct mytag_sring      - The shared ring.
 *     struct mytag_front_ring - The 'front' half of the ring.
 *     struct mytag_back_ring  - The 'back' half of the ring.
 *
 * To initialize a ring in your code you need to know the location and size
 * of the shared memory area (PAGE_SIZE, for instance). To initialise
 * the front half:
 *
 *     struct mytag_front_ring front_ring;
 *     SHARED_RING_INIT((struct mytag_sring *)shared_page);
 *     FRONT_RING_INIT(&front_ring, (struct mytag_sring *)shared_page,
 *		       PAGE_SIZE);
 *
 * Initializing the back follows similarly (note that only the front
 * initializes the shared ring):
 *
 *     struct mytag_back_ring back_ring;
 *     BACK_RING_INIT(&back_ring, (struct mytag_sring *)shared_page,
 *		      PAGE_SIZE);
 */

#define DEFINE_RING_TYPES(__name, __req_t, __rsp_t)			\
									\
/* Shared ring entry */							\
union __name##_sring_entry {						\
    __req_t req;							\
    __rsp_t rsp;							\
};									\
									\
/* Shared ring page */							\
struct __name##_sring {							\
    RING_IDX req_prod, req_event;					\
    RING_IDX rsp_prod, rsp_event;					\
    uint8_t  pad[48];							\
    union __name##_sring_entry ring[1]; /* variable-length */		\
};									\
									\
/* "Front" end's private variables */					\
struct __name##_front_ring {						\
    RING_IDX req_prod_pvt;						\
    RING_IDX rsp_cons;							\
    unsigned int nr_ents;						\
    struct __name##_sring *sring;					\
};									\
									\
/* "Back" end's private variables */					\
struct __name##_back_ring {						\
    RING_IDX rsp_prod_pvt;						\
    RING_IDX req_cons;							\
    unsigned int nr_ents;						\
    struct __name##_sring *sring;					\
};

/*
 * Macros for manipulating rings.
 *
 * FRONT_RING_whatever works on the "front end" of a ring: here
 * requests are pushed on to the ring and responses taken off it.
 *
 * BACK_RING_whatever works on the "back end" of a ring: here
 * requests are taken off the ring and responses put on.
 *
 * N.B. these macros do NO INTERLOCKS OR FLOW CONTROL.
 * This is OK in 1-for-1 request-response situations where the
 * requestor (front end) never has more than RING_SIZE()-1
 * outstanding requests.
 */

/* Initialising empty rings */
#define SHARED_RING_INIT(_s) do {					\
    (_s)->req_prod  = (_s)->rsp_prod  = 0;				\
    (_s)->req_event = (_s)->rsp_event = 1;				\
    memset((_s)->pad, 0, sizeof((_s)->pad));				\
} while(0)

#define FRONT_RING_INIT(_r, _s, __size) do {				\
    (_r)->req_prod_pvt = 0;						\
    (_r)->rsp_cons = 0;							\
    (_r)->nr_ents = __RING_SIZE(_s, __size);				\
    (_r)->sring = (_s);							\
} while (0)

#define BACK_RING_INIT(_r, _s, __size) do {				\
    (_r)->rsp_prod_pvt = 0;						\
    (_r)->req_cons = 0;							\
    (_r)->nr_ents = __RING_SIZE(_s, __size);				\
    (_r)->sring = (_s);							\
} while (0)

/* Initialize to existing shared indexes -- for recovery */
#define FRONT_RING_ATTACH(_r, _s, __size) do {				\
    (_r)->sring = (_s);							\
    (_r)->req_prod_pvt = (_s)->req_prod;				\
    (_r)->rsp_cons = (_s)->rsp_prod;					\
    (_r)->nr_ents = __RING_SIZE(_s, __size);				\
} while (0)

#define BACK_RING_ATTACH(_r, _s, __size) do {				\
    (_r)->sring = (_s);							\
    (_r)->rsp_prod_pvt = (_s)->rsp_prod;				\
    (_r)->req_cons = (_s)->req_prod;					\
    (_r)->nr_ents = __RING_SIZE(_s, __size);				\
} while (0)

/* How big is this ring? */
#define RING_SIZE(_r)							\
    ((_r)->nr_ents)

/* Number of free requests (for use on front side only). */
#define RING_FREE_REQUESTS(_r)						\
    (RING_SIZE(_r) - ((_r)->req_prod_pvt - (_r)->rsp_cons))

/* Test if there is an empty slot available on the front ring.
 * (This is only meaningful from the front. )
 */
#define RING_FULL(_r)							\
    (RING_FREE_REQUESTS(_r) == 0)

/* Test if there are outstanding messages to be processed on a ring. */
#define RING_HAS_UNCONSUMED_RESPONSES(_r)				\
    ((_r)->sring->rsp_prod - (_r)->rsp_cons)

#define RING_HAS_UNCONSUMED_REQUESTS(_r)				\
    ({									\
	unsigned int req = (_r)->sring->req_prod - (_r)->req_cons;	\
	unsigned int rsp = RING_SIZE(_r) -				\
			   ((_r)->req_cons - (_r)->rsp_prod_pvt);	\
	req < rsp ? req : rsp;						\
    })

/* Direct access to individual ring elements, by index. */
#define RING_GET_REQUEST(_r, _idx)					\
    (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].req))

#define RING_GET_RESPONSE(_r, _idx)					\
    (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].rsp))

/* Loop termination condition: Would the specified index overflow the ring? */
#define RING_REQUEST_CONS_OVERFLOW(_r, _cons)				\
    (((_cons) - (_r)->rsp_prod_pvt) >= RING_SIZE(_r))

/* Ill-behaved frontend determination: Can there be this many requests? */
#define RING_REQUEST_PROD_OVERFLOW(_r, _prod)               \
    (((_prod) - (_r)->rsp_prod_pvt) > RING_SIZE(_r))

#define RING_PUSH_REQUESTS(_r) do {					\
    wmb(); /* back sees requests /before/ updated producer index */	\
    (_r)->sring->req_prod = (_r)->req_prod_pvt;				\
} while (0)

#define RING_PUSH_RESPONSES(_r) do {					\
    wmb(); /* front sees responses /before/ updated producer index */	\
    (_r)->sring->rsp_prod = (_r)->rsp_prod_pvt;				\
} while (0)

/*
 * Notification hold-off (req_event and rsp_event):
 *
 * When queueing requests or responses on a shared ring, it may not always be
 * necessary to notify the remote end. For example, if requests are in flight
 * in a backend, the front may be able to queue further requests without
 * notifying the back (if the back checks for new requests when it queues
 * responses).
 *
 * When enqueuing requests or responses:
 *
 *  Use RING_PUSH_{REQUESTS,RESPONSES}_AND_CHECK_NOTIFY(). The second argument
 *  is a boolean return value. True indicates that the receiver requires an
 *  asynchronous notification.
 *
 * After dequeuing requests or responses (before sleeping the connection):
 *
 *  Use RING_FINAL_CHECK_FOR_REQUESTS() or RING_FINAL_CHECK_FOR_RESPONSES().
 *  The second argument is a boolean return value. True indicates that there
 *  are pending messages on the ring (i.e., the connection should not be put
 *  to sleep).
 *
 *  These macros will set the req_event/rsp_event field to trigger a
 *  notification on the very next message that is enqueued. If you want to
 *  create batches of work (i.e., only receive a notification after several
 *  messages have been enqueued) then you will need to create a customised
 *  version of the FINAL_CHECK macro in your own code, which sets the event
 *  field appropriately.
 */

#define RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(_r, _notify) do {		\
    RING_IDX __old = (_r)->sring->req_prod;				\
    RING_IDX __new = (_r)->req_prod_pvt;				\
    wmb(); /* back sees requests /before/ updated producer index */	\
    (_r)->sring->req_prod = __new;					\
    mb(); /* back sees new requests /before/ we check req_event */	\
    (_notify) = ((RING_IDX)(__new - (_r)->sring->req_event) <		\
		 (RING_IDX)(__new - __old));				\
} while (0)

#define RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(_r, _notify) do {		\
    RING_IDX __old = (_r)->sring->rsp_prod;				\
    RING_IDX __new = (_r)->rsp_prod_pvt;				\
    wmb(); /* front sees responses /before/ updated producer index */	\
    (_r)->sring->rsp_prod = __new;					\
    mb(); /* front sees new responses /before/ we check rsp_event */	\
    (_notify) = ((RING_IDX)(__new - (_r)->sring->rsp_event) <		\
		 (RING_IDX)(__new - __old));				\
} while (0)

#define RING_FINAL_CHECK_FOR_REQUESTS(_r, _work_to_do) do {		\
    (_work_to_do) = RING_HAS_UNCONSUMED_REQUESTS(_r);			\
    if (_work_to_do) break;						\
    (_r)->sring->req_event = (_r)->req_cons + 1;			\
    mb();								\
    (_work_to_do) = RING_HAS_UNCONSUMED_REQUESTS(_r);			\
} while (0)

#define RING_FINAL_CHECK_FOR_RESPONSES(_r, _work_to_do) do {		\
    (_work_to_do) = RING_HAS_UNCONSUMED_RESPONSES(_r);			\
    if (_work_to_do) break;						\
    (_r)->sring->rsp_event = (_r)->rsp_cons + 1;			\
    mb();								\
    (_work_to_do) = RING_HAS_UNCONSUMED_RESPONSES(_r);			\
} while (0)

#endif /* __XEN_PUBLIC_IO_RING_H__ */


text:
<?php $view->extend('HelloBundle::layout.php.html') ?>

Hello <?php echo $name ?>!

redpajama_set_name: RedPajamaGithub


text:
import Model from './model'
import { User } from './users'
import { Translation } from './translation'
import Transaction from './transaction'
import { NoSuchEntryError } from './errors'

export interface Group {
  idx: number
  ownerGroupIdx: number | null
  name: Translation
  description: Translation
}

export interface GroupUserInfo {
  idx: number
  name: Translation
  description: Translation
  isMember: boolean
  isDirectMember: boolean
  isPending: boolean
  isOwner: boolean
}

interface GroupReachable {
  [groupIdx: number]: Array<number>
}

export interface GroupRelationship {
  supergroupIdx: number
  subgroupIdx: number
}

export default class Groups {
  constructor(private readonly model: Model) {
  }

  public async create(tr: Transaction, name: Translation, description: Translation): Promise<number> {
    const query = 'INSERT INTO groups(name_ko, name_en, description_ko, ' +
      'description_en) VALUES ($1, $2, $3, $4) RETURNING idx'
    const result = await tr.query(query, [name.ko, name.en, description.ko, description.en])
    await this.updateGroupReachableCache(tr)
    return result.rows[0].idx
  }

  public async delete(tr: Transaction, groupIdx: number): Promise<number> {
    const query = 'DELETE FROM groups WHERE idx = $1 RETURNING idx'
    const result = await tr.query(query, [groupIdx])
    if (result.rows.length === 0) {
      throw new NoSuchEntryError()
    }
    await this.updateGroupReachableCache(tr)
    return result.rows[0].idx
  }

  public async getGroupReachableArray(tr: Transaction, groupIdx: number): Promise<Array<number>> {
    const query = 'SELECT subgroup_idx FROM group_reachable_cache WHERE supergroup_idx = $1'
    const result = await tr.query(query, [groupIdx])
    return result.rows.map(row => row.subgroup_idx)
  }

  public async getByIdx(tr: Transaction, idx: number): Promise<Group> {
    const query = 'SELECT * FROM groups WHERE idx = $1'
    const result = await tr.query(query, [idx])
    if (result.rows.length === 0) {
      throw new NoSuchEntryError()
    }
    return this.rowToGroup(result.rows[0])
  }

  public async setOwnerGroup(tr: Transaction, groupIdx: number, ownerGroupIdx: number | null): Promise<void> {
    const query = 'UPDATE groups SET owner_group_idx = $1 WHERE idx = $2 RETURNING idx'
    const result = await tr.query(query, [ownerGroupIdx, groupIdx])
    if (result.rows.length === 0) {
      throw new NoSuchEntryError()
    }
  }

  public async getUserGroupList(tr: Transaction, userIdx: number): Promise<Array<GroupUserInfo>> {
    const query = `
    WITH
      umem AS (SELECT user_idx, group_idx FROM user_memberships WHERE user_idx = $1),
      pend_umem AS (SELECT user_idx, group_idx FROM pending_user_memberships WHERE user_idx = $1)
    SELECT DISTINCT ON (g.idx)
      g.idx,
      g.name_ko,
      g.name_en,
      g.description_ko,
      g.description_en,
      (umem.user_idx IS NOT NULL) AS is_member,
      (dir.user_idx IS NOT NULL) AS is_direct_member,
      (pend_umem.user_idx IS NOT NULL) AS is_pending,
      (EXISTS (SELECT 1 FROM umem WHERE umem.group_idx = g.owner_group_idx)) AS is_owner
    FROM umem
    RIGHT JOIN group_reachable_cache gr ON umem.group_idx = gr.supergroup_idx
    RIGHT JOIN groups g ON g.idx = gr.subgroup_idx
    LEFT JOIN umem dir ON dir.group_idx = g.idx
    LEFT JOIN pend_umem ON pend_umem.group_idx = g.idx
    WHERE g.owner_group_idx IS NOT NULL
    ORDER BY g.idx, umem.user_idx
    `
    const result = await tr.query(query, [userIdx])
    return result.rows.map(row => this.rowToGroupUserInfo(row))
  }

  public async checkOwner(tr: Transaction, groupIdx: number, userIdx: number): Promise<boolean> {
    const query = 'SELECT EXISTS (SELECT 1 FROM user_memberships mem INNER JOIN groups g ' +
      'ON g.owner_group_idx = mem.group_idx WHERE mem.user_idx = $1 AND g.idx = $2)'
    const result = await tr.query(query, [userIdx, groupIdx])
    return result.rows[0].exists
  }

  public async addGroupRelation(tr: Transaction, supergroupIdx: number, subgroupIdx: number): Promise<number> {
    const query = 'INSERT INTO group_relations(supergroup_idx, subgroup_idx) ' +
      'VALUES ($1, $2) RETURNING idx'
    const result = await tr.query(query, [supergroupIdx, subgroupIdx])
    await this.updateGroupReachableCache(tr)
    return result.rows[0].idx
  }

  public async deleteGroupRelation(tr: Transaction, groupRelationIdx: number): Promise<number> {
    const query = 'DELETE FROM group_relations WHERE idx = $1 RETURNING idx'
    const result = await tr.query(query, [groupRelationIdx])
    if (result.rows.length === 0) {
      throw new NoSuchEntryError()
    }
    await this.updateGroupReachableCache(tr)
    return result.rows[0].idx
  }

  public async updateGroupReachableCache(tr: Transaction): Promise<void> {
    let groupIdxArray: Array<number> = []
    let groupRelationArray: Array<GroupRelationship> = []
    const firstGroupReachable: GroupReachable = {}
    const cache: GroupReachable = {}

    tr.ensureHasAccessExclusiveLock('group_reachable_cache')
    // this will acquire ACCESS EXCLUSIVE lock for cache table
    await tr.query('TRUNCATE group_reachable_cache')

    // these queries should be executed AFTER acquiring lock
    groupIdxArray = await this.getAllIdx(tr)
    groupRelationArray = await this.getAllGroupRelation(tr)

    groupIdxArray.forEach(groupIdx => {
      firstGroupReachable[groupIdx] = []
    })

    groupRelationArray.forEach(groupRelation => {
      const si = groupRelation.supergroupIdx
      // maybe can use Set?
      if (!firstGroupReachable[si].includes(groupRelation.subgroupIdx)) {
        firstGroupReachable[si].push(groupRelation.subgroupIdx)
      }
    })

    groupIdxArray.forEach(gi => {
      this.dfsGroup(gi, cache, firstGroupReachable)
    })

    // build cache table
    for (const supergroupIdx of Object.keys(cache)) {
      for (const subgroupIdx of cache[Number(supergroupIdx)]) {
        const query = 'INSERT INTO group_reachable_cache(supergroup_idx, subgroup_idx) VALUES ($1, $2)'
        await tr.query(query, [Number(supergroupIdx), Number(subgroupIdx)])
      }
    }
  }

  private async getAllGroupRelation(tr: Transaction): Promise<Array<GroupRelationship>> {
    const query = 'SELECT supergroup_idx, subgroup_idx FROM group_relations'
    const result = await tr.query(query)
    return result.rows.map(row => this.rowToGroupRelation(row))
  }

  private dfsGroup(groupIdx: number, cache: GroupReachable, firstGroupReachable: GroupReachable): Array<number> {
    if (groupIdx in cache) {
      return cache[groupIdx]
    }

    const firstReachable: Array<number> = firstGroupReachable[groupIdx]
    let newReachable: Array<number> = []

    firstReachable.forEach(gi => {
      newReachable = newReachable.concat(this.dfsGroup(gi, cache, firstGroupReachable))
    })

    const indexSet = new Set(newReachable.concat(firstReachable))
    indexSet.add(groupIdx)

    cache[groupIdx] = Array.from(indexSet)
    return cache[groupIdx]
  }

  private async getAllIdx(tr: Transaction): Promise<Array<number>> {
    const query = 'SELECT idx FROM groups'
    const result = await tr.query(query)

    return result.rows.map(row => row.idx)
  }

  private rowToUser(row: any): User {
    const user: User = {
      idx: row.idx,
      username: row.username,
      name: row.name,
      uid: row.uid,
      shell: row.shell,
      preferredLanguage: row.preferred_language,
    }

    if (row.student_number) {
      user.studentNumber = row.student_number
    }

    return user
  }

  private rowToGroup(row: any): Group {
    return {
      idx: row.idx,
      ownerGroupIdx: row.owner_group_idx,
      name: {
        ko: row.name_ko,
        en: row.name_en,
      },
      description: {
        ko: row.description_ko,
        en: row.description_en,
      },
    }
  }

  private rowToGroupUserInfo(row: any): GroupUserInfo {
    return {
      idx: row.idx,
      name: {
        ko: row.name_ko,
        en: row.name_en,
      },
      description: {
        ko: row.description_ko,
        en: row.description_en,
      },
      isPending: row.is_pending,
      isMember: row.is_member,
      isDirectMember: row.is_direct_member,
      isOwner: row.is_owner,
    }
  }

  private rowToGroupRelation(row: any): GroupRelationship {
    return {
      supergroupIdx: row.supergroup_idx,
      subgroupIdx: row.subgroup_idx,
    }
  }
}


text:
package org.ansj.util;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;

import org.ansj.app.crf.SplitWord;
import org.ansj.dic.DicReader;
import org.ansj.dic.impl.Jdbc2Stream;
import org.ansj.domain.AnsjItem;
import org.ansj.exception.LibraryException;
import org.ansj.library.AmbiguityLibrary;
import org.ansj.library.CrfLibrary;
import org.ansj.library.DATDictionary;
import org.ansj.library.DicLibrary;
import org.ansj.library.StopLibrary;
import org.ansj.library.SynonymsLibrary;
import org.ansj.recognition.impl.StopRecognition;
import org.nlpcn.commons.lang.tire.domain.Forest;
import org.nlpcn.commons.lang.tire.domain.SmartForest;
import org.nlpcn.commons.lang.util.FileFinder;
import org.nlpcn.commons.lang.util.IOUtil;
import org.nlpcn.commons.lang.util.ObjConver;
import org.nlpcn.commons.lang.util.StringUtil;
import org.nlpcn.commons.lang.util.logging.Log;
import org.nlpcn.commons.lang.util.logging.LogFactory;

/**
 * 这个类储存一些公用变量.
 *
 * @author ansj
 *
 */
public class MyStaticValue {

	public static final Log LOG = LogFactory.getLog(MyStaticValue.class);

	// 是否开启人名识别
	public static Boolean isNameRecognition = true;

	// 是否开启数字识别
	public static Boolean isNumRecognition = true;

	// 是否数字和量词合并
	public static Boolean isQuantifierRecognition = true;

	// 是否显示真实词语
	public static Boolean isRealName = false;

	/**
	 * 是否用户辞典不加载相同的词
	 */
	public static boolean isSkipUserDefine = false;

	public static final Map<String, String> ENV = new HashMap<>();

	static {
		/**
		 * 配置文件变量
		 */
		ResourceBundle rb = null;
		try {
			rb = ResourceBundle.getBundle("ansj_library");
		} catch (Exception e) {
			try {
				File find = FileFinder.find("ansj_library.properties", 1);
				if (find != null && find.isFile()) {
					rb = new PropertyResourceBundle(IOUtil.getReader(find.getAbsolutePath(), System.getProperty("file.encoding")));
					LOG.info("load ansj_library not find in classPath ! i find it in " + find.getAbsolutePath() + " make sure it is your config!");
				}
			} catch (Exception e1) {
				LOG.warn("not find ansj_library.properties. reason: " + e1.getMessage());
			}
		}

		if (rb == null) {
			try {
				rb = ResourceBundle.getBundle("library");
			} catch (Exception e) {
				try {
					File find = FileFinder.find("library.properties", 2);
					if (find != null && find.isFile()) {
						rb = new PropertyResourceBundle(IOUtil.getReader(find.getAbsolutePath(), System.getProperty("file.encoding")));
						LOG.info("load library not find in classPath ! i find it in " + find.getAbsolutePath() + " make sure it is your config!");
					}
				} catch (Exception e1) {
					LOG.warn("not find library.properties. reason: " + e1.getMessage());
				}
			}
		}

		if (rb == null) {
			LOG.warn("not find library.properties in classpath use it by default !");
		} else {

			for (String key : rb.keySet()) {
				ENV.put(key, rb.getString(key));
				try {
					String value = rb.getString(key);
					if (value.startsWith("jdbc:")) { //给jdbc窜中密码做一个加密,不让密码明文在日志中
						value = Jdbc2Stream.encryption(value);
					}
					LOG.info("init " + key + " to env value is : " + value);
					Field field = MyStaticValue.class.getField(key);
					field.set(null, ObjConver.conversion(rb.getString(key), field.getType()));
				} catch (Exception e) {
				}
			}

		}
	}

	/**
	 * 人名词典
	 *
	 * @return
	 */
	public static BufferedReader getPersonReader() {
		return DicReader.getReader("person/person.dic");
	}

	/**
	 * 机构名词典
	 *
	 * @return
	 */
	public static BufferedReader getCompanReader() {
		return DicReader.getReader("company/company.data");
	}

	/**
	 * 机构名词典
	 *
	 * @return
	 */
	public static BufferedReader getNewWordReader() {
		return DicReader.getReader("newWord/new_word_freq.dic");
	}

	/**
	 * 核心词典
	 *
	 * @return
	 */
	public static BufferedReader getArraysReader() {
		return DicReader.getReader("arrays.dic");
	}

	/**
	 * 数字词典
	 *
	 * @return
	 */
	public static BufferedReader getNumberReader() {
		return DicReader.getReader("numberLibrary.dic");
	}

	/**
	 * 英文词典
	 *
	 * @return
	 */
	public static BufferedReader getEnglishReader() {
		return DicReader.getReader("englishLibrary.dic");
	}

	/**
	 * 词性表
	 *
	 * @return
	 */
	public static BufferedReader getNatureMapReader() {
		return DicReader.getReader("nature/nature.map");
	}

	/**
	 * 词性关联表
	 *
	 * @return
	 */
	public static BufferedReader getNatureTableReader() {
		return DicReader.getReader("nature/nature.table");
	}

	/**
	 * 得道姓名单字的词频词典
	 *
	 * @return
	 */
	public static BufferedReader getNatureClassSuffix() {
		return DicReader.getReader("nature_class_suffix.txt");
	}

	/**
	 * 根据词语后缀判断词性
	 *
	 * @return
	 */
	public static BufferedReader getPersonFreqReader() {
		return DicReader.getReader("person/name_freq.dic");
	}

	/**
	 * 名字词性对象反序列化
	 *
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public static Map<String, int[][]> getPersonFreqMap() {
		Map<String, int[][]> map = new HashMap<String, int[][]>(0);
		try (InputStream inputStream = DicReader.getInputStream("person/asian_name_freq.data")) {
			ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
			map = (Map<String, int[][]>) objectInputStream.readObject();
		} catch (IOException e) {
			LOG.warn("IO异常", e);
		} catch (ClassNotFoundException e) {
			LOG.warn("找不到类", e);
		}
		return map;
	}

	/**
	 * 词与词之间的关联表数据
	 *
	 * @return
	 */
	public static void initBigramTables() {
		try (BufferedReader reader = IOUtil.getReader(DicReader.getInputStream("bigramdict.dic"), "UTF-8")) {
			String temp = null;
			String[] strs = null;
			int freq = 0;
			while ((temp = reader.readLine()) != null) {
				if (StringUtil.isBlank(temp)) {
					continue;
				}
				strs = temp.split("\t");
				freq = Integer.parseInt(strs[1]);
				strs = strs[0].split("@");
				AnsjItem fromItem = DATDictionary.getItem(strs[0]);

				AnsjItem toItem = DATDictionary.getItem(strs[1]);

				if (fromItem == AnsjItem.NULL && strs[0].contains("#")) {
					fromItem = AnsjItem.BEGIN;
				}

				if (toItem == AnsjItem.NULL && strs[1].contains("#")) {
					toItem = AnsjItem.END;
				}

				if (fromItem == AnsjItem.NULL || toItem == AnsjItem.NULL) {
					continue;
				}

				if (fromItem.bigramEntryMap == null) {
					fromItem.bigramEntryMap = new HashMap<Integer, Integer>();
				}

				fromItem.bigramEntryMap.put(toItem.getIndex(), freq);

			}
		} catch (NumberFormatException e) {
			LOG.warn("数字格式异常", e);
		} catch (UnsupportedEncodingException e) {
			LOG.warn("不支持的编码", e);
		} catch (IOException e) {
			LOG.warn("IO异常", e);
		}
	}

	/*
	 * 外部引用为了实例化加载变量
	 */
	public static Log getLog(Class<?> clazz) {
		return LogFactory.getLog(clazz);
	}

	/**
	 * 增加一个词典
	 *
	 * @param key
	 * @param path
	 * @param value
	 */
	public static void putLibrary(String key, String path, Object value) {
		if (key.startsWith(DicLibrary.DEFAULT)) {
			DicLibrary.put(key, path, (Forest) value);
		} else if (key.startsWith(StopLibrary.DEFAULT)) {
			StopLibrary.put(key, path, (StopRecognition) value);
		} else if (key.startsWith(SynonymsLibrary.DEFAULT)) {
			SynonymsLibrary.put(key, path, (SmartForest) value);
		} else if (key.startsWith(AmbiguityLibrary.DEFAULT)) {
			AmbiguityLibrary.put(key, path, (Forest) value);
		} else if (key.startsWith(CrfLibrary.DEFAULT)) {
			CrfLibrary.put(key, path, (SplitWord) value);
		} else {
			throw new LibraryException(key + " type err must start with dic,stop,ambiguity,synonyms");
		}
		ENV.put(key, path);
	}

	/**
	 * 懒加载一个词典
	 *
	 * @param key
	 * @param path
	 */
	public static void putLibrary(String key, String path) {
		if (key.startsWith(DicLibrary.DEFAULT)) {
			DicLibrary.put(key, path);
		} else if (key.startsWith(StopLibrary.DEFAULT)) {
			StopLibrary.put(key, path);
		} else if (key.startsWith(SynonymsLibrary.DEFAULT)) {
			SynonymsLibrary.put(key, path);
		} else if (key.startsWith(AmbiguityLibrary.DEFAULT)) {
			AmbiguityLibrary.put(key, path);
		} else if (key.startsWith(CrfLibrary.DEFAULT)) {
			CrfLibrary.put(key, path);
		} else {
			throw new LibraryException(key + " type err must start with dic,stop,ambiguity,synonyms");
		}
		ENV.put(key, path);
	}

	/**
	 * 删除一个词典
	 *
	 * @param key
	 */
	public static void removeLibrary(String key) {
		if (key.startsWith(DicLibrary.DEFAULT)) {
			DicLibrary.remove(key);
		} else if (key.startsWith(StopLibrary.DEFAULT)) {
			StopLibrary.remove(key);
		} else if (key.startsWith(SynonymsLibrary.DEFAULT)) {
			SynonymsLibrary.remove(key);
		} else if (key.startsWith(AmbiguityLibrary.DEFAULT)) {
			AmbiguityLibrary.remove(key);
		} else if (key.startsWith(CrfLibrary.DEFAULT)) {
			CrfLibrary.remove(key);
		} else {
			throw new LibraryException(key + " type err must start with dic,stop,ambiguity,synonyms");
		}
		ENV.remove(key);
	}

	/**
	 * 重置一个词典
	 *
	 * @param key
	 */
	public static void reloadLibrary(String key) {
		if (key.startsWith(DicLibrary.DEFAULT)) {
			DicLibrary.reload(key);
		} else if (key.startsWith(StopLibrary.DEFAULT)) {
			StopLibrary.reload(key);
		} else if (key.startsWith(SynonymsLibrary.DEFAULT)) {
			SynonymsLibrary.reload(key);
		} else if (key.startsWith(AmbiguityLibrary.DEFAULT)) {
			AmbiguityLibrary.reload(key);
		} else if (key.startsWith(CrfLibrary.DEFAULT)) {
			CrfLibrary.reload(key);
		} else {
			throw new LibraryException(key + " type err must start with dic,stop,ambiguity,synonyms");
		}
	}
}


text:
var app = {

    /*---------------app object property -------------------------------------------------------------------------------*/
    // Application Constructor
    initialize: function() {
        this.bindEvents();
        app.goingState = "start-app";
                                                                      //   alert("From initialize " + app.goingState);
        app.passFileReadErrorState = "";
        app.passFileWriteErrorState = "";

    },

    /*---------------app object property -------------------------------------------------------------------------------*/
    // Bind Event Listeners
    // Bind any events that are required on startup. Common events are:
    // 'load', 'deviceready', 'offline', and 'online'.

    bindEvents: function() {
        document.addEventListener('deviceready', app.onDeviceReady, false);
        //    alert ("First Eventlistener");
        document.addEventListener('online', app.onOnline, false);
        document.addEventListener('offline', function(){
                //  alert("Timeout");
                //  setTimeout(function(){app.onOffline(), 40000});
                app.onOffline();
            }, false
        );
        var gastKaufenButton = document.querySelector('#gast-kaufen-send-button');
        //  alert (gastKaufenButton);
        gastKaufenButton.addEventListener("click", app.gastKaufen, false);

        //    alert("Next  listeners");

    },

    /*---------------app object property, Main Allication  Handler-------------------------------------------------------------------------------*/

    mainAppHandler: function(calledFrom){
        switch(calledFrom){
            case "onDeviceReady":
            {
                                                                                //   alert("Enter mainAppHandler");

                                                                                // alert(app.myNetworkState);
                if (app.goingState == "start-app" && app.myNetworkState == "connected") {
                                                                                //   alert(app.goingState);
                    var passData;
                    app.readFromPassFile('pass_file.json', function (passFileData) {
                                                        //    alert("readErrorState = " + app.passFileReadErrorState);
                        if (!(passFileData == undefined) || (app.passFileReadErrorState == "error")) {
                            passData = passFileData;
                            app.goingState = "call-autorisation";
                            //Here call hash-function
                        }
                    });
                }
            }
                break;

            case "errorReadPassFileHandler":
            {
                if (app.passFileErrorTyp == 1) {
                    app.enterProc();
                }
            }

        }

    },

    /*---------------app object property -------------------------------------------------------------------------------*/
    // deviceready Event Handler

    onDeviceReady: function() {
        window.open = cordova.InAppBrowser.open;
                                                                //    alert("From onDeviceReady " + app.goingState);

        app.mainAppHandler("onDeviceReady");

    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    stopRotation: function(){
                                                                           //    alert("Enter stopRotation");
        //    app.goingState = "stopped";
        var circularProgressContainer = document.querySelector('#circular-progress');
        circularProgressContainer.classList.remove("visible");
        circularProgressContainer.classList.add("not-visible");
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    startRotation: function(){
        var circularProgressContainer = document.querySelector('#circular-progress');
        circularProgressContainer.classList.remove("not-visible");
        circularProgressContainer.classList.add("visible");
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    onOffline: function(){
        setTimeout(closeOnOffline, 1000);
        function closeOnOffline() {
            var netState = navigator.connection.type;
                                                                            //    alert("NetworkState = "+netState);
            if (netState == Connection.NONE){
                app.myNetworkState = "no-internet";
                app.stopRotation();
                                                                           //   alert("No connection!"); //Debug
                app.myChildWindowClose();
                alert("Leider gibt es keine Internetverbindung.  Die Bestellung konnte nicht aufgegeben werden. Schließen Sie bitee die App um später zu probieren.");
                var noInternetMsgContainer = document.querySelector('#no-internet-msg-container');
                noInternetMsgContainer.classList.remove("not-visible");
                noInternetMsgContainer.classList.add("visible");
            };
        }
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    onOnline: function(){
        app.myNetworkState = "connected";
        //  app.startRotation();
                                                                                //    alert("Connected!");
        var noInternetMsgContainer = document.querySelector('#no-internet-msg-container');
        noInternetMsgContainer.classList.remove("visible");
        noInternetMsgContainer.classList.add("not-visible");
        app.mainAppHandler("onOnline");
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    checkLocalStorageSupport:  function(){
        var testKey = 'test', storage = window.localStorage;
        try {
            storage.setItem(testKey, '1');
            storage.removeItem(testKey);
            return true;
        } catch (error) {
            return false;
        }
    },

    /*---------------app object property -------------------------------------------------------------------------------*/
    // Only for test

    localStoreDataTestCreate:  function(lolo, papa){
        if (app.checkLocalStorageSupport()){
            var myLocalStore = window.localStorage;
            var myLolo = lolo;
            var myPapa = papa;
            myLocalStore.setItem(myLolo, myPapa);
        }
        else{
            alert("Leider wird Ihr Browser Local Storage nicht unterstützt, und Sie können unser App nicht benutzen!");
        }
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    myChildWindowOpen: function(){

        var ref = window.open('http://v2.pizza-web.de/', '_blank', 'location=no,hidden=yes,closebuttoncaption=Done,toolbar=no');
        //   var ref = window.open('http://google.com/', '_blank', 'location=yes,hidden=yes,closebuttoncaption=Done,toolbar=no,hardwareback=no');
        app.myCildWindowState = "loading";
        app.myChildWindow = ref;
                                                          //   alert("This is app.myChildWindow "+app.myChildWindow);
        var loadStopCallback = function (event) {
                                                                                //     alert('stop: ' + event.url);
            //  setTimeout(function(){ app.stopRotation()},40);
            app.stopRotation();
            ref.show();
            //    setTimeout(function(){ ref.close()},15000);
            app.myCildWindowState = "showing";
        }
        ref.addEventListener('loadstop', loadStopCallback);
        ref.addEventListener('exit', function(){ ref = null;});

    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    myChildWindowClose: function(){
                                                                            //   alert("Enter myChildWindowClose");
        if(!((app.myChildWindow == undefined) || (app.myChildWindow == null))){
                                                                                //     alert("In loop");
                                                            //    alert("This is app.myChildWindow "+app.myChildWindow);
            app.myChildWindow.close();
            app.myCildWindowState = "closed";
            return;
        }
        else{return}
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    readFromPassFile: function(fileName, cb) {
                                                                             //   alert("Enter readFromPassFile");
        var pathToFile = cordova.file.dataDirectory + fileName;
                                                                               //   alert(pathToFile);
        window.resolveLocalFileSystemURL(pathToFile, function (fileEntry) {
            fileEntry.file(function (file) {
                var reader = new FileReader();

                reader.onloadend = function (e) {
                    cb(JSON.parse(this.result));
                    app.goingState = "end-parsing-passFile";
                };

                reader.readAsText(file);
            }, app.errorReadPassFileHandler.bind(null, fileName));
        }, app.errorReadPassFileHandler.bind(null, fileName));
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    errorReadPassFileHandler: function(fileName, e){
                                                                   //   alert("Enter error reading PassFileHandler");
        app.passFileErrorTyp = e.code;
        app.passFileReadErrorState = "error";
                                                                                //    alert(e.code);
        app.mainAppHandler("errorReadPassFileHandler");
    },

    enterProc: function(){
        app.stopRotation();
        var passInputContainer = document.querySelector('#login-register-container');
        passInputContainer.classList.remove("not-visible");
        passInputContainer.classList.add("visible");
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    gastKaufen: function(){
                                                                                //    alert("Als Gast-kaufen Click!");
        app.myChildWindowOpen();
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    get goingState() {
        return this.goState;
    },

    set goingState(value){
        this.goState = value;
                                                             //   alert("Just state = " + this.state)
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    get myNetworkState() {
        return this.networkState;
    },

    set myNetworkState(value){
        this.networkState = value;
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    get passFileReadErrorState() {
        return this.passFileReadError;
    },

    set passFileReadErrorState(value){
        this.passFileReadError = value;
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    get passFileWriteErrorState() {
        return this.passFileWriteError;
    },

    set passFileWriteErrorState(value){
        this.passFileWriteError = value;
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    get myChildWindowState() {
        return this.childWindowState;
    },

    set myCildWindowState(value){
        this.childWindowState = value;
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    get myChildWindow(){
        return this.childWindow;
    },

    /*---------------app object property -------------------------------------------------------------------------------*/

    set myChildWindow(value){
        this.childWindow = value;
    },

    /*---------------app object property ?????-------------------------------------------------------------------------------*/

    get passFileErrorTyp(){
        return this.passwordFileErrorTyp;
    },

    /*---------------app object property ??????-------------------------------------------------------------------------------*/

    set passFileErrorTyp(value){
        this.passwordFileErrorTyp = value;
    },

    /*---------------app object end -------------------------------------------------------------------------------*/
};


text:
namespace era01 {

enum Stat { DEBUG, WARNING, ERROR, INFO };

// Opportunities abound for Stat filtering, Stat counts, (etc.)

class StatLog : public EzLog {
 public:
  StatLog(const File& file);

  bool append(Stat stat, string message);
  bool append(const LogEntry& ref) { return EzLog::append(ref); }  // eh?
};
}

#endif


text:
int cmd__wildmatch(int argc, const char **argv)
{
	int i;
	for (i = 2; i < argc; i++) {
		if (argv[i][0] == '/')
			die("Forward slash is not allowed at the beginning of the\n"
			    "pattern because Windows does not like it. Use `XXX/' instead.");
		else if (!strncmp(argv[i], "XXX/", 4))
			argv[i] += 3;
	}
	if (!strcmp(argv[1], "wildmatch"))
		return !!wildmatch(argv[3], argv[2], WM_PATHNAME);
	else if (!strcmp(argv[1], "iwildmatch"))
		return !!wildmatch(argv[3], argv[2], WM_PATHNAME | WM_CASEFOLD);
	else if (!strcmp(argv[1], "pathmatch"))
		return !!wildmatch(argv[3], argv[2], 0);
	else if (!strcmp(argv[1], "ipathmatch"))
		return !!wildmatch(argv[3], argv[2], WM_CASEFOLD);
	else
		return 1;
}


text:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
                "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="cairo-Recording-Surfaces">
<refmeta>
<refentrytitle role="top_of_page" id="cairo-Recording-Surfaces.top_of_page">Recording Surfaces</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  CAIRO Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Recording Surfaces</refname>
<refpurpose>Records all drawing operations</refpurpose>
</refnamediv>

<refsynopsisdiv id="cairo-Recording-Surfaces.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>#define             <link linkend="CAIRO-HAS-RECORDING-SURFACE:CAPS">CAIRO_HAS_RECORDING_SURFACE</link>
<link linkend="cairo-surface-t"><returnvalue>cairo_surface_t</returnvalue></link> *   <link linkend="cairo-recording-surface-create">cairo_recording_surface_create</link>      (<parameter><link linkend="cairo-content-t"><type>cairo_content_t</type></link> content</parameter>,
                                                         <parameter>const <link linkend="cairo-rectangle-t"><type>cairo_rectangle_t</type></link> *extents</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="cairo-recording-surface-ink-extents">cairo_recording_surface_ink_extents</link> (<parameter><link linkend="cairo-surface-t"><type>cairo_surface_t</type></link> *surface</parameter>,
                                                         <parameter><link linkend="double"><type>double</type></link> *x0</parameter>,
                                                         <parameter><link linkend="double"><type>double</type></link> *y0</parameter>,
                                                         <parameter><link linkend="double"><type>double</type></link> *width</parameter>,
                                                         <parameter><link linkend="double"><type>double</type></link> *height</parameter>);
<link linkend="cairo-bool-t"><returnvalue>cairo_bool_t</returnvalue></link>        <link linkend="cairo-recording-surface-get-extents">cairo_recording_surface_get_extents</link> (<parameter><link linkend="cairo-surface-t"><type>cairo_surface_t</type></link> *surface</parameter>,
                                                         <parameter><link linkend="cairo-rectangle-t"><type>cairo_rectangle_t</type></link> *extents</parameter>);
</synopsis>
</refsynopsisdiv>

<refsect1 id="cairo-Recording-Surfaces.description" role="desc">
<title role="desc.title">Description</title>
<para>
A recording surface is a surface that records all drawing operations at
the highest level of the surface backend interface, (that is, the
level of paint, mask, stroke, fill, and show_text_glyphs). The recording
surface can then be "replayed" against any target surface by using it
as a source surface.
</para>
<para>
If you want to replay a surface so that the results in target will be
identical to the results that would have been obtained if the original
operations applied to the recording surface had instead been applied to the
target surface, you can use code like this:
<informalexample><programlisting>
cairo_t *cr;

cr = cairo_create (target);
cairo_set_source_surface (cr, recording_surface, 0.0, 0.0);
cairo_paint (cr);
cairo_destroy (cr);
</programlisting></informalexample>
</para>
<para>
A recording surface is logically unbounded, i.e. it has no implicit constraint
on the size of the drawing surface. However, in practice this is rarely
useful as you wish to replay against a particular target surface with
known bounds. For this case, it is more efficient to specify the target
extents to the recording surface upon creation.
</para>
<para>
The recording phase of the recording surface is careful to snapshot all
necessary objects (paths, patterns, etc.), in order to achieve
accurate replay. The efficiency of the recording surface could be
improved by improving the implementation of snapshot for the
various objects. For example, it would be nice to have a
copy-on-write implementation for _cairo_surface_snapshot.
</para>
</refsect1>
<refsect1 id="cairo-Recording-Surfaces.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="CAIRO-HAS-RECORDING-SURFACE:CAPS" role="macro" condition="since:1.10">
<title>CAIRO_HAS_RECORDING_SURFACE</title>
<indexterm zone="CAIRO-HAS-RECORDING-SURFACE:CAPS" role="1.10"><primary sortas="HAS_RECORDING_SURFACE">CAIRO_HAS_RECORDING_SURFACE</primary></indexterm>
<programlisting>#define CAIRO_HAS_RECORDING_SURFACE 1
</programlisting>
<para>
Defined if the recording surface backend is available.
The recording surface backend is always built in.
This macro was added for completeness in cairo 1.10.
</para><para role="since">Since 1.10</para></refsect2>
<refsect2 id="cairo-recording-surface-create" role="function" condition="since:1.10">
<title>cairo_recording_surface_create ()</title>
<indexterm zone="cairo-recording-surface-create" role="1.10"><primary sortas="recording_surface_create">cairo_recording_surface_create</primary></indexterm>
<programlisting><link linkend="cairo-surface-t"><returnvalue>cairo_surface_t</returnvalue></link> *   cairo_recording_surface_create      (<parameter><link linkend="cairo-content-t"><type>cairo_content_t</type></link> content</parameter>,
                                                         <parameter>const <link linkend="cairo-rectangle-t"><type>cairo_rectangle_t</type></link> *extents</parameter>);</programlisting>
<para>
Creates a recording-surface which can be used to record all drawing operations
at the highest level (that is, the level of paint, mask, stroke, fill
and show_text_glyphs). The recording surface can then be "replayed" against
any target surface by using it as a source to drawing operations.
</para>
<para>
The recording phase of the recording surface is careful to snapshot all
necessary objects (paths, patterns, etc.), in order to achieve
accurate replay.
</para><variablelist role="params">
<varlistentry><term><parameter>content</parameter> :</term>
<listitem><simpara>the content of the recording surface</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extents</parameter> :</term>
<listitem><simpara>the extents to record in pixels, can be <link linkend="NULL:CAPS"><literal>NULL</literal></link> to record
unbounded operations.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>a pointer to the newly created surface. The caller
owns the surface and should call <link linkend="cairo-surface-destroy"><function>cairo_surface_destroy()</function></link> when done
with it.</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.10</para></refsect2>
<refsect2 id="cairo-recording-surface-ink-extents" role="function" condition="since:1.10">
<title>cairo_recording_surface_ink_extents ()</title>
<indexterm zone="cairo-recording-surface-ink-extents" role="1.10"><primary sortas="recording_surface_ink_extents">cairo_recording_surface_ink_extents</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                cairo_recording_surface_ink_extents (<parameter><link linkend="cairo-surface-t"><type>cairo_surface_t</type></link> *surface</parameter>,
                                                         <parameter><link linkend="double"><type>double</type></link> *x0</parameter>,
                                                         <parameter><link linkend="double"><type>double</type></link> *y0</parameter>,
                                                         <parameter><link linkend="double"><type>double</type></link> *width</parameter>,
                                                         <parameter><link linkend="double"><type>double</type></link> *height</parameter>);</programlisting>
<para>
Measures the extents of the operations stored within the recording-surface.
This is useful to compute the required size of an image surface (or
equivalent) into which to replay the full sequence of drawing operations.
</para><variablelist role="params">
<varlistentry><term><parameter>surface</parameter> :</term>
<listitem><simpara>a <link linkend="cairo-recording-surface-t"><type>cairo_recording_surface_t</type></link></simpara></listitem></varlistentry>
<varlistentry><term><parameter>x0</parameter> :</term>
<listitem><simpara>the x-coordinate of the top-left of the ink bounding box</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y0</parameter> :</term>
<listitem><simpara>the y-coordinate of the top-left of the ink bounding box</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter> :</term>
<listitem><simpara>the width of the ink bounding box</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter> :</term>
<listitem><simpara>the height of the ink bounding box</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.10</para></refsect2>
<refsect2 id="cairo-recording-surface-get-extents" role="function" condition="since:1.12">
<title>cairo_recording_surface_get_extents ()</title>
<indexterm zone="cairo-recording-surface-get-extents" role="1.12"><primary sortas="recording_surface_get_extents">cairo_recording_surface_get_extents</primary></indexterm>
<programlisting><link linkend="cairo-bool-t"><returnvalue>cairo_bool_t</returnvalue></link>        cairo_recording_surface_get_extents (<parameter><link linkend="cairo-surface-t"><type>cairo_surface_t</type></link> *surface</parameter>,
                                                         <parameter><link linkend="cairo-rectangle-t"><type>cairo_rectangle_t</type></link> *extents</parameter>);</programlisting>
<para>
Get the extents of the recording-surface.
</para><variablelist role="params">
<varlistentry><term><parameter>surface</parameter> :</term>
<listitem><simpara>a <link linkend="cairo-recording-surface-t"><type>cairo_recording_surface_t</type></link></simpara></listitem></varlistentry>
<varlistentry><term><parameter>extents</parameter> :</term>
<listitem><simpara>the <link linkend="cairo-rectangle-t"><type>cairo_rectangle_t</type></link> to be assigned the extents</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the surface is bounded, of recording type, and
not in an error state, otherwise <link linkend="FALSE:CAPS"><literal>FALSE</literal></link></simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.12</para></refsect2>

</refsect1>
<refsect1 id="cairo-Recording-Surfaces.see-also">
<title>See Also</title>
<link linkend="cairo-surface-t"><type>cairo_surface_t</type></link>
</refsect1>

</refentry>


text:
name: cljs.repl.browser/send-static
see also:
---

## Summary

## Details

## Examples


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="">
    <meta name="googlebot" content="index,follow">

    <title>Guri Guri Nyoi — Bootstrap 3 iPhone App Templates</title>

    <link href="stylesheets/application.css" rel="stylesheet">

    <link href="images/favicon/favicon.png" rel="shortcut icon">
    <link href="images/favicon/apple-touch-icon-57-precomposed.png" rel="apple-touch-icon">
    <link href="images/favicon/apple-touch-icon-72-precomposed.png" rel="apple-touch-icon" sizes="72x72">
    <link href="images/favicon/apple-touch-icon-144-precomposed.png" rel="apple-touch-icon" sizes="114x114">

Sign In to your account

              <form class="sign-in-up-form" action="./sign-in.html" role="form">

                  <input class="form-control" id="exampleInputEmail2" type="email" placeholder="Enter email address">

                  <input class="form-control" id="exampleInputPassword1" type="password" placeholder="Password">

                <button class="btn btn-success btn-block" type="submit">Sign In</button>

                      <input type="checkbox" checked> Keep me logged in

Forgot password? – Need an account?

              </form>

Made with  by Aryandhani.


text:
package org.wicketchartist.chart.data;

import java.io.Serializable;
import java.util.List;

/**
 * The Class ChartSeries.
 *
 * @author mielimonka
 */
public class ChartSeries implements Serializable {

    /** The Constant serialVersionUID. */
    private static final long serialVersionUID = 1L;

    /** The data. */
    private List<Float> data;

    /** The name. */
    private String name;

    /**
     * Gets the data.
     *
     * @return the data
     */
    public List<Float> getData() {
        return data;
    }

    /**
     * Sets the data.
     *
     * @param data
     *            the new data
     */
    public void setData(List<Float> data) {
        this.data = data;
    }

    /**
     * Gets the name.
     *
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the name.
     *
     * @param name
     *            the new name
     */
    public void setName(String name) {
        this.name = name;
    }

}


text:
from enum import Enum
from typing import Dict, List, Union, Optional
from linear_operator import LOLambda, LOMu
from counter import Counter

class VariableType(Enum):
    INPUT = 0
    OUTPUT = 1
    UNKNOWN = 2
    ZERO = 3

    def __str__(self) -> str:
        return {VariableType.INPUT: 'a',
                VariableType.OUTPUT: 'c',
                VariableType.UNKNOWN: 'b',
                VariableType.ZERO: '0'}.get(self, None)

class Variable(object):
    # XXX: It is workaround for getting unique id for Variable object
    # __k__ - coefficient for calculation hash of Variable
    __k__ = 1000000000  # type: int
    __id__ = {
        VariableType.INPUT: Counter(),
        VariableType.OUTPUT: Counter(),
        VariableType.UNKNOWN: Counter(),
        VariableType.ZERO: Counter()
    }  # type: Dict[Enum, Counter]

    def __init__(self, type_var: VariableType, id_predefined: int=None) -> None:
        super(Variable, self).__init__()
        if id_predefined is not None:
            self.__id = id_predefined
        else:
            self.__id = Variable.__id__[type_var].increment()  # type: int

        self.__type = type_var  # type: VariableType
        self.__hash = Variable.__k__ * int(self.__type.value) + self.__id  # type: int
        self.__loperators = []  # type: List[Union[LOLambda, LOMu]]

    def contains(self, other: 'Variable') -> bool:
        return self.__type == other.__type and self.__id == other.__id

    def __eq__(self, other: 'Variable') -> bool:
        if not (self.__type == other.__type and self.__id == other.__id):
            return False
        elif len(self.__loperators) != len(other.__loperators):
            return False
        else:
            for index in range(len(self.__loperators)):
                if self.__loperators[index] != other.__loperators[index]:
                    return False
            return True

    def __ne__(self, other: 'Variable') -> bool:
        return not self.__eq__(other)

    def __gt__(self, other: 'Variable') -> bool:
        if self.__type != other.__type:
            raise Exception("Compare two different types of Variables")
        return self.__id > other.__id

    def __str__(self) -> str:
        if self.__type != VariableType.ZERO:
            res = "{}{}".format(str(self.__type), self.__id)
        else:
            res = str(self.__type)
        for lop in self.__loperators:
            res = "{}({})".format(lop.get_name(), res)
        return res

    def __repr__(self) -> str:
        return self.__str__()

    def __hash__(self) -> int:
        return self.__hash

    def is_unknown(self) -> bool:
        return self.__type == VariableType.UNKNOWN

    def is_input(self) -> bool:
        return self.__type == VariableType.INPUT

    def is_output(self) -> bool:
        return self.__type == VariableType.OUTPUT

    def is_zero(self) -> bool:
        return self.__type == VariableType.ZERO

    def has_type(self, type_var: VariableType) -> bool:
        return self.__type == type_var

    def get_id(self) -> int:
        return self.__id

    def get_operators(self) -> List[Union[LOMu, LOLambda]]:
        return self.__loperators

    def clone(self) -> 'Variable':
        x = Variable(self.__type, self.__id)
        for lop in self.__loperators:
            x.apply_lin_oper(lop.clone())
        return x

    def apply_lin_oper(self, lin_op: Union[LOMu, LOLambda]) -> None:
        assert lin_op is not None
        if len(self.__loperators) > 0:
            top_lo = self.__loperators[-1]
            if type(top_lo) == type(lin_op) and top_lo.is_inverse() == (not lin_op.is_inverse()):
                self.__loperators.pop(-1)
                return

        self.__loperators.append(lin_op)

    def can_be_removed(self) -> bool:
        return self.is_zero() and len(self.__loperators) == 0

    def contains_inverse_lo_lambda(self) -> bool:
        for lo in self.__loperators:
            if isinstance(lo, LOLambda) and lo.is_inverse():
                return True
        return False

    def move_operators(self, other: Optional['Variable']) -> 'Variable':
        while len(self.__loperators):
            l = self.__loperators.pop(0)
            l.make_inverse()
            if other is None:
                # create ZERO variable as
                # LOLambda^-1(0) == N
                if isinstance(l, LOLambda) and l.is_inverse() == True:
                    other = Variable(VariableType.ZERO)
                else:
                    # in all other cases we have zero result
                    # mu(0) = 0;  mu^-1(0) = 0; lambda(0) = 0
                    continue
                other.__loperators.append(l)
        return other


text:
namespace MealsToday.Providers.Enums
{
	public enum Actions
	{
		ShowMeals,
		ShowMealDetails,
		OrderToday,
		OrderTomorrow,
		ShowAllOrders,
		ShowStatistics
	}
}


text:
import sys, time
import os
from typing import List
from collections import namedtuple
from collections.abc import Callable
from itertools import chain
from typing import Sequence, Optional

import numpy as np

from iree.compiler.ir import *
from iree.compiler.dialects import arith, func, linalg, memref, scf, func
from iree.compiler.dialects.linalg.opdsl.lang import OperandKind
from iree.compiler.execution_engine import *
from iree.compiler.runtime import *

from mlir.sandbox.transforms import *

f16 = "f16"
f32 = "f32"
f64 = "f64"

numpy_types = {f16: np.float16, f32: np.float32, f64: np.float64}

scalar_types = list(numpy_types.keys())

_MLIR_RUNNER_UTILS_LIB_ENV = "MLIR_RUNNER_UTILS_LIB"
_MLIR_RUNNER_UTILS_LIB_DEFAULT = "libmlir_runner_utils.so"
_MLIR_C_RUNNER_UTILS_LIB_ENV = "MLIR_C_RUNNER_UTILS_LIB"
_MLIR_C_RUNNER_UTILS_LIB_DEFAULT = "libmlir_c_runner_utils.so"
_MLIR_RUNNER_EXTRA_LIBS_ENV = "MLIR_RUNNER_EXTRA_LIBS"

def numpy_type(scalar_type):
  numpy_types[scalar_type]

def mlir_type(scalar_type):
  if scalar_type == f16:
    return F16Type.get()
  elif scalar_type == f32:
    return F32Type.get()
  elif scalar_type == f64:
    return F64Type.get()
  else:
    raise Exception(f"unknown scalar type: {scalar_type}")

def scalar_type(odef, **assignments):
  return mlir_type(assignments[odef.type_var.name])

def operand_type(odef, **assignments):
  if odef.kind == OperandKind.Scalar:
    return scalar_type(odef, **assignments)
  if (odef.kind == OperandKind.InputTensor or
      odef.kind == OperandKind.OutputTensor):
    shape = tuple(assignments[sym.symname] for sym in odef.size_exprs)
    return RankedTensorType.get(shape, scalar_type(odef, **assignments))
  raise Exception(f"unsupported operand type: {repr(odef)}")

def attach_inplaceable_attributes(func: func.FuncOp,
                                  inplaceable: Sequence[Optional[bool]]):
  attrs = []
  for t, flag in zip(func.type.inputs, inplaceable):
    if flag is None:
      attrs.append(DictAttr.get({}))
      continue
    assert RankedTensorType.isinstance(t), "Not a RankedTensorType: {t}"
    identity_map = AffineMapAttr.get(
        AffineMap.get_identity(RankedTensorType(t).rank))
    attrs.append(
        DictAttr.get({
            "linalg.inplaceable": BoolAttr.get(flag),
            "linalg.buffer_layout": identity_map
        }))
  func.arg_attrs = attrs

def attach_passthrough(func: func.FuncOp,
                       extras: Sequence[Attribute] = [],
                       avx512: bool = False):
  attributes = extras[:]
  if avx512:
    attributes.append(
        ArrayAttr.get(
            [StringAttr.get("target-cpu"),
             StringAttr.get("skylake-avx512")]))
    attributes.append(
        ArrayAttr.get(
            [StringAttr.get("prefer-vector-width"),
             StringAttr.get("512")]))
  else:
    attributes.append(
        ArrayAttr.get(
            [StringAttr.get("target-cpu"),
             StringAttr.get("broadwell")]))
    attributes.append(
        ArrayAttr.get(
            [StringAttr.get("prefer-vector-width"),
             StringAttr.get("256")]))
  func.attributes["passthrough"] = ArrayAttr.get(attributes)

def emit_benchmarking_function(name: str,
                               bench: func.FuncOp) -> func.FuncOp:
  """Produces the benchmarking function.

  This function calls the given function `bench` as many times as requested by
  its last argument.
  """
  i64_type = IntegerType.get_signless(64)
  nano_time = func.FuncOp("nanoTime", ([], [i64_type]),
                             visibility="private")
  nano_time.attributes["llvm.emit_c_interface"] = UnitAttr.get()

  memref_of_i64_type = MemRefType.get([-1], i64_type)
  wrapper = func.FuncOp(
      # Same signature and an extra buffer of indices to save timings.
      name,
      (bench.arguments.types + [memref_of_i64_type], bench.type.results),
      visibility="public")
  wrapper.attributes["llvm.emit_c_interface"] = UnitAttr.get()
  wrapper.arg_attrs = bench.arg_attrs + [DictAttr.get()]

  num_results = len(bench.type.results)
  with InsertionPoint(wrapper.add_entry_block()):
    timer_buffer = wrapper.arguments[-1]
    zero = arith.ConstantOp.create_index(0)
    n_iterations = memref.DimOp(IndexType.get(), timer_buffer, zero)
    one = arith.ConstantOp.create_index(1)
    iter_args = list(wrapper.arguments[-num_results - 1:-1])
    loop = scf.ForOp(zero, n_iterations, one, iter_args)
    with InsertionPoint(loop.body):
      start = func.CallOp(nano_time, [])
      args = list(wrapper.arguments[:-num_results - 1])
      args.extend(loop.inner_iter_args)
      call = func.CallOp(bench, args)
      end = func.CallOp(nano_time, [])
      time = arith.SubIOp(end, start)
      memref.StoreOp(time, timer_buffer, [loop.induction_variable])
      scf.YieldOp(list(call.results))
    func.ReturnOp(loop)

  return wrapper

# JIT compile and return an execution engine that can be invoked.
# Needs to be run under Context.
def compile_to_execution_engine(module,
                                transform: Callable,
                                opt_level: int = 3):
  transformed_module = transform(module)
  shared_libs = [
      os.getenv(_MLIR_RUNNER_UTILS_LIB_ENV, _MLIR_RUNNER_UTILS_LIB_DEFAULT),
      os.getenv(_MLIR_C_RUNNER_UTILS_LIB_ENV, _MLIR_C_RUNNER_UTILS_LIB_DEFAULT)
  ]
  extra_libs = os.getenv(_MLIR_RUNNER_EXTRA_LIBS_ENV)
  if extra_libs is not None:
    shared_libs.append(*(str(extra_libs).split(',')))
  execution_engine = ExecutionEngine(transformed_module,
                                     opt_level,
                                     shared_libs=shared_libs)
  return transformed_module, execution_engine


text:
MathJax.Localization.addTranslation("br","MathML",{
        version: "2.7.7",
        isLoaded: true,
        strings: {
          BadMglyph: "mglyph fall : %1",
          BadMglyphFont: "Font fall : %1",
          UnknownNodeType: "Seurt skoulm dianav : %1",
          UnexpectedTextNode: "Skoulm testenn dic'hortoz : %1",
          ErrorParsingMathML: "Fazi o tielfenna\u00F1 MathML",
          ParsingError: "Fazi o ielfenna\u00F1 MathML : %1",
          MathMLSingleElement: "MathML a rank beza\u00F1 stummet gant un elfenn hepken",
          MathMLRootElement: "Gant un elfenn \u003Cmath\u003E e rank beza\u00F1 stummet MathML, ha ket gant %1"
        }
});

MathJax.Ajax.loadComplete("[MathJax]/localization/br/MathML.js");


text:
/* Generated from Java with JSweet 1.2.0-SNAPSHOT - http://www.jsweet.org */
/**
 * A non standard class, field, method or code attribute.
 *
 * @author Eric Bruneton
 * @author Eugene Kuleshov
 */
import { Label } from "./Label";
import { ClassReader } from "./ClassReader";
import { ClassWriter } from "./ClassWriter";
import { ByteVector } from "./ByteVector";

export class Attribute {
    /**
     * The type of this attribute.
     */
    public type: string;

    /**
     * The raw value of this attribute, used only for unknown attributes.
     */
    value: Uint8Array;

    /**
     * The next attribute in this attribute list. May be <tt>null</tt>.
     */
    next: Attribute;

    /**
     * Constructs a new empty attribute.
     *
     * @param type
     * the type of the attribute.
     */
    constructor(type: string) {
        this.type = type;
    }

    /**
     * Returns <tt>true</tt> if this type of attribute is unknown. The default
     * implementation of this method always returns <tt>true</tt>.
     *
     * @return <tt>true</tt> if this type of attribute is unknown.
     */
    public isUnknown(): boolean {
        return true;
    }

    /**
     * Returns <tt>true</tt> if this type of attribute is a code attribute.
     *
     * @return <tt>true</tt> if this type of attribute is a code attribute.
     */
    public isCodeAttribute(): boolean {
        return false;
    }

    /**
     * Returns the labels corresponding to this attribute.
     *
     * @return the labels corresponding to this attribute, or <tt>null</tt> if
     * this attribute is not a code attribute that contains labels.
     */
    getLabels(): Label[] {
        return null;
    }

    /**
     * Reads a {@link #type type} attribute. This method must return a
     * new {@link Attribute} object, of type {@link #type type},
     * corresponding to the <tt>len</tt> bytes starting at the given offset, in
     * the given class reader.
     *
     * @param cr
     * the class that contains the attribute to be read.
     * @param off
     * index of the first byte of the attribute's content in
     * {@link ClassReader#b cr.b}. The 6 attribute header bytes,
     * containing the type and the length of the attribute, are not
     * taken into account here.
     * @param len
     * the length of the attribute's content.
     * @param buf
     * buffer to be used to call {@link ClassReader#readUTF8
     * readUTF8}, {@link ClassReader#readClass(int,char[]) readClass}
     * or {@link ClassReader#readConst readConst}.
     * @param codeOff
     * index of the first byte of code's attribute content in
     * {@link ClassReader#b cr.b}, or -1 if the attribute to be read
     * is not a code attribute. The 6 attribute header bytes,
     * containing the type and the length of the attribute, are not
     * taken into account here.
     * @param labels
     * the labels of the method's code, or <tt>null</tt> if the
     * attribute to be read is not a code attribute.
     * @return a new {@link Attribute} object corresponding to the given
     * bytes.
     */
    read(cr: ClassReader, off: number, len: number, buf: number[], codeOff: number, labels: Label[]): Attribute {
        let attr: Attribute = new Attribute(this.type);
        attr.value = cr.buf.slice(0, len);
        // java.lang.System.arraycopy(cr.b, off, attr.value, 0, len);
        return attr;
    }

    /**
     * Returns the byte array form of this attribute.
     *
     * @param cw
     * the class to which this attribute must be added. This
     * parameter can be used to add to the constant pool of this
     * class the items that corresponds to this attribute.
     * @param code
     * the bytecode of the method corresponding to this code
     * attribute, or <tt>null</tt> if this attribute is not a code
     * attributes.
     * @param len
     * the length of the bytecode of the method corresponding to this
     * code attribute, or <tt>null</tt> if this attribute is not a
     * code attribute.
     * @param maxStack
     * the maximum stack size of the method corresponding to this
     * code attribute, or -1 if this attribute is not a code
     * attribute.
     * @param maxLocals
     * the maximum number of local variables of the method
     * corresponding to this code attribute, or -1 if this attribute
     * is not a code attribute.
     * @return the byte array form of this attribute.
     */
    write(cw: ClassWriter, code: Uint8Array, len: number, maxStack: number, maxLocals: number): ByteVector {
        let v: ByteVector = new ByteVector();
        v.data = this.value;
        v.length = this.value.length;
        return v;
    }

    /**
     * Returns the length of the attribute list that begins with this attribute.
     *
     * @return the length of the attribute list that begins with this attribute.
     */
    getCount(): number {
        let count: number = 0;
        let attr: Attribute = this;
        while ((attr != null)) {
            count += 1;
            attr = attr.next;
        };
        return count;
    }

    /**
     * Returns the size of all the attributes in this attribute list.
     *
     * @param cw
     * the class writer to be used to convert the attributes into
     * byte arrays, with the {@link #write write} method.
     * @param code
     * the bytecode of the method corresponding to these code
     * attributes, or <tt>null</tt> if these attributes are not code
     * attributes.
     * @param len
     * the length of the bytecode of the method corresponding to
     * these code attributes, or <tt>null</tt> if these attributes
     * are not code attributes.
     * @param maxStack
     * the maximum stack size of the method corresponding to these
     * code attributes, or -1 if these attributes are not code
     * attributes.
     * @param maxLocals
     * the maximum number of local variables of the method
     * corresponding to these code attributes, or -1 if these
     * attributes are not code attributes.
     * @return the size of all the attributes in this attribute list. This size
     * includes the size of the attribute headers.
     */
    getSize(cw: ClassWriter, code: Uint8Array, len: number, maxStack: number, maxLocals: number): number {
        let attr: Attribute = this;
        let size: number = 0;
        while ((attr != null)) {
            cw.newUTF8(attr.type);
            size += attr.write(cw, code, len, maxStack, maxLocals).length + 6;
            attr = attr.next;
        };
        return size;
    }

    /**
     * Writes all the attributes of this attribute list in the given byte
     * vector.
     *
     * @param cw
     * the class writer to be used to convert the attributes into
     * byte arrays, with the {@link #write write} method.
     * @param code
     * the bytecode of the method corresponding to these code
     * attributes, or <tt>null</tt> if these attributes are not code
     * attributes.
     * @param len
     * the length of the bytecode of the method corresponding to
     * these code attributes, or <tt>null</tt> if these attributes
     * are not code attributes.
     * @param maxStack
     * the maximum stack size of the method corresponding to these
     * code attributes, or -1 if these attributes are not code
     * attributes.
     * @param maxLocals
     * the maximum number of local variables of the method
     * corresponding to these code attributes, or -1 if these
     * attributes are not code attributes.
     * @param out
     * where the attributes must be written.
     */
    put(cw: ClassWriter, code: Uint8Array, len: number, maxStack: number, maxLocals: number, out: ByteVector) {
        let attr: Attribute = this;
        while ((attr != null)) {
            let b: ByteVector = attr.write(cw, code, len, maxStack, maxLocals);
            out.putShort(cw.newUTF8(attr.type)).putInt(b.length);
            out.putByteArray(b.data, 0, b.length);
            attr = attr.next;
        };
    }
}
Attribute["__class"] = "Attribute";


text:
/**
 * Social Network Aggregation
 * collects data from connected networks and adds them
 * to feed collection
 */

Meteor.publish('social_media_feed', function() {
	return FeedCollection.find({}, {sort: {created_at: -1}, limit: 50});
});

SocialMediaFeed = {
	options: {
		// Log details to console
		log: false,
		// enable pagination of feed
		pagination: false,	// to-do
		// Profile Ids from social media accounts
		facebookIds: [],
		instagramIds: [],
		instagramTags: [],
		twitterIds: [],		// to-do
	},
	config: function(opts) {
		this.options = _.extend({}, this.options, opts);
	}
}

// gathers content from all connected networks
SocialMediaFeed.update = function() {
	if (SocialMediaFeed.options.facebookIds.length > 0) {
		getFacebookContent();
	}
	if (SocialMediaFeed.options.instagramIds.length > 0) {
		getInstagramContent();
	}
	if (SocialMediaFeed.options.instagramTags.length > 0) {
		getInstagramTagData();
	}
};

// resets feed collection
SocialMediaFeed.reset = function() {
	FeedCollection.remove({});
};

//
SocialMediaFeed.hideContent = function(network, contentId) {
	// check if contentId exists
	var content = FeedCollection.find({"social_network": network, "content_id": contentId}).fetch();
	if (content.length == 1) {
		// hide content
		FeedCollection.update({
			"social_network": network, "content_id": contentId
		}, {
			$set: {"hidden": true}
		});

		return true
	} else if (content.length > 1) {
		throw new Meteor.Error("Hide Feed content", 'Found multiple results for contentId: ' + contentId + ' from: ' + network);
	} else {
		throw new Meteor.Error('Hide Feed content', 'ContentId: ' + contentId + ' from: ' + network + ' is not in the social media feed');
	}
};

var getInstagramContent = function getInstagramContentF() {
	this.unblock;

	var instagramProfiles = SocialMediaFeed.options.instagramIds;
	var clientId = Meteor.settings.instagram_keys.client_id;

	for (var i=0; i<instagramProfiles.length; i++) {
		var url = "https://api.instagram.com/v1/users/" + instagramProfiles[i] + "/media/recent?client_id=" + clientId;
		callInstagramAPI(url, "profile_data");
	}
};

var getInstagramTagData = function getInstagramTagDataF() {
	this.unblock;

	var instagramProfiles = SocialMediaFeed.options.instagramIds;
	var clientId = Meteor.settings.instagram_keys.client_id;
	var accessToken = Meteor.settings.instagram_keys.access_token;

	var tags = SocialMediaFeed.options.instagramTags;

	for (var i=0; i<tags.length; i++) {
		var url = "https://api.instagram.com/v1/tags/" + tags[i] + "/media/recent?access_token=" + accessToken;
		callInstagramAPI(url, "tag_data");
	}
};

var getFacebookContent = function getFacebookContentF() {
	this.unblock;

	var appId = Meteor.settings.facebook_keys.app_id;
	var appSecret = Meteor.settings.facebook_keys.app_secret;
	var authToken = Meteor.http.call("GET", "https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=" + appId + "&client_secret=" + appSecret).content;
	var facebookProfiles = SocialMediaFeed.options.facebookIds;

	for (var i=0; i<facebookProfiles.length; i++) {
		var url = "https://graph.facebook.com/" + facebookProfiles[i] + "/feed?" + authToken;
		callFacebookAPI(url);
	}
};

var instagramHastagMedia = function (url) {
	// to-do get access token via oauth
	// url: https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN
}

var callInstagramAPI = function callInstagramAPIF(url, contentType) {
	Meteor.http.call("GET", url, function(error, results) {
		if (error) {
			throw new Meteor.Error('GET Instagram Data', 'There was an error processing your request');
		}

		if (results) {
			var response = JSON.parse(results.content).meta;

			if (response.code == 200) {
				var jsonData = JSON.parse(results.content).data;
				var existingContentIds = getContentIds("instagram");

				for (var i = 0; i < jsonData.length; i++) {
					// check if content is already present in feed collection
					if (existingContentIds.indexOf(jsonData[i].id) == -1) {
						// insert new content in collection
						var date = new Date(jsonData[i].caption.created_time * 1000);

						FeedCollection.insert({
							"social_network": "instagram", "content_id": jsonData[i].id, "content_type": contentType,
							"created_at": date, "data": jsonData[i]
						});
					}
				}
			} else {
				// Status Code is not 200
				var status = JSON.parse(results.content).meta
				throw new Meteor.Error(status.code, status.error_message);
			}
		}
	});
};

var callFacebookAPI = function callFacebookAPIF(url) {
	Meteor.http.call("GET", url, function(error, results) {
		// Error handling
		if (error) {
			throw new Meteor.Error('GET Facebook Data', 'There was an error processing your request');
		}

		// Check if Result
		if (results) {
			var response = JSON.parse(results.content);

			if (response.data) {
				var jsonData = JSON.parse(results.content).data;
				var existingContentIds = getContentIds("facebook");

				for (var i = 0; i < jsonData.length; i++) {
					// check if content is already present in feed collection
					if (existingContentIds.indexOf(jsonData[i].id) == -1) {
						// insert new content in collection
						var date = new Date(jsonData[i].created_time);
						// request large image if available
						var largeImage = "";
						if (jsonData[i].object_id) {
							largeImage = "https://graph.facebook.com/" + jsonData[i].object_id + "/picture";						var createdTime = JSON.parse(results.content).data[i].created_time;
						}

						FeedCollection.insert({
							social_network: "facebook", content_id: jsonData[i].id,
							created_at: date ,data: jsonData[i], large_image: largeImage
						});
					}
				}
			} else {
				var error = JSON.parse(results.content).error
				throw new Meteor.Error(error.code, error.message);
			}
		}
	});
}

// Helper function
var getContentIds = function getContentIdsF(socialNetworkQuery) {
	var results = FeedCollection.find({social_network: socialNetworkQuery}, {fields: {content_id: 1}}).fetch();
	// stream.find(...) returns an array of results with _id and content_id
	var contentIds = [];

	for (id in results) {
		contentIds.push(results[id].content_id);
	}

	return contentIds;
};


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace git.jrowberg.bglib.Bluegiga.BLE.Events.Connection
{
	public delegate void FeatureIndEventHandler (object sender, FeatureIndEventArgs e);

	public class FeatureIndEventArgs : EventArgs
	{
		public readonly Byte connection;
		public readonly Byte[] features;

		public FeatureIndEventArgs (Byte connection, Byte[] features)
		{
			this.connection = connection;
			this.features = features;
		}
	}
}


text:
package org.smarti18n.messages.common;

import java.security.NoSuchAlgorithmException;
import java.util.Base64;

import org.springframework.stereotype.Service;

import javax.crypto.KeyGenerator;

/**
 * @author Marc Bellmann <marc.bellmann@googlemail.com>
 */
@Service
public class SmartKeyGenerator {

    private final KeyGenerator keyGenerator;

    public SmartKeyGenerator() throws NoSuchAlgorithmException {
        this.keyGenerator = KeyGenerator.getInstance("AES");
        this.keyGenerator.init(256);
    }

    public String generateKey() {
        return Base64.getUrlEncoder().encodeToString(
                this.keyGenerator.generateKey().getEncoded()
        );
    }
}


text:
=======================
solr-zkutil CLI Utility
=======================

About
-----
``solr-zkutil`` is an easy to use tool written in ``Python`` that allows you to quickly understand
information about your **Solr** ZooKeeper cluster.

If you live in an ethereal environment in which solr-hosts are frequently changing, or you have
many different solr environments to keep track of, this tool is for you!

The program is designed to work with **Windows** or **Linux** hosts, and is easy to install.

Runs on **python3** or **python2**!

Features
--------
|livenodesgif|

Supports environment aliases for ZooKeeper Connections
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|environmentconf|

Add your ZooKeeper connection string to the program and an environment alias
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::

    solr-zkutil config --add 'DEV=zk01.host.com:2181,zk02.host.com:2181,zk03.host.com:2181'

| `Or replace the configuration entirely using valid json`

::

    solr-zkutil config --configuration '{\"DEV\":\"zk01.dev.host.com:2181,zk02.dev.host.com:2181,zk03.dev.host.com:2181\", \"QA\": \"zk01.qa.host.com:2181,zk02.qa.host.com:2181,zk03.qa.host.com:2181\"}'

|environmentadd|

Query ZooKeeper for Solr Hosts, and Open the administration web-interface automatically
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ``solr-zkutil live-nodes --env DEV --browser``

| `or`

| ``solr-zkutil live-nodes -z zk01.dev.host.com:2181 --browser``

|livenodes|

Watch any ZooKeeper file/node for changes, during deployments, etc
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ``solr-zkutil watch /live_nodes --env DEV``

| `or`

| ``solr-zkutil watch /clusterstate.json --env PROD``

|watchnode|

Issue Administrative Commands Easily
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ``solr-zkutil admin RUOK --env DEV``

|admincmd|

| ``solr-zkutil ls /live_nodes -z zk01.dev.host.com:2181,zk02.dev.host.com:2181,zk03.dev.host.com:2181``

| `or.. note that ls can also be used to view the contents of node`

| ``solr-zkutil ls /clusterstate.json --env PROD --all-hosts``

View the contents/children of a node across all ensemble (cluster) members quickly
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|lsnodesall|

View all nodes, with stats info
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|lsnodesdebug|

Execute admin commands across all nodes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|adminall|

Installation
------------

Windows
^^^^^^^
On windows install ``Python 2.7`` or ``Python 3.3+``, and ensure Python ``exe`` and ``Scripts`` paths are configured
to be on your Windows Path environment, and the program should be accessible through ``PowerShell``
or ``cmd.exe``.

Setting up Python Paths is an option during the installation of the Python Package on Windows, I highly suggest you check the box, or mark the feature **add Python to system path** so this step is accomplished for you.

`Note: I will try to add a bundled exe installer soon for Windows`

**Python Include Paths**

- ``C:\Python27``
- ``C:\Python27\Scripts``

The ``pip`` command is bundled with the Python Windows installation.

Once you have this configured you should be able to also execute ``pip`` without specifying its path.

Linux
^^^^^
A recent version of Python ships with most linux distributions, if you don't have pip
install it with (ubuntu/debian)::

    sudo apt-get install python-pip

(Fedora)::

    sudo dnf install python-pip

There are no additional special instructions on Linux.

Installing from PyPi (recommended)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::

    pip install solr-zkutil

Or to update your solr-zkutil to the latest version::

    pip install solr-zkutil --upgrade

Install Manually
^^^^^^^^^^^^^^^^
Simply download, clone the repository, open a console and execute:
``python setup.py install``

On windows if you have not configured your Python environment you can install with::

    C:\Python27\python.exe setup.py install

Install from pip/github
^^^^^^^^^^^^^^^^^^^^^^^
::

    pip install git+https://github.com/bendemott/solr-zkutil.git

Program Commands
----------------
Once installed the program is executable using the command::

    solr-zkutil

For help with the command type::

    solr-zkutil --help

If you are having trouble configuring paths the program can also be ran using::

    python -m solrzkutil

or for `Windows`::

    C:\Python27\python.exe -m solrzkutil

Usage
^^^^^
::

    usage: solr-zkutil [-h]
                       {live-nodes,clusterstate,watch,ls,stat,admin,config} ...

    positional arguments:
      {live-nodes,clusterstate,watch,ls,stat,admin,config}
                            --- available sub-commands ---
        live-nodes          List Solr Live Nodes from ZooKeeper
        clusterstate        List Solr Collections and Nodes
        watch               Watch a ZooKeeper Node for Changes
        ls                  List a ZooKeeper Node
        stat                Check ZooKeeper ensemble status
        admin               Execute a ZooKeeper administrative command
        config              Show connection strings, or set environment
                            configuration

    optional arguments:
      -h, --help            show this help message and exit

.. |livenodesgif| image:: http://i.imgur.com/uTROF7Z.gif
.. |environmentconf| image:: http://i.imgur.com/v1df7K9.png
.. |environmentadd| image:: http://i.imgur.com/UL1peUD.png
.. |livenodes| image:: http://i.imgur.com/QpQt1Xs.png
.. |watchnode| image:: http://i.imgur.com/9S9x9wb.png
.. |admincmd| image:: http://i.imgur.com/Wm1DpmL.png
.. |lsnodesall| image:: http://i.imgur.com/Lk1yVtB.png
.. |lsnodesdebug| image:: http://i.imgur.com/mcl54I5.png
.. |adminall| image:: http://i.imgur.com/aDqCdzE.png


text:
module ResourceController::Helpers::Nested
  protected
    # Returns the relevant association proxy of the parent. (i.e. /posts/1/comments # => @post.comments)
    #
    def parent_association
      @parent_association ||= parent_object.send(model_name.to_s.pluralize.to_sym)
    end

    # Returns the type of the current parent
    #
    def parent_type
      @parent_type ||= [*belongs_to].find { |parent| !params["#{parent}_id".to_sym].nil? }
    end

    # Returns true/false based on whether or not a parent is present.
    #
    def parent?
      !parent_type.nil?
    end

    # Returns the current parent param, if there is a parent. (i.e. params[:post_id])
    def parent_param
      params["#{parent_type}_id".to_sym]
    end

    # Like the model method, but for a parent relationship.
    #
    def parent_model
      parent_type.to_s.camelize.constantize
    end

    # Returns the current parent object if a parent object is present.
    #
    def parent_object
      parent? ? parent_model.find(parent_param) : nil
    end

    # If there is a parent, returns the relevant association proxy.  Otherwise returns model.
    #
    def end_of_association_chain
      parent? ? parent_association : model
    end
end


text:
namespace odb {

class _dbTechLayer;
class _dbDatabase;
class dbIStream;
class dbOStream;
class dbDiff;

class _dbTrackGrid : public _dbObject
{
 public:
  dbId<_dbTechLayer> _layer;
  dbVector<int> _x_origin;
  dbVector<int> _x_count;
  dbVector<int> _x_step;
  dbVector<int> _y_origin;
  dbVector<int> _y_count;
  dbVector<int> _y_step;
  dbId<_dbTechLayer> _next_grid;

  _dbTrackGrid(_dbDatabase*, const _dbTrackGrid& g);
  _dbTrackGrid(_dbDatabase*);
  ~_dbTrackGrid();

  bool operator==(const _dbTrackGrid& rhs) const;
  bool operator!=(const _dbTrackGrid& rhs) const { return !operator==(rhs); }

  bool operator<(const _dbTrackGrid& rhs) const
  {
    if (_layer < rhs._layer)
      return true;

    if (_layer > rhs._layer)
      return false;

    return false;
  }

  void differences(dbDiff& diff,
                   const char* field,
                   const _dbTrackGrid& rhs) const;
  void out(dbDiff& diff, char side, const char* field) const;
};

inline _dbTrackGrid::_dbTrackGrid(_dbDatabase*, const _dbTrackGrid& g)
    : _layer(g._layer),
      _x_origin(g._x_origin),
      _x_count(g._x_count),
      _x_step(g._x_step),
      _y_origin(g._y_origin),
      _y_count(g._y_count),
      _y_step(g._y_step),
      _next_grid(g._next_grid)
{
}

inline _dbTrackGrid::_dbTrackGrid(_dbDatabase*)
{
}

inline _dbTrackGrid::~_dbTrackGrid()
{
}

inline dbOStream& operator<<(dbOStream& stream, const _dbTrackGrid& grid)
{
  stream << grid._layer;
  stream << grid._x_origin;
  stream << grid._x_count;
  stream << grid._x_step;
  stream << grid._y_origin;
  stream << grid._y_count;
  stream << grid._y_step;
  stream << grid._next_grid;
  return stream;
}

inline dbIStream& operator>>(dbIStream& stream, _dbTrackGrid& grid)
{
  stream >> grid._layer;
  stream >> grid._x_origin;
  stream >> grid._x_count;
  stream >> grid._x_step;
  stream >> grid._y_origin;
  stream >> grid._y_count;
  stream >> grid._y_step;
  stream >> grid._next_grid;
  return stream;
}

}  // namespace odb


text:
title: Media and Youth Movement
date: 2011-09-16 11:08:00 +07:00
nohibah: 807
inisiator: Dhyta Caturani
lokasi: Jakarta Selatan
dana: 800 Juta Rupiah
topik: Keadilan dan kesetaraan akses terhadap media
lama: Maret 2012 – Maret 2013 (1 tahun) dengan harapan berlanjut
deskripsi: Proyek ini ditujukan untuk membangun gerakan yang akan memobilisir remaja
  untuk mereposisi diri dari sekedar menjadi konsumen bagi media mainstream untuk
  menjadi subyek/pelaku aktif penyebaran informasi yang terkait dengan suara atau
  opini remaja sendiri terhadap persoalan-persoalan atau isu-isu strategis yang berkembang
  di masyarakat (misalnya isu-isu pluralisme dan toleransi, kasus-kasus korupsi yang
  marak, fakta komersialisasi pendidikan). Untuk menjadi subyek/pelaku dalam media
  maka gerakan ini harus terlebih dulu 'merebut' akses yang memang selama ini tidak
  pernah diberikan kepada remaja oleh media mainstream. Akses atas media yang didapatkan
  akan dimanfaatkan untuk mempublikasikan output-output yang akan diproduksi oleh
  remaja yang berisi suara atau opini dan masukan-masukan remaja untuk masyarakat
  dan pemimpin negara terkait dengan isu-isu tertentu. Adapun output tersebut bisa
  berupa tulisan, audio visual maupun rekaman audio. Untuk mempertajam gaung gerakan
  ini dan memperluas jangkauan publikasi suara/opini remaja, gerakan ini akan memposisikan
  diri sebagau Opinion Hub bagi remaja dengan memanfaatkan jejaring media sosial,
  yakni Facebook, Twitter, Blog dan website yang memang sudah cukup akrab di kalangan
  remaja.
masalah: Selama ini media mainstream hanya menjadikan remaja sebagai konsumen atas
  produk-produk yang mereka hasilkan dan tidak pernah memberikan akses yang memadai
  kepada mereka untuk menyuarakan opini baik mereka terutama yang terkait dengan persoalan-persoalan
  atau isu-isu strategis yang berkembang di tataran masyarakat maupun di tataran negara.
  Contohnya, dalam diskursus-diskursus publik, media hanya berfokus pada kelompok
  politisi, akademisi ataupun bahkan selebritas untuk menyampaikan opini mereka, namun
  selalu melupakan suara remaja sebagai elemen masyarakat yang juga mempunyai peran
  yang tak kalah pentingnya. Kebekuan akses atas media mainstream inilah yang kemudian
  juga melahirkan fenomena dimana sebagian remaja beralih pada tehnologi jejaring
  media sosial seperti Facebook, twitter, dan blog untuk menyuarakan pemikiran-pemikiran
  mereka. Namun apakah dinamika remaja di jejaring media sosial ini membuat mereka
  lebih berdaya atau lebih didengarkan? Ternyata tidak. Karena pemanfaatan media sosial
  sejauh ini dilakukan secara individu dan sporadik, Tidak terintegrasinya suara individu-individu
  remaja dalam satu wadah gerakan yang solid menjadikan pemanfaatan jejaring media
  sosial tidak efektif untuk tujuan ini. Seperti lingkaran setan, situasi ini kemudian
  lebih jauh menghasilkan generasi-generasi muda yang tidak peduli dan tidak peka
  terhadap persoalan-persoalan yang terjadi di masyarakat.
solusi: |-
  1. Mengorganisir sebanyak mungkin remaja untuk terlibat dalam gerakan ini.
  2. Memanfaatkan jejaring media sosial (Facebook, twitter, blog, website) untuk memperluas jangkauan gerakan ini.
  3. Membangun dan menggerakan Opinion Hub dalam bentuk website yang akan mengintegrasikan akun-akun sosial media pribadi (facebook, twitter, blog) milik individu remaja dan mempublikasikan opini/masukan mereka dalam website gerakan ini berupa tulisan, audio visual (baik dengan memanfaatkan kamera video semi pro ataupun kamera telepon genggam) dan rekaman suara.
  4.Penjaringan dan penggalian opini dilakukan melalui penerimaan tulisan/artikel, pembuatan audio visual durasi pendek atau rekaman audio untuk dipublikasikan secara luas melalui media mainstream.
  5. Menyelenggarakan workshop/pelatihan produksi (menulis, audio visual, rekaman suara) yang layak publikasi di media mainstream.
  6. Mengupayakan negosiasi dengan mainstream media untuk memberikan slot bagi gerakan ini untuk mempublikasikan suara/opini anak muda/remaja dengan menayangkan output-output yang digagas dan diproduksi oleh gerakan ini serta mendorong media untuk mengundang representasi remaja dalam acara-acara talkshow.
  7. Media roadshow untuk menggali standard tayangan/publikasi media langsung dari tangan pertama.
  8. Aktivitas tambahan yang akan dilakukan adalah, mengundang seorang public figure yang terkait dengan satu isu tertentu untuk terlibat dalam proses tanya jawab dengan anak muda/remaja dan untuk menerima masukan dari mereka melalui chatting massal menggunakan Instant Messenger. Hasil dari proses ini akan kembali dipublikasikan, termasuk apabila public figure yang diundang tidak bersedia untuk hadir.
  Pihak yang menerima manfaat adalah remaja usia 16 – 24 tahun di Jabodetabek. Penerima manfaat tidak langsung: remaja di wilayah-wilayah lain di Indonesia (partisipasi online)
keberhasilan: |-
  Meningkatnya jumlah partisipasi anak muda/remaja dalam setiap aktivitas online/offline gerakan ini.
  Meningkatnya jumlah pengakses dan pengambil manfaat Opinion Hub melalui akun media sosial dan website gerakan yang akan dievaluasi setiap 2 bulan.
  Keberhasilan menembus mainstream media untuk menayangkan output gerakan berupa audio visual untuk media televisi, tulisan untuk media cetak dan rekaman audio untuk media radio (berdasarkan jumlah).
diuntungkan: 'Penerima manfaat langsung: Remaja usia 16 – 24 tahun di Jabodetabek.
  Penerima manfaat tidak langsung: Remaja di wilayah-wilayah lain di Indonesia (partisipasi
  online)'
organisasi: NA
layout: hibahcmb
---

![807](/static/img/hibahcmb/807.png){: .img-responsive }{: width="350" }

### {{ page.nohibah }} - {{ page.title }}

---


text:
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\ORM\Query\AST\Functions;

/**
 * Implementation of PostgreSql JSON_OBJECT_AGG().
 *
 * @see https://www.postgresql.org/docs/9.5/functions-aggregate.html
 * @since 1.4
 *
 * @author Martin Georgiev <martin.georgiev@gmail.com>
 */
class JsonObjectAgg extends BaseFunction
{
    protected function customiseFunction(): void
    {
        $this->setFunctionPrototype('json_object_agg(%s, %s)');
        $this->addNodeMapping('StringPrimary');
        $this->addNodeMapping('StringPrimary');
    }
}


text:
techGSR Website
===

To run, start off an HTTP Server in the **root directory of the project**. The easiest way to do this would be via Python's `SimpleHTTPServer`

	python -m SimpleHTTPServer 8000

on linux. You website would run at http://localhost:8000 (Here 8000 is a configurable port).

An HTTP Server is required because we are running Angular.


text:
<?xml version="1.0" encoding="UTF-8"?>
<Help xmlns="http://v8.1c.ru/8.3/xcf/extrnprops" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Page>InformationRegister.ЦелевыеЗначенияВариантовАнализа.Form.ФормаЗаписи.Help.ru</Page>
</Help>