text:
/************************************************************************/
/* IntRep/Constraint.h: SpecC Internal Representation, Constraint Class	*/
/************************************************************************/
/* Author: Rainer Doemer			first version: 10/20/97 */
/************************************************************************/

/* last update: 06/15/04 */

/* modifications: (most recent first)
 *
 * 06/15/04 PC  Adjustments for scrc 2.0
 * 05/30/01 RD	eliminated level 2 of SIR API
 * 05/25/01 RD	eliminated support for binary SIR files (import/export)
 * 04/06/01 RD	added support for non-native 'long long' type;
 *		changed use of 'long long int' to TIME type
 * 04/06/01 RD	started this header (last update was 04/12/99)
 */

#ifndef INTREP_CONSTRAINT_H
#define INTREP_CONSTRAINT_H

#include "Global.h"
#include "IntRep/Label.h"

/*** enumeration types **************************************************/

	/* none */

/*** type definitions ***************************************************/

typedef class SIR_Constraint		sir_constraint;
typedef SIR_List<sir_constraint>	sir_constraint_list;
typedef class SIR_Constraints		sir_constraints;

/*** class declarations *************************************************/

	/**********************/
	/*** SIR_Constraint ***/
	/**********************/

class SIR_Constraint :		/* constraint */
	public SIR_Node,			/* is a node */
	public SIR_ListElem<SIR_Constraint>	/* and a list element */
{
public:
sir_label	*Label1;	/* first label entry */
sir_label	*Label2;	/* second label entry */
sir_constant	*MinTime;	/* minimum time (NULL if unspecified) */
sir_constant	*MaxTime;	/* maximum time (NULL if unspecified) */

//++++++++++++++++++++++++++++ API Layer 1 +++++++++++++++++++++++++++++//

SIR_Constraint(			/* constructor #1 */
	sir_label	*Label1,
	sir_label	*Label2,
	sir_constant	*MinTime,
	sir_constant	*MaxTime,
	unsigned int	Line = 0,
	sir_fileinfo	*FileInfo = NULL);

SIR_Constraint(			/* constructor #3 (duplicator) */
	sir_constraint	*Original);

~SIR_Constraint(void);		/* destructor */

ERROR DFS_ForAllNodes(		/* iterator over all nodes (depth first) */
	sir_node_mptr	MemberFct,
	sir_node_marg	MemberFctArg);
};

	/***********************/
	/*** SIR_Constraints ***/
	/***********************/

class SIR_Constraints :		/* constraints list */
	public SIR_List<SIR_Constraint>	/* is simply a list of constraints */
{					/* with additional member(function)s */
public:

//++++++++++++++++++++++++++++ API Layer 1 +++++++++++++++++++++++++++++//

SIR_Constraints(		/* constructor #1 */
	sir_constraint	*FirstEntry = NULL);

SIR_Constraints(		/* constructor #2 (duplicator) */
	sir_constraints	*Original);

~SIR_Constraints(void);		/* destructor */

ERROR DFS_ForAllNodes(		/* iterator over all nodes (depth first) */
	sir_node_mptr	MemberFct,
	sir_node_marg	MemberFctArg);

sir_constraint *Insert(		/* insert a new constraint */
	sir_constraint	*NewOne);	/* (must not exist) */

sir_constraint *Find(		/* find the first constraint beginning here */
	sir_label	*Label1);	/* (returns NULL if not found) */

sir_constraint *Find(		/* find a constraint */
	sir_label	*Label1,	/* (returns NULL if not found) */
	sir_label	*Label2);
};

/*** exported functions *************************************************/

	/* none */

#endif /* INTREP_CONSTRAINT_H */

/* EOF IntRep/Constraint.h */


text:
namespace Microsoft.Azure.Management.DeviceProvisioningServices.Models
{

    /// <summary>
    /// Defines values for IotDpsSku.
    /// </summary>
    public static class IotDpsSku
    {
        public const string S1 = "S1";
    }
}

redpajama_set_name: RedPajamaGithub


text:
__author__ = "Angelo Torelli, Markus Gumbel"
__copyright__ = "The authors"
__license__ = "Apache 2"
__email__ = "m.gumbel@hs-mannheim.de"
__status__ = "Production"

from Steppable.ModuroSteppable import ModuroSteppable
from Steppable.TransformationSteppable import TransformationSteppable

class CMTransformationSteppable(TransformationSteppable):
    def __init__(self, _simulator, model, _frequency=1):
        TransformationSteppable.__init__(self, _simulator, model, _frequency)

    def moduroStep(self, mcs):
        for cell in self.cellList:
            if cell.type == self.BASAL and not self.hasCertainNeighbor(cell, self.BASALMEMBRANE):
                self.transformInto(cell, self.INTERMEDIATE, mcs)
            elif cell.type == self.INTERMEDIATE and self.hasCertainNeighbor(cell, self.MEDIUM):
                self.transformInto(cell, self.UMBRELLA, mcs)
            elif (cell.type == self.STEM or cell.type == self.UMBRELLA) and self.hasCertainNeighbor(cell, self.MEDIUM):
                self.setInhibitionFlag(cell, False)

#    def hasCertainNeighbor(self, cell, neighborType):
#        totalMediumArea = 0
#        hasCertainNeighbor = False
#        for neighbor, commonSurfaceArea in self.getCellNeighborDataList(cell):
#            if neighbor and neighborType != 0 and neighbor.type == neighborType and commonSurfaceArea > 0:
#                hasCertainNeighbor = True
#            elif not neighbor and commonSurfaceArea > 0:
#                totalMediumArea += commonSurfaceArea
#                if neighborType == 0:
#                    hasCertainNeighbor = True
#                if hasCertainNeighbor:
#                    break
#        if totalMediumArea == 0:
#            self.setInhibitionFlag(cell, True)
#        else:
#            self.setInhibitionFlag(cell, False)
#        return hasCertainNeighbor
#
#
#    def transformInto(self, cell, cellType, mcs):
#        cellDict = self.getDictionaryAttribute(cell)
#        self.model.cellLifeCycleLogger.cellLifeCycleDeath(mcs, cell, cellDict)
#        cell.type = cellType
#        self.model.setCellAttributes(cellDict, cell, 0)
#        self.model.cellLifeCycleLogger.cellLifeCycleBirth(mcs, cell, cellDict)
#
#
#    def setInhibitionFlag(self, cell, flag):
#        cellDict = self.getDictionaryAttribute(cell)
#        cellDict['inhibited'] = flag


text:
  Moutiers est
       un village
       géographiquement positionné dans le département de l'Eure-et-Loir en Centre. Elle totalisait 233 habitants en 2008.

Le nombre d'habitations, à Moutiers, se décomposait en 2011 en zero appartements et 132 maisons soit
 un marché plutôt équilibré.

À coté de Moutiers sont positionnées géographiquement les communes de
Mondonville-Saint-Jean à 8 km, 85 habitants,
Prasville localisée à 5 km, 324 habitants,
Boisville-la-Saint-Père située à 6 km, 721 habitants,
Guilleville située à 8 km, 177 habitants,
Réclainville à 5 km, 140 habitants,
Trancrainville localisée à 8 km, 159 habitants,
 entre autres. De plus, Moutiers est située à seulement 27 km de Chartres.

Si vous envisagez de venir habiter à Moutiers, vous pourrez facilement trouver une maison à acheter.


text:
package com.example.examplemod.ProjectTableExample;

public interface IRecipeCraftingEventListener
{
    void onRecipeCrafting(ProjectTableRecipe recipe);
}


text:
package com.cloudera.oryx.example;

import com.cloudera.oryx.lambda.BatchLayerUpdate;
import com.cloudera.oryx.lambda.TopicProducer;
import org.apache.spark.api.java.JavaPairRDD;
import org.apache.spark.api.java.JavaSparkContext;

