text:
<!DOCTYPE html>

  <title>Introduction to the R Language</title>
  <meta charset="utf-8">
  <meta name="description" content="Introduction to the R Language">
  <meta name="author" content="Roger Peng, Associate Professor">
  <meta name="generator" content="slidify" />
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta http-equiv="X-UA-Compatible" content="chrome=1">
  <link rel="stylesheet" href="../../libraries/frameworks/io2012/css/default.css" media="all" >
  <link rel="stylesheet" href="../../libraries/frameworks/io2012/phone.css"
    media="only screen and (max-device-width: 480px)" >
  <link rel="stylesheet" href="../../libraries/frameworks/io2012/css/slidify.css" >
  <link rel="stylesheet" href="../../libraries/highlighters/highlight.js/css/tomorrow.css" />
  <base target="_blank">

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

  <slides class="layout-widescreen">

    <slide class="title-slide segue nobackground">

      <hgroup class="auto-fadein">

Introduction to the R Language

Control Structures

Roger Peng, Associate Professor
Johns Hopkins Bloomberg School of Public Health

      </hgroup>
          </slide>

      <slide class="" id="slide-1" style="background:;">
  <hgroup>

Control Structures

  </hgroup>

Control structures in R allow you to control the flow of execution of the program, depending on runtime conditions. Common structures are

if, else: testing a condition

for: execute a loop a fixed number of times

while: execute a loop while a condition is true

repeat: execute an infinite loop

break: break the execution of a loop

next: skip an interation of a loop

return: exit a function

Most control structures are not used in interactive sessions, but rather when writing functions or longer expresisons.

</slide>

      <slide class="" id="slide-2" style="background:;">
  <hgroup>

Control Structures: if

  </hgroup>

if(<condition>) {
        ## do something
} else {
        ## do something else
}
if(<condition1>) {
        ## do something
} else if(<condition2>)  {
        ## do something different
} else {
        ## do something different
}

</slide>

      <slide class="" id="slide-3" style="background:;">
  <hgroup>

if

  </hgroup>

This is a valid if/else structure.

if(x > 3) {
        y <- 10
} else {
        y <- 0
}

So is this one.

y <- if(x > 3) {
        10
} else {
        0
}

</slide>

      <slide class="" id="slide-4" style="background:;">
  <hgroup>

if

  </hgroup>

Of course, the else clause is not necessary.

if(<condition1>) {

}

if(<condition2>) {

}

</slide>

      <slide class="" id="slide-5" style="background:;">
  <hgroup>

for

  </hgroup>

for loops take an interator variable and assign it successive values from a sequence or vector. For loops are most commonly used for iterating over the elements of an object (list, vector, etc.)

for(i in 1:10) {
        print(i)
}

This loop takes the i variable and in each iteration of the loop gives it values 1, 2, 3, ..., 10, and then exits.

</slide>

      <slide class="" id="slide-6" style="background:;">
  <hgroup>

for

  </hgroup>

These three loops have the same behavior.

x <- c("a", "b", "c", "d")

for(i in 1:4) {
        print(x[i])
}

for(i in seq_along(x)) {
        print(x[i])
}

for(letter in x) {
        print(letter)
}

for(i in 1:4) print(x[i])

</slide>

      <slide class="" id="slide-7" style="background:;">
  <hgroup>

Nested for loops

  </hgroup>

for loops can be nested.

x <- matrix(1:6, 2, 3)

for(i in seq_len(nrow(x))) {
        for(j in seq_len(ncol(x))) {
                print(x[i, j])
        }
}

Be careful with nesting though. Nesting beyond 2–3 levels is often very difficult to read/understand.

</slide>

      <slide class="" id="slide-8" style="background:;">
  <hgroup>

while

  </hgroup>

While loops begin by testing a condition. If it is true, then they execute the loop body. Once the loop body is executed, the condition is tested again, and so forth.

count <- 0
while(count < 10) {
        print(count)
        count <- count + 1
}

While loops can potentially result in infinite loops if not written properly. Use with care!

</slide>

      <slide class="" id="slide-9" style="background:;">
  <hgroup>

while

  </hgroup>

Sometimes there will be more than one condition in the test.

z <- 5

while(z >= 3 && z <= 10) {
        print(z)
        coin <- rbinom(1, 1, 0.5)

        if(coin == 1) {  ## random walk
                z <- z + 1
        } else {
                z <- z - 1
        }
}

Conditions are always evaluated from left to right.

</slide>

      <slide class="" id="slide-10" style="background:;">
  <hgroup>

repeat

  </hgroup>

Repeat initiates an infinite loop; these are not commonly used in statistical applications but they do have their uses. The only way to exit a repeat loop is to call break.

x0 <- 1
tol <- 1e-8

repeat {
        x1 <- computeEstimate()

        if(abs(x1 - x0) < tol) {
                break
        } else {
                x0 <- x1
        }
}

</slide>

      <slide class="" id="slide-11" style="background:;">
  <hgroup>

repeat

  </hgroup>

The loop in the previous slide is a bit dangerous because there's no guarantee it will stop. Better to set a hard limit on the number of iterations (e.g. using a for loop) and then report whether convergence was achieved or not.

</slide>

      <slide class="" id="slide-12" style="background:;">
  <hgroup>

next, return

  </hgroup>

next is used to skip an iteration of a loop

for(i in 1:100) {
        if(i <= 20) {
                ## Skip the first 20 iterations
                next
        }
        ## Do something here
}

return signals that a function should exit and return a given value

</slide>

      <slide class="" id="slide-13" style="background:;">
  <hgroup>

Control Structures

  </hgroup>

Summary

Control structures like if, while, and for allow you to control the flow of an R program

Infinite loops should generally be avoided, even if they are theoretically correct.

Control structures mentiond here are primarily useful for writing programs; for command-line interactive work, the *apply functions are more useful.

</slide>

    <slide class="backdrop"></slide>
  </slides>


text:
package org.apache.spark.sql.catalyst.expressions

import org.apache.spark.sql.catalyst.expressions.Cast.{forceNullable, resolvableNullability}
import org.apache.spark.sql.catalyst.expressions.codegen._
import org.apache.spark.sql.catalyst.expressions.codegen.Block._
import org.apache.spark.sql.types.{ArrayType, DataType, MapType, StructType}

/**
 * A special version of [[AnsiCast]]. It performs the same operation (i.e. converts a value of
 * one data type into another data type), but returns a NULL value instead of raising an error
 * when the conversion can not be performed.
 *
 * When cast from/to timezone related types, we need timeZoneId, which will be resolved with
 * session local timezone by an analyzer [[ResolveTimeZone]].
 */
@ExpressionDescription(
  usage = """
    _FUNC_(expr AS type) - Casts the value `expr` to the target data type `type`.
      This expression is identical to CAST with configuration `spark.sql.ansi.enabled` as
      true, except it returns NULL instead of raising an error. Note that the behavior of this
      expression doesn't depend on configuration `spark.sql.ansi.enabled`.
  """,
  examples = """
    Examples:
      > SELECT _FUNC_('10' as int);
       10
      > SELECT _FUNC_(1234567890123L as int);
       null
  """,
  since = "3.2.0",
  group = "conversion_funcs")
case class TryCast(child: Expression, dataType: DataType, timeZoneId: Option[String] = None)
  extends CastBase {
  override def withTimeZone(timeZoneId: String): TimeZoneAwareExpression =
    copy(timeZoneId = Option(timeZoneId))

  // Here we force `ansiEnabled` as true so that we can reuse the evaluation code branches which
  // throw exceptions on conversion failures.
  override protected val ansiEnabled: Boolean = true

  override def nullable: Boolean = true

  // If the target data type is a complex type which can't have Null values, we should guarantee
  // that the casting between the element types won't produce Null results.
  override def canCast(from: DataType, to: DataType): Boolean = (from, to) match {
    case (ArrayType(fromType, fn), ArrayType(toType, tn)) =>
      canCast(fromType, toType) &&
        resolvableNullability(fn || forceNullable(fromType, toType), tn)

    case (MapType(fromKey, fromValue, fn), MapType(toKey, toValue, tn)) =>
      canCast(fromKey, toKey) &&
        (!forceNullable(fromKey, toKey)) &&
        canCast(fromValue, toValue) &&
        resolvableNullability(fn || forceNullable(fromValue, toValue), tn)

    case (StructType(fromFields), StructType(toFields)) =>
      fromFields.length == toFields.length &&
        fromFields.zip(toFields).forall {
          case (fromField, toField) =>
            canCast(fromField.dataType, toField.dataType) &&
              resolvableNullability(
                fromField.nullable || forceNullable(fromField.dataType, toField.dataType),
                toField.nullable)
        }

    case _ =>
      AnsiCast.canCast(from, to)
  }

  override def cast(from: DataType, to: DataType): Any => Any = (input: Any) =>
    try {
      super.cast(from, to)(input)
    } catch {
      case _: Exception =>
        null
    }

  override def castCode(ctx: CodegenContext, input: ExprValue, inputIsNull: ExprValue,
    result: ExprValue, resultIsNull: ExprValue, resultType: DataType, cast: CastFunction): Block = {
    val javaType = JavaCode.javaType(resultType)
    code"""
      boolean $resultIsNull = $inputIsNull;
      $javaType $result = ${CodeGenerator.defaultValue(resultType)};
      if (!$inputIsNull) {
        try {
          ${cast(input, result, resultIsNull)}
        } catch (Exception e) {
          $resultIsNull = true;
        }
      }
    """
  }

  override def typeCheckFailureMessage: String =
    AnsiCast.typeCheckFailureMessage(child.dataType, dataType, None, None)

  override protected def withNewChildInternal(newChild: Expression): TryCast =
    copy(child = newChild)

  override def toString: String = {
    s"try_cast($child as ${dataType.simpleString})"
  }

  override def sql: String = s"TRY_CAST(${child.sql} AS ${dataType.sql})"
}

