text:
const { makeTask,
        toggleStatus,
        toggleAllTasksCompleted,
        toggleAllTasksActive,
        addTask,
        deleteCompleted,
        filterTaskList,
        tasksToTaskList,
        taskListToKeyed,
        getActiveCount } = require('./TaskList')
const taskListFactory = require('./task_list_factory')
const { deepEqual } = require('assert')
const { merge } = require('./utils')

describe('TaskList.js', () => {
  describe('makeTask()', () => {
    it('should create a task object', () => {
      const task = makeTask('id', 'text', 'date')
      const expectedTask = {
        id: 'id',
        text: 'text',
        status: 'active',
        created: 'date',
        updated: 'date',
        cleared: false
      }

      deepEqual(task, expectedTask)
    })
  })

  describe('toggleStatus()', () => {
    it('should toggle task status between "completed" and "active"', () => {
      const newTask = makeTask('id', 'text', 'date')
      const completed = toggleStatus(newTask, 'updated date')
      const expectedCompleted = {
        id: 'id',
        text: 'text',
        status: 'completed',
        created: 'date',
        updated: 'updated date',
        cleared: false
      }

      deepEqual(completed, expectedCompleted)

      const backToActive = toggleStatus(completed, 'updated date 2')
      const expectedActive = {
        id: 'id',
        text: 'text',
        status: 'active',
        created: 'date',
        updated: 'updated date 2',
        cleared: false
      }

      deepEqual(backToActive, expectedActive)
    })
  })

  describe('toggleAllTasksCompleted()', () => {
    it('should set every task to have status: "complete"', () => {
      const task1 = { id: 'task-id-1', status: 'active' }
      const task2 = { id: 'task-id-2', status: 'completed' }
      const task3 = { id: 'task-id-3', status: 'completed' }
      const task4 = { id: 'task-id-4', status: 'active' }
      const tasks = {
        [task1.id]: task1,
        [task2.id]: task2,
        [task3.id]: task3,
        [task4.id]: task4
      }
      const actual = toggleAllTasksCompleted(tasks)
      const task1Completed = merge(task1, {status: 'completed'})
      const task4Completed = merge(task4, {status: 'completed'})
      const expected = {
        [task1.id]: task1Completed,
        [task2.id]: task2,
        [task3.id]: task3,
        [task4.id]: task4Completed
      }
      deepEqual(actual, expected)
    })
  })

  describe('toggleAllTasksActive()', () => {
    it('should set every task to have status: "active"', () => {
      const task1 = { id: 'task-id-1', status: 'active' }
      const task2 = { id: 'task-id-2', status: 'completed' }
      const task3 = { id: 'task-id-3', status: 'completed' }
      const task4 = { id: 'task-id-4', status: 'active' }
      const tasks = {
        [task1.id]: task1,
        [task2.id]: task2,
        [task3.id]: task3,
        [task4.id]: task4
      }
      const actual = toggleAllTasksActive(tasks)
      const task2Active = merge(task2, {status: 'active'})
      const task3Active = merge(task3, {status: 'active'})
      const expected = {
        [task1.id]: task1,
        [task2.id]: task2Active,
        [task3.id]: task3Active,
        [task4.id]: task4
      }
      deepEqual(actual, expected)
    })
  })

  describe('addTask()', () => {
    it('should add a new task to the list', () => {
      const now = () => 1234
      const task = makeTask('id1', 'text', now() - 1)
      const list = {
        id1: task
      }
      const { newList, newestTask } = addTask(now, list, 'text two')
      const expectedNewList = {
        id1: task,
        [newestTask.id]: newestTask
      }
      deepEqual(newList, expectedNewList)
    })
  })

  describe('deleteCompleted()', () => {
    it('should return the task object with completed tasks removed', () => {
      const task1 = { id: 'task-id-1', status: 'active' }
      const task2 = { id: 'task-id-2', status: 'completed' }
      const task3 = { id: 'task-id-3', status: 'completed' }
      const task4 = { id: 'task-id-4', status: 'active' }
      const tasks = {
        [task1.id]: task1,
        [task2.id]: task2,
        [task3.id]: task3,
        [task4.id]: task4
      }
      const actual = deleteCompleted(tasks)
      const expected = {
        [task1.id]: task1,
        [task4.id]: task4
      }
      deepEqual(actual, expected)
    })
  })

  describe('filterTaskList()', () => {
    it('should return a task list filtered by filter', () => {
      const active1 = makeTask('id1', 'text', Date.now())
      const active2 = makeTask('id2', 'text', Date.now())
      const temp1 = makeTask('id3', 'text', Date.now())
      const temp2 = makeTask('id4', 'text', Date.now())
      const completed1 = toggleStatus(temp1, Date.now())
      const completed2 = toggleStatus(temp2, Date.now())
      const filterActive = 'active'
      const filterCompleted = 'completed'
      const list = [active1, active2, completed1, completed2]
      const activeList = filterTaskList(filterActive, list)
      const completedList = filterTaskList(filterCompleted, list)
      const expectedActive = [active1, active2]
      const expectedCompleted = [completed1, completed2]
      deepEqual(activeList, expectedActive)
      deepEqual(completedList, expectedCompleted)
    })

    it('should return entire list if filter is `all`', () => {
      const active1 = makeTask('id1', 'text', Date.now())
      const active2 = makeTask('id2', 'text', Date.now())
      const temp1 = makeTask('id3', 'text', Date.now())
      const temp2 = makeTask('id4', 'text', Date.now())
      const completed1 = toggleStatus(temp1, Date.now())
      const completed2 = toggleStatus(temp2, Date.now())
      const list = [active1, active2, completed1, completed2]
      const actualList = filterTaskList('all', list)
      deepEqual(actualList, list)
    })
  })

  describe('tasksToTaskList()', () => {
    it('should return task objects in an array sorted by time created', () => {
      const task1 = makeTask('task-id-1', 'laundry', Date.now())
      const task2 = makeTask('task-id-2', 'groceries', Date.now())
      const task3 = makeTask('task-id-3', 'errands', Date.now())
      const task4 = makeTask('task-id-4', 'email', Date.now())
      const tasks = {
        [task1.id]: task1,
        [task2.id]: task2,
        [task3.id]: task3,
        [task4.id]: task4
      }
      const actual = tasksToTaskList(tasks)
      const expected = [task1, task2, task3, task4]
      deepEqual(actual, expected)
    })
  })

  describe('taskListToKeyed()', () => {
    it('should return task object keyed by id', () => {
      const task1 = makeTask('task-id-1', 'laundry', Date.now())
      const task2 = makeTask('task-id-2', 'groceries', Date.now())
      const task3 = makeTask('task-id-3', 'errands', Date.now())
      const task4 = makeTask('task-id-4', 'email', Date.now())
      const list = [task1, task2, task3, task4]
      const actual = taskListToKeyed(list)
      const expected = {
        [task1.id]: task1,
        [task2.id]: task2,
        [task3.id]: task3,
        [task4.id]: task4
      }
      deepEqual(actual, expected)
    })
  })

  describe('getActiveCount()', () => {
    it('should return a count of active tasks', () => {
      const active1 = makeTask('id1', 'text', Date.now())
      const active2 = makeTask('id2', 'text', Date.now())
      const temp1 = makeTask('id3', 'text', Date.now())
      const completed1 = toggleStatus(temp1, Date.now())
      const tasks = {
        [active1.id]: active1,
        [active2.id]: active2,
        [completed1.id]: completed1,
      }
      deepEqual(getActiveCount(tasks), 2)
    })
  })
})