import java.io.IOException;

public final class ExampleBatchLayerUpdate implements BatchLayerUpdate<String,String,String> {

  @Override
  public void runUpdate(JavaSparkContext sparkContext,
                        long timestamp,
                        JavaPairRDD<String,String> newData,
                        JavaPairRDD<String,String> pastData,
                        String modelDirString,
                        TopicProducer<String,String> modelUpdateTopic)
      throws IOException, InterruptedException {

  }

}


text:
/**
 * Created with JetBrains WebStorm.
 * User: mschwartz
 * Date: 6/23/13
 * Time: 9:23 AM
 * To change this template use File | Settings | File Templates.
 */

"use strict";

/*global decaf, exports, require, JSON: true */

global.ISODate = java.util.Date;

decaf.extend(exports, {
    serialize: require('lib/BSON').serialize,
    deserialize: require('lib/BSON').deserialize,
    MongoDB: require('lib/MongoDB').MongoDB,
    Collection: require('lib/Collection').Collection,
    Cursor: require('lib/Cursor').Cursor,
    ObjectId: require('lib/ObjectId').ObjectId
});


text:
<!DOCTYPE html>

	<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
	<title><?=view_manager::get_value('TITLE')?></title>

	<link type="text/css" rel="stylesheet" href="http://framecdn.serverboy.net/latest.css" />
	<link type="text/css" rel="stylesheet" href="/css/tape.css" />
	<link type="text/css" rel="stylesheet" href="<?php echo URL_PREFIX; ?>common.css" />
<link type="text/css" rel="stylesheet" href="/scripts/fancybox/jquery.fancybox-1.3.1.css" media="screen" />

<?=view_manager::get_value('TITLE')?>

		<div class="hcont" style="background:#<?=view_manager::get_value('COLOR')?>">
			<?
			if(view_manager::get_value('SHUFFLE')){
				echo 'Turn Shuffle Off';
			}else{
				echo 'Turn Shuffle On';
			}
			if($session->logged_in && $session->username == view_manager::get_value("OWNER")) {
				?> • <a href="/tapes/<?=view_manager::get_value('NAME')?>">Edit Tape<?php
			}
			?> • <a href="/tape/<?=view_manager::get_value('ID')?>">Back to Tinytape

		<?php
		$results = view_manager::get_value('INSTANCES');

		if($results != false) {

			$tempsecret = uniqid();
			$embeddable = true;
			$rlive = false;
			$racoustic = false;
			$rremix = false;
			$rclean = false;
			$hide_view_edit = true;

			?>

			<?php
			$json_data = array();
			foreach($results as $result) {
				$uid = sha1($result['id'] . $tempsecret);

				$rtitle = $result['title'] . ' - ' . $result['artist'];
				$rid = $result['id'];
				$instance_id = $result['instance'];
				require(PATH_PREFIX . '/result.php');

				$json_data[$uid] = array(
					"service"=>"tinytape",
					"resource"=>array(
						"id"=>(int)$result['id'],
						"instance"=>(int)$result['instance']
					),
					"metadata"=>array(
						"title"=>htmlentities($result['title']),
						"artist"=>htmlentities($result['artist']),
						"album"=>htmlentities($ralbum)
					)
				);

			}
		?>

		<?php
		} else {
			?>
Whoa whoa whoa whoa. You don't have any songs here yet! You should <a href="<?php echo URL_PREFIX; ?>search">go find some.
<?php
		}
		?>

		© Copyright <?php echo date('Y'); ?>, Tinytape •
		Powered by <?php

			$wiseass = array(
				'Hamsters',
				'The N\'Avi',
				'Billy Joel',
				'Strawberry Milkshakes',
				'Free Energy',
				'ECHELON',
				'like fifty patoots',
				'oxy-morons',
				'a series of only moderately unfortunate events',
				'Baby Jesus',
				'Dark Magic'
			);
			echo $wiseass[array_rand($wiseass)];
			?>

		Pause
		Repeat
		Next »

<?php
if(view_manager::get_value("BADGE_SHUFFLER")) {
	?>

Congratulations, you've earned yourself the Kansas City Shuffle Badge. You've shuffled fifteen tapes. As they say, "you look left, Bruce Willis snaps your neck."

Ok, whatever

	<?php
}?>

<?php
if(view_manager::get_value("BADGE")) {
	?>

	<?php
}

?>


text:
namespace ProvenStyle.ReadEveryWord.Web.Migrations
{
    using System;
    using System.Data.Entity.Migrations;

    public partial class timesRead : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.TimesReads",
                c => new
                    {
                        Id = c.Guid(nullable: false, identity: true),
                        UserId = c.String(),
                        Count = c.Int(nullable: false),
                    })
                .PrimaryKey(t => t.Id);

            CreateTable(
                "dbo.ReadingRecords",
                c => new
                    {
                        Id = c.Guid(nullable: false, identity: true),
                        UserId = c.String(),
                        Book = c.String(),
                        Chapter = c.Int(nullable: false),
                        DateTime = c.DateTime(nullable: false),
                        TimesRead = c.Int(nullable: false),
                    })
                .PrimaryKey(t => t.Id);

        }

        public override void Down()
        {
            DropTable("dbo.ReadingRecords");
            DropTable("dbo.TimesReads");
        }
    }
}


text:
import sys, os

MAT_HOME = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

sys.path.insert(0, os.path.join(MAT_HOME, "lib", "mat", "python"))
import MAT

import unittest, MAT.UnitTest

#
# Main
#

def Usage():
    print "Usage: mat_unittest.py [ --debug ] [ --quiet ] [ --verbose ] [ --tmpdir <d> ] [ --block_context_teardown ] [ --setting <a>=<b> ]* [ --categories a,b,c... ] [ --class_name_pattern p ] [ --test_name_pattern p ] app_dir..."
    print "--debug: pass debug to unittest."
    print "--quiet: quiet execution."
    print "--verbose: verbose execution."
    print "--tmpdir <d>: the temp directory will be created in <d> instead of the default location"
    print "--block_context_teardown: don't clean up the context at the end (so tmpdir remains)"
    print "--setting <a>=<b>: provide a setting to the test context"
    print """--categories <a,b,c...>: an optional comma-delimited list of core categories to test. If present,
  the system will test only files in the unittest directory named mat_<category>_unittest.py."""
    print """--class_name_pattern <p>: an optional pattern to filter unit test class names."""
    print """--test_name_pattern <p>: an optional pattern to filter the individual test method names."""
    sys.exit(1)

import getopt
try:
    opts, args = getopt.getopt(sys.argv[1:], "", ["debug", "block_context_teardown", "quiet",
                                                  "verbose", "tmpdir=", "setting=", "categories=",
                                                  "class_name_pattern=", "test_name_pattern="])
except getopt.GetoptError:
    Usage()

VERBOSITY = 1
DEBUG = False
TMPDIR = None
BLOCK_TEARDOWN = False
SETTINGS = {}
CATEGORIES = None
CLASS_NAME_PAT = None
TEST_NAME_PAT = None

for key, val in opts:
    if key == "--debug":
        DEBUG = True
    elif key == "--block_context_teardown":
        BLOCK_TEARDOWN = True
    elif key == "--quiet":
        VERBOSITY = 0
    elif key == "--verbose":
        VERBOSITY = 2
    elif key == "--tmpdir":
        TMPDIR = val
    elif key == "--categories":
        CATEGORIES = val.split(",")
        if CATEGORIES == ['']:
            CATEGORIES = []
    elif key == "--class_name_pattern":
        CLASS_NAME_PAT = val
    elif key == "--test_name_pattern":
        TEST_NAME_PAT = val
    elif key == "--setting":
        pair = val.split("=", 1)
        if len(pair) != 2:
            print "Warning: ignoring ill-formed setting '%s'" % val
        SETTINGS[pair[0]] = pair[1]
    else:
        Usage()