redpajama_set_name: RedPajamaGithub


text:
package gov.sequarius.dockercenter.center.service;

import gov.sequarius.dockercenter.center.domain.JobConfig;
import gov.sequarius.dockercenter.common.rpc.CommonResultDTO;
import gov.sequarius.dockercenter.common.rpc.JobDTO;

import java.util.List;

/**
 * Created by Sequarius on 2017/4/7.
 */
public interface JobService {
    CommonResultDTO createJob(String jobName);
    JobConfig getJob(String jobName);
    List<JobConfig> getJobs();

    JobDTO convertJobConfig(JobConfig jobConfig);

    JobDTO getJobStatus(String jobName);

    CommonResultDTO startJob(String jobName);

    CommonResultDTO stopJob(String jobName);
}


text:
/**
 *
 */
package com.android.aid;

import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnKeyListener;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.GridView;
import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;

/**
 * @author wangpeifeng
 *
 */
public class AppManagerMy extends Activity {

	private static final String TAG = "AppManagerMy";

	private static final int HANDLER_MSG_WHAT_PROGRESS = 1;

	AppInfoData appInfoData;

	private String name;
	private ImageButton imageButtonBack;

	private ArrayList<AppInfoData> listApps;

	private Context context;
	private DataProxy dataproxy;

	private GridView gridView;
	private GridAdapterIcon gridAdapter;

	private boolean newVersion = false;

	/* (non-Javadoc)
	 * @see android.app.Activity#onCreate(android.os.Bundle)
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		Intent intent = getIntent();
		name = intent.getStringExtra(Data.APP_REQUEST);

		context = this;
		dataproxy = new DataProxy(context);

		setTheme(R.style.Transparent);
		setContentView(R.layout.appmanager);

		refreshMyView();

		super.onCreate(savedInstanceState);

	}

	private void refreshMyView(){

		appInfoData = new AppInfoData(context);
		listApps = new ArrayList<AppInfoData>();
		if(dataproxy.newVersionReady(appInfoData)){
			newVersion = true;
			appInfoData.setLabel(getResources().getString(R.string.app_name));
			appInfoData.setLabel(Data.DB_VALUE_VERSION_UPDATE);
			appInfoData.setLocation(Data.DB_VALUE_LOCATION_DOWNLOADED);
			appInfoData.setPackage(Data.DB_VALUE_PACKAGE_ANDROIDAID+".apk");

			FileProxy.setApkFileIcon(context, appInfoData.getPath(),appInfoData);
			listApps.add(appInfoData);
//			Toast.makeText(context,
					//getResources().getString(R.string.app_name)+
//					Data.TOAST_NEW_VERSOIN_READY, Toast.LENGTH_LONG).show();

		}

		appInfoData = new AppInfoData(context);
		appInfoData.setLabel(Data.APP_ADD_MY);
		appInfoData.setLocation(Data.DB_VALUE_LOCATION_INTERNAL);
		appInfoData.setIcon(context.getResources().getDrawable(R.drawable.menu_icon_about));
		listApps.add(appInfoData);

		appInfoData = new AppInfoData(context);
		appInfoData.setLabel(Data.APP_DOWNLOADING);
		appInfoData.setLocation(Data.DB_VALUE_LOCATION_INTERNAL);
		appInfoData.setIcon(context.getResources().getDrawable(R.drawable.menu_icon_download));
		listApps.add(appInfoData);

		appInfoData = new AppInfoData(context);
		appInfoData.setLabel(Data.APP_SYNCHRONIZATION);
		appInfoData.setLocation(Data.DB_VALUE_LOCATION_INTERNAL);
		appInfoData.setIcon(context.getResources().getDrawable(R.drawable.menu_icon_refresh_lib));
		listApps.add(appInfoData);

/*
		//test tools
		appInfoData = new AppInfoData(context);
		appInfoData.setLabel(Data.APP_DATABASE);
		appInfoData.setLocation(Data.DB_VALUE_LOCATION_INTERNAL);
		appInfoData.setIcon(context.getResources().getDrawable(R.drawable.download_mgr));
		listApps.add(appInfoData);
*/

		listApps = dataproxy.queryAppMy(listApps,Data.DB_VALUE_CATEGORY_MY);

		gridView = (GridView)findViewById(R.id.gridView);

		gridAdapter = new GridAdapterIcon(this,listApps);

		gridView.setAdapter(gridAdapter);

		gridView.setOnItemClickListener(listenerGrid);

		TextView tvName = (TextView)findViewById(R.id.textViewName);
		tvName.setText(name);

		imageButtonBack = (ImageButton)findViewById(R.id.imageButtonBack);
		imageButtonBack.setOnClickListener(listenerButton);

	}

	/* (non-Javadoc)
	 * @see android.app.Activity#onActivityResult(int, int, android.content.Intent)
	 */
	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		// TODO Auto-generated method stub
		super.onActivityResult(requestCode, resultCode, data);
		refreshMyView();
	}

	/* (non-Javadoc)
	 * @see android.app.Activity#onDestroy()
	 */
	@Override
	protected void onDestroy() {
		// TODO Auto-generated method stub
		this.setResult(0);
		super.onDestroy();
	}

	/* (non-Javadoc)
	 * @see android.app.Activity#onKeyDown(int, android.view.KeyEvent)
	 */
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		// TODO Auto-generated method stub
		switch(keyCode){
		case KeyEvent.KEYCODE_BACK:
			finish();
			return true;

		}
		return super.onKeyDown(keyCode, event);
	}

	private OnClickListener listenerButton = new OnClickListener(){

		public void onClick(View v) {
			// TODO Auto-generated method stub
			switch(v.getId()){
			case R.id.imageButtonBack:
				finish();
				break;

			}
		}

	};

	private OnItemClickListener listenerGrid = new OnItemClickListener(){

		public void onItemClick(AdapterView<?> parent, View view, int position,
				long id) {
			// TODO Auto-generated method stub
			String label = listApps.get(position).getLabel();

			if(Data.APP_ADD_MY.equals(label)){
				Intent intent =new Intent(context,AppManagerAddMy.class);
				startActivityForResult(intent,0);

			}
			else if (Data.APP_DOWNLOADING.equals(label)){
				Intent intent =new Intent(context,AppManagerDownloading.class);
				startActivityForResult(intent,0);

			}
			else if (Data.APP_SYNCHRONIZATION.equals(label)){

				Intent intent =new Intent(context,AppManagerSynchronize.class);
				startActivityForResult(intent,0);

/*
				Intent startIntent = new Intent();
				Log.i(TAG, "start AndroidAidService");
				startIntent.setClass(context, AndroidAidService.class);

				startIntent.putExtra(Data.SERVICE_REQUEST_APP_CLOUD, true);
				startIntent.putExtra(Data.SERVICE_REQUEST_APP_DOWNLOADED, true);
				startIntent.putExtra(Data.SERVICE_REQUEST_APP_INSTALLED, true);
				startIntent.putExtra(Data.SERVICE_REQUEST_APP_DOWNLOADING, true);
				startIntent.putExtra(Data.SERVICE_REQUEST_DOWNLOAD_REPORTER, true);
				context.startService(startIntent);
				Toast.makeText(context, Data.TOAST_SYNC_SERVICRE_START, Toast.LENGTH_LONG).show();
*/
			}
			else if(Data.APP_DATABASE.equals(label)){
				Intent intent =new Intent(context,AppManagerTools.class);
				startActivityForResult(intent,0);

			}
			else if(Data.DB_VALUE_VERSION_UPDATE.equals(label)){

				AppInfoData appInfoData = listApps.get(position);
				Intent startIntent = new Intent();

				startIntent.setAction(android.content.Intent.ACTION_VIEW);

				startIntent.setDataAndType(Uri.fromFile(new File(appInfoData.getPath())),
		                "application/vnd.android.package-archive");
		        startActivityForResult(startIntent,0);
		        //finish();

			}
			else{

				AppInfoData appInfoData = listApps.get(position);
				Intent startIntent = new Intent();

				if(Data.DB_VALUE_LOCATION_INSTALLED.equals(appInfoData.getLocation())){
					startIntent = getPackageManager().getLaunchIntentForPackage(
			                appInfoData.getPackage());
					startActivityForResult(startIntent,0);
					finish();

				}

			}

		}

    };

}


text:
trait Bippy[@specialized(
  scala.Char, scala.Boolean, scala.Byte,
  scala.Short, scala.Int, scala.Long,
  scala.Float, scala.Double, scala.Unit,
  scala.AnyRef) T] { }