text:
{{--
  Template Name: Press Listing (DONOT USE)
--}}

@extends('layouts.app')
@section('content')

        @if ($post->post_name !='press')

        @endif
        @php _e("Press Home","sage"); @endphp
        @if ($post->post_name !='press')

        @endif

      @include('partials.content-side-press-listing')

    @if ($post->post_name !='press')
      @while(have_posts()) @php(the_post())

              @if($press_listing)

                    @foreach ($press_listing as $press_item)
                      @include('partials.content-press-card',['item_id'=>$press_item->ID])
                    @endforeach

              @else

                    @php _e("There are no press posts to display","sage"); @endphp

                  {!! get_search_form(false) !!}

              @endif

          @if ($get_max_num_pages_press)
            @include('partials.pagination',['max_num_pages'=>$get_max_num_pages_press])
          @endif

      @endwhile
    @else

        @if(!empty($coverage_listing))

@php _e("Recent Press Coverage","sage"); @endphp

              @foreach ($coverage_listing as $press_item)
               @include('partials.content-press-card',['item_id'=>$press_item->ID])
              @endforeach

            @php _e("See All Press Coverage","sage"); @endphp

        @endif

        @if(!empty($releases_listing))

@php _e("Statements & Press Releases","sage"); @endphp

            @foreach ($releases_listing as $press_item)
              @include('partials.content-press-card',['item_id'=>$press_item->ID])
            @endforeach

            @php _e("See All Statements & Press Releases","sage"); @endphp

        @endif

    @endif