loader = MAT.UnitTest.TestLoader()
if CLASS_NAME_PAT is not None:
    loader.filterClassNames(CLASS_NAME_PAT)
if TEST_NAME_PAT is not None:
    loader.filterTestNames(TEST_NAME_PAT)
context = MAT.UnitTest.getTestContext(blockTeardown = BLOCK_TEARDOWN)
context.setTmpDir(TMPDIR)
for key, val in SETTINGS.items():
    context[key] = val

suite = unittest.TestSuite()

# First, load any tests defined in the core.
suite.addTest(loader.loadTestsFromModule(MAT.UnitTest))

# Then let's load the tests in the core. There should be no
# tests in this file. Make sure this directory is in the
# path.

oldSysPath = sys.path[:]
sys.path[0:0] = os.path.dirname(__file__)
if CATEGORIES is None:
    import glob
    files = glob.glob(os.path.join(os.path.dirname(__file__), "mat_*_unittest.py"))
    for file in files:
        suite.addTest(loader.loadTestsFromModule(__import__(os.path.splitext(os.path.basename(file))[0])))
else:
    for category in CATEGORIES:
        if os.path.isfile(os.path.join(os.path.dirname(__file__), "mat_" + category + "_unittest.py")):
            suite.addTest(loader.loadTestsFromModule(__import__("mat_" + category + "_unittest")))
sys.path = oldSysPath

suite.addTest(loader.loadTestsFromModule(__import__("__main__")))

# And now, let's load the tests from the various plugin dirs.
# One problem is that if there are tests which refer to classes in
# other plugin dirs, that's a problem. I haven't set up the
# import path appropriately. It's gotta be the same algorithm that's used
# in PluginMgr.py, in LoadPluginsFromDirs

plugins = MAT.PluginMgr.LoadPlugins()

import glob

# It's not clear to me that we need this - sys.modules seems to
# be updated by the way I load the plugins, in which case all the
# references will already be loaded.

sys.path[0:0] = [p.taskRoot for p in plugins.values()]

for site in args:
    paths = glob.glob(os.path.join(site, "test", "*.py"))
    for p in paths:
        print "Loading tests from", p
        # Add the prefix to the path, momentarily.
        oldSysPath = sys.path[:]
        sys.path[0:0] = [os.path.join(site, "test")]
        context.setLocal({"TASK_DIR": site})
        suite.addTest(loader.loadTestsFromName(os.path.splitext(os.path.basename(p))[0]))
        context.clearLocal(["TASK_DIR"])
        # Return the path.
        sys.path = oldSysPath

try:
    if DEBUG:
        suite.debug()
    else:
        unittest.TextTestRunner(verbosity=VERBOSITY).run(suite)
finally:
    context.tearDown()


text:
#include "third_party/blink/renderer/modules/webaudio/realtime_audio_destination_node.h"

#include "base/feature_list.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/platform/web_audio_latency_hint.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/renderer/modules/webaudio/audio_context.h"
#include "third_party/blink/renderer/modules/webaudio/audio_node_input.h"
#include "third_party/blink/renderer/modules/webaudio/audio_node_output.h"
#include "third_party/blink/renderer/modules/webaudio/audio_worklet.h"
#include "third_party/blink/renderer/modules/webaudio/audio_worklet_messaging_proxy.h"
#include "third_party/blink/renderer/platform/audio/audio_utilities.h"
#include "third_party/blink/renderer/platform/audio/denormal_disabler.h"
#include "third_party/blink/renderer/platform/bindings/exception_messages.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_base.h"

namespace blink {

RealtimeAudioDestinationNode::RealtimeAudioDestinationNode(
    AudioContext& context,
    const WebAudioSinkDescriptor& sink_descriptor,
    const WebAudioLatencyHint& latency_hint,
    absl::optional<float> sample_rate)
    : AudioDestinationNode(context) {
  SetHandler(RealtimeAudioDestinationHandler::Create(
      *this, sink_descriptor, latency_hint, sample_rate));
}

RealtimeAudioDestinationNode* RealtimeAudioDestinationNode::Create(
    AudioContext* context,
    const WebAudioSinkDescriptor& sink_descriptor,
    const WebAudioLatencyHint& latency_hint,
    absl::optional<float> sample_rate) {
  return MakeGarbageCollected<RealtimeAudioDestinationNode>(
      *context, sink_descriptor, latency_hint, sample_rate);
}

void RealtimeAudioDestinationNode::SetSinkDescriptor(
    const WebAudioSinkDescriptor& sink_descriptor,
    media::OutputDeviceStatusCB callback) {
  static_cast<RealtimeAudioDestinationHandler&>(Handler())
      .SetSinkDescriptor(sink_descriptor, std::move(callback));
}

}  // namespace blink


text:
title: RadNotification Object
page_title: RadNotification Object - RadNotification
description: Check our Web Forms article about RadNotification Object.
slug: notification/client-side-programming/radnotification-object
tags: radnotification,object
published: True
position: 1
---

# RadNotification Object

## Methods that expose the public properties

>caption Getters/setters for the properties