trait Bippy2[@specialized(Char, Boolean, Byte, Short, Int, Long, Float, Double, Unit, AnyRef) T] { }


text:
package org.apache.tajo.engine.function.datetime;

import org.apache.tajo.catalog.Column;
import org.apache.tajo.common.TajoDataTypes;
import org.apache.tajo.datum.Datum;
import org.apache.tajo.datum.DatumFactory;
import org.apache.tajo.datum.NullDatum;
import org.apache.tajo.datum.TimestampDatum;
import org.apache.tajo.engine.eval.FunctionEval;
import org.apache.tajo.engine.function.GeneralFunction;
import org.apache.tajo.engine.function.annotation.Description;
import org.apache.tajo.engine.function.annotation.ParamTypes;
import org.apache.tajo.storage.Tuple;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

import static org.apache.tajo.common.TajoDataTypes.Type.INT8;
import static org.apache.tajo.common.TajoDataTypes.Type.TEXT;

@Description(
  functionName = "to_char",
  description = "Convert time stamp to string",
  example = "> SELECT to_char(1389071652, 'yyyy-MM');\n"
          + "2014-01",
  returnType = TajoDataTypes.Type.TEXT,
  paramTypes = {@ParamTypes(paramTypes = {TajoDataTypes.Type.TIMESTAMP, TajoDataTypes.Type.TEXT})}
)
public class ToCharTimestamp extends GeneralFunction {
  private boolean constantFormat;
  private DateTimeFormatter formatter;

  public ToCharTimestamp() {
    super(new Column[] {
        new Column("timestamp", INT8),
        new Column("format", TEXT)
    });
  }

  @Override
  public void init(FunctionEval.ParamType[] paramTypes) {
    if (paramTypes[1] == FunctionEval.ParamType.CONSTANT) {
      constantFormat = true;
    }
  }

  @Override
  public Datum eval(Tuple params) {
    if(params.isNull(0) || params.isNull(1)) {
      return NullDatum.get();
    }

    TimestampDatum valueDatum = (TimestampDatum) params.get(0);
    Datum pattern = params.get(1);

    if (formatter == null || !constantFormat) {
      formatter = DateTimeFormat.forPattern(pattern.asChars());
    }
    return DatumFactory.createText(valueDatum.toChars(formatter));
  }
}


text:
"""CSS selector structure items."""
from __future__ import annotations
import copyreg
from .pretty import pretty
from typing import Any, Iterator, Hashable, Optional, Pattern, Iterable, Mapping

__all__ = (
    'Selector',
    'SelectorNull',
    'SelectorTag',
    'SelectorAttribute',
    'SelectorContains',
    'SelectorNth',
    'SelectorLang',
    'SelectorList',
    'Namespaces',
    'CustomSelectors'
)

SEL_EMPTY = 0x1
SEL_ROOT = 0x2
SEL_DEFAULT = 0x4
SEL_INDETERMINATE = 0x8
SEL_SCOPE = 0x10
SEL_DIR_LTR = 0x20
SEL_DIR_RTL = 0x40
SEL_IN_RANGE = 0x80
SEL_OUT_OF_RANGE = 0x100
SEL_DEFINED = 0x200
SEL_PLACEHOLDER_SHOWN = 0x400

class Immutable:
    """Immutable."""

    __slots__: tuple[str, ...] = ('_hash',)

    _hash: int

    def __init__(self, **kwargs: Any) -> None:
        """Initialize."""

        temp = []
        for k, v in kwargs.items():
            temp.append(type(v))
            temp.append(v)
            super(Immutable, self).__setattr__(k, v)
        super(Immutable, self).__setattr__('_hash', hash(tuple(temp)))

    @classmethod
    def __base__(cls) -> "type[Immutable]":
        """Get base class."""

        return cls

    def __eq__(self, other: Any) -> bool:
        """Equal."""

        return (
            isinstance(other, self.__base__()) and
            all([getattr(other, key) == getattr(self, key) for key in self.__slots__ if key != '_hash'])
        )

    def __ne__(self, other: Any) -> bool:
        """Equal."""

        return (
            not isinstance(other, self.__base__()) or
            any([getattr(other, key) != getattr(self, key) for key in self.__slots__ if key != '_hash'])
        )

    def __hash__(self) -> int:
        """Hash."""

        return self._hash

    def __setattr__(self, name: str, value: Any) -> None:
        """Prevent mutability."""

        raise AttributeError("'{}' is immutable".format(self.__class__.__name__))

    def __repr__(self) -> str:  # pragma: no cover
        """Representation."""

        return "{}({})".format(
            self.__class__.__name__, ', '.join(["{}={!r}".format(k, getattr(self, k)) for k in self.__slots__[:-1]])
        )

    __str__ = __repr__

    def pretty(self) -> None:  # pragma: no cover
        """Pretty print."""

        print(pretty(self))

class ImmutableDict(Mapping[Any, Any]):
    """Hashable, immutable dictionary."""

    def __init__(
        self,
        arg: dict[Any, Any] | Iterable[tuple[Any, Any]]
    ) -> None:
        """Initialize."""

        self._validate(arg)
        self._d = dict(arg)
        self._hash = hash(tuple([(type(x), x, type(y), y) for x, y in sorted(self._d.items())]))

    def _validate(self, arg: dict[Any, Any] | Iterable[tuple[Any, Any]]) -> None:
        """Validate arguments."""

        if isinstance(arg, dict):
            if not all([isinstance(v, Hashable) for v in arg.values()]):
                raise TypeError('{} values must be hashable'.format(self.__class__.__name__))
        elif not all([isinstance(k, Hashable) and isinstance(v, Hashable) for k, v in arg]):
            raise TypeError('{} values must be hashable'.format(self.__class__.__name__))

    def __iter__(self) -> Iterator[Any]:
        """Iterator."""

        return iter(self._d)

    def __len__(self) -> int:
        """Length."""

        return len(self._d)

    def __getitem__(self, key: Any) -> Any:
        """Get item: `namespace['key']`."""

        return self._d[key]

    def __hash__(self) -> int:
        """Hash."""

        return self._hash

    def __repr__(self) -> str:  # pragma: no cover
        """Representation."""

        return "{!r}".format(self._d)

    __str__ = __repr__

class Namespaces(ImmutableDict):
    """Namespaces."""

    def __init__(self, arg: dict[str, str] | Iterable[tuple[str, str]]) -> None:
        """Initialize."""

        super().__init__(arg)

    def _validate(self, arg: dict[str, str] | Iterable[tuple[str, str]]) -> None:
        """Validate arguments."""

        if isinstance(arg, dict):
            if not all([isinstance(v, str) for v in arg.values()]):
                raise TypeError('{} values must be hashable'.format(self.__class__.__name__))
        elif not all([isinstance(k, str) and isinstance(v, str) for k, v in arg]):
            raise TypeError('{} keys and values must be Unicode strings'.format(self.__class__.__name__))

class CustomSelectors(ImmutableDict):
    """Custom selectors."""

    def __init__(self, arg: dict[str, str] | Iterable[tuple[str, str]]) -> None:
        """Initialize."""

        super().__init__(arg)

    def _validate(self, arg: dict[str, str] | Iterable[tuple[str, str]]) -> None:
        """Validate arguments."""

        if isinstance(arg, dict):
            if not all([isinstance(v, str) for v in arg.values()]):
                raise TypeError('{} values must be hashable'.format(self.__class__.__name__))
        elif not all([isinstance(k, str) and isinstance(v, str) for k, v in arg]):
            raise TypeError('{} keys and values must be Unicode strings'.format(self.__class__.__name__))

class Selector(Immutable):
    """Selector."""

    __slots__ = (
        'tag', 'ids', 'classes', 'attributes', 'nth', 'selectors',
        'relation', 'rel_type', 'contains', 'lang', 'flags', '_hash'
    )

    tag: Optional[SelectorTag]
    ids: tuple[str, ...]
    classes: tuple[str, ...]
    attributes: tuple[SelectorAttribute, ...]
    nth: tuple[SelectorNth, ...]
    selectors: tuple[SelectorList, ...]
    relation: SelectorList
    rel_type: Optional[str]
    contains: tuple[SelectorContains, ...]
    lang: tuple[SelectorLang, ...]
    flags: int

    def __init__(
        self,
        tag: Optional[SelectorTag],
        ids: tuple[str, ...],
        classes: tuple[str, ...],
        attributes: tuple[SelectorAttribute, ...],
        nth: tuple[SelectorNth, ...],
        selectors: tuple[SelectorList, ...],
        relation: SelectorList,
        rel_type: Optional[str],
        contains: tuple[SelectorContains, ...],
        lang: tuple[SelectorLang, ...],
        flags: int
    ):
        """Initialize."""

        super().__init__(
            tag=tag,
            ids=ids,
            classes=classes,
            attributes=attributes,
            nth=nth,
            selectors=selectors,
            relation=relation,
            rel_type=rel_type,
            contains=contains,
            lang=lang,
            flags=flags
        )

class SelectorNull(Immutable):
    """Null Selector."""

    def __init__(self) -> None:
        """Initialize."""

        super().__init__()