@endsection

redpajama_set_name: RedPajamaGithub


text:
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * The Date property "UTC" has { DontEnum } attributes
 *
 * @path ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T2.js
 * @description Checking absence of DontDelete attribute
 */

if (delete Date.UTC  === false) {
  $ERROR('#1: The Date.UTC property has not the attributes DontDelete');
}

if (Date.hasOwnProperty('UTC')) {
  $FAIL('#2: The Date.UTC property has not the attributes DontDelete');
}


text:
<!DOCTYPE html>

	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="Mapas e informações atualizadas sobre Ribeirão Grande - SP">
   	<title>Mapa de Ribeirão Grande - SP</title>
	<link href="css/geral.css" rel="stylesheet" type="text/css"/>
	<link href="css/map.css" rel="stylesheet" type="text/css"/>
	<link rel="shortcut icon" href="img/favicon.png" />

	<link href='https://api.tiles.mapbox.com/mapbox.js/v2.2.1/mapbox.css' rel='stylesheet' />

	<link href='//mapbox.com/base/latest/base.css' rel='stylesheet' />

	<link href='https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-locatecontrol/v0.24.0/L.Control.Locate.css' rel='stylesheet' />

	<link rel="stylesheet" href="css/Control.Geocoder.css" />

	<link rel="stylesheet" href="css/OverPassLayer.css" />

	<link href='https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-markercluster/v0.4.0/MarkerCluster.css' rel='stylesheet' />
	<link href='https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-markercluster/v0.4.0/MarkerCluster.Default.css' rel='stylesheet' />


text:
package com.khartec.waltz.jobs;

import com.khartec.waltz.common.DateTimeUtilities;
import com.khartec.waltz.common.StringUtilities;
import com.khartec.waltz.model.EntityKind;
import com.khartec.waltz.model.EntityLifecycleStatus;
import com.khartec.waltz.model.rating.AuthoritativenessRatingValue;
import com.khartec.waltz.schema.tables.records.CostKindRecord;
import com.khartec.waltz.schema.tables.records.LogicalFlowDecoratorRecord;
import com.khartec.waltz.schema.tables.records.LogicalFlowRecord;
import com.khartec.waltz.schema.tables.records.MeasurableCategoryRecord;
import org.jooq.DSLContext;

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

import static com.khartec.waltz.common.DateTimeUtilities.nowUtcTimestamp;
import static com.khartec.waltz.schema.Tables.COST_KIND;
import static com.khartec.waltz.schema.tables.Application.APPLICATION;
import static com.khartec.waltz.schema.tables.MeasurableCategory.MEASURABLE_CATEGORY;

public class WaltzUtilities {

    public static Long getOrCreateMeasurableCategory(DSLContext dsl, String externalId, String name) {

        Long categoryId = dsl
                .select(MEASURABLE_CATEGORY.ID)
                .from(MEASURABLE_CATEGORY)
                .where(MEASURABLE_CATEGORY.EXTERNAL_ID.eq(externalId))
                .fetchOne(MEASURABLE_CATEGORY.ID);

        if (categoryId != null) {
            return categoryId;
        } else {
            MeasurableCategoryRecord measurableCategoryRecord = dsl.newRecord(MEASURABLE_CATEGORY);
            measurableCategoryRecord.setName(name);
            measurableCategoryRecord.setDescription(name);
            measurableCategoryRecord.setExternalId(externalId);
            measurableCategoryRecord.setRatingSchemeId(1L);
            measurableCategoryRecord.setLastUpdatedAt(DateTimeUtilities.nowUtcTimestamp());
            measurableCategoryRecord.setLastUpdatedBy("admin");
            measurableCategoryRecord.store();
            return measurableCategoryRecord.getId();
        }
    }