| Name | Description |
| ------ | ------ |
| **get_animation** |Gets the animation value of the notification. Returns a variable of type Telerik.Web.UI.NotificationAnimation.|
| **get_animationDuration** |Gets animation duration value for the notification.|
| **get_autoCloseDelay** |Gets delay in milliseconds for the notification to close automatically.|
| **getBounds** |Returns the size and position of the notification popup.|
| **get_enabled** |Gets a value indicating whether the notification is enabled|
| **get_height** |Gets the height of the notification.|
| **get_contentElement** |Gets the content element of the notification.|
| **get_contentScrolling** |Gets a new overflow value for the notification content area. Returns a variable of type Telerik.Web.UI.NotificationScrolling.|
| **get_keepOnMouseOver** |Gets a value indicating whether the notification should stay on the screen when hovered (autoclose is delayed until the mouse goes outside the popup).|
| **get_loadContentOn** |Gets when the content should be loaded. Returns a variable of type Telerik.Web.UI.NotificationLoad.|
| **get_offsetX** |Gets the horizontal offset relative to the browser window.|
| **get_offsetY** |Gets the vertical offset relative to the browser window.|
| **get_opacity** |Gets the value indicating the opacity of the RadNotification.The value should be between 0 and 100. The default value is 100 which is opaque.|
| **get_overlay** |Gets a value indicating whether the notification has an overlay element.|
| **get_pinned** |Gets a value indicating whether the notification should be scrolled along with the content or not.|
| **get_popupElement** |Returns a reference to the popup element of RadNotification.|
| **get_position** |Gets the relative to the browser window position of the notification.|
| **get_showInterval** |Gets the show interval of the notification.|
| **get_text** |Gets the text of the notification.|
| **get_title** |Gets the title of the notification.|
| **get_titleMenu** |Returns a reference to a RadMenu object. Returns 'null' when there is no menu configured.|
| **get_updateInterval** |Gets the update interval of the notification.|
| **get_value** |Gets the current value associated with the RadNotification control.|
| **get_visibleTitlebar** |Gets a value indicating whether the RadNotification should have a visible titlebar.|
| **get_width** |Gets the width of the notification.|
| **get_zIndex** |Gets the z-index of the RadNotification.|
| **set_animation** |Sets new animation value for the notification. The parameter must be of type Telerik.Web.UI.NotificationAnimation. The **NotificationAnimation** property is an enum and can take the following values, which names describe the effect when they are set: None, Resize, Fade, Slide, FlyIn. For example: **notification.set_animation(Telerik.Web.UI.NotificationAnimation.Slide);** |
| **set_animationDuration** |Sets animation duration value for the notification.|
| **set_autoCloseDelay** |Sets delay in milliseconds for the notification to close automatically.|
| **set_contentScrolling** |Sets a new overflow value for the notification content area. The **Scrolling** property is an enum (Telerik.Web.UI.NotificationScrolling) and can take the following values, which names describe the effect when they are set: Default, Auto, None, X, Y, Both. For example: **notification.set_contentScrolling(Telerik.Web.UI.NotificationScrolling.None);** |
| **set_enabled** |Sets a value indicating whether the notification is enabled.|
| **set_height** |Sets new height to the notification.|
| **set_keepOnMouseOver** |Sets a value indicating whether the notification should stay on the screen when hovered (autoclose is delayed until the mouse goes outside the popup).|
| **set_loadContentOn** |Sets when the content should be loaded. The parameter must be of type Telerik.Web.UI.NotificationLoad. The **NotificationLoad** property is an enum and can take the following values, which names describe the effect when they are set: PageLoad, FirstShow, EveryShow, TimeInterval.For example: **notification.set_loadContentOn(Telerik.Web.UI.NotificationLoad.TimeInterval);** |
| **set_offsetX** |Sets a new horizontal offset relative to the browser window.|
| **set_offsetY** |Sets a new vertical offset relative to the browser window.|
| **set_opacity** |Sets the value indicating the opacity of the RadNotification. The value should be between 0 and 100 where 100 is opaque.|
| **set_overlay** |Sets a value indicating whether the notification will create an overlay element.|
| **set_pinned** |Sets a value indicating whether the notification should be scrolled along with the content or not.|
| **set_position** |Sets a new relative to the browser window position for the notification. The parameter must be of type Telerik.Web.UI.NotificationPosition. The **NotificationPosition** property is an enum and can take the following values, which names describe the effect when they are set: TopLeft, TopCenter, TopRight, MiddleLeft, Center, MiddleRight, BottomLeft, BottomCenter, BottomRight. For example: **notification.set_position(Telerik.Web.UI.NotificationPosition.Center);** |
| **set_showInterval** |Sets new show interval to the notification.|
| **set_text** |Sets new text to the notification.|
| **set_title** | Sets a new title to the notification.|
| **set_updateInterval** | Sets new update interval to the notification.|
| **set_value** | Sets new value to be associated with the RadNotification control|
| **set_visibleTitlebar** | Sets a value indicating whether the RadNotification should have a visible titlebar.|
| **set_width** |Sets new width to the notification.|
| **set_zIndex** |Sets new z-index of the RadNotification.|

## Public methods

>caption They activate certain behaviors or functionality

| Name | Description |
| ------ | ------ |
| **hide** |Hides the notification.|
| **isVisible** |Indicates whether the RadNotification popup is currently visible.|
| **moveTo** |Moves the notification to the specified coordinates (horizontal, vertical).|
| **playSound** |Starts the notification sound.|
| **setSize** |Sets new width and height to the notification.|
| **show** |Displays the notification at the proper position, relative to the browser window.|
| **update** |Updates the content of the notification.|
| **userInitSound** |Some browsers have the limitation to only play sound after a user interaction.Calling this method at such a moment tries to play the sound in an attempt to make it availablefor cases when user interaction is missing. Such known case is Safari on iOS devices.|
| **verifySound** |Does a check whether internally the sound is playable. This is usually needed when the sound is onlyplayable after a user interaction and **userInitSound** method has had to be called.|


text:
simple json parser example for practice with alex + happy

The best resource for this (and mostly copied):  https://github.com/dagit/happy-plus-alex


text:
package org.eclipse.rdf4j.sail.lmdb.model;

import java.io.ObjectStreamException;
import java.util.Optional;

import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.base.AbstractLiteral;
import org.eclipse.rdf4j.model.base.CoreDatatype;
import org.eclipse.rdf4j.sail.lmdb.ValueStoreRevision;

public class LmdbLiteral extends AbstractLiteral implements LmdbValue {

	/*-----------*
	 * Constants *
	 *-----------*/

	private static final long serialVersionUID = 5198968663650168819L;

	/*----------*
	 * Variable *
	 *----------*/

	/**
	 * The literal's label.
	 */
	private String label;

	/**
	 * The literal's language tag.
	 */
	private String language;

	/**
	 * The literal's datatype.
	 */
	private IRI datatype;

	/**
	 * The literal's core datatype. This value is null if there is no know datatype.
	 */
	private CoreDatatype coreDatatype;

	private volatile ValueStoreRevision revision;

	private volatile long internalID;

	private volatile boolean initialized = false;

	/*--------------*
	 * Constructors *
	 *--------------*/

	public LmdbLiteral(ValueStoreRevision revision, long internalID) {
		super();
		setInternalID(internalID, revision);
		coreDatatype = null;
	}

	public LmdbLiteral(ValueStoreRevision revision, String label, long internalID) {
		this.label = label;
		coreDatatype = CoreDatatype.XSD.STRING;
		datatype = CoreDatatype.XSD.STRING.getIri();
		setInternalID(internalID, revision);
		this.initialized = true;
	}

	public LmdbLiteral(ValueStoreRevision revision, String label, String lang) {
		this(revision, label, lang, UNKNOWN_ID);
	}

	public LmdbLiteral(ValueStoreRevision revision, String label, String lang, long internalID) {
		this.label = label;
		this.language = lang;
		coreDatatype = CoreDatatype.RDF.LANGSTRING;
		datatype = CoreDatatype.RDF.LANGSTRING.getIri();
		setInternalID(internalID, revision);
		this.initialized = true;
	}

	public LmdbLiteral(ValueStoreRevision revision, String label, IRI datatype) {
		this(revision, label, datatype, UNKNOWN_ID);
	}

	public LmdbLiteral(ValueStoreRevision revision, String label, IRI datatype, CoreDatatype coreDatatype) {
		this(revision, label, datatype, coreDatatype, UNKNOWN_ID);
	}

	public LmdbLiteral(ValueStoreRevision revision, String label, CoreDatatype datatype) {
		this(revision, label, datatype, UNKNOWN_ID);
	}

	public LmdbLiteral(ValueStoreRevision revision, String label, IRI datatype, long internalID) {
		this.label = label;
		this.datatype = datatype;
		this.coreDatatype = null;
		setInternalID(internalID, revision);
		this.initialized = true;
	}

	public LmdbLiteral(ValueStoreRevision revision, String label, IRI datatype, CoreDatatype coreDatatype,
			long internalID) {
		this.label = label;
		assert datatype != null;
		assert coreDatatype != null;
		assert coreDatatype == CoreDatatype.NONE || coreDatatype.getIri() == datatype;
		this.datatype = datatype;
		this.coreDatatype = coreDatatype;
		setInternalID(internalID, revision);
		this.initialized = true;
	}

	public LmdbLiteral(ValueStoreRevision revision, String label, CoreDatatype coreDatatype, long internalID) {
		this.label = label;
		this.coreDatatype = coreDatatype;
		this.datatype = coreDatatype.getIri();
		setInternalID(internalID, revision);
		this.initialized = true;
	}

	/*---------*
	 * Methods *
	 *---------*/

	@Override
	public void setInternalID(long internalID, ValueStoreRevision revision) {
		this.internalID = internalID;
		this.revision = revision;
	}

	@Override
	public ValueStoreRevision getValueStoreRevision() {
		return revision;
	}

	@Override
	public long getInternalID() {
		return internalID;
	}

	@Override
	public IRI getDatatype() {
		init();
		return datatype;
	}