class SelectorTag(Immutable):
    """Selector tag."""

    __slots__ = ("name", "prefix", "_hash")

    name: str
    prefix: Optional[str]

    def __init__(self, name: str, prefix: Optional[str]) -> None:
        """Initialize."""

        super().__init__(name=name, prefix=prefix)

class SelectorAttribute(Immutable):
    """Selector attribute rule."""

    __slots__ = ("attribute", "prefix", "pattern", "xml_type_pattern", "_hash")

    attribute: str
    prefix: str
    pattern: Optional[Pattern[str]]
    xml_type_pattern: Optional[Pattern[str]]

    def __init__(
        self,
        attribute: str,
        prefix: str,
        pattern: Optional[Pattern[str]],
        xml_type_pattern: Optional[Pattern[str]]
    ) -> None:
        """Initialize."""

        super().__init__(
            attribute=attribute,
            prefix=prefix,
            pattern=pattern,
            xml_type_pattern=xml_type_pattern
        )

class SelectorContains(Immutable):
    """Selector contains rule."""

    __slots__ = ("text", "own", "_hash")

    text: tuple[str, ...]
    own: bool

    def __init__(self, text: Iterable[str], own: bool) -> None:
        """Initialize."""

        super().__init__(text=tuple(text), own=own)

class SelectorNth(Immutable):
    """Selector nth type."""

    __slots__ = ("a", "n", "b", "of_type", "last", "selectors", "_hash")

    a: int
    n: bool
    b: int
    of_type: bool
    last: bool
    selectors: SelectorList

    def __init__(self, a: int, n: bool, b: int, of_type: bool, last: bool, selectors: SelectorList) -> None:
        """Initialize."""

        super().__init__(
            a=a,
            n=n,
            b=b,
            of_type=of_type,
            last=last,
            selectors=selectors
        )

class SelectorLang(Immutable):
    """Selector language rules."""

    __slots__ = ("languages", "_hash",)

    languages: tuple[str, ...]

    def __init__(self, languages: Iterable[str]):
        """Initialize."""

        super().__init__(languages=tuple(languages))

    def __iter__(self) -> Iterator[str]:
        """Iterator."""

        return iter(self.languages)

    def __len__(self) -> int:  # pragma: no cover
        """Length."""

        return len(self.languages)

    def __getitem__(self, index: int) -> str:  # pragma: no cover
        """Get item."""

        return self.languages[index]

class SelectorList(Immutable):
    """Selector list."""

    __slots__ = ("selectors", "is_not", "is_html", "_hash")

    selectors: tuple[Selector | SelectorNull, ...]
    is_not: bool
    is_html: bool

    def __init__(
        self,
        selectors: Optional[Iterable[Selector | SelectorNull]] = None,
        is_not: bool = False,
        is_html: bool = False
    ) -> None:
        """Initialize."""

        super().__init__(
            selectors=tuple(selectors) if selectors is not None else tuple(),
            is_not=is_not,
            is_html=is_html
        )

    def __iter__(self) -> Iterator[Selector | SelectorNull]:
        """Iterator."""

        return iter(self.selectors)

    def __len__(self) -> int:
        """Length."""

        return len(self.selectors)

    def __getitem__(self, index: int) -> Selector | SelectorNull:
        """Get item."""

        return self.selectors[index]

def _pickle(p: Any) -> Any:
    return p.__base__(), tuple([getattr(p, s) for s in p.__slots__[:-1]])

def pickle_register(obj: Any) -> None:
    """Allow object to be pickled."""

    copyreg.pickle(obj, _pickle)

pickle_register(Selector)
pickle_register(SelectorNull)
pickle_register(SelectorTag)
pickle_register(SelectorAttribute)
pickle_register(SelectorContains)
pickle_register(SelectorNth)
pickle_register(SelectorLang)
pickle_register(SelectorList)


text:
You can view the application records of a parameter template.

## Procedure

1.  Log in to the management console.
2.  Click  ![](figures/region.png)  in the upper left corner and select a region and a project.
3.  Click  **Service List**. Under  **Database**, click  **Relational Database Service**  to go to the RDS console. The RDS console is displayed.
4.  After a parameter template is applied successfully, choose  **Parameter Template Management**  in the navigation pane on the left, locate the target parameter template, and choose  **More**  \>  **View Application Record**  on the  **Default Templates**  or  **Custom Templates**  page.

    You can view the name or ID of the DB instance to which the parameter template applies, as well as the application status, application time, and failure cause.


text:
/**
 */
package gluemodel.CIM.IEC61968.PaymentMetering.util;

import gluemodel.CIM.Element;

import gluemodel.CIM.IEC61968.Common.Agreement;
import gluemodel.CIM.IEC61968.Common.Document;
import gluemodel.CIM.IEC61968.Common.Organisation;

import gluemodel.CIM.IEC61968.PaymentMetering.*;

import gluemodel.CIM.IEC61970.Core.IdentifiedObject;

import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;

import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;

import org.eclipse.emf.ecore.EObject;

/**
 *
 * The Adapter Factory for the model.
 * It provides an adapter createXXX method for each class of the model.
 *
 * @see gluemodel.CIM.IEC61968.PaymentMetering.PaymentMeteringPackage
 * @generated
 */
public class PaymentMeteringAdapterFactory extends AdapterFactoryImpl {
	/**
	 * The cached model package.
	 *
	 *
	 * @generated
	 */
	protected static PaymentMeteringPackage modelPackage;

	/**
	 * Creates an instance of the adapter factory.
	 *
	 *
	 * @generated
	 */
	public PaymentMeteringAdapterFactory() {
		if (modelPackage == null) {
			modelPackage = PaymentMeteringPackage.eINSTANCE;
		}
	}

	/**
	 * Returns whether this factory is applicable for the type of the object.
	 *
	 * This implementation returns true if the object is either the model's package or is an instance object of the model.
	 *
	 * @return whether this factory is applicable for the type of the object.
	 * @generated
	 */
	@Override
	public boolean isFactoryForType(Object object) {
		if (object == modelPackage) {
			return true;
		}
		if (object instanceof EObject) {
			return ((EObject)object).eClass().getEPackage() == modelPackage;
		}
		return false;
	}

	/**
	 * The switch that delegates to the createXXX methods.
	 *
	 *
	 * @generated
	 */
	protected PaymentMeteringSwitch<Adapter> modelSwitch =
		new PaymentMeteringSwitch<Adapter>() {
			@Override
			public Adapter caseCashier(Cashier object) {
				return createCashierAdapter();
			}
			@Override
			public Adapter caseTransactor(Transactor object) {
				return createTransactorAdapter();
			}
			@Override
			public Adapter caseTariffProfile(TariffProfile object) {
				return createTariffProfileAdapter();
			}
			@Override
			public Adapter caseMerchantAgreement(MerchantAgreement object) {
				return createMerchantAgreementAdapter();
			}
			@Override
			public Adapter caseVendorShift(VendorShift object) {
				return createVendorShiftAdapter();
			}
			@Override
			public Adapter caseTransaction(Transaction object) {
				return createTransactionAdapter();
			}
			@Override
			public Adapter caseCheque(Cheque object) {
				return createChequeAdapter();
			}
			@Override
			public Adapter caseAuxiliaryAgreement(AuxiliaryAgreement object) {
				return createAuxiliaryAgreementAdapter();
			}
			@Override
			public Adapter caseShift(Shift object) {
				return createShiftAdapter();
			}
			@Override
			public Adapter caseConsumptionTariffInterval(ConsumptionTariffInterval object) {
				return createConsumptionTariffIntervalAdapter();
			}
			@Override
			public Adapter caseReceipt(Receipt object) {
				return createReceiptAdapter();
			}
			@Override
			public Adapter caseDue(Due object) {
				return createDueAdapter();
			}
			@Override
			public Adapter caseBankAccountDetail(BankAccountDetail object) {
				return createBankAccountDetailAdapter();
			}
			@Override
			public Adapter caseLineDetail(LineDetail object) {
				return createLineDetailAdapter();
			}
			@Override
			public Adapter caseServiceSupplier(ServiceSupplier object) {
				return createServiceSupplierAdapter();
			}
			@Override
			public Adapter caseAccountMovement(AccountMovement object) {
				return createAccountMovementAdapter();
			}
			@Override
			public Adapter casePointOfSale(PointOfSale object) {
				return createPointOfSaleAdapter();
			}
			@Override
			public Adapter caseAuxiliaryAccount(AuxiliaryAccount object) {
				return createAuxiliaryAccountAdapter();
			}
			@Override
			public Adapter caseCharge(Charge object) {
				return createChargeAdapter();
			}
			@Override
			public Adapter caseAccountingUnit(AccountingUnit object) {
				return createAccountingUnitAdapter();
			}
			@Override
			public Adapter caseTimeTariffInterval(TimeTariffInterval object) {
				return createTimeTariffIntervalAdapter();
			}
			@Override
			public Adapter caseCashierShift(CashierShift object) {
				return createCashierShiftAdapter();
			}
			@Override
			public Adapter caseMerchantAccount(MerchantAccount object) {
				return createMerchantAccountAdapter();
			}
			@Override
			public Adapter caseTender(Tender object) {
				return createTenderAdapter();
			}
			@Override
			public Adapter caseVendor(Vendor object) {
				return createVendorAdapter();
			}
			@Override
			public Adapter caseCard(Card object) {
				return createCardAdapter();
			}
			@Override
			public Adapter caseElement(Element object) {
				return createElementAdapter();
			}
			@Override
			public Adapter caseIdentifiedObject(IdentifiedObject object) {
				return createIdentifiedObjectAdapter();
			}
			@Override
			public Adapter caseDocument(Document object) {
				return createDocumentAdapter();
			}
			@Override
			public Adapter caseAgreement(Agreement object) {
				return createAgreementAdapter();
			}
			@Override
			public Adapter caseOrganisation(Organisation object) {
				return createOrganisationAdapter();
			}
			@Override
			public Adapter defaultCase(EObject object) {
				return createEObjectAdapter();
			}
		};