    public static String toId(String t) {
        return StringUtilities.mkSafe(t).toLowerCase();
    }

    public static String toId(String... ts) {
        return Stream.of(ts)
                .map(WaltzUtilities::toId)
                .collect(Collectors.joining("_"));
    }

    public static List<Long> getActiveAppIds(DSLContext dsl) {
        return dsl
                .select(APPLICATION.ID)
                .from(APPLICATION)
                .where(APPLICATION.ENTITY_LIFECYCLE_STATUS.ne(EntityLifecycleStatus.REMOVED.name()))
                .fetch(APPLICATION.ID);
    }

    public static LogicalFlowDecoratorRecord mkLogicalFlowDecoratorRecord(long flowId, long dtId, String provenance) {
        LogicalFlowDecoratorRecord decorator = new LogicalFlowDecoratorRecord();
        decorator.setLogicalFlowId(flowId);
        decorator.setDecoratorEntityKind(EntityKind.DATA_TYPE.name());
        decorator.setDecoratorEntityId(dtId);
        decorator.setProvenance(provenance);
        decorator.setLastUpdatedAt(nowUtcTimestamp());
        decorator.setLastUpdatedBy("admin");
        decorator.setRating(AuthoritativenessRatingValue.NO_OPINION.value());
        return decorator;
    }

    public static LogicalFlowRecord mkLogicalFlowRecord(long sourceAppId, long targetAppId, String provenance) {
        LogicalFlowRecord record = new LogicalFlowRecord();
        record.setSourceEntityId(sourceAppId);
        record.setTargetEntityId(targetAppId);
        record.setSourceEntityKind(EntityKind.APPLICATION.name());
        record.setTargetEntityKind(EntityKind.APPLICATION.name());
        record.setCreatedBy("admin");
        record.setCreatedAt(nowUtcTimestamp());
        record.setLastUpdatedBy("admin");
        record.setLastUpdatedAt(nowUtcTimestamp());
        record.setProvenance(provenance);
        record.setEntityLifecycleStatus(EntityLifecycleStatus.ACTIVE.name());
        record.setIsRemoved(false);
        return record;
    }

    public static long getOrCreateCostKind(DSLContext dsl,
                                           String name,
                                           String externalId) {
        return dsl
                .select(COST_KIND.ID)
                .from(COST_KIND)
                .where(COST_KIND.EXTERNAL_ID.eq(externalId))
                .fetchOptional(COST_KIND.ID)
                .orElseGet(() -> {
                    CostKindRecord r = dsl.newRecord(COST_KIND);
                    r.setName(name);
                    r.setDescription(name);
                    r.setExternalId(externalId);
                    r.store();
                    return r.getId();
                });
    }
}


text:
/*
 * This file defines hardware resources statically allocated to M0 core
 * when static resource managemnt is used.
 *
 * There are 4 classes of resources that must be declared here:
 *  - M0_ASSIGNED_PORTS macro defines which ports and pins are reserved
 *    for M0 core use.
 *    You define these as a colon separated list of ports and pins reserved
 *    using macro SRM_PORT(port_num, pins), one time for each reserved port.
 *    SRM_PORT macro arguments are port number, in the range 0 .. 14 and
 *    pins is a hex value with a bit set for each reserved pin on a port.
 *
 *  - M0_ASSIGNED_DIVIDERS macro defines which clock dividers are reserved
 *    for M0 core use.
 *    You define these as a colon separated list of dividers reserved
 *    using macro SRM_DIVIDER(type, reservations), one time for each required
 *    devider type.
 *    SRM_DIVIDER arguments are divider type, one of cy_en_divider_types_t
 *    values and reservations is a hex mask value with a bit set for each
 *    reserved divider of a given type.
 *
 *  - M0_ASSIGNED_SCBS macro defines which SCB blocks are reserved
 *    for M0 core use.
 *    You define these as a colon separated list of SCBs reserved using
 *    macro SRM_SCB(n), which argument is SCB number in a range 0 .. 7.
 *
 *  - M0_ASSIGNED_TCPWM macro defines which TCPWM blocks are reserved
 *    for M0 core use.
 *    You define these as a colon separated list of TCPWMs reserved using
 *    macro SRM_TCPWM(n), which argument is TCPWM number in a range 0 .. 31.
 *
 * If a particular resource class is not used at all by M0 core you can
 * skip defining relevant M0_ASSIGNED_* macro or define it as an empty one.
 *
 * Examples:
 *    #define M0_ASSIGNED_PORTS		SRM_PORT(0, 0x30), SRM_PORT(5, 0x03)
 *
 *    #define M0_ASSIGNED_DIVIDERS	SRM_DIVIDER(CY_SYSCLK_DIV_8_BIT, 0x01)
 *
 *	  #define M0_ASSIGNED_SCBS		SRM_SCB(2)
 *
 *    #define M0_ASSIGNED_TCPWMS
 *
 */