	@Override
	public CoreDatatype getCoreDatatype() {
		init();
		if (coreDatatype == null) {
			coreDatatype = CoreDatatype.from(datatype);
		}
		return coreDatatype;
	}

	public void setDatatype(IRI datatype) {
		this.datatype = datatype;
		coreDatatype = null;
	}

	public void setDatatype(CoreDatatype coreDatatype) {
		this.coreDatatype = coreDatatype;
		datatype = coreDatatype.getIri();
	}

	@Override
	public String getLabel() {
		init();
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	@Override
	public Optional<String> getLanguage() {
		init();
		return Optional.ofNullable(language);
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	protected void init() {
		if (!initialized) {
			synchronized (this) {
				if (!initialized) {
					revision.resolveValue(internalID, this);
				}
				initialized = true;
			}
		}
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}

		if (o instanceof LmdbLiteral && internalID != UNKNOWN_ID) {
			LmdbLiteral otherLmdbLiteral = (LmdbLiteral) o;

			if (otherLmdbLiteral.internalID != UNKNOWN_ID
					&& revision.equals(otherLmdbLiteral.revision)) {
				// LmdbLiteral's from the same revision of the same lmdb store,
				// with both ID's set
				return internalID == otherLmdbLiteral.internalID;
			}
		}

		init();
		return super.equals(o);
	}

	@Override
	public int hashCode() {
		init();
		return super.hashCode();
	}

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

	protected Object writeReplace() throws ObjectStreamException {
		init();
		return this;
	}
}


text:
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Renci.SshNet.Tests.Properties;
using System;
using System.Diagnostics;
using System.Threading.Tasks;

namespace Renci.SshNet.Tests.Classes
{
    public partial class SshCommandTest
    {

        public void Test_MultipleThread_Example_MultipleConnections()
        {
            var host = Resources.HOST;
            var username = Resources.USERNAME;
            var password = Resources.PASSWORD;

            try
            {
                #region Example SshCommand RunCommand Parallel
                System.Threading.Tasks.Parallel.For(0, 10000,
                    () =>
                    {
                        var client = new SshClient(host, username, password);
                        client.Connect();
                        return client;
                    },
                    (int counter, ParallelLoopState pls, SshClient client) =>
                    {
                        var result = client.RunCommand("echo 123");
                        Debug.WriteLine(string.Format("TestMultipleThreadMultipleConnections #{0}", counter));
                        return client;
                    },
                    (SshClient client) =>
                    {
                        client.Disconnect();
                        client.Dispose();
                    }
                );
                #endregion

            }
            catch (Exception exp)
            {
                Assert.Fail(exp.ToString());
            }
        }

        //[TestMethod]
        public void Test_MultipleThread_10000_MultipleConnections()
        {
            try
            {
                System.Threading.Tasks.Parallel.For(0, 10000,
                    () =>
                    {
                        var client = new SshClient(Resources.HOST, Resources.USERNAME, Resources.PASSWORD);
                        client.Connect();
                        return client;
                    },
                    (int counter, ParallelLoopState pls, SshClient client) =>
                    {
                        var result = ExecuteTestCommand(client);
                        Debug.WriteLine(string.Format("TestMultipleThreadMultipleConnections #{0}", counter));
                        Assert.IsTrue(result);
                        return client;
                    },
                    (SshClient client) =>
                    {
                        client.Disconnect();
                        client.Dispose();
                    }
                );
            }
            catch (Exception exp)
            {
                Assert.Fail(exp.ToString());
            }
        }

        //[TestMethod]
        public void Test_MultipleThread_10000_MultipleSessions()
        {
            using (var client = new SshClient(Resources.HOST, Resources.USERNAME, Resources.PASSWORD))
            {
                client.Connect();
                System.Threading.Tasks.Parallel.For(0, 10000,
                    (counter) =>
                    {
                        var result = ExecuteTestCommand(client);
                        Debug.WriteLine(string.Format("TestMultipleThreadMultipleConnections #{0}", counter));
                        Assert.IsTrue(result);
                    }
                );

                client.Disconnect();
            }
        }
    }
}


text:
package com.dylanjsa.cryptopia.remote.data.enums;

/**
 * Created by Dylan Janeke on 2017/06/23.
 */
public enum TransactionType {
    DEPOSIT("Deposit"), WITHDRAW("Withdraw");
    private final String label;
    TransactionType(String l) {
        this.label = l;
    }

    public static TransactionType byLabel(String l) {
        for (TransactionType st : values()) {
            if (st.label.equals(l)) {
                return st;
            }
        }
        return null;
    }

    public String getLabel() {
        return label;
    }
}


text:
<?php
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);

$result_id = $request->result_id;

$servername = "localhost";
$username   = "root";
$password   = "6462093221";
$dbname     = "acp";

$con = new mysqli($servername, $username, $password, $dbname);

if ($con->connect_error) {
    die("Connection failed: " . $con->connect_error);
}

$sql = <<<SQL
    delete from tb_result
          where result_id = $result_id
SQL;

if ($con->query($sql) === TRUE) {
    echo "Selected result deleted successfully";
} else {
    echo "Error: " . $sql . ", " . $con->error;
}

$con->close();
?>


text:
"use strict";

// OverPass Server Control(Width easy cache)
var OvPassCnt = (function () {
	return {
		get: function (targets, poi, progress) {
			return new Promise((resolve, reject) => {
				let LL = GeoCont.get_LL();
				let offset_lat = (LL.NW.lat - LL.SE.lat) / 4;
				let offset_lng = (LL.SE.lng - LL.NW.lng) / 4;
				let SE_lat = LL.SE.lat - offset_lat;
				let SE_lng = LL.SE.lng + offset_lng;
				let NW_lat = LL.NW.lat + offset_lat;
				let NW_lng = LL.NW.lng - offset_lng;
				let maparea = SE_lat + ',' + NW_lng + ',' + NW_lat + ',' + SE_lng;
				let query = "";
				targets.forEach(key => { for (let idx in Conf.target[key].overpass) query += Conf.target[key].overpass[idx] + ";" });
				let url = Conf.default.OverPassServer + `?data=[out:json][timeout:30][bbox:${maparea}];(${query});(._;>;);out body qt;`;
				console.log("GET: " + url);
				$.ajax({
					"type": 'GET', "dataType": 'json', "url": url, "cache": false, "xhr": function () {
						var xhr = new window.XMLHttpRequest();
						xhr.addEventListener("progress", function (evt) {
							console.log("OvPassCnt.get: Progress: " + evt.loaded);
							if (progress !== undefined) progress(evt.loaded);
						}, false);
						return xhr;
					}
				}).done(function (data) {
					console.log("OvPassCnt.get: done.");
					if (data.elements.length == 0) { resolve(); return };
					let osmxml = data;
					let geojson = osmtogeojson(osmxml, { flatProperties: true });
					geojson = geojson.features.filter(node => {      	// 非対応の店舗はキャッシュに載せない
						let tags = node.properties;
						if (poi && !targets.includes("wikipedia")) {			// Poi(Wikipedia以外)の場合
							if (PoiCont.get_catname(tags) !== "") {
								let result = false;     // takeaway and delivery tag check
								let take1 = tags.takeaway == undefined ? "" : tags.takeaway;                        // どれか一つにYesがあればOK
								let take2 = tags["takeaway:covid19"] == undefined ? "" : tags["takeaway:covid19"];
								let deli1 = tags.delivery == undefined ? "" : tags.delivery;
								let deli2 = tags["delivery:covid19"] == undefined ? "" : tags["delivery:covid19"];
								if ([take1, take2].includes("yes")) result = true;
								if ([take1, take2].includes("only")) result = true;
								if ([deli1, deli2].includes("yes")) result = true;
								if ([deli1, deli2].includes("only")) result = true;
								if ([take1, take2, deli1, deli2].filter(Boolean).length > 0) {  // タグが一つでもあれば判定終了
									if (result) return node;
								} else {        	        				// 自動販売機や図書館など
									return node;
								};
							};
						} else if (poi && targets.includes("wikipedia")) {	// Poi(Wikipedia)の場合
							if (PoiCont.get_wikiname(tags)) return node;	// tagがある場合は残す
						} else {											// Poi以外の場合(LineやPolygon)
							return node;
						};
					});
					resolve(OvPassCnt.set_targets(geojson));				// Target Set
				}).fail(function (jqXHR, statusText, errorThrown) {
					console.log(statusText);
					reject(jqXHR, statusText, errorThrown);
				});
			});
		},
		set_targets: (geojson) => {    // geojsonからtargetsを割り振る
			console.log("set_targets: " + geojson.length);
			let Datas = { "geojson": [], "targets": [] };
			geojson.forEach(function (val1, idx) {
				Datas.geojson.push(val1);
				let cidx = Datas.geojson.length - 1;

				let keys = Object.keys(Conf.target).filter(key => Conf.target[key].file == undefined);
				keys.forEach(val2 => {
					var target = val2;
					Conf.target[target].tags.forEach(function (tag) {		// target[category].tags による該当チェック
						let tag_kv = tag.split("=").concat([""]);
						let tag_not = tag_kv[0].slice(-1) == "!" ? true : false;
						tag_kv[0] = tag_kv[0].replace(/!/, "");
						if (val1.properties[tag_kv[0]] !== undefined) {		// タグがある場合
							if ((val1.properties[tag_kv[0]] == tag_kv[1] ^ tag_not) || tag_kv[1] == "") {
								if (Datas.targets[cidx] == undefined) {  	//
									Datas.targets[cidx] = [target];
								} else if (Datas.targets[cidx].indexOf(target) === -1) {
									Datas.targets[cidx].push(target);
								};
							};
						};
					});
				});
			});
			return Datas;
		},
		// ovanswerから指定したtargetのgeojsonを返す
		get_target: (ovanswer, target) => {
			let geojson = ovanswer.geojson.filter(function (val, gidx) {
				let found = false;
				for (let tidx in ovanswer.targets[gidx]) {
					if (ovanswer.targets[gidx][tidx] == target) { found = true; break };
				};
				return found;
			});
			//console.log(geojson);
			return geojson;
		}
	}
})();