	/**
	 * Creates an adapter for the target.
	 *
	 *
	 * @param target the object to adapt.
	 * @return the adapter for the target.
	 * @generated
	 */
	@Override
	public Adapter createAdapter(Notifier target) {
		return modelSwitch.doSwitch((EObject)target);
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.Cashier Cashier}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.Cashier
	 * @generated
	 */
	public Adapter createCashierAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.Transactor Transactor}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.Transactor
	 * @generated
	 */
	public Adapter createTransactorAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.TariffProfile Tariff Profile}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.TariffProfile
	 * @generated
	 */
	public Adapter createTariffProfileAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.MerchantAgreement Merchant Agreement}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.MerchantAgreement
	 * @generated
	 */
	public Adapter createMerchantAgreementAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.VendorShift Vendor Shift}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.VendorShift
	 * @generated
	 */
	public Adapter createVendorShiftAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.Transaction Transaction}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.Transaction
	 * @generated
	 */
	public Adapter createTransactionAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.Cheque Cheque}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.Cheque
	 * @generated
	 */
	public Adapter createChequeAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.AuxiliaryAgreement Auxiliary Agreement}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.AuxiliaryAgreement
	 * @generated
	 */
	public Adapter createAuxiliaryAgreementAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.Shift Shift}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.Shift
	 * @generated
	 */
	public Adapter createShiftAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.ConsumptionTariffInterval Consumption Tariff Interval}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.ConsumptionTariffInterval
	 * @generated
	 */
	public Adapter createConsumptionTariffIntervalAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.Receipt Receipt}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.Receipt
	 * @generated
	 */
	public Adapter createReceiptAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.Due Due}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.Due
	 * @generated
	 */
	public Adapter createDueAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.BankAccountDetail Bank Account Detail}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.BankAccountDetail
	 * @generated
	 */
	public Adapter createBankAccountDetailAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.LineDetail Line Detail}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.LineDetail
	 * @generated
	 */
	public Adapter createLineDetailAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.ServiceSupplier Service Supplier}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.ServiceSupplier
	 * @generated
	 */
	public Adapter createServiceSupplierAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.AccountMovement Account Movement}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.AccountMovement
	 * @generated
	 */
	public Adapter createAccountMovementAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.PointOfSale Point Of Sale}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.PointOfSale
	 * @generated
	 */
	public Adapter createPointOfSaleAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.AuxiliaryAccount Auxiliary Account}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.AuxiliaryAccount
	 * @generated
	 */
	public Adapter createAuxiliaryAccountAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.Charge Charge}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.Charge
	 * @generated
	 */
	public Adapter createChargeAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.AccountingUnit Accounting Unit}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.AccountingUnit
	 * @generated
	 */
	public Adapter createAccountingUnitAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.TimeTariffInterval Time Tariff Interval}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.TimeTariffInterval
	 * @generated
	 */
	public Adapter createTimeTariffIntervalAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.CashierShift Cashier Shift}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.CashierShift
	 * @generated
	 */
	public Adapter createCashierShiftAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.MerchantAccount Merchant Account}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.MerchantAccount
	 * @generated
	 */
	public Adapter createMerchantAccountAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.Tender Tender}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.Tender
	 * @generated
	 */
	public Adapter createTenderAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.Vendor Vendor}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.Vendor
	 * @generated
	 */
	public Adapter createVendorAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.PaymentMetering.Card Card}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.PaymentMetering.Card
	 * @generated
	 */
	public Adapter createCardAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.Element Element}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.Element
	 * @generated
	 */
	public Adapter createElementAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61970.Core.IdentifiedObject Identified Object}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61970.Core.IdentifiedObject
	 * @generated
	 */
	public Adapter createIdentifiedObjectAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.Common.Document Document}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.Common.Document
	 * @generated
	 */
	public Adapter createDocumentAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.Common.Agreement Agreement}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.Common.Agreement
	 * @generated
	 */
	public Adapter createAgreementAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for an object of class '{@link gluemodel.CIM.IEC61968.Common.Organisation Organisation}'.
	 *
	 * This default implementation returns null so that we can easily ignore cases;
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
	 *
	 * @return the new adapter.
	 * @see gluemodel.CIM.IEC61968.Common.Organisation
	 * @generated
	 */
	public Adapter createOrganisationAdapter() {
		return null;
	}

	/**
	 * Creates a new adapter for the default case.
	 *
	 * This default implementation returns null.
	 *
	 * @return the new adapter.
	 * @generated
	 */
	public Adapter createEObjectAdapter() {
		return null;
	}

} //PaymentMeteringAdapterFactory


text:
from rest_framework import serializers

from realestate.listing.models import Listing

class ListingSerializer(serializers.Serializer):
    price = serializers.SerializerMethodField()
    currency = serializers.SerializerMethodField()
    images = serializers.SerializerMethodField()

    def get_images(self, listing):
        return listing.image_list

    def get_price(self, listing):
        return listing.price.amount

    def get_currency(self, listing):
        return listing.price.currency.code

    class Meta:
        model = Listing
        fields = ['id', 'title', 'description', 'absolute_url', 'price', 'currency', 'address', 'type', 'offer',
                  'active', 'baths', 'beds', 'size', 'coords', 'agent', 'created_at', 'last_modified', 'images', ]


text:
import {Part} from "./part";

export class Page {

    private _elements: Part[];
    private _totalCount: number;

    constructor(elements: Part[], totalCount: number) {
        this._elements = elements;
        this._totalCount = totalCount;
    }

    get elements(): Part[] {
        return this._elements;
    }

    set elements(value: Part[]) {
        this._elements = value;
    }

    get totalCount(): number {
        return this._totalCount;
    }

    set totalCount(value: number) {
        this._totalCount = value;
    }
}


text:
<?php
/**
 * Représente un paiement.
 * N'est pas utilisé directement
 *
 */
class HIPAY_MAPI_Payment extends HIPAY_MAPI_XML  {

	/**
	 * Paramètres du paiement
	 *
	 * @var HIPAY_MAPI_PaymentParams
	 */
	protected $paymentParams;

	/**
	 * Objets HIPAY_MAPI_Order
	 *
	 * @var array
	 */
	protected $order;

	/**
	 * Objets HIPAY_MAPI_Item
	 *
	 * @var array
	 */
	protected $items;

	/**
	 * Total des taxes sur les produits
	 *
	 * @var array
	 */
	protected $_taxItemsAmount;

	/**
	 * Total des taxes sur les frais d'envoi
	 *
	 * @var array
	 */
	protected $_taxShippingAmount;
	/**
	 * Total des taxes sur les assurances
	 *
	 * @var array
	 */
	protected $_taxInsuranceAmount;

	/**
	 * Total des taxes sur les coûts fixes
	 *
	 * @var array
	 */
	protected $_taxFixedCostAmount;

	/**
	 * Total du montant HT des produits
	 *
	 * @var array
	 */
	protected $_itemsTotalAmount;

	/**
	 * Total des taxes
	 *
	 * @var array
	 */
	public $_taxTotalAmount;

	/**
	 * Total de la commande hors taxes
	 *
	 * @var array
	 */
	protected $_orderTotalAmountHT;

	/**
	 * Total de la commande
	 *
	 * @var array
	 */
	protected $_orderTotalAmount;

	/**
	 * Total des affilies
	 *
	 * @var array
	 */
	protected $_affiliateTotalAmount;

	public function __construct($paymentParams, $order, $items) {
		try {
			$this->init($paymentParams, $order, $items);
		} catch(Exception $e) {
			throw new Exception($e->getMessage());
		}
	}