// Reservations below apply to default M0 hex image.

// P0_0 and p0_1 reserved for WCO, P6-6 and P6_7 reserved for SWD
#define M0_ASSIGNED_PORTS       SRM_PORT(0, 0x03), SRM_PORT(6, 0xc0)
// 8-bit divider 0 reserved for us ticker
#define M0_ASSIGNED_DIVIDERS    SRM_DIVIDER(CY_SYSCLK_DIV_8_BIT, 0x01)
#define M0_ASSIGNED_SCBS
// TCPWM 0,0 used for us_ticker
#define M0_ASSIGNED_TCPWMS      SRM_TCPWM(0)

/* End of File */


text:
package weiboclient4j;

import weiboclient4j.model.AccountUid;
import weiboclient4j.model.Privacy;
import weiboclient4j.model.RateLimitStatus;
import weiboclient4j.model.User;

/**
 * @author Hover Ruan
 */
public class AccountService extends AbstractService {
    public AccountService(WeiboClient client) {
        super(client);
    }

    public long getUid() throws WeiboClientException {
        AccountUid accountUid = doGet("account/get_uid", AccountUid.class);

        return accountUid.getUid();
    }

    public Privacy getPrivacy() throws WeiboClientException {
        return doGet("account/get_privacy", Privacy.class);
    }

    public RateLimitStatus getRateLimitStatus() throws WeiboClientException {
        return doGet("account/rate_limit_status", RateLimitStatus.class);
    }

    public User endSession() throws WeiboClientException {
        return doGet("account/end_session", User.class);
    }
}


text:
import glob
import os

from django.apps import apps
from django.conf import settings

def run():
    Image = apps.get_model('train', 'Image')
    Image.objects.all().delete()
    files = glob.glob(os.path.join(
        settings.BASE_DIR, 'train', 'static', 'training_images', '*.png'
    ))
    for f in files:
        os.remove(f)


text:
package java.lang.reflect;

import java.lang.reflect.VMCommonLibrarySupport;

import org.jikesrvm.classloader.RVMClass;
import org.jikesrvm.classloader.RVMField;
import org.jikesrvm.classloader.RVMMember;
import org.jikesrvm.classloader.RVMType;
import org.jikesrvm.classloader.TypeReference;
import org.jikesrvm.objectmodel.ObjectModel;
import org.jikesrvm.runtime.RuntimeEntrypoints;
import org.jikesrvm.VM;

/**
 * This class must be implemented by the VM vendor. This class models a field.
 * Information about the field can be accessed, and the field's value can be
 * accessed dynamically.
 *
 */
public final class Field extends AccessibleObject implements Member {
  private final RVMField vmField;

  /**
	* Constructor
	*/
  Field(RVMField vmField){
	 this.vmField = vmField;
  }

  /**
	* Prevent this class from being instantiated
	*/
  private Field(){
	 vmField = null;
  }

  public boolean isSynthetic() {
	 return super.isSynthetic();
  }

  /**
	*

	* Returns the String representation of the field's declaration, including
	* the type parameters.
	*

	*
	* @return An instance of String.
	* @since 1.5
	*/
  public String toGenericString() {
	 throw new Error("TODO");
  }

  /**
	*

	* Indicates whether or not this field is an enumeration constant.
	*

	*
	* @return A value of true if this field is an enumeration
	*         constant, otherwise false.
	* @since 1.5
	*/
  public boolean isEnumConstant() {
	 return (getModifiers() & Modifier.ENUM) != 0;
  }