text:
package org.apache.flink.table.api;

import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.table.expressions.ApiExpressionUtils;
import org.apache.flink.table.expressions.Expression;

/** Session window on time with alias. Fully specifies a window. */
@PublicEvolving
public final class SessionWithGapOnTimeWithAlias extends GroupWindow {

    private final Expression gap;

    SessionWithGapOnTimeWithAlias(Expression alias, Expression timeField, Expression gap) {
        super(alias, timeField);
        this.gap = ApiExpressionUtils.unwrapFromApi(gap);
    }

    public Expression getGap() {
        return gap;
    }
}


text:
/* comprs.c - LZW compression code for GIF */

/*
 * ABSTRACT:
 *	The compression algorithm builds a string translation table that maps
 *	substrings from the input string into fixed-length codes.  These codes
 *	are used by the expansion algorithm to rebuild the compressor's table
 *	and reconstruct the original data stream.  In it's simplest form, the
 *	algorithm can be stated as:
 *
 *		"if <w>k is in the table, then <w> is in the table"
 *
 *	<w> is a code which represents a string in the table.  When a new
 *	character k is read in, the table is searched for <w>k.  If this
 *	combination is found, <w> is set to the code for that combination
 *	and the next character is read in.  Otherwise, this combination is
 *	added to the table, the code <w> is written to the output stream and
 *	<w> is set to k.
 *
 *	The expansion algorithm builds an identical table by parsing each
 *	received code into a prefix string and suffix character.  The suffix
 *	character is pushed onto the stack and the prefix string translated
 *	again until it is a single character.  This completes the expansion.
 *	The expanded code is then output by popping the stack and a new entry
 *	is made in the table.
 *
 *	The algorithm used here has one additional feature.  The output codes
 *	are variable length.  They start at a specified number of bits.  Once
 *	the number of codes exceeds the current code size, the number of bits
 *	in the code is incremented.  When the table is completely full, a
 *	clear code is transmitted for the expander and the table is reset.
 *	This program uses a maximum code size of 12 bits for a total of 4096
 *	codes.
 *
 *	The expander realizes that the code size is changing when it's table
 *	size reaches the maximum for the current code size.  At this point,
 *	the code size in increased.  Remember that the expander's table is
 *	identical to the compressor's table at any point in the original data
 *	stream.
 *
 *	The compressed data stream is structured as follows:
 *		first byte denoting the minimum code size
 *		one or more counted byte strings. The first byte contains the
 *		length of the string. A null string denotes "end of data"
 *
 *	This format permits a compressed data stream to be embedded within a
 *	non-compressed context.
 *
 * AUTHOR: Steve Wilhite
 *
 * REVISION HISTORY:
 *   Speed tweaked a bit by Jim Kent 8/29/88
 *
 */

#include "common.h"
#include <setjmp.h>

#define UBYTE unsigned char

#define LARGEST_CODE	4095
#define TABLE_SIZE	(8*1024)

static UBYTE gif_byte_buff[256+3];               /* Current block */
static FILE *gif_file;

static unsigned char *gif_wpt;
static long gif_wcount;

static jmp_buf recover;

static short *prior_codes;
static short *code_ids;
static unsigned char *added_chars;

static short code_size;
static short clear_code;
static short eof_code;
static short bit_offset;
static short max_code;
static short free_code;

static void init_table(short min_code_size)
{
code_size = min_code_size + 1;
clear_code = 1 << min_code_size;
eof_code = clear_code + 1;
free_code = clear_code + 2;
max_code = 1 << code_size;

zeroBytes(code_ids, TABLE_SIZE*sizeof(code_ids[0]));
}

static void flush(size_t n)
{
if (fputc(n,gif_file) < 0)
    {
    longjmp(recover, -3);
    }
if (fwrite(gif_byte_buff, 1, n, gif_file) < n)
    {
    longjmp(recover, -3);
    }
}

static void write_code(short code)
{
long temp;
register short byte_offset;
register short bits_left;

byte_offset = bit_offset >> 3;
bits_left = bit_offset & 7;

if (byte_offset >= 254)
	{
	flush(byte_offset);
	gif_byte_buff[0] = gif_byte_buff[byte_offset];
	bit_offset = bits_left;
	byte_offset = 0;
	}

if (bits_left > 0)
	{
	temp = ((long) code << bits_left) | gif_byte_buff[byte_offset];
	gif_byte_buff[byte_offset] = (UBYTE)temp;
	gif_byte_buff[byte_offset + 1] = (UBYTE)(temp >> 8);
	gif_byte_buff[byte_offset + 2] = (UBYTE)(temp >> 16);
	}
else
	{
	gif_byte_buff[byte_offset] = (UBYTE)code;
	gif_byte_buff[byte_offset + 1] = (UBYTE)(code >> 8);
	}
bit_offset += code_size;
}

/*
 * Function:
 *	Compress a stream of data bytes using the LZW algorithm.
 *
 * Inputs:
 *	min_code_size
 *		the field size of an input value.  Should be in the range from
 *		1 to 9.
 *
 * Returns:
 *	 0	normal completion
 *	-1	(not used)
 *	-2	insufficient dynamic memory
 *	-3	bad "min_code_size"
 *	< -3	error status from either the get_byte or put_byte routine
 */