	protected function init($paymentParams, $order, $items) {
		if (!($paymentParams instanceof HIPAY_MAPI_PaymentParams)
		|| !HIPAY_MAPI_UTILS::is_an_array_of($order, 'HIPAY_MAPI_Order')
		|| !HIPAY_MAPI_UTILS::is_an_array_of($items, 'HIPAY_MAPI_Item')
		|| count($items) < 1)
			throw new Exception('Wrong parameters');

		try {
			$paymentParams->check();
		} catch (Exception $e) {
			throw new Exception($e->getMessage());
		}

		foreach($order as $orderObj) {
			try {
				$orderObj->check();
			} catch (Exception $e) {
				throw new Exception($e->getMessage());
			}
		}

		foreach($items as $obj) {
			try {
				$obj->check();
			} catch (Exception $e) {
				throw new Exception($e->getMessage());
			}
		}

		$this->paymentParams = clone $paymentParams;
		$this->paymentParams->lock();

		foreach($order as $obj) {
			$this->order[] = clone $obj;
			end($this->order)->lock();
			$this->_taxItemsAmount[] = 0;
			$this->_taxShippingAmount[] = 0;
			$this->_taxInsuranceAmount[] = 0;
			$this->_taxFixedCostAmount[] = 0;
			$this->_itemsTotalAmount[] = 0;
			$this->_taxTotalAmount[] = 0;
			$this->_orderTotalAmount[] = 0;
			$this->_affiliateTotalAmount[] = 0;
		}

		foreach($items as $obj) {
			$this->items[] = clone $obj;
			end($this->items)->lock();
		}

		try {
			$this->compute();
		} catch(Exception $e) {
			throw new Exception($e->getMessage());
		}
	}

	/**
	 * Calcul les différents montants (taxes, affiliés, totaux) de la commande
	 *
	 */
	protected function compute() {
		// Mise à jour du montant total des taxes pour chaque item du tableau _taxItemsAmount
		// Mise à jour du montant total des taxes de livraison pour chaque order du tableau _taxShippingAmount
		// Mise à jour du montant total des taxes d'assurances pour chaque order du tableau _taxInsuranceAmount
		// Mise à jour du montant total des taxes de couts fixes pour chaque order du tableau _taxFixedCostAmount
		$this->computeTaxes();
        // Mise a jour du montant total HT des produits pour chaque item du tableau _itemsTotalAmount
		$this->computeItemsAmount();
		// Pour chaque commande
		foreach($this->order as $key=>$order) {
			$this->_taxTotalAmount[$key] = $this->_taxItemsAmount[$key] + $this->_taxShippingAmount[$key] + $this->_taxInsuranceAmount[$key] + $this->_taxFixedCostAmount[$key];
			$this->_orderTotalAmountHT[$key] = $order->getShippingAmount() + $order->getInsuranceAmount() + $order->getFixedCostAmount() + $this->_itemsTotalAmount[$key];
			$this->_orderTotalAmount[$key] = $this->_orderTotalAmountHT[$key] + $this->_taxTotalAmount[$key];
//			$this->_orderTotalAmount[$key] = $order->getShippingAmount() + $order->getInsuranceAmount() + $order->getFixedCostAmount() + $this->_itemsTotalAmount[$key] +
//						$this->_taxItemsAmount[$key] +
//						$this->_taxShippingAmount[$key] +
//						$this->_taxInsuranceAmount[$key] +
//						$this->_taxFixedCostAmount[$key];
		}
		try {
			$this->computeAffiliates();
		} catch(Exception $e) {
			throw new Exception($e->getMessage());
		}
	}

	/**
	 * Calcul le montant des taxes
	 *
	 */
	protected function computeTaxes() {
		// Taxes sur les produits au niveau de l'item (ligne de commande)
		// @FIXME bug et confusion entre indice d'item et indice d'order ?
		$cur = 0;
		// pour chaque ligne de commande
		foreach($this->items as $item) {
			// Liste des taxes de la ligne
			$itemTaxes = $item->getTax();
			$tItemsAmount = 0;

			// pour chaque taxe appliquée sur cette ligne
			foreach($itemTaxes as $tax) {
				$amount = HIPAY_MAPI_UTILS::computeTax($item->getPrice(), $tax);
				$tax->setTaxAmount($amount);
				$tax->lock();
				// mise a jour du montant total des taxes pour cet item (ligne de commande)
				$tItemsAmount += $amount;
			}

			if (!isset($this->order[$cur]))
				$cur = 0;
			if (!isset($this->_taxItemsAmount[$cur]))
				$this->_taxItemsAmount[$cur] = 0;

			// mise a jour du montant total des taxes pour cette ligne de commande
			// avec prise en compte du nombre de produits dans l'indice numLigneCommande
			// du tableau _taxItemsAmount de cette commande
			$this->_taxItemsAmount[$cur] += ($tItemsAmount*$item->getQuantity());
			$item->lock();
			$cur++;
		}

		// Taxes sur frais d'envoi, assurances, coûts fixes
        // au niveau des commandes
		$cur = 0;
		foreach($this->order as $order) {
			// Taxes sur frais d'envoi
			$taxArr =& $order->getShippingTax();
			foreach($taxArr as $key=>$tax) {
				$amount = HIPAY_MAPI_UTILS::computeTax($order->getShippingAmount(), $tax);
				$taxArr[$key]->setTaxAmount($amount);
				$taxArr[$key]->lock();

				if (!isset($this->_taxShippingAmount[$cur]))
					$this->_taxShippingAmount[$cur] = 0;
				$this->_taxShippingAmount[$cur] += $amount;
			}

            // Taxes sur assurances
            $taxArr =& $order->getInsuranceTax();
			foreach($taxArr as $key=>$tax) {
				$amount = HIPAY_MAPI_UTILS::computeTax($order->getInsuranceAmount(), $tax);
				$taxArr[$key]->setTaxAmount($amount);
				$taxArr[$key]->lock();
				if (!isset($this->_taxInsuranceAmount[$cur]))
					$this->_taxInsuranceAmount[$cur] = 0;
				$this->_taxInsuranceAmount[$cur] += $amount;
			}

            // Taxes sur coûts fixes
			$taxArr =& $order->getFixedCostTax();
			foreach($taxArr as $key=>$tax) {
				$amount = HIPAY_MAPI_UTILS::computeTax($order->getFixedCostAmount(), $tax);
				$taxArr[$key]->setTaxAmount($amount);
				$taxArr[$key]->lock();
				if (!isset($this->_taxFixedCostAmount[$cur]))
					$this->_taxFixedCostAmount[$cur] = 0;
				$this->_taxFixedCostAmount[$cur] += $amount;
			}

			$cur++;
		}
	}

	/**
	 * Calcul le montant total HT des produits
	 *
	 */
	protected function computeItemsAmount() {
		$itemsAmount = 0;
		$cur = 0;
		foreach($this->items as $item) {
			$mt = sprintf("%.02f", $item->getPrice() * $item->getQuantity());

			if (!isset($this->order[$cur]))
				$cur = 0;
			if (!isset($this->_itemsTotalAmount[$cur]))
				$this->_itemsTotalAmount[$cur] = 0;
			$this->_itemsTotalAmount[$cur] += $mt;

			$cur++;
		}
	}

	/**
	 * Retourne le montant total des taxes
	 *
	 * @param array $tItemsAmount
	 * @param array $tShippingAmount
	 * @param array $tInsuranceAmount
	 * @param array $tFixedCostAmount
	 */
	public function getTotalTaxes(&$tItemsAmount, &$tShippingAmount, &$tInsuranceAmount, &$tFixedCostAmount) {
		$tItemsAmount = $this->getItemsTaxes();
		$tShippingAmount = $this->getShippingTaxes();
		$tInsuranceAmount = $this->getInsuranceTaxes();
		$tFixedCostAmount = $this->getFixedCostTaxes();
	}

	/**
	 * Retourne le montant des taxes sur les articles
	 *
	 * @return float
	 */
	public function getItemsTaxes() {
		return $this->_taxItemsAmount;
	}

	/**
	 * Retourne le montant des taxes sur les frais de port
	 *
	 * @return float
	 */
	public function getShippingTaxes() {
		return $this->_taxShippingAmount;
	}

	/**
	 * Retourne le montant des taxes sur les assurances
	 *
	 * @return float
	 */
	public function getInsuranceTaxes() {
		return $this->_taxInsuranceAmount;
	}

	/**
	 * Retourne le montant des taxes sur les couts fixes
	 *
	 * @return float
	 */
	public function getFixedCostTaxes() {
		return $this->_taxFixedCostAmount;
	}

	/**
	 * Retourne le montant total des produits
	 *
	 * @return array
	 */
	public function getItemsTotalAmount() {
		return $this->_itemsTotalAmount;
	}

	/**
	 * Retourne le montant total des taxes
	 *
	 * @return array
	 */
	public function getTaxesTotalAmount() {
		return $this->_taxTotalAmount;
	}

	/**
	 * Retourne le montant total hors taxes de la commande
	 *
	 * @return array
	 */
	public function getOrderTotalAmountHT() {
		return $this->_orderTotalAmountHT;
	}

	/**
	 * Retourne le montant total TTC de la commande
	 *
	 * @return array
	 */
	public function getOrderTotalAmount() {
		return $this->_orderTotalAmount;
	}

	/**
	 * Retourne le montant total des affiliés
	 *
	 * @return array
	 */
	public function getAffiliateTotalAmount() {
		return $this->_affiliateTotalAmount;
	}

	/**
	 * Retourne les objets order
	 *
	 * @return array
	 */
	public function getOrder() {
		return $this->order;
	}

	/**
	 * Retourne les objets items
	 *
	 * @return array
	 */
	public function getItems() {
		return $this->items;
	}

	/**
	 * Retourne l'objet paramètre
	 *
	 * @return HIPAY_MAPI_PaymentParams
	 */
	public function getPaymentParams() {
		return $this->paymentParams;
	}