  /**
	*

	* Gets the declared type of this field.
	*

	*
	* @return An instance of {@link Type}.
	* @throws GenericSignatureFormatError if the generic method signature is
	*         invalid.
	* @throws TypeNotPresentException if the component type points to a missing
	*         type.
	* @throws MalformedParameterizedTypeException if the component type points
	*         to a type that can't be instantiated for some reason.
	* @since 1.5
	*/
  public Type getGenericType() {
	 throw new Error("TODO");
  }

  /**
	* Compares the specified object to this Field and answer if they are equal.
	* The object must be an instance of Field with the same defining class and
	* name.
	*
	* @param object the object to compare
	* @return true if the specified object is equal to this Field, false
	*         otherwise
	* @see #hashCode
	*/
  @Override
  public boolean equals(Object object) {
	 if (object instanceof Field) {
		Field that = (Field)object;
		return this.vmField == that.vmField;
	 } else {
		return false;
	 }
  }

  /**
	* Return the value of the field in the specified object. This reproduces
	* the effect of object.fieldName
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*

	* The value of the field is returned. If the type of this field is a base
	* type, the field value is automatically wrapped.
	*
	* @param object
	*            the object to access
	* @return the field value, possibly wrapped
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public Object get(Object object) throws IllegalAccessException, IllegalArgumentException {
    return VMCommonLibrarySupport.get(object, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Return the value of the field in the specified object as a boolean. This
	* reproduces the effect of object.fieldName
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*
	* @param object
	*            the object to access
	* @return the field value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public boolean getBoolean(Object object)
	 throws IllegalAccessException, IllegalArgumentException{
	 return VMCommonLibrarySupport.getBoolean(object, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Return the value of the field in the specified object as a byte. This
	* reproduces the effect of object.fieldName
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*
	* @param object
	*            the object to access
	* @return the field value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public byte getByte(Object object) throws IllegalAccessException,
														  IllegalArgumentException{
	 return VMCommonLibrarySupport.getByte(object, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Return the value of the field in the specified object as a char. This
	* reproduces the effect of object.fieldName
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*
	* @param object
	*            the object to access
	* @return the field value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public char getChar(Object object) throws IllegalAccessException,
														  IllegalArgumentException {
	 return VMCommonLibrarySupport.getChar(object, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Return the {@link Class} associated with the class that defined this
	* field.
	*
	* @return the declaring class
	*/
  public Class<?> getDeclaringClass() {
	 return (Class<?>)vmField.getDeclaringClass().getClassForType();
  }

  /**
	* Return the value of the field in the specified object as a double. This
	* reproduces the effect of object.fieldName
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*
	* @param object
	*            the object to access
	* @return the field value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public double getDouble(Object object)
	 throws IllegalAccessException, IllegalArgumentException {
	 return VMCommonLibrarySupport.getDouble(object, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Return the value of the field in the specified object as a float. This
	* reproduces the effect of object.fieldName
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*
	* @param object
	*            the object to access
	* @return the field value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public float getFloat(Object object) throws IllegalAccessException,
															 IllegalArgumentException {
	 return VMCommonLibrarySupport.getFloat(object, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Return the value of the field in the specified object as an int. This
	* reproduces the effect of object.fieldName
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*
	* @param object
	*            the object to access
	* @return the field value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public int getInt(Object object) throws IllegalAccessException, IllegalArgumentException {
    return VMCommonLibrarySupport.getInt(object, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Return the value of the field in the specified object as a long. This
	* reproduces the effect of object.fieldName
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*
	* @param object
	*            the object to access
	* @return the field value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public long getLong(Object object) throws IllegalAccessException,
														  IllegalArgumentException {
	 return VMCommonLibrarySupport.getLong(object, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Return the modifiers for the modeled field. The Modifier class should be
	* used to decode the result.
	*
	* @return the modifiers
	* @see java.lang.reflect.Modifier
	*/
  public int getModifiers() {
    return super.getModifiers();
  }

  /**
	* Return the name of the modeled field.
	*
	* @return the name
	*/
  public String getName() {
	 return vmField.getName().toString();
  }