static short compress_data(int min_code_size)
{
short status;
short prefix_code;
short d;
register int hx;
register short suffix_char;

status = setjmp(recover);

if (status != 0)
    {
    return status;
    }

bit_offset = 0;
init_table(min_code_size);
write_code(clear_code);
suffix_char = *gif_wpt++;
gif_wcount -= 1;

prefix_code = suffix_char;

while (--gif_wcount >= 0)
    {
    suffix_char = *gif_wpt++;
    hx = prefix_code ^ suffix_char << 5;
    d = 1;

    for (;;)
	{
	if (code_ids[hx] == 0)
	    {
	    write_code(prefix_code);

	    d = free_code;

	    if (free_code <= LARGEST_CODE)
		{
		prior_codes[hx] = prefix_code;
		added_chars[hx] = (UBYTE)suffix_char;
		code_ids[hx] = free_code;
		free_code++;
		}

	    if (d == max_code)
		{
		if (code_size < 12)
		    {
		    code_size++;
		    max_code <<= 1;
		    }
		else
		    {
		    write_code(clear_code);
		    init_table(min_code_size);
		    }
	        }

	    prefix_code = suffix_char;
	    break;
	    }

	if (prior_codes[hx] == prefix_code &&
		added_chars[hx] == suffix_char)
	    {
	    prefix_code = code_ids[hx];
	    break;
	    }

	hx += d;
	d += 2;
	if (hx >= TABLE_SIZE)
	    hx -= TABLE_SIZE;
	}
    }

write_code(prefix_code);

write_code(eof_code);

/* Make sure the code buffer is flushed */

if (bit_offset > 0)
    {
    int byte_offset = (bit_offset >> 3);
    if (byte_offset == 255)	/* Make sure we don't write a zero by mistake. */
        {
	int bits_left = bit_offset & 7;
	flush(255);
	if (bits_left)
	    {
	    gif_byte_buff[0] = gif_byte_buff[byte_offset];
	    flush(1);
	    }
	}
    else
	{
	flush((bit_offset + 7)/8);
	}
    }

flush(0);				/* end-of-data */
return 0;
}

short gif_compress_data(int min_code_size, unsigned char *pt, long size, FILE *out)
{
int ret;

/* Make sure min_code_size is reasonable. */
if (min_code_size < 2 || min_code_size > 9)
    {
    if (min_code_size == 1)
	min_code_size = 2;
    else
	return -3;
    }

/* Store input parameters where rest of routines can use. */
gif_file = out;
gif_wpt = pt;
gif_wcount = size;

ret = -2;	/* out of memory default */
prior_codes = NULL;
code_ids = NULL;
added_chars = NULL;
if ((prior_codes = (short*)needMem(TABLE_SIZE*sizeof(short))) == NULL)
	goto OUT;
if ((code_ids = (short*)needMem(TABLE_SIZE*sizeof(short))) == NULL)
	goto OUT;
if ((added_chars = (unsigned char*)needMem(TABLE_SIZE)) == NULL)
	goto OUT;

ret = compress_data(min_code_size);

OUT:
gentleFree(prior_codes);
gentleFree(code_ids);
gentleFree(added_chars);
return(ret);
}


text:
package com.evolveum.midpoint.model.impl.util;

import com.evolveum.midpoint.audit.api.AuditEventRecord;
import com.evolveum.midpoint.audit.api.AuditService;
import com.evolveum.midpoint.prism.PrismContext;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.delta.ObjectDelta;
import com.evolveum.midpoint.prism.polystring.PolyString;
import com.evolveum.midpoint.repo.api.RepositoryService;
import com.evolveum.midpoint.schema.GetOperationOptions;
import com.evolveum.midpoint.schema.ObjectDeltaOperation;
import com.evolveum.midpoint.schema.SchemaHelper;
import com.evolveum.midpoint.schema.SelectorOptions;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.schema.util.ObjectDeltaSchemaLevelUtil;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.util.exception.ObjectNotFoundException;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import java.util.Collection;

import static com.evolveum.midpoint.schema.util.ObjectDeltaSchemaLevelUtil.resolveNames;

/**
 *  Uses cache repository service to resolve object names.
 */
@Component
public class AuditHelper {

    @Autowired private AuditService auditService;
    @Autowired private PrismContext prismContext;
    @Autowired private SchemaHelper schemaHelper;
    @Autowired
    @Qualifier("cacheRepositoryService")
    private RepositoryService repositoryService;

    /**
     * @param externalNameResolver Name resolver that should be tried first. It should be fast. If it returns null it means
     *                             "I don't know".
     */
    public void audit(AuditEventRecord record, ObjectDeltaSchemaLevelUtil.NameResolver externalNameResolver, Task task,
            OperationResult parentResult) {
        // TODO we could obtain names for objects that were deleted e.g. from the lens context (MID-5501)
        if (record.getDeltas() != null) {
            for (ObjectDeltaOperation<? extends ObjectType> objectDeltaOperation : record.getDeltas()) {
                ObjectDelta<? extends ObjectType> delta = objectDeltaOperation.getObjectDelta();
                ObjectDeltaSchemaLevelUtil.NameResolver nameResolver = (objectClass, oid) -> {
                    OperationResult result = parentResult.subresult(AuditHelper.class.getName() + ".resolveName")
                            .setMinor()
                            .build();
                    try {
                        if (record.getNonExistingReferencedObjects().contains(oid)) {
                            // This information could get from upper layers (not now, but maybe in the future).
                            return null;
                        }
                        if (externalNameResolver != null) {
                            PolyString externallyResolvedName = externalNameResolver.getName(objectClass, oid);
                            if (externallyResolvedName != null) {
                                return externallyResolvedName;
                            }
                        }
                        // we use null options here, in order to utilize the local or global repository cache
                        Collection<SelectorOptions<GetOperationOptions>> options = schemaHelper.getOperationOptionsBuilder()
                                .allowNotFound().build();
                        PrismObject<? extends ObjectType> object = repositoryService.getObject(objectClass, oid, options, result);
                        return object.getName();
                    } catch (ObjectNotFoundException e) {
                        record.addNonExistingReferencedObject(oid);
                        return null;        // we will NOT record an error here
                    } catch (Throwable t) {
                        result.recordFatalError(t.getMessage(), t);
                        throw t;
                    } finally {
                        result.computeStatusIfUnknown();
                    }
                };
                resolveNames(delta, nameResolver, prismContext);
            }
        }
        auditService.audit(record, task);
    }
}


text:
<?php

/* projectBundle:besoin:listBesoin.html.twig */
class __TwigTemplate_edd3153dbc0fc40413c533d53c8511aef02d67a6ce56a6da78931556b3aeff3d extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->blocks = array(
            'Containtname' => array($this, 'block_Containtname'),
            'Containt' => array($this, 'block_Containt'),
        );
    }

    protected function doGetParent(array $context)
    {
        // line 2
        return $this->env->resolveTemplate(array(0 => "userBundle:dashboard:dashboard.html.twig"));
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_Containtname($context, array $blocks = array())
    {
        // line 4
        echo "          ";
        if ($this->env->getExtension('security')->isGranted("ROLE_INTERCLIENT")) {
            echo "

            env, $this->env->getExtension('routing')->getPath("Besoin_add", array("idprojet" => $this->getAttribute($this->getAttribute($_app_, "request", array()), "get", array(0 => "idprojet"), "method"))), "html", null, true);
            echo "\">
                Ajouter un nouveau besoin

";
        } else {
            // line 8
            echo "

";
        }
        // line 9
        echo "
    ";
    }

    // line 11
    public function block_Containt($context, array $blocks = array())
    {
        // line 12
        echo "

        ";
        // line 19
        if (isset($context["verBesoin"])) { $_verBesoin_ = $context["verBesoin"]; } else { $_verBesoin_ = null; }
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable($_verBesoin_);
        foreach ($context['_seq'] as $context["_key"] => $context["besoin"]) {
            // line 20
            echo "

                    env, $this->getAttribute($_besoin_, "id", array()), "html", null, true);
            echo "\">

";
            // line 27
            if (isset($context["besoin"])) { $_besoin_ = $context["besoin"]; } else { $_besoin_ = null; }
            echo twig_escape_filter($this->env, $this->getAttribute($_besoin_, "nom", array()), "html", null, true);
            echo "

Version ";
            // line 29
            if (isset($context["besoin"])) { $_besoin_ = $context["besoin"]; } else { $_besoin_ = null; }
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_besoin_, "version", array()), "count", array()), "html", null, true);
            echo "