	/**
	 * Calcul les montants à redistribuer aux affiliés
	 *
	 */
	protected function computeAffiliates() {
		foreach($this->order as $k=>$order) {
			$totalAmount = 0;
			$tAffiliate = $order->getAffiliate();
			foreach($tAffiliate as $key=>$affiliate) {
				$baseAmount = 0;
				$percentageTarget = $affiliate->getPercentageTarget();
				if ($percentageTarget > 0) {
					if ($percentageTarget & HIPAY_MAPI_TTARGET_ITEM)
						$baseAmount +=$this->_itemsTotalAmount[$k];
					if ($percentageTarget & HIPAY_MAPI_TTARGET_TAX)
						$baseAmount += $this->_taxItemsAmount[$k] + $this->_taxFixedCostAmount[$k] + $this->_taxInsuranceAmount[$k] + $this->_taxShippingAmount[$k];
					if ($percentageTarget& HIPAY_MAPI_TTARGET_INSURANCE)
						$baseAmount += $order->getInsuranceAmount();
					if ($percentageTarget & HIPAY_MAPI_TTARGET_FCOST)
						$baseAmount += $order->getFixedCostAmount();
					if ($percentageTarget & HIPAY_MAPI_TTARGET_SHIPPING)
						$baseAmount += $order->getShippingAmount();

					$tAffiliate[$key]->setBaseAmount($baseAmount);
				} else {
					$baseAmount = $affiliate->getValue();
					$tAffiliate[$key]->setBaseAmount($baseAmount);
				}

				$totalAmount += $tAffiliate[$key]->getAmount();
				$tAffiliate[$key]->lock();
			}

			$this->_affiliateTotalAmount[$k] = $totalAmount;
			if ($totalAmount > $this->_orderTotalAmount[$k]) {
				throw new Exception('The total amount to distribute is greather than the transaction amount ('.$totalAmount.'/'.$this->_orderTotalAmount.')');
			}
		}
	}
}


text:
title: Makeover shoot Libelle.be
author: Filip Bunkens
type: post
date: 2011-02-22
url: /blog/20110222_libelle_makeover
categories:
  - Clients
  - Photography
  - Portrait
tags:
  - client
  - portfolio
  - potrait
format: gallery
---

I already saw photos of makeovers for several woman's magazines, but until now I got never asked to shoot one. So I was quite happy when Karen from Libelle contacted me to shoot a makeover session for S. Oliver in the store of S. Oliver Antwerp.

Everything had to be done pretty fast, because we only had 4 hours for choosing, styling, make-up and shooting of a whole family. So we stayed in and around the shop. Luckily S. Oliver stores are quite nice and the Meir in Antwerp is definitely a great background for photos, so I didn't need too much setup to have a nice family shoot.

Some more of the results, to check out the whole set go to Flickr


text:
cat sr4chargen.sql sr4views.sql sr4data.sql sr4test.sql | sqlite3 sr4.sqlite3;
sqlite3 sr4.sqlite3;


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Oligandra chrysocoma Wedd.

### Remarks
null


text:
<!DOCTYPE html>

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

    <link rel="shortcut icon" href="favicon.ico" type="image/icon">
    <link rel="icon" href="favicon.ico" type="image/icon">
    <title>SelfCure</title>

    <link href="bootstrap.min.css" rel="stylesheet">

    <link href="freelancer.css" rel="stylesheet">

    <link href="font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
	<link href='http://fonts.googleapis.com/css?family=Dosis:500' rel='stylesheet' type='text/css'>
	<link href='http://fonts.googleapis.com/css?family=Voltaire' rel='stylesheet' type='text/css'>
    <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>
                SelfCure

                        Home

                        Get Started

                        Logout

        Virtual Training
        Watching Videos
        Learning

Food Addiction Vs Emotional Eating

First things first, you must understand whether you are addicted to food or are simply overeating due to emotional stress, for both cases require a different path.

In case you are simply overeating due to excessive stress, then you will have to overcome the trauma that has triggered this stress instead of trying to control your eating habits.

We do not specialize in providing any emotional relief and hence advice you to seek a therapist, but feel free to have a look at our personalised virtual trainer which provides several tricks to control your eating habits.

    <button type="button" class="btn btn-default">Read More</button>

Next


text:
require 'models/actions/spec_helper'

shared_examples "an action" do
  context "to be valid" do
    its(:user) { should_not be_nil }
    its(:application) { should_not be_nil }
    its(:application) { should_not be_empty }
    its(:store) { should_not be_nil }

    it { should respond_to(:call) }
    it { should respond_to(:revert) }

    xit { subject.valid?.should be_true }
  end

  context "well implemented" do
  end
end

shared_context "for application" do |application_string|
        let(:user) { double(:user) }
        let(:application) { application_string}
end


text:
\begin {figure}[hbtp]
\centering
\includegraphics[width=\textwidth]{output/R4_250_ONLY_1_LINEAR_NCORE/plot_R4_250_bestmodels.eps}
\caption{Completion time vs ncores for query R4 with datasize 250GB}
\label{fig:only_1_linear_R4_250}
\end {figure}


text:
<?php
/*
 fopen() function:
 Prototype: resource fopen(string $filename, string $mode
                            [, bool $use_include_path [, resource $context]] );
 Description: Opens file or URL.
*/
/*
 fclose() function:
 Prototype: bool fclose ( resource $handle );
 Description: Closes an open file pointer
*/

/* Test fopen() and fclose(): Opening the file in "xt" mode,
   checking for the file creation, write & read operations,
   checking for the file pointer position,
   checking for the warning msg when trying to open an existing file in "xt" mode,
   and fclose function
*/
$file_path = dirname(__FILE__);
$string = b"abcdefghij\nmnopqrst\tuvwxyz\n0123456789";
$file = $file_path."/007_variation15.tmp";

echo "*** Test fopen() & fclose() functions:  with 'xt' mode ***\n";
$file_handle = fopen($file, "xt");  //opening the non-existing file in "xt" mode, file will be created
var_dump($file_handle);  //Check for the content of handle
var_dump( get_resource_type($file_handle) );  //Check for the type of resource
var_dump( ftell($file_handle) );  //Initial file pointer position, expected at the beginning of the file
var_dump( fwrite($file_handle, $string) );  //Check for write operation; passes; expected:size of the $string
var_dump( ftell($file_handle) );  //File pointer position after write operation, expected at the end of the file
rewind($file_handle);
var_dump( fread($file_handle, 100) );  //Check for read operation; fails; expected: empty string
var_dump( ftell($file_handle) );  //File pointer position after read operation, expected at the beginning of the file
var_dump( fclose($file_handle) );  //Check for close operation on the file handle
var_dump( get_resource_type($file_handle) );  //Check whether resource is lost after close operation
$file_handle = fopen($file, "xt");  //Opening the existing data file in 'xt' mode to check for the warning message
echo "*** Done ***\n";


text:
package com.rodrigodev.xgen4j_table_generator.test.tableIsGeneratedForErrorsWithNumericId.common_code_name_1.common_code_name_2.common_code_name_3_1;

import com.rodrigodev.xgen4j_table_generator.test.tableIsGeneratedForErrorsWithNumericId.common_code_name_1.common_code_name_2.CName2Error;

import com.rodrigodev.xgen4j_table_generator.test.tableIsGeneratedForErrorsWithNumericId.ErrorCode;
import com.rodrigodev.xgen4j_table_generator.test.tableIsGeneratedForErrorsWithNumericId.RootNameException;
import com.rodrigodev.xgen4j_table_generator.test.tableIsGeneratedForErrorsWithNumericId.RootNameException.ExceptionType;

/**
 * Autogenerated by XGen4J on January 1, 0001.
 */
public abstract class CName3_1Error extends CName2Error {

    public static final ErrorCode CODE = new ErrorCode("common-code-name-3-1", 4, CName2Error.CODE);

    private static String MESSAGE_FORMAT = "Message for CName3_1 error.";

    private static String createMessage() {

        return String.format(MESSAGE_FORMAT);
    }

    public static void throwException() {
        throw new CName3_1Exception(CODE, createMessage());
    }

    public static void throwException(Throwable cause) {
        throw new CName3_1Exception(CODE, createMessage(), cause);
    }

    public static void throwException(ExceptionType exceptionType) {
        throwExceptionForCommonError(CODE, exceptionType, createMessage());
    }

    public static void throwException(ExceptionType exceptionType, Throwable cause) {
        throwExceptionForCommonError(CODE, exceptionType, createMessage(), cause);
    }

}


text:
namespace HackathonBackend.Areas.HelpPage.ModelDescriptions
{
    public class SimpleTypeModelDescription : ModelDescription
    {
    }
}


text:
function clickedSection(event) {
  var section = event.currentTarget;
  section.classList.add("selected");
  section.parentElement.classList.add("chosen");

  section.querySelectorAll("iframe").forEach(resizeIframe);

  updateSectionListeners("remove");
}

function updateSectionListeners(action) {
  document.querySelectorAll("section").forEach(function (e) {
    e[action + "EventListener"]("click", clickedSection, false);
    e.classList.add("ready");
  });
}

updateSectionListeners("add");