  /**
	* Return the value of the field in the specified object as a short. This
	* reproduces the effect of object.fieldName
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*

	*
	* @param object
	*            the object to access
	* @return the field value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public short getShort(Object object) throws IllegalAccessException,
															 IllegalArgumentException {
	 return VMCommonLibrarySupport.getShort(object, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Return the {@link Class} associated with the type of this field.
	*
	* @return the type
	*/
  public Class<?> getType() {
	 return vmField.getType().resolve().getClassForType();
  }

  /**
	* Answers an integer hash code for the receiver. Objects which are equal
	* answer the same value for this method.
	*

	* The hash code for a Field is the hash code of the field's name.
	*
	* @return the receiver's hash
	* @see #equals
	*/
  @Override
    public int hashCode() {
	 return getName().hashCode();
  }

  /**
	* Set the value of the field in the specified object to the boolean value.
	* This reproduces the effect of object.fieldName = value
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*

	* If the field type is a base type, the value is automatically unwrapped.
	* If the unwrap fails, an IllegalArgumentException is thrown. If the value
	* cannot be converted to the field type via a widening conversion, an
	* IllegalArgumentException is thrown.
	*
	* @param object
	*            the object to access
	* @param value
	*            the new value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public void set(Object object, Object value)
	 throws IllegalAccessException, IllegalArgumentException {
	 VMCommonLibrarySupport.set(object, value, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Set the value of the field in the specified object to the boolean value.
	* This reproduces the effect of object.fieldName = value
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*

	* If the value cannot be converted to the field type via a widening
	* conversion, an IllegalArgumentException is thrown.
	*
	* @param object
	*            the object to access
	* @param value
	*            the new value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public void setBoolean(Object object, boolean value)
	 throws IllegalAccessException, IllegalArgumentException {
	 VMCommonLibrarySupport.setBoolean(object, value, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Set the value of the field in the specified object to the byte value.
	* This reproduces the effect of object.fieldName = value
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*

	* If the value cannot be converted to the field type via a widening
	* conversion, an IllegalArgumentException is thrown.
	*
	* @param object
	*            the object to access
	* @param value
	*            the new value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public void setByte(Object object, byte value)
	 throws IllegalAccessException, IllegalArgumentException {
	 VMCommonLibrarySupport.setByte(object, value, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Set the value of the field in the specified object to the char value.
	* This reproduces the effect of object.fieldName = value
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*

	* If the value cannot be converted to the field type via a widening
	* conversion, an IllegalArgumentException is thrown.
	*
	* @param object
	*            the object to access
	* @param value
	*            the new value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public void setChar(Object object, char value)
	 throws IllegalAccessException, IllegalArgumentException {
	 VMCommonLibrarySupport.setChar(object, value, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Set the value of the field in the specified object to the double value.
	* This reproduces the effect of object.fieldName = value
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*

	* If the value cannot be converted to the field type via a widening
	* conversion, an IllegalArgumentException is thrown.
	*
	* @param object
	*            the object to access
	* @param value
	*            the new value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public void setDouble(Object object, double value)
	 throws IllegalAccessException, IllegalArgumentException {
	 VMCommonLibrarySupport.setDouble(object, value, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Set the value of the field in the specified object to the float value.
	* This reproduces the effect of object.fieldName = value
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*

	* If the value cannot be converted to the field type via a widening
	* conversion, an IllegalArgumentException is thrown.
	*
	* @param object
	*            the object to access
	* @param value
	*            the new value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public void setFloat(Object object, float value)
	 throws IllegalAccessException, IllegalArgumentException {
	 VMCommonLibrarySupport.setFloat(object, value, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Set the value of the field in the specified object to the int value. This
	* reproduces the effect of object.fieldName = value
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*

	* If the value cannot be converted to the field type via a widening
	* conversion, an IllegalArgumentException is thrown.
	*
	* @param object
	*            the object to access
	* @param value
	*            the new value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public void setInt(Object object, int value)
	 throws IllegalAccessException, IllegalArgumentException {
	 VMCommonLibrarySupport.setInt(object, value, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Set the value of the field in the specified object to the long value.
	* This reproduces the effect of object.fieldName = value
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*

	* If the value cannot be converted to the field type via a widening
	* conversion, an IllegalArgumentException is thrown.
	*
	* @param object
	*            the object to access
	* @param value
	*            the new value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public void setLong(Object object, long value)
	 throws IllegalAccessException, IllegalArgumentException {
	 VMCommonLibrarySupport.setLong(object, value, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Set the value of the field in the specified object to the short value.
	* This reproduces the effect of object.fieldName = value
	*

	* If the modeled field is static, the object argument is ignored.
	* Otherwise, if the object is null, a NullPointerException is thrown. If
	* the object is not an instance of the declaring class of the method, an
	* IllegalArgumentException is thrown.
	*

	* If this Field object is enforcing access control (see AccessibleObject)
	* and the modeled field is not accessible from the current context, an
	* IllegalAccessException is thrown.
	*

	* If the value cannot be converted to the field type via a widening
	* conversion, an IllegalArgumentException is thrown.
	*
	* @param object
	*            the object to access
	* @param value
	*            the new value
	* @throws NullPointerException
	*             if the object is null and the field is non-static
	* @throws IllegalArgumentException
	*             if the object is not compatible with the declaring class
	* @throws IllegalAccessException
	*             if modeled field is not accessible
	*/
  public void setShort(Object object, short value)
	 throws IllegalAccessException, IllegalArgumentException {
	 VMCommonLibrarySupport.setShort(object, value, vmField, this, RVMClass.getClassFromStackFrame(1));
  }