View

env, $this->getAttribute($_besoin_, "id", array()), "html", null, true);
            echo "\" class=\"panel-collapse collapse\">

                    ";
            // line 40
            if (isset($context["besoin"])) { $_besoin_ = $context["besoin"]; } else { $_besoin_ = null; }
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute($_besoin_, "version", array()));
            foreach ($context['_seq'] as $context["_key"] => $context["version"]) {
                // line 41
                echo "

                            ";
                // line 44
                if (isset($context["version"])) { $_version_ = $context["version"]; } else { $_version_ = null; }
                if (($this->getAttribute($_version_, "curent", array()) == "true")) {
                    echo "
                            Nouveau

                            ";
                } else {
                    // line 47
                    echo "Ancien";
                }
                echo "
                            ";
                // line 48
                if (isset($context["version"])) { $_version_ = $context["version"]; } else { $_version_ = null; }
                echo twig_escape_filter($this->env, $this->getAttribute($_version_, "descp", array()), "html", null, true);
                echo "

Rédiger le :";
                if (isset($context["version"])) { $_version_ = $context["version"]; } else { $_version_ = null; }
                echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($_version_, "date", array()), "d/m/y"), "html", null, true);
                echo " par  ";
                if (isset($context["version"])) { $_version_ = $context["version"]; } else { $_version_ = null; }
                echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_version_, "redact", array()), "getNom", array()), "html", null, true);
                echo "
                            ";
                // line 49
                if (isset($context["version"])) { $_version_ = $context["version"]; } else { $_version_ = null; }
                if (($this->getAttribute($_version_, "curent", array()) == "true")) {
                    echo "
                                ";
                    // line 50
                    if (isset($context["version"])) { $_version_ = $context["version"]; } else { $_version_ = null; }
                    if ( !(null === $this->getAttribute($_version_, "getDoc", array()))) {
                        echo "
 env, $this->getAttribute($this->getAttribute($_version_, "getDoc", array()), "getAbsolutePath", array()), "html", null, true);
                        echo "\">";
                        if (isset($context["version"])) { $_version_ = $context["version"]; } else { $_version_ = null; }
                        echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($_version_, "getDoc", array()), "getWebPath", array()), "html", null, true);
                        echo "";
                    }
                    // line 51
                    echo "

                          ";
                    // line 52
                    if ($this->env->getExtension('security')->isGranted("ROLE_INTERCLIENT")) {
                        echo "      env, $this->env->getExtension('routing')->getPath("Doc_add", array("idprojet" => $this->getAttribute($this->getAttribute($_app_, "request", array()), "get", array(0 => "idprojet"), "method"), "vBesoin" => $this->getAttribute($_version_, "id", array()))), "html", null, true);
                        echo "\">
                                       Attacher un fichier

";
                    }
                    // line 56
                    echo "
                               ";
                    // line 57
                    if ($this->env->getExtension('security')->isGranted("ROLE_INTERCAP")) {
                        echo "   env, $this->env->getExtension('routing')->getPath("Exigence_list", array("idprojet" => $this->getAttribute($this->getAttribute($_app_, "request", array()), "get", array(0 => "idprojet"), "method"), "vBesoin" => $this->getAttribute($_version_, "id", array()))), "html", null, true);
                        echo "\">
                                       Ajouter une exigence

  ";
                    }
                    // line 61
                    echo "

                                ";
                    // line 62
                    if ($this->env->getExtension('security')->isGranted("ROLE_INTERCLIENT")) {
                        echo "
                                  env, $this->env->getExtension('routing')->getPath("Vbesoin_add", array("idprojet" => $this->getAttribute($this->getAttribute($_app_, "request", array()), "get", array(0 => "idprojet"), "method"), "idbesoin" => $this->getAttribute($this->getAttribute($_version_, "getBesoin", array()), "getId", array()))), "html", null, true);
                        echo "\">
                                       Ajouter une nouvelle version
                                   ";
                    }
                    // line 66
                    echo "

                            ";
                }
                // line 69
                echo "

                    ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['version'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 72
            echo "

      ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['besoin'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 77
        echo "

    ";
    }

    public function getTemplateName()
    {
        return "projectBundle:besoin:listBesoin.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  223 => 77,  213 => 72,  205 => 69,  200 => 66,  192 => 63,  188 => 62,  185 => 61,  174 => 57,  171 => 56,  160 => 52,  157 => 51,  146 => 50,  141 => 49,  130 => 48,  125 => 47,  117 => 44,  112 => 41,  107 => 40,  99 => 36,  88 => 29,  82 => 27,  75 => 24,  69 => 20,  64 => 19,  55 => 12,  52 => 11,  47 => 9,  44 => 8,  36 => 5,  31 => 4,  28 => 3,  19 => 2,);
    }
}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace CloudinaryDotNet.Actions
{
    /// <summary>
    /// Parameters of context management
    /// </summary>
    public class ContextParams : BaseParams
    {
        List<string> m_publicIds = new List<string>();

        /// <summary>
        /// A list of Public IDs of images uploaded to Cloudinary.
        /// </summary>
        public List<string> PublicIds
        {
            get { return m_publicIds; }
            set { m_publicIds = value; }
        }

        /// <summary>
        /// The context name to assign or remove.
        /// </summary>
        public string Context { get; set; }

        /// <summary>
        /// General textual context metadata
        /// </summary>
        public StringDictionary ContextDict { get; set; }

        /// <summary>
        /// Type
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// The action to perform on image resources using the given context.
        /// </summary>
        public ContextCommand Command { get; set; }

        /// <summary>
        /// Validate object model
        /// </summary>
        public override void Check()
        {
            // ok
        }

        /// <inheritdoc />
        /// <summary>
        /// Maps object model to dictionary of parameters in cloudinary notation
        /// </summary>
        /// <returns>Sorted dictionary of parameters</returns>
        public override SortedDictionary<string, object> ToParamsDictionary()
        {
            var dict = base.ToParamsDictionary();

            var contextPairs = new List<string>();

            if (ContextDict?.SafePairs != null)
            {
                contextPairs.AddRange(ContextDict.SafePairs);
            }

            if (!string.IsNullOrEmpty(Context))
            {
                contextPairs.Add(Context);
            }

            if (contextPairs.Count > 0)
            {
                AddParam(dict, Constants.CONTEXT_PARAM_NAME, Utils.SafeJoin("|", contextPairs));
            }

            AddParam(dict, Constants.PUBLIC_IDS, PublicIds);
            AddParam(dict, Constants.COMMAND, ApiShared.GetCloudinaryParam(Command));

            return dict;
        }
    }

    /// <summary>
    /// The action to perform on image resources using the given context.
    /// </summary>
    public enum ContextCommand
    {
        /// <summary>
        /// Assign the given context to the resources with the given Public IDs.
        /// </summary>
        [EnumMember(Value = "add")]
        Add,
        /// <summary>
        /// Remove all contexts from resources with the given Public IDs.
        /// </summary>
        [EnumMember(Value = "remove_all")]
        RemoveAll
    }
}