function resizeIframe(frame) {
  var doc = frame.contentDocument || frame.contentWindow.document;
  if (doc.readyState === 'complete') {
    var height = frame.contentDocument.body.scrollHeight;
    // Add 25 pixels for possible scrollbar at bottom
    height += 25;
    frame.style.height = height + 'px';
  } else {
    frame.addEventListener('load', function() {
      resizeIframe(frame);
    }, false);
  }
}


text:
package org.trendafilov.confucius.core;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

interface ConfigurationDataProvider {
	List<String> getAllLines() throws IOException;

	InputStream getInputStream() throws IOException;
}


text:
EXECUTABLE	:= FDTD3d
# CUDA source files
CUFILES     := src/FDTD3dGPU.cu
# CUDA dependencies
CU_DEPS     := inc/FDTD3dGPUKernel.cuh
# C/C++ source files (compiled with gcc / c++)
SRCDIR		:= src/
CCFILES		:= FDTD3d.cpp FDTD3dReference.cpp
INCLUDES    += -Iinc/

################################################################################
# Rules and targets

include ../../common/common.mk


text:
namespace MinCOM
{
namespace iPhone
{

    class Device
    {
    public:

        static std::string GetId();

        static std::string GetName();

		static std::string GetDocuments();

    };

}
}


text:
namespace EventEmitter.Core.Query
{
    public interface IQueryDispatcher
    {
        TResult Ask<TQuery, TResult>(TQuery query)
            where TQuery : IQuery;
    }
}


text:
<?php

namespace Flarum\Admin\Middleware;

use Exception;
use Flarum\Core\Access\AssertPermissionTrait;
use Flarum\Forum\Controller\LogInController;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\View\Factory;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Zend\Diactoros\Response\HtmlResponse;
use Zend\Diactoros\Response\RedirectResponse;
use Zend\Stratigility\MiddlewareInterface;

class RequireAdministrateAbility implements MiddlewareInterface
{
    use AssertPermissionTrait;

    /**
     * @var LogInController
     */
    private $logInController;

    /**
     * @var Factory
     */
    private $view;

    /**
     * @param LogInController $logInController
     * @param Factory $view
     */
    public function __construct(LogInController $logInController, Factory $view)
    {
        $this->logInController = $logInController;
        $this->view = $view;
    }

    /**
     * {@inheritdoc}
     */
    public function __invoke(Request $request, Response $response, callable $out = null)
    {
        try {
            $this->assertAdminAndSudo($request);
        } catch (Exception $e) {
            if ($request->getMethod() === 'POST') {
                $response = $this->logInController->handle($request);

                if ($response->getStatusCode() === 200) {
                    return $response
                        ->withStatus(302)
                        ->withHeader('location', app('Flarum\Admin\UrlGenerator')->toRoute('index'));
                }
            }

            return new HtmlResponse(
                $this->view->make('flarum.admin::login')
                    ->with('token', $request->getAttribute('session')->get('csrf_token'))
                    ->render()
            );
        }

        return $out ? $out($request, $response) : $response;
    }
}


text:
#include <catch.hpp>

#include "NAOS/cubicRoot.hpp"

namespace naos
{
namespace tests
{

TEST_CASE( "Test computation of max real cubic root", "[cubic-root]" )
{
    // input values were individually tested on wolfram alpha
    const double A2 = -7.0;
    const double A1 = 4.0;
    const double A0 = 12.0;

    const double B2 = 3.0 / 2.0;
    const double B1 = -11.0 / 2.0;
    const double B0 = -3.0;

    // compute the max real roots for the two cubic equations
    const double maxRealRoot1 = computeMaxRealCubicRoot( A2, A1, A0 );
    const double maxRealRoot2 = computeMaxRealCubicRoot( B2, B1, B0 );

    // check the computed values
    REQUIRE( maxRealRoot1 == Approx( 6.0 ).epsilon( 1.0e-9 ) );
    REQUIRE( maxRealRoot2 == Approx( 2.0 ).epsilon( 1.0e-9 ) );
}

} // namespace tests
} // namespace naos


text:
package org.apache.geode.internal.admin.remote;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.geode.distributed.internal.DistributionManager;
import org.apache.geode.distributed.internal.InternalDistributedSystem;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.Config;
import org.apache.geode.internal.ConfigSource;

/**
 * A message that is sent to a particular distribution manager to modify its current
 * {@link org.apache.geode.internal.Config}.
 */
public class StoreSysCfgResponse extends AdminResponse {
  // instance variables

  // static methods
  /**
   * Returns a StoreSysCfgResponse that states that a given set of distribution
   * managers are known by dm to be started.
   */
  public static StoreSysCfgResponse create(DistributionManager dm,
      InternalDistributedMember recipient, Config sc) {
    StoreSysCfgResponse m = new StoreSysCfgResponse();
    m.setRecipient(recipient);
    InternalDistributedSystem sys = dm.getSystem();
    Config conf = sys.getConfig();
    String[] names = conf.getAttributeNames();
    for (int i = 0; i < names.length; i++) {
      if (conf.isAttributeModifiable(names[i])) {
        conf.setAttributeObject(names[i], sc.getAttributeObject(names[i]), ConfigSource.runtime());
      }
    }

    return m;
  }

  // instance methods

  public int getDSFID() {
    return STORE_SYS_CFG_RESPONSE;
  }

  @Override
  public void toData(DataOutput out) throws IOException {
    super.toData(out);
  }

  @Override
  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
    super.fromData(in);
  }

  @Override
  public String toString() {
    return "StoreSysCfgResponse from " + this.getRecipient();
  }
}


text:
package com.lovejjfg.blogdemo.ui;

import android.animation.Animator;

/**
 * Created by Joe on 2016-06-15
 * Email: lovejjfg@gimail.com
 */
public abstract class SimpleAnimatorListener implements Animator.AnimatorListener {
    @Override
    public  void onAnimationStart(Animator animation){}

    @Override
    public  void onAnimationEnd(Animator animation){}

    @Override
    public void onAnimationCancel(Animator animation) {

    }

    @Override
    public void onAnimationRepeat(Animator animation) {

    }
}


text:
FROM fedora:36
ARG NCPU=4
ARG ARCH=amd64

# Install the minimal packages needed to compile libcxx, install Bazel, and
# then compile our code.
RUN dnf makecache && \
    dnf install -y ccache clang clang-tools-extra cmake findutils \
        git llvm llvm-devel make ninja-build openssl-devel patch python \
        python3 python3-devel python3-lit python-pip tar unzip which wget xz

# Sets root's password to the empty string to enable users to get a root shell
# inside the container with `su -` and no password. Sudo would not work because
# we run these containers as the invoking user's uid, which does not exist in
# the container's /etc/passwd file.
RUN echo 'root:' | chpasswd

# Install the Python modules needed to run the storage emulator
RUN pip3 install --upgrade pip
RUN pip3 install setuptools wheel

WORKDIR /var/tmp/build

# Install instructions from:
# https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo
RUN git clone --depth=1 --branch llvmorg-14.0.0 https://github.com/llvm/llvm-project
WORKDIR /var/tmp/build/llvm-project
# configure cmake
RUN cmake -GNinja -S llvm -B build \
    -DCMAKE_BUILD_TYPE=Release \
    -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++ \
    -DLLVM_USE_SANITIZER=MemoryWithOrigins \
    -DCMAKE_INSTALL_PREFIX=/usr
# build the libraries
RUN cmake --build build -- cxx cxxabi
RUN cmake --build build -- install-cxx install-cxxabi

# Install the Cloud SDK and some of the emulators. We use the emulators to run
# integration tests for the client libraries.
COPY . /var/tmp/ci
WORKDIR /var/tmp/downloads
ENV CLOUDSDK_PYTHON=python3.10
RUN /var/tmp/ci/install-cloud-sdk.sh
ENV CLOUD_SDK_LOCATION=/usr/local/google-cloud-sdk
ENV PATH=${CLOUD_SDK_LOCATION}/bin:${PATH}
# The Cloud Pub/Sub emulator needs Java :shrug:
RUN dnf makecache && dnf install -y java-latest-openjdk

RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.15.0/bazelisk-linux-${ARCH}" && \
    chmod +x /usr/bin/bazelisk && \
    ln -s /usr/bin/bazelisk /usr/bin/bazel


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Septoria platycodonis Syd.

### Remarks
null


text:
using System;
using System.Reflection;

public class App
{
	static bool[] expected_results = {false, false};
	static bool handler_fired;

	public static int Main ()
	{
		AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += new ResolveEventHandler(MyReflectionResolveEventHandler);

		int i = 0;
		handler_fired = false;

		try {
			Assembly.ReflectionOnlyLoad ("SomeAssembly");
		} catch (Exception) {
		}
		if (expected_results [i] != handler_fired)
			return 1;

		i++;
		handler_fired = false;
		try {
			Assembly.ReflectionOnlyLoadFrom ("SomeAssembly");
		} catch (Exception) {
		}
		if (expected_results [i] != handler_fired)
			return 2;

		return 0;
	}

	static Assembly MyReflectionResolveEventHandler(object sender, ResolveEventArgs args) {
		handler_fired = true;
		return null;
	}
}