  /**
	* Answers a string containing a concise, human-readable description of the
	* receiver.
	*

	* The format of the string is:
	*

	*
modifiers (if any)
	*
return type
	*
declaring class name
	*
'.'
	*
field name
	*

	*

	* For example:
	* public static java.io.InputStream java.lang.System.in
	*
	* @return a printable representation for the receiver
	*/
  public String toString() {
	 StringBuilder sb = new StringBuilder(80);
	 // append modifiers if any
	 int modifier = getModifiers();
	 if (modifier != 0) {
		sb.append(Modifier.toString(modifier)).append(' ');
	 }
	 // append return type
	 appendArrayType(sb, getType());
	 sb.append(' ');
	 // append full field name
	 sb.append(getDeclaringClass().getName()).append('.').append(getName());
	 return sb.toString();
  }

  /* ---- Non-API methods ---- */

  /**
   * Get the VM member implementation. Package protected to stop outside use.
   */
  @Override
  RVMMember getVMMember() {
	 return vmField;
  }
}


text:
#ifndef	_SPTGLOBAL_H
#define	_SPTGLOBAL_H

/* typedef */
typedef	struct	txbset	TSET;
typedef	struct	alword	ALWORD;
typedef	union	txhand	TXHAND;

typedef	void		(*finit)(void);
typedef	void		(*fwt)(void *);
typedef	void		(*fwtf)(void *, void *, void *);
typedef	int		(*fwtr)(void *, void *);
typedef	void		(*fctime)(void);

/* struct */
struct	txbset {
	finit	ts_init;
	fwt	ts_wt;
	fwtf	ts_wtf;
	fwtr	ts_wtr;
	fctime	ts_fctim;

	void	*ts_hand;
};

struct	alword {
	char	*al_str;
	int	al_len;
};

union	txhand {
	MYSQL	tx_sql;
	int	tx_fd;
};

/* global data */
extern	MGCH	*textGarCol;
extern	SCONF	*urlConfigSave;
extern	WPOOL	*contMemPool, *tsMemPool;
extern	BUFF	*contStoreBuf, *urlSaveBuf;
extern	TXHAND	txTranHand;

extern	void	*txbugRunMp;	/* DMPH */
extern	void	*txbugMsgSet;	/* MSGSET */
extern	void	*tbThreadPool;	/* PTHPOOL */

extern	MYSQL	urlDataBase;
extern	int	nTxbugPthread, nLoadLimit;
extern	int	textProcFd;
extern	short	nToleError, cSyncTime;
extern	char	urlsTblName[], urlsDbName[];
extern	char	newsTblName[], newsDbName[];
extern	char	charSetBuf[][CHARSET_LEN];

extern	MATOS	writeDataLock;
extern	TSET	textbugRunSet;
extern	MGCO	txbugResCol;

#endif