text:
UPDATE
======

The *UPDATE* keyword can be used to partially update documents in a collection. On a
single server, updates are executed transactionally in an all-or-nothing fashion.
For sharded collections, the entire update operation is not transactional.

Each *UPDATE* operation is restricted to a single collection, and the
[collection name](../../Manual/Appendix/Glossary.html#collection-name) must not be dynamic.
Only a single *UPDATE* statement per collection is allowed per AQL query, and
it cannot be followed by read operations that access the same collection, by
traversal operations, or AQL functions that can read documents.
The system attributes *_id*, *_key* and *_rev* cannot be updated, *_from* and *_to* can.

The two syntaxes for an update operation are:

```
UPDATE document IN collection options
UPDATE keyExpression WITH document IN collection options
```

*collection* must contain the name of the collection in which the documents should
be updated. *document* must be a document that contains the attributes and values
to be updated. When using the first syntax, *document* must also contain the *_key*
attribute to identify the document to be updated.

```js
FOR u IN users
  UPDATE { _key: u._key, name: CONCAT(u.firstName, " ", u.lastName) } IN users
```

The following query is invalid because it does not contain a *_key* attribute and
thus it is not possible to determine the documents to be updated:

```js
FOR u IN users
  UPDATE { name: CONCAT(u.firstName, " ", u.lastName) } IN users
```

When using the second syntax, *keyExpression* provides the document identification.
This can either be a string (which must then contain the document key) or a
document, which must contain a *_key* attribute.

The following queries are equivalent:

```js
FOR u IN users
  UPDATE u._key WITH { name: CONCAT(u.firstName, " ", u.lastName) } IN users

FOR u IN users
  UPDATE { _key: u._key } WITH { name: CONCAT(u.firstName, " ", u.lastName) } IN users

FOR u IN users
  UPDATE u WITH { name: CONCAT(u.firstName, " ", u.lastName) } IN users
```

An update operation may update arbitrary documents which do not need to be identical
to the ones produced by a preceding *FOR* statement:

```js
FOR i IN 1..1000
  UPDATE CONCAT('test', i) WITH { foobar: true } IN users

FOR u IN users
  FILTER u.active == false
  UPDATE u WITH { status: 'inactive' } IN backup
```

### Using the current value of a document attribute

The pseudo-variable `OLD` is not supported inside of `WITH` clauses (it is
available after `UPDATE`). To access the current attribute value, you can
usually refer to a document via the variable of the `FOR` loop, which is used
to iterate over a collection:

```js
FOR doc IN users
  UPDATE doc WITH {
    fullName: CONCAT(doc.firstName, " ", doc.lastName)
  } IN users
```

If there is no loop, because a single document is updated only, then there
might not be a variable like above (`doc`), which would let you refer to the
document which is being updated:

```js
UPDATE "users/john" WITH { ... } IN users
```

To access the current value in this situation, the document has to be retrieved
and stored in a variable first:

```js
LET doc = DOCUMENT("users/john")
UPDATE doc WITH {
  fullName: CONCAT(doc.firstName, " ", doc.lastName)
} IN users
```

An existing attribute can be modified based on its current value this way,
to increment a counter for instance:

```js
UPDATE doc WITH {
  karma: doc.karma + 1
} IN users
```

If the attribute `karma` doesn't exist yet, `doc.karma` is evaluated to *null*.
The expression `null + 1` results in the new attribute `karma` being set to *1*.
If the attribute does exist, then it is increased by *1*.

Arrays can be mutated too of course:

```js
UPDATE doc WITH {
  hobbies: PUSH(doc.hobbies, "swimming")
} IN users
```

If the attribute `hobbies` doesn't exist yet, it is conveniently initialized
as `[ "swimming" ]` and otherwise extended.

### Setting query options

*options* can be used to suppress query errors that may occur when trying to
update non-existing documents or violating unique key constraints:

```js
FOR i IN 1..1000
  UPDATE {
    _key: CONCAT('test', i)
  } WITH {
    foobar: true
  } IN users OPTIONS { ignoreErrors: true }
```

An update operation will only update the attributes specified in *document* and
leave other attributes untouched. Internal attributes (such as *_id*, *_key*, *_rev*,
*_from* and *_to*) cannot be updated and are ignored when specified in *document*.
Updating a document will modify the document's revision number with a server-generated value.

When updating an attribute with a null value, ArangoDB will not remove the attribute
from the document but store a null value for it. To get rid of attributes in an update
operation, set them to null and provide the *keepNull* option:

```js
FOR u IN users
  UPDATE u WITH {
    foobar: true,
    notNeeded: null
  } IN users OPTIONS { keepNull: false }
```

The above query will remove the *notNeeded* attribute from the documents and update
the *foobar* attribute normally.

There is also the option *mergeObjects* that controls whether object contents will be
merged if an object attribute is present in both the *UPDATE* query and in the
to-be-updated document.

The following query will set the updated document's *name* attribute to the exact
same value that is specified in the query. This is due to the *mergeObjects* option
being set to *false*:

```js
FOR u IN users
  UPDATE u WITH {
    name: { first: "foo", middle: "b.", last: "baz" }
  } IN users OPTIONS { mergeObjects: false }
```

Contrary, the following query will merge the contents of the *name* attribute in the
original document with the value specified in the query:

```js
FOR u IN users
  UPDATE u WITH {
    name: { first: "foo", middle: "b.", last: "baz" }
  } IN users OPTIONS { mergeObjects: true }
```

Attributes in *name* that are present in the to-be-updated document but not in the
query will now be preserved. Attributes that are present in both will be overwritten
with the values specified in the query.

Note: the default value for *mergeObjects* is *true*, so there is no need to specify it
explicitly.

To make sure data are durable when an update query returns, there is the *waitForSync*
query option:

```js
FOR u IN users
  UPDATE u WITH {
    foobar: true
  } IN users OPTIONS { waitForSync: true }
```

### Returning the modified documents

The modified documents can also be returned by the query. In this case, the `UPDATE`
statement needs to be followed a `RETURN` statement (intermediate `LET` statements
are allowed, too). These statements can refer to the pseudo-values `OLD` and `NEW`.
The `OLD` pseudo-value refers to the document revisions before the update, and `NEW`
refers to document revisions after the update.

Both `OLD` and `NEW` will contain all document attributes, even those not specified
in the update expression.

```
UPDATE document IN collection options RETURN OLD
UPDATE document IN collection options RETURN NEW
UPDATE keyExpression WITH document IN collection options RETURN OLD
UPDATE keyExpression WITH document IN collection options RETURN NEW
```

Following is an example using a variable named `previous` to capture the original
documents before modification. For each modified document, the document key is returned.

```js
FOR u IN users
  UPDATE u WITH { value: "test" }
  LET previous = OLD
  RETURN previous._key
```

The following query uses the `NEW` pseudo-value to return the updated documents,
without some of the system attributes:

```js
FOR u IN users
  UPDATE u WITH { value: "test" }
  LET updated = NEW
  RETURN UNSET(updated, "_key", "_id", "_rev")
```

It is also possible to return both `OLD` and `NEW`:

```js
FOR u IN users
  UPDATE u WITH { value: "test" }
  RETURN { before: OLD, after: NEW }
```


text:
import BRDF_Lambert from './BSDF/BRDF_Lambert.js';
import BRDF_GGX from './BSDF/BRDF_GGX.js';
import ShaderNode from '../shadernode/ShaderNode.js';
import {
	mul, saturate, dot, transformedNormalView,
	diffuseColor, specularColor, roughness
} from '../shadernode/ShaderNodeElements.js';

const RE_Direct_Physical = new ShaderNode( ( inputs ) => {

	const { lightDirection, lightColor, reflectedLight } = inputs;

	const dotNL = saturate( dot( transformedNormalView, lightDirection ) );
	const irradiance = mul( dotNL, lightColor );

	reflectedLight.directSpecular.add( mul( irradiance, BRDF_GGX.call( { lightDirection, f0: specularColor, f90: 1, roughness } ) ) );

	reflectedLight.directDiffuse.add( mul( irradiance, BRDF_Lambert.call( { diffuseColor: diffuseColor.rgb } ) ) );

} );

const PhysicalLightingModel = new ShaderNode( ( inputs/*, builder*/ ) => {

	RE_Direct_Physical.call( inputs );

} );

export default PhysicalLightingModel;

redpajama_set_name: RedPajamaGithub


text:
package com.github.fge.grappa.matchers.predicates;

import com.github.fge.grappa.matchers.MatcherType;
import com.github.fge.grappa.matchers.base.CustomDefaultLabelMatcher;
import com.github.fge.grappa.matchers.base.Matcher;
import com.github.fge.grappa.parsers.BaseParser;
import com.github.fge.grappa.rules.Rule;
import com.github.fge.grappa.run.context.MatcherContext;

import java.util.Objects;

/**
 * A "negative lookahead" matcher
 *
 *
This is the matcher used by {@link BaseParser#testNot(Object) testNot()}.
 * This matcher will run its submatcher and declare success if the submatcher
 * fails.

 *
 *
However, unlike other delegating matchers, after the submatcher is done,
 * it will reset both the current index and value stack to the values they had
 * when entering this matcher. Among other things, this means that this matcher
 * never advances in the input text.

 *
 * @see MatcherType#PREDICATE
 */
public final class TestNotMatcher
    extends CustomDefaultLabelMatcher<TestNotMatcher>
{
    private final Matcher subMatcher;

    public TestNotMatcher(final Rule subRule)
    {
        super(Objects.requireNonNull(subRule, "subRule"), "testNot");
        subMatcher = getChildren().get(0);
    }

    @Override
    public MatcherType getType()
    {
        return MatcherType.PREDICATE;
    }

    @Override
    public <V> boolean match(final MatcherContext<V> context)
    {
        final int lastIndex = context.getCurrentIndex();
        final Object valueStackSnapshot
            = context.getValueStack().takeSnapshot();

        if (subMatcher.getSubContext(context).runMatcher())
            return false;

        // reset location, Test matchers never advance
        context.setCurrentIndex(lastIndex);

        // erase all value stack changes the the submatcher could have made
        context.getValueStack().restoreSnapshot(valueStackSnapshot);
        return true;
    }
}


text:
var path = require('path');
var _;
var expand;
var write;

function checkDuplicates (pattern) {
	return function (p) {
		return path.basename(p).match(path.basename(pattern));
	}
}

// creates json file for Telemetry
var createTelemetryJSON = function (caseName, min) {

	var minified = min ? '.test.' : '';

	var jsonContent = {
		"description": caseName,
		"archive_data_file": "../data/" + caseName + ".json",
		"pages": [
			{
				"url": "file:///topcoat/" + caseName + minified + ".html",
				"smoothness": {
					"action": "scroll"
				}
			}
		]
	};

	var jsonFilePATH = "perf/page_sets/" + caseName + '.json';

	write(jsonFilePATH,
		JSON.stringify(jsonContent, null, 4),
		'utf8');
};

function relativeCSSPath (file, options) {

	var cssPath = null;

	if (typeof options == 'string') {
		var match = expand(path.join(file + options[i]));
		cssPath = match.length ? match[0] : null;
	} else {
		for (var i = 0; i < options.length && !cssPath; ++i) {

			// console.log(expand(path.resolve(file + options[i])),expand(file + options[i]));

			var match = expand(path.join(file + options[i]));
			console.log(match);
			if (match.length) {
				cssPath = match[0];
			}
		}

	}

	if (!cssPath) {
		console.log('No CSS match for',file);
		return '';
	}

	return cssPath;
}

module.exports = function (grunt) {

	_ = grunt.util._;
	expand = grunt.file.expand;
	write = grunt.file.write;

	grunt.registerTask('assemble-build', 'Generates test pages', function () {

		var pkgOptions = grunt.config('telemetry');
		var assembleConfigs = grunt.config('assemble');
		var chromiumSrc = process.env.CHROMIUM_SRC;

		// assign the instances variable to assemble
		// that will include the variable several times
		// in the page
		assembleConfigs.options.instances = pkgOptions.instances;

		// components is an array that will contain all the files
		// that match the pattern specified in the package.json
		// they are the pages that will be build for testing
		var components = grunt.file.expand(pkgOptions.files);
		var copyOpt = grunt.config('copy');

		components.forEach(function (c, idx) {

			if (components.filter(checkDuplicates(c)).length > 1) {
				grunt.log.warn('You have multiple files with the same name');
				grunt.log.warn(components.filter(checkDuplicates(c)));
			}

			// c = each file to be turned in a test page
			// cssPath = relative URL for the page css

			var cssPath = relativeCSSPath(c, pkgOptions.css)
				, fname = 'perf/page_sets/topcoat/' + path.basename(c)
				;

			createTelemetryJSON(path.basename(c, '.html'), pkgOptions.minified);

			assembleConfigs[path.basename(c)] = {
				files: {},
				options: {
					style: cssPath
				}
			}
			assembleConfigs[path.basename(c)].files[fname] = c;
			copyOpt.telemetry.files.push({
				src: cssPath,
				dest: path.join(chromiumSrc, '/tools/perf/page_sets/topcoat/')
			})
		});

		grunt.config('copy', copyOpt);
		grunt.config('assemble', assembleConfigs);
		grunt.task.run('assemble');

		if (pkgOptions.minified) {
			grunt.task.run('htmlmin');
		}

	});

}


text:
Container
=========

Simple Mac OSX application container for web technologies.

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

This project needs [cocoapods](http://beta.cocoapods.org)
for managing its dependencies.

    $ sudo gem install cocoapods

Install the dependencies in the Container project.

    $ pod install

Make sure to always open the Xcode workspace instead
of the project file when building your project:

    $ open Container.xcworkspace

Usage
-----

The document root of your html project is in `Resources/www`.
You can add directly your file in the finder and they will
appear in your project.

The entry point must be an `index.html` file.

The initial size of the main window can be changed in the
`MainMenu.xib` file.

New menu item can be added and interfaced with the javascript
used in the hmtl application.

Build and enjoy.

WebGL
-----

If you want to enable webgl in the webview, you can add the following
lines at the begining of the `-applicationDidFinishLaunching` method:

    // Enable WebGL.
    WebPreferences *preferences = [self.webView preferences];
    if ([preferences respondsToSelector:@selector(setWebGLEnabled:)])
    {
        [preferences performSelector:@selector(setWebGLEnabled:)
                          withObject: [NSNumber numberWithBool:YES]];
    }


text:
  Les Échelles est
      une ville géographiquement positionnée dans le département de Savoie en Rhône-Alpes. Elle totalisait 1 234 habitants en 2008.

À Les Échelles, le prix moyen à la vente d'un appartement s'évalue à 1 264 € du m² en vente. La valeur moyenne d'une maison à l'achat se situe à 1 370 € du m². À la location la valeur moyenne se situe à 10,82 € du m² par mois.

La localité dispose s'agissant de l'enseignement aux enfants de un collège.
Pour les plus petits d'entre nous, la localité est pourvue pour le bien être de sa population de une école primaire.
Les Échelles est équipée des  installations éducatives facilitant une éducation de qualité.
Si vous avez un projet d'acheter un bien immobilier à Les Échelles, vous devrez impérativement évaluer la qualité des équipements éducatifs

À proximité de Les Échelles sont localisées les villes de
Saint-Pierre-de-Genebroz située à 1 km, 277 habitants,
Corbel située à 5 km, 131 habitants,
Entre-deux-Guiers à 0 km, 1 631 habitants,
Saint-Christophe-sur-Guiers à 1 km, 766 habitants,
Miribel-les-Échelles localisée à 3 km, 1 733 habitants,
Saint-Laurent-du-Pont à 5 km, 4 489 habitants,
 entre autres. De plus, Les Échelles est située à seulement 26 km de Grenoble.

La commune propose quelques  équipements, elle propose entre autres un terrain de tennis et une boucle de randonnée.

Le nombre de logements, à Les Échelles, se décomposait en 2011 en 358 appartements et 305 maisons soit
 un marché plutôt équilibré.


text:
/*******************************************ÉêÃ÷***************************************
±¾Ç¶Èëʽ²Ù×÷ϵͳδ¾ÊÚȨ£¬½ûÖ¹Ó¦ÓÃÓÚÈκÎÉÌÒµÓÃ;
°æȨËùÓУ¬ÇÖȨ±Ø¾¿
**************************************************************************************/
/******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
* File Name          : hw_config.h
* Author             : MCD Application Team
* Version            : V3.1.1
* Date               : 04/07/2010
* Description        : Hardware Configuration & Setup
********************************************************************************
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __HW_CONFIG_H
#define __HW_CONFIG_H

/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"

/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported define -----------------------------------------------------------*/
#define BULK_MAX_PACKET_SIZE  0x00000040

/* Exported functions ------------------------------------------------------- */
void Set_System(void);
void Set_USBClock(void);
void Enter_LowPowerMode(void);
void Leave_LowPowerMode(void);
void USB_Interrupts_Config(void);
void Led_Config(void);
void Led_RW_ON(void);
void Led_RW_OFF(void);
void USB_Configured_LED(void);
void USB_NotConfigured_LED(void);
void USB_Cable_Config (FunctionalState NewState);
void Get_SerialNum(void);
void MAL_Config(void);
void USB_Disconnect_Config(void);
void GPIO_Config(void);
/* External variables --------------------------------------------------------*/

#endif  /*__HW_CONFIG_H*/

/******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="description" content="A lightweight web application, which utilizes the Fulcrum Records API for batch deleting records from your account.">
    <meta name="author" content="Bryan McBride">
    <title>Batch Delete Utility</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.9.1/bootstrap-table.min.css">
    <link rel="stylesheet" href="assets/vendor/jQuery-QueryBuilder/query-builder.default.min.css">
    <link rel="stylesheet" href="assets/css/app.css">

          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

          </button>

Batch Delete Utility

          <form class="navbar-form navbar-right">

              API Key:
              <input type="password" class="form-control" name="api-key" id="api-key" placeholder="API Key">

          </form>

  About

<input class="btn btn-default" type="file" accept=".csv" id="csv-upload-input" name="files">

  Upload CSV File

Loading...

        <button type="button" class="btn btn-danger">
            Delete selected records
        </button>
        <button type="button" class="btn btn-default" id="filter-btn">
            Filter records
        </button>

Fulcrum Batch Delete Utility

Warning- this utility will delete data from your Fulcrum account that cannot be recovered once deleted!

  Start by uploading a CSV file

            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

Fulcrum Batch Delete Utility

This is a lightweight web application, which utilizes the Fulcrum Records API for batch deleting records from your account.

Paste your API Key into the input in the upper right-hand corner.

Upload a CSV file, which must at least contain a fulcrum_id column with valid record IDs.

Use the table sorting, filtering, and searching tools to identify and check the records you wish to delete.

Once you've selected some records, click the red Delete button to proceed with deleting them.

Note that you will only be given one confirmation opportunity to abort this action. Once deleted, records cannot be recovered.

This application saves your Fulcrum API token in your browser sessionStorage. Switch to localStorage if security is less of a concern and you want your login to persist beyond browser sessions.

            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

Filter Data

            <button type="button" class="btn btn-default pull-left" id="view-sql-btn"> SQL</button>
            <button type="button" class="btn btn-info" id="reset-filter-btn"> Reset Filter</button>
            <button type="button" class="btn btn-primary" id="apply-filter-btn"> Apply Filter</button>


text:
#ifndef VCXYPADPRESET_H
#define VCXYPADPRESET_H

#include <QKeySequence>

#include "qlcinputsource.h"

class QDomDocument;
class QDomElement;

/** @addtogroup ui_vc_widgets
 * @{
 */

#define KXMLQLCVCXYPadPreset         "Preset"
#define KXMLQLCVCXYPadPresetID       "ID"
#define KXMLQLCVCXYPadPresetType     "Type"
#define KXMLQLCVCXYPadPresetName     "Name"

#define KXMLQLCVCXYPadPresetFuncID   "FuncID"
#define KXMLQLCVCXYPadPresetXPos     "X"
#define KXMLQLCVCXYPadPresetYPos     "Y"

#define KXMLQLCVCXYPadPresetInput         "Input"
#define KXMLQLCVCXYPadPresetInputUniverse "Universe"
#define KXMLQLCVCXYPadPresetInputChannel  "Channel"

#define KXMLQLCVCXYPadPresetKey "Key"

class VCXYPadPreset
{
public:
    explicit VCXYPadPreset(quint8 id);
    explicit VCXYPadPreset(VCXYPadPreset const& vcpp);

    /** Destructor */
    ~VCXYPadPreset();

    enum PresetType
    {
        Position = 0,
        EFX,
        Scene
    };

    void setFunctionID(quint32 id);
    quint32 functionID() const;

    void setPosition(QPointF pos);
    QPointF position() const;

public:
    bool operator<(VCXYPadPreset const& right) const;
    static bool compare(VCXYPadPreset const* left, VCXYPadPreset const* right);

protected:
    static QString typeToString(PresetType type);
    static PresetType stringToType(QString str);

public:
    /** The preset unique ID */
    quint8 m_id;

    /** The preset type */
    PresetType m_type;

    /** The preset name */
    QString m_name;

    /** Position in DMX coordinates 0.0..(256.0 - 1/256)
      * when the preset type is Position */
    QPointF m_dmxPos;

    /** ID of the Function controlled by this preset
     *  when type is EFX or Scene */
    quint32 m_funcID;

    QSharedPointer<QLCInputSource> m_inputSource;
    QKeySequence m_keySequence;

    /************************************************************************
     * Load & Save
     ***********************************************************************/
public:
    /** Load properties and contents from an XML tree */
    bool loadXML(const QDomElement& root);

    /** Save properties and contents to an XML document */
    bool saveXML(QDomDocument* doc, QDomElement* xypad_root);
};

/** @} */

#endif // VCXYPADPRESET_H


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class User extends CI_Controller {

public function crearCliente()
	{
		$this->load->view('Cliente/RegistrarCliente.php');
	}

		public function save() {
		// objener valores
    $nombre = $this->input->post('Nombre');
		$Edad = $this->input->post('Edad');
		$Dirrecion = $this->input->post('Dirrecion');
				$Telefono = $this->input->post('Telefono');

    $Cliente = array(
        'Nombre' => $nombre,
        'Edad' => $Edad,
        'Dirrecion' => $Dirrecion,
 			'Telefono' => $Telefono

      );

     $r = $this->Cliente_model->save($Cliente);

	if($r) {
      $this->session->set_flashdata('message','User saved');
			redirect('User/ADMIN');
		} else {
      $this->session->set_flashdata('message','There was an error saving the user');
			redirect('Cliente/RegistrarCliente');
		}

}
}


text:
module Newsletterable
	module OrmAdapters
		class TestOrmAdapter < Adapter
			cattr_writer :query_subscription

			def query_subscription(query, initialize = false)
				record = @@query_subscription
				if initialize
					record ||= SubscriptionableModel.new(state: :pending)
				end
				record
			end

			def save(record)
				record.save!
			end
		end
	end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <item
        android:id="@+id/menu_item_filter"
        android:title="@string/menu_filter_title"
        android:icon="@drawable/ic_filter_variant"
        app:showAsAction="ifRoom" />

    <item
        android:id="@+id/menu_item_licenses"
        android:title="@string/menu_licenses"
        android:contentDescription="@string/menu_licenses"
        app:showAsAction="never" />

</menu>


text:
module ActiveRecord
  class NonScalarPrimaryKeyError < ActiveRecordError
    def initialize(reflection)
      super("Can not join association #{reflection.name.inspect}, because :primary_key is a callable. Use Relation#includes or specify a join column name")
    end
  end

  module Associations
    class JoinDependency
      class JoinAssociation
        safe_monkeypatch :initialize, md5: '2332c88140aa9e9efa96975fd48e6958'

        def initialize(reflection, children)

          # PATCH here
          if reflection.options[:primary_key].respond_to?(:call)
            raise NonScalarPrimaryKeyError.new(reflection)
          end
          # end PATCH

          super(reflection.klass, children)

          @reflection      = reflection
          @tables          = nil
        end
      end
    end
  end
end


text:
type: diagram
title: Anatomy of a Brief Model
attachments:
  - diagrams/anatomy-of-a-brief-model.svg
annotations:
  "Annotation One":
    x: 400
    y: 20
  "Annotation Two":
    x: 450
    y: 20
---

![inline:svg](path=diagrams/anatomy-of-a-brief-model)

Notice how we're inlining the SVG diagram.  Pretty neat.

Using javascript to join the elements of the SVG to your writing is a really powerful technique for combining graphics and writing
together in a scriptable way!

# Annotations

## Annotation One

This can be displayed in context along with the annotation bubble for the diagram.

## Annotation Two

This can also be displayed in context.


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <Button
        android:id="@+id/find_button"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/find_button_margin"
        android:text="@string/find_button"/>

    <LinearLayout
        android:id="@+id/container"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" >

        <Button
	        android:id="@+id/led2_button"
	        android:layout_width="fill_parent"
	        android:layout_height="wrap_content"
	        android:layout_margin="@dimen/find_button_margin"
	        android:text="@string/led2"/>

	    <Button
	        android:id="@+id/led3_button"
	        android:layout_width="fill_parent"
	        android:layout_height="wrap_content"
	        android:layout_margin="@dimen/find_button_margin"
	        android:text="@string/led3"/>

	    <Button
            android:id="@+id/led4_button"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_margin="@dimen/find_button_margin"
            android:text="@string/led4"/>

	    <Button
            android:id="@+id/led5_button"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_margin="@dimen/find_button_margin"
            android:text="@string/led5"/>

    </LinearLayout>

</LinearLayout>


text:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

//

namespace Microsoft.Azure.Batch.Common
{
    /// <summary>
    /// An action that the Batch service should take on tasks that depend on the task specifying the action.
    /// </summary>
    public enum DependencyAction
    {
        /// <summary>
        /// The dependency is satisfied. Once all of a dependent task's dependencies are satisfied, the dependent task is eligible to run.
        /// </summary>
        Satisfy,

        /// <summary>
        /// The dependency is not satisfied. Dependent tasks will not become eligible to run.
        /// </summary>
        Block,
    }
}


text:
import { ComponentFactoryResolver, Renderer, ViewContainerRef } from '@angular/core';
import { NavParams } from '../../navigation/nav-params';
import { ViewController } from '../../navigation/view-controller';
import { GestureController, BlockerDelegate } from '../../gestures/gesture-controller';
import { ModuleLoader } from '../../util/module-loader';
/**
 * @hidden
 */
export declare class ModalCmp {
    _cfr: ComponentFactoryResolver;
    _renderer: Renderer;
    _navParams: NavParams;
    _viewCtrl: ViewController;
    moduleLoader: ModuleLoader;
    _viewport: ViewContainerRef;
    _bdDismiss: boolean;
    _enabled: boolean;
    _gestureBlocker: BlockerDelegate;
    constructor(_cfr: ComponentFactoryResolver, _renderer: Renderer, _navParams: NavParams, _viewCtrl: ViewController, gestureCtrl: GestureController, moduleLoader: ModuleLoader);
    ionViewPreLoad(): void;
    /** @hidden */
    _load(component: any): void;
    _viewWillEnter(): void;
    _viewDidLeave(): void;
    /** @hidden */
    _setCssClass(componentRef: any, className: string): void;
    _bdClick(): Promise<any>;
    _keyUp(ev: KeyboardEvent): void;
    ngOnDestroy(): void;
}


text:
<!DOCTYPE html>

		<form name="form" onsubmit="return sendForm()">
			<fieldset>
				New Desired Temperature:<input type="text" name="newDesiredTemperature" id="newDesiredTemperature">

				<input type="submit" name="Submit" id="submit">

			</fieldset>
		</form>


text:
<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns="http://purl.org/rss/1.0/"
 xmlns:cc="http://web.resource.org/cc/"
 xmlns:content="http://purl.org/rss/1.0/modules/content/"
 xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
 xmlns:admin="http://webns.net/mvcb/"
>

<channel rdf:about="http://del.icio.us/hjortholm">
<title>del.icio.us/hjortholm</title>
<link>http://del.icio.us/hjortholm</link>
<description></description>
<cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
<items>
 <rdf:Seq>
  <rdf:li rdf:resource="http://blog.jimmyr.com/Most_Common_Passwords_20_2008.php" />
  <rdf:li rdf:resource="http://www.milw0rm.com/" />
  <rdf:li rdf:resource="http://www.whatsmypass.com/?p=25#more-25" />
  <rdf:li rdf:resource="http://www.whatsmypass.com/" />
  <rdf:li rdf:resource="http://formatoz.com/" />
  <rdf:li rdf:resource="http://www.sisense.com/default.aspx?AspxAutoDetectCookieSupport=1" />
  <rdf:li rdf:resource="http://immike.net/blog/2007/04/06/5-regular-expressions-every-web-programmer-should-know/" />
  <rdf:li rdf:resource="http://immike.net/blog/2007/06/21/extreme-regex-foo-what-you-need-to-know-to-become-a-regular-expression-pro/" />
  <rdf:li rdf:resource="http://www.latimes.com/news/education/la-sci-carroll28-2008jun28,0,6029497,full.story" />
  <rdf:li rdf:resource="http://www.astro.wisc.edu/~heroux/images/Particle_chart.jpg" />
  <rdf:li rdf:resource="http://www.ajaxonomy.com/2008/web-design/great-accordion-scripts" />
  <rdf:li rdf:resource="http://www.evvs.dk/index.php?osCsid=076cb2b5f0f15603feb9ce87d6a4dc3d" />
  <rdf:li rdf:resource="http://git.or.cz/" />
  <rdf:li rdf:resource="http://codebasehq.com/" />
  <rdf:li rdf:resource="http://flexiscale.com/" />
  <rdf:li rdf:resource="http://www.mediatemple.net/webhosting/gs/" />
  <rdf:li rdf:resource="http://www.mosso.com/" />
  <rdf:li rdf:resource="http://www.capify.org/" />
  <rdf:li rdf:resource="http://www.ibm.com/developerworks/library/x-schematips/?ca=dgr-lnxw07x-schematips&S_TACT=105AGX59&S_CMP=GRsitelnxw07" />
  <rdf:li rdf:resource="http://www.slantly.com/" />
  <rdf:li rdf:resource="http://www.techcrunch.com/2008/06/30/internet-broadcasting-introduces-new-online-opinion-tool-slantly/" />
  <rdf:li rdf:resource="http://code.google.com/p/ratproxy/" />
  <rdf:li rdf:resource="http://en.wikipedia.org/wiki/XUnit" />
  <rdf:li rdf:resource="http://badprogrammer.infogami.com/" />
  <rdf:li rdf:resource="http://www.smashingmagazine.com/2008/07/02/55-free-high-quality-icon-sets/" />
  <rdf:li rdf:resource="http://www.sloshspot.com/blog/07-02-2008/25-Clever-Bar-Pick-Up-Lines-26" />
  <rdf:li rdf:resource="http://dirtgetswet.com/pics-images/194/now-thats-is-subtle" />
  <rdf:li rdf:resource="http://www.appappeal.com/" />
  <rdf:li rdf:resource="http://www.mikogo.com/welcome.aspx" />
  <rdf:li rdf:resource="http://mashable.com/2008/06/30/top-10-how-to-sites/" />
  <rdf:li rdf:resource="http://www.hiddenpixels.com/designer-and-developer-resources/free-web-icons/" />
 </rdf:Seq>
</items>
</channel>

<item rdf:about="http://blog.jimmyr.com/Most_Common_Passwords_20_2008.php">
<title>Most Common Passwords(-)</title>
<link>http://blog.jimmyr.com/Most_Common_Passwords_20_2008.php</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-06T12:56:42Z</dc:date>
<dc:subject>password security</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/password" />
    <rdf:li resource="http://del.icio.us/tag/security" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.milw0rm.com/">
<title>milw0rm - exploits : vulnerabilities : videos : papers : shellcode(-)</title>
<link>http://www.milw0rm.com/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-06T12:52:47Z</dc:date>
<dc:subject>security</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/security" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.whatsmypass.com/?p=25#more-25">
<title>What’s My Pass » How To Gain access to Windows Vista(-)</title>
<link>http://www.whatsmypass.com/?p=25#more-25</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-06T12:50:27Z</dc:date>
<dc:subject>passwords vista</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/vista" />
    <rdf:li resource="http://del.icio.us/tag/passwords" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.whatsmypass.com/">
<title>What’s My Pass</title>
<link>http://www.whatsmypass.com/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-06T12:49:57Z</dc:date>
<dc:subject>password security</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/security" />
    <rdf:li resource="http://del.icio.us/tag/password" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://formatoz.com/">
<title>FormatFactory - File format convert tools (http://www.formatoz.com)(-)</title>
<link>http://formatoz.com/</link>
<description>FormatFactory is a multifunctional media converter.</description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-06T11:11:40Z</dc:date>
<dc:subject>conversion software</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/conversion" />
    <rdf:li resource="http://del.icio.us/tag/software" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.sisense.com/default.aspx?AspxAutoDetectCookieSupport=1">
<title>Dashboards, Reports and Business Intelligence Applications by SiSense(-)</title>
<link>http://www.sisense.com/default.aspx?AspxAutoDetectCookieSupport=1</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-06T10:38:13Z</dc:date>
<dc:subject>amazon analytics s3</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/amazon" />
    <rdf:li resource="http://del.icio.us/tag/s3" />
    <rdf:li resource="http://del.icio.us/tag/analytics" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://immike.net/blog/2007/04/06/5-regular-expressions-every-web-programmer-should-know/">
<title>5 Regular Expressions Every Web Programmer Should Know - I’m Mike(-)</title>
<link>http://immike.net/blog/2007/04/06/5-regular-expressions-every-web-programmer-should-know/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-06T10:30:43Z</dc:date>
<dc:subject>howto regex</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/regex" />
    <rdf:li resource="http://del.icio.us/tag/howto" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://immike.net/blog/2007/06/21/extreme-regex-foo-what-you-need-to-know-to-become-a-regular-expression-pro/">
<title>Extreme regex foo: what you need to know to become a regular expression pro - I’m Mike(-)</title>
<link>http://immike.net/blog/2007/06/21/extreme-regex-foo-what-you-need-to-know-to-become-a-regular-expression-pro/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-06T10:30:27Z</dc:date>
<dc:subject>howto regex tutorial</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/regex" />
    <rdf:li resource="http://del.icio.us/tag/tutorial" />
    <rdf:li resource="http://del.icio.us/tag/howto" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.latimes.com/news/education/la-sci-carroll28-2008jun28,0,6029497,full.story">
<title>Mysteries of time, and the multiverse - Los Angeles Times(-)</title>
<link>http://www.latimes.com/news/education/la-sci-carroll28-2008jun28,0,6029497,full.story</link>
<description>Time exists without entropy, but entropy is what gives time its special character.</description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-06T10:27:27Z</dc:date>
<dc:subject>articles entropy time universe</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/time" />
    <rdf:li resource="http://del.icio.us/tag/articles" />
    <rdf:li resource="http://del.icio.us/tag/universe" />
    <rdf:li resource="http://del.icio.us/tag/entropy" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.astro.wisc.edu/~heroux/images/Particle_chart.jpg">
<title>Particle_chart.jpg (JPEG Image, 3000x2275 pixels) - Scaled (26%)</title>
<link>http://www.astro.wisc.edu/~heroux/images/Particle_chart.jpg</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-06T00:55:53Z</dc:date>
<dc:subject>physics quantum</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/physics" />
    <rdf:li resource="http://del.icio.us/tag/quantum" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.ajaxonomy.com/2008/web-design/great-accordion-scripts">
<title>Great Accordion Scripts | Ajaxonomy(-)</title>
<link>http://www.ajaxonomy.com/2008/web-design/great-accordion-scripts</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T21:38:12Z</dc:date>
<dc:subject>javascript jquery tools</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/jquery" />
    <rdf:li resource="http://del.icio.us/tag/tools" />
    <rdf:li resource="http://del.icio.us/tag/javascript" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.evvs.dk/index.php?osCsid=076cb2b5f0f15603feb9ce87d6a4dc3d">
<title>e-vvs - radiator, radiatorer, vvs, armatur, ifø, vvsartikler, håndvaske, vvs online, vvs salg(-)</title>
<link>http://www.evvs.dk/index.php?osCsid=076cb2b5f0f15603feb9ce87d6a4dc3d</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T19:49:30Z</dc:date>
<dc:subject>shopping vvs</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/vvs" />
    <rdf:li resource="http://del.icio.us/tag/shopping" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://git.or.cz/">
<title>Git - Fast Version Control System(-)</title>
<link>http://git.or.cz/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T15:39:30Z</dc:date>
<dc:subject>git svn versioncontrol</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/git" />
    <rdf:li resource="http://del.icio.us/tag/versioncontrol" />
    <rdf:li resource="http://del.icio.us/tag/svn" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://codebasehq.com/">
<title>Codebase - Git repository hosting with source browser, changesets, ticketing & deployment tracking(-)</title>
<link>http://codebasehq.com/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T15:39:07Z</dc:date>
<dc:subject>svn versioncontrol</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/versioncontrol" />
    <rdf:li resource="http://del.icio.us/tag/svn" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://flexiscale.com/">
<title>FlexiScale - Utility Computing On-Demand(-)</title>
<link>http://flexiscale.com/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T15:38:23Z</dc:date>
<dc:subject>cloud grid hosting</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/hosting" />
    <rdf:li resource="http://del.icio.us/tag/grid" />
    <rdf:li resource="http://del.icio.us/tag/cloud" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.mediatemple.net/webhosting/gs/">
<title>(mt) Media Temple - (gs) Grid-Service(-)</title>
<link>http://www.mediatemple.net/webhosting/gs/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T15:38:12Z</dc:date>
<dc:subject>cloud hosting</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/hosting" />
    <rdf:li resource="http://del.icio.us/tag/cloud" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.mosso.com/">
<title>MOSSO :: The Hosting Cloud - Home(-)</title>
<link>http://www.mosso.com/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T15:37:45Z</dc:date>
<dc:subject>cloud hosting</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/cloud" />
    <rdf:li resource="http://del.icio.us/tag/hosting" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.capify.org/">
<title>Capistrano: Home(-)</title>
<link>http://www.capify.org/</link>
<description>Simply put, Capistrano is a tool for automating tasks on one or more remote servers. It executes commands in parallel on all targeted machines, and provides a mechanism for rolling back changes across multiple machines.</description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T15:37:12Z</dc:date>
<dc:subject>capistrano deployment rails ruby</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/ruby" />
    <rdf:li resource="http://del.icio.us/tag/capistrano" />
    <rdf:li resource="http://del.icio.us/tag/deployment" />
    <rdf:li resource="http://del.icio.us/tag/rails" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.ibm.com/developerworks/library/x-schematips/?ca=dgr-lnxw07x-schematips&S_TACT=105AGX59&S_CMP=GRsitelnxw07">
<title>Ten XML Schemas you should know(-)</title>
<link>http://www.ibm.com/developerworks/library/x-schematips/?ca=dgr-lnxw07x-schematips&S_TACT=105AGX59&S_CMP=GRsitelnxw07</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T15:16:25Z</dc:date>
<dc:subject>reference tutorial xml</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/xml" />
    <rdf:li resource="http://del.icio.us/tag/reference" />
    <rdf:li resource="http://del.icio.us/tag/tutorial" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.slantly.com/">
<title>Slantly - Opinion & Discussion(-)</title>
<link>http://www.slantly.com/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T15:16:10Z</dc:date>
<dc:subject>community polls</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/community" />
    <rdf:li resource="http://del.icio.us/tag/polls" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.techcrunch.com/2008/06/30/internet-broadcasting-introduces-new-online-opinion-tool-slantly/">
<title>Internet Broadcasting Introduces New Online Opinion Tool Slantly(-)</title>
<link>http://www.techcrunch.com/2008/06/30/internet-broadcasting-introduces-new-online-opinion-tool-slantly/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T15:14:47Z</dc:date>
<dc:subject>polls</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/polls" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://code.google.com/p/ratproxy/">
<title>ratproxy - Google Code(-)</title>
<link>http://code.google.com/p/ratproxy/</link>
<description>Detects and prioritizes broad classes of security problems, such as dynamic cross-site trust model considerations, script inclusion issues, content serving problems, insufficient XSRF and XSS defenses, and much more.</description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T10:46:02Z</dc:date>
<dc:subject>google security testing tools</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/security" />
    <rdf:li resource="http://del.icio.us/tag/google" />
    <rdf:li resource="http://del.icio.us/tag/testing" />
    <rdf:li resource="http://del.icio.us/tag/tools" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://en.wikipedia.org/wiki/XUnit">
<title>xUnit - Wikipedia, the free encyclopedia(-)</title>
<link>http://en.wikipedia.org/wiki/XUnit</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T10:40:41Z</dc:date>
<dc:subject>testing xunit</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/testing" />
    <rdf:li resource="http://del.icio.us/tag/xunit" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://badprogrammer.infogami.com/">
<title>Signs that you are a bad programmer (Bad Programmers)(-)</title>
<link>http://badprogrammer.infogami.com/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-05T10:38:17Z</dc:date>
<dc:subject>howto programming</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/programming" />
    <rdf:li resource="http://del.icio.us/tag/howto" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.smashingmagazine.com/2008/07/02/55-free-high-quality-icon-sets/">
<title>55 Free High Quality Icon Sets | Graphics | Smashing Magazine(-)</title>
<link>http://www.smashingmagazine.com/2008/07/02/55-free-high-quality-icon-sets/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-03T15:32:00Z</dc:date>
<dc:subject>icons</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/icons" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.sloshspot.com/blog/07-02-2008/25-Clever-Bar-Pick-Up-Lines-26">
<title>25 Clever Bar Pick Up Lines | Sloshspot Blog(-)</title>
<link>http://www.sloshspot.com/blog/07-02-2008/25-Clever-Bar-Pick-Up-Lines-26</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-03T15:31:44Z</dc:date>
<dc:subject>fun humor</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/humor" />
    <rdf:li resource="http://del.icio.us/tag/fun" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://dirtgetswet.com/pics-images/194/now-thats-is-subtle">
<title>DirtGetsWet » Now that is Subtle(-)</title>
<link>http://dirtgetswet.com/pics-images/194/now-thats-is-subtle</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-03T15:30:19Z</dc:date>
<dc:subject>fun</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/fun" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.appappeal.com/">
<title>AppAppeal » Reviews of Web Based Applications(-)</title>
<link>http://www.appappeal.com/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-01T13:33:09Z</dc:date>
<dc:subject>comparison review</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/comparison" />
    <rdf:li resource="http://del.icio.us/tag/review" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.mikogo.com/welcome.aspx">
<title>Mikogo: Free Online Meetings(-)</title>
<link>http://www.mikogo.com/welcome.aspx</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-01T13:10:57Z</dc:date>
<dc:subject>conferencing skype tools</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/conferencing" />
    <rdf:li resource="http://del.icio.us/tag/skype" />
    <rdf:li resource="http://del.icio.us/tag/tools" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://mashable.com/2008/06/30/top-10-how-to-sites/">
<title>10 Essential Sites for Tips and How-To’s(-)</title>
<link>http://mashable.com/2008/06/30/top-10-how-to-sites/</link>
<description>10 Essential Sites for Tips and How-To’s</description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-07-01T12:25:16Z</dc:date>
<dc:subject>howto list</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/howto" />
    <rdf:li resource="http://del.icio.us/tag/list" />
  </rdf:Bag>
</taxo:topics>
</item>

<item rdf:about="http://www.hiddenpixels.com/designer-and-developer-resources/free-web-icons/">
<title>Hidden Pixels - FREE Web Icons(-)</title>
<link>http://www.hiddenpixels.com/designer-and-developer-resources/free-web-icons/</link>
<description></description>
<dc:creator>hjortholm</dc:creator>
<dc:date>2008-06-30T20:01:45Z</dc:date>
<dc:subject>icons</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/icons" />
  </rdf:Bag>
</taxo:topics>
</item>

</rdf:RDF>


text:
<?php

namespace HealthCareAbroad\SearchBundle\Controller;

use HealthCareAbroad\SearchBundle\Services\SearchParameterBag;

use Symfony\Component\HttpFoundation\Request;

use Symfony\Component\HttpFoundation\Response;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class WidgetController extends Controller
{
    public function ajaxLoadSearchSourcesAction(Request $request)
    {
        $start = \microtime(true);

        $responseData = array();
        $defaultParameters = array(
            'destination' => null,
            'treatment' => null,
            'destinationLabel' => '',
            'treatmentLabel' => '',
            'filter' => $request->get('filter', '')
        );
        switch ($type = $request->get('type', 'all')) {
            case 'treatments':
                $defaultParameters['destination'] = $request->get('value', 0);
                $defaultParameters['destinationLabel'] = $request->get('label', '');
                $responseData[$type] = $this->get('services.search')->getTreatments(new SearchParameterBag($defaultParameters));
                break;
            case 'destinations':
                $defaultParameters['treatment'] = $request->get('value', 0);
                $defaultParameters['treatmentLabel'] = $request->get('label', '');
                $responseData[$type] = $this->get('services.search')->getDestinations(new SearchParameterBag($defaultParameters));
                break;
            default:
                $startDestinations = \microtime(true);
                $destinations = $this->get('services.search')->getAllDestinations();
                $endDestinations = \microtime(true);
                $responseData['destination_processing_time'] = $endDestinations-$startDestinations;

                $startTreatments = \microtime(true);
                $treatments = $this->get('services.search')->getAllTreatments();
                $endTreatments = \microtime(true);
                $responseData['treatment_processing_time'] = $endTreatments-$startTreatments;

                $responseData = array('treatments' => $treatments, 'destinations' => $destinations);
        }

        $end = \microtime(true);
        $responseData['executionTime'] = $end-$start;

        return new Response(\json_encode($responseData), 200, array('content-type' => 'application/json'));
    }
}


text:
Configuration PackageManagement {

    Import-DscResource -ModuleName PackageManagementProviderResource

    Node Test {

        PackageManagementSource SourceRepoChocolatey {

            Ensure = "Present"
            Name = "Chocolatey"
            ProviderName = "Chocolatey"
            SourceUri = "http://chocolatey.org/api/v2/"
            InstallationPolicy = "Untrusted"

        }

        PackageManagementSource SourceRepoInovativ {

            Ensure = "Present"
            Name = "InovativPackage"
            ProviderName = "Chocolatey"
            SourceUri = "http://inovativapplicationgallery.azurewebsites.net/api/v2"
            InstallationPolicy = "Trusted"

        }

    }

    Node installPackage {

        PackageManagementSource SourceRepoChocolatey {

            Ensure = "Present"
            Name = "Chocolatey"
            ProviderName = "Chocolatey"
            SourceUri = "http://chocolatey.org/api/v2/"
            InstallationPolicy = "Untrusted"

        }
<#
 The nugetpackage has the provider hardcoded to nuget. So setting the source to Chocolatey will fail anyhow
 TODO: update the PackageManagementProviderResource module with a ChocolateyPackage resource
        NugetPackage Notepadplusplus {
            Ensure = "Present"
            Name = "notepadplusplus"
            Source = "Chocolatey"
            DependsOn = "[PackageManagementSource]SourceRepoChocolatey"
            DestinationPath = "$env:ProgramFiles\notepadplusplus"
            InstallationPolicy = "trusted"
        }
#>
        PSModule Pester {
            Ensure = "Present"
            Name = "Pester"
            Repository = "PSGallery"
            InstallationPolicy="trusted"
        }

        PSModule xNetworking {
            Ensure = "Present"
            Name = "xNetworking"
            Repository = "PSGallery"
            InstallationPolicy="trusted"
        }

    }
}


text:
CREATE TABLE `smmt_make_map` (
    `id`                int(20) unsigned    NOT NULL AUTO_INCREMENT,
    `smmt_make`         varchar(50)         NOT NULL,
    `make`              varchar(50)         NOT NULL,
    `created_by`        INT UNSIGNED        NOT NULL,
    `created_on`        DATETIME(6)         NOT NULL    DEFAULT CURRENT_TIMESTAMP(6),
    `last_updated_by`   INT UNSIGNED        DEFAULT NULL,
    `last_updated_on`   DATETIME(6)         DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
    `version`           INT UNSIGNED        NOT NULL    DEFAULT '1',
    PRIMARY KEY (`id`),
    INDEX (make),
    KEY `ix_smmt_make_map_created_by` (`created_by`),
    KEY `ix_smmt_make_map_last_updated_by` (`last_updated_by`),
    CONSTRAINT `fk_smmt_make_map_created_by_person_id` FOREIGN KEY (`created_by`) REFERENCES `person` (`id`),
    CONSTRAINT `fk_smmt_make_map_last_updated_by_person_id` FOREIGN KEY (`last_updated_by`) REFERENCES `person` (`id`)
);

DROP TRIGGER IF EXISTS `mot2`.`tr_smmt_make_map_bi`;
DROP TRIGGER IF EXISTS `mot2`.`tr_smmt_make_map_bu`;

DELIMITER ;;
CREATE TRIGGER `mot2`.`tr_smmt_make_map_bi`
BEFORE INSERT ON `mot2`.`smmt_make_map`
FOR EACH ROW
    MainBlock: BEGIN
        DECLARE c_version VARCHAR(256) DEFAULT 'tr_smmt_make_map_bi Generated on 2017-10-02 13:08:16. $Id$';

        IF `mot2`.`is_mot_trigger_disabled`()
        THEN
             LEAVE MainBlock;
        END IF;

        IF (@app_user_id IS NULL)
        THEN
             SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Session variable @app_user_id cannot be NULL if triggers are enabled.';
        END IF;

        SET NEW.`version` = 1;
        SET NEW.`created_by` = COALESCE(@app_user_id, NEW.`last_updated_by`, NEW.`created_by`);
        SET NEW.`last_updated_by` = NEW.`created_by`;
        SET NEW.`created_on` = CURRENT_TIMESTAMP;
        SET NEW.`last_updated_on` = NEW.`created_on`;
    END ;;
DELIMITER ;

DELIMITER ;;
CREATE TRIGGER `mot2`.`tr_smmt_make_map_bu`
BEFORE UPDATE ON `mot2`.`smmt_make_map`
FOR EACH ROW
    MainBlock: BEGIN
        DECLARE c_version VARCHAR(256) DEFAULT 'tr_smmt_make_map_bu Generated on 2017-10-02 13:10:03. $Id$';

        IF `mot2`.`is_mot_trigger_disabled`()
        THEN
            LEAVE MainBlock;
        END IF;

        IF (@app_user_id IS NULL)
        THEN
            SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Session variable @app_user_id cannot be NULL if triggers are enabled.';
        END IF;

        SET NEW.`version` = OLD.`version` + 1;
        SET NEW.`last_updated_by` = COALESCE(@app_user_id, NEW.`last_updated_by`);
        SET NEW.`last_updated_on` = CURRENT_TIMESTAMP;
  END;;
DELIMITER ;

CREATE TABLE `smmt_make_map_hist` (
    `hist_id`           BIGINT UNSIGNED     NOT NULL AUTO_INCREMENT,
    `id`                int(20) unsigned    DEFAULT NULL,
    `smmt_make`         varchar(50)         DEFAULT NULL,
    `make`              varchar(50)         DEFAULT NULL,
    `created_by`        INT UNSIGNED        DEFAULT NULL,
    `created_on`        DATETIME(6)         DEFAULT NULL,
    `last_updated_by`   INT UNSIGNED        DEFAULT NULL,
    `last_updated_on`   DATETIME(6)         DEFAULT NULL,
    `version`           INT UNSIGNED        DEFAULT NULL,
    PRIMARY KEY (`hist_id`),
    UNIQUE KEY `smmt_make_map_hist` (`id`,`version`)
);

DELIMITER ;;
CREATE TRIGGER `mot2`.`smmt_make_map_au`
AFTER UPDATE ON `mot2`.`smmt_make_map`
FOR EACH ROW
    MainBlock: BEGIN

        DECLARE c_version VARCHAR(256) DEFAULT 'smmt_make_map_au Generated on 2017-04-17 09:42:33. $Id$';

        IF `mot2`.`is_mot_trigger_disabled`()
        THEN
            LEAVE MainBlock;
        END IF;

        IF (@app_user_id IS NULL)
        THEN
            SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Session variable @app_user_id cannot be NULL if triggers are enabled.';
        END IF;

        INSERT INTO `mot2`.`smmt_make_map_hist`
        (
          `id`,
          `smmt_make`,
          `make`,
          `created_by`,
          `created_on`,
          `last_updated_by`,
          `last_updated_on`,
          `version`
        )
        VALUES
        (
          OLD.`id`,
          OLD.`smmt_make`,
          OLD.`make`,
          OLD.`created_by`,
          OLD.`created_on`,
          OLD.`last_updated_by`,
          OLD.`last_updated_on`,
          OLD.`version`
        );
    END ;;
DELIMITER ;

SET SESSION sql_mode='NO_AUTO_VALUE_ON_ZERO';
SET @app_user_id = (SELECT `id`
                      FROM `person`
                      WHERE `user_reference` = 'Static Data' OR `username` = 'static data');

INSERT INTO smmt_make_map(smmt_make, make) values ('ABARTH', 'ABARTH');
INSERT INTO smmt_make_map(smmt_make, make) values ('ALFA ROMEO', 'ALFA ROMEO');
INSERT INTO smmt_make_map(smmt_make, make) values ('AUDI', 'AUDI');
INSERT INTO smmt_make_map(smmt_make, make) values ('BMW', 'BMW');
INSERT INTO smmt_make_map(smmt_make, make) values ('CHEVROLET', 'CHEVROLET');
INSERT INTO smmt_make_map(smmt_make, make) values ('CHRYSLER', 'CHRYSLER');
INSERT INTO smmt_make_map(smmt_make, make) values ('CHRYSLER', 'CHRYSLER JEEP');
INSERT INTO smmt_make_map(smmt_make, make) values ('CITROEN', 'CITROEN');
INSERT INTO smmt_make_map(smmt_make, make) values ('DACIA', 'DACIA');
INSERT INTO smmt_make_map(smmt_make, make) values ('DODGE', 'DODGE');
INSERT INTO smmt_make_map(smmt_make, make) values ('FIAT', 'FIAT');
INSERT INTO smmt_make_map(smmt_make, make) values ('FORD', 'FORD');
INSERT INTO smmt_make_map(smmt_make, make) values ('HONDA', 'HONDA');
INSERT INTO smmt_make_map(smmt_make, make) values ('HYUNDAI', 'HYUNDAI');
INSERT INTO smmt_make_map(smmt_make, make) values ('INFINITI', 'INFINITI');
INSERT INTO smmt_make_map(smmt_make, make) values ('JAGUAR', 'JAGUAR');
INSERT INTO smmt_make_map(smmt_make, make) values ('JEEP', 'JEEP');
INSERT INTO smmt_make_map(smmt_make, make) values ('KIA', 'KIA');
INSERT INTO smmt_make_map(smmt_make, make) values ('LANCIA', 'LANCIA');
INSERT INTO smmt_make_map(smmt_make, make) values ('LAND ROVER', 'LAND ROVER');
INSERT INTO smmt_make_map(smmt_make, make) values ('LEXUS', 'LEXUS');
INSERT INTO smmt_make_map(smmt_make, make) values ('MAZDA', 'MAZDA');
INSERT INTO smmt_make_map(smmt_make, make) values ('MINI', 'MINI');
INSERT INTO smmt_make_map(smmt_make, make) values ('MITSUBISHI', 'MITSUBISHI');
INSERT INTO smmt_make_map(smmt_make, make) values ('MITSUBISHI', 'MITSUBISHI FUSO');
INSERT INTO smmt_make_map(smmt_make, make) values ('NISSAN', 'NISSAN');
INSERT INTO smmt_make_map(smmt_make, make) values ('OPEL', 'OPEL');
INSERT INTO smmt_make_map(smmt_make, make) values ('PEUGEOT', 'PEUGEOT');
INSERT INTO smmt_make_map(smmt_make, make) values ('PORSCHE', 'PORSCHE');
INSERT INTO smmt_make_map(smmt_make, make) values ('RENAULT', 'RENAULT');
INSERT INTO smmt_make_map(smmt_make, make) values ('SEAT', 'SEAT');
INSERT INTO smmt_make_map(smmt_make, make) values ('SKODA', 'SKODA');
INSERT INTO smmt_make_map(smmt_make, make) values ('SUZUKI', 'SUZUKI');
INSERT INTO smmt_make_map(smmt_make, make) values ('TOYOTA', 'TOYOTA');
INSERT INTO smmt_make_map(smmt_make, make) values ('VAUXHALL', 'VAUXHALL');
INSERT INTO smmt_make_map(smmt_make, make) values ('VOLKSWAGEN', 'VOLKSWAGEN');
INSERT INTO smmt_make_map(smmt_make, make) values ('VOLVO', 'VOLVO');


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
    <TextView
        android:layout_gravity="center_horizontal"
        android:gravity="center_horizontal"
        android:id="@+id/tv_pop_del"
        android:text="删除"
        android:textSize="20sp"
        android:textColor="#f10202"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
</LinearLayout>


text:
package com.wenyu.kaijiw.fragment;

import java.util.ArrayList;
import java.util.List;
import com.wenyu.Data.Myone;
import com.wenyu.kaijiw.ArtSchool;
import com.wenyu.kaijiw.FindTwoAlliance;
import com.wenyu.kaijiw.Findfilmcompany;
import com.wenyu.kaijiw.Findfilmpeople;
import com.wenyu.kaijiw.Findfilmproject;
import com.wenyu.kaijiw.Findissuepublicity;
import com.wenyu.kaijiw.Findproduction;
import com.wenyu.kaijiw.R;
import com.wenyu.kjw.adapter.Myoneadpater;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ImageView;
import android.widget.ListView;

public class FindFragment extends Fragment {
	ImageView viewpager;
	private ListView listview;
	private List<Myone> arrlist;
	Myoneadpater hla;
	private  String [] str={"Ó°ÊÓ¹«Ë¾","Ó°ÊÓÏîÄ¿","Ó°ÊÓÈ˲Å","ºóÆÚÖÆ×÷","Ðû´«·¢ÐÐ","ÒÕÊõԺУ","ÑÝÒïÁªÃË"};
	private int [] images={R.drawable.movescompany,R.drawable.movesproject,R.drawable.movespepple,R.drawable.lattermake,R.drawable.xuanchuan,R.drawable.artsc,R.drawable.biaoyan};
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		return inflater.inflate(R.layout.find, null);
	}
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		initView();
	}
	private void initView() {

		listview = (ListView)getView().findViewById(R.id.listview);
		viewpager = (ImageView)getView().findViewById(R.id.viewpager);
		listview =	(ListView) getView().findViewById(R.id.listView);
		arrlist = new ArrayList<Myone>();
		for (int i = 0; i < str.length; i++) {
			Myone mh =	new Myone( images[i]);
			arrlist.add(mh);
		}
		viewpager.setImageResource(R.drawable.faxian_top);
		hla =new Myoneadpater(arrlist, getActivity());
		listview.setAdapter(hla);
		listview.setDivider(null);
		listview.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
					long arg3) {
				switch(arg2){
				case 0:
					Intent it1 = new Intent(getActivity(),Findfilmcompany.class);
					it1.putExtra("it", "Ó°ÊÓ¹«Ë¾");
					startActivity(it1);
					break;

				case 1:
					Intent it2 = new Intent(getActivity(),Findfilmproject.class);
					it2.putExtra("it", "Ó°ÊÓÏîÄ¿");
					startActivity(it2);
					break;
				case 2:
					Intent it3 = new Intent(getActivity(),Findfilmpeople.class);
					it3.putExtra("it", "Ó°ÊÓÈ˲Å");
					startActivity(it3);
					break;

				case 3:
					Intent it4 = new Intent(getActivity(),Findproduction.class);
					it4.putExtra("it", "ºóÆÚÖÆ×÷");
					startActivity(it4);
					break;
				case 4:
					Intent it5 = new Intent(getActivity(),Findissuepublicity.class);
					it5.putExtra("it", "Ðû´«·¢ÐÐ");
					startActivity(it5);
					break;
				case 5:
					Intent it6 = new Intent(getActivity(),ArtSchool.class);
					it6.putExtra("it", "ÒÕÊõԺУ");
					startActivity(it6);
					break;

				case 6:
					Intent it7 = new Intent(getActivity(),FindTwoAlliance.class);
					it7.putExtra("it", "ÑÝÒïÁªÃË");
					startActivity(it7);
					break;
				}

			}
		});
	}
}


text:
<?php
    $errors = \Elham\Controller\BaseController::getWith('errorBag');
    $oldValue = \Elham\Controller\BaseController::getWith('oldInputs');
?>
{{\Elham\Controller\BaseController::getFlash('userUpdateMessage')}}
<form action="/user/{{$userData['id']}}/update" method="POST"  role="form" enctype="multipart/form-data">

username ? 'has-error' : ''}}">
        Username
        <input class="form-control" name="username" type="text" {{ @$errors->username ? 'autofocus' : ''}} value="{{@$userData['username']}}">
        @if(@$errors->username)

                @foreach($errors->username as $error)

{{$error}}

                @endforeach

        @endif

email ? 'has-error' : ''}}">
        Email
        <input class="form-control" name="email" type="email" {{@$errors->email ? 'autofocus':''}} value="{{@$userData['email']}}">
        @if(@$errors->email)

                @foreach($errors->email as $error)

{{$error}}

                @endforeach

        @endif

password ? 'has-error' : ''}}">
        Password
        <input class="form-control" name="password" {{@$errors->password ? 'autofocus':''}} type="password">
        @if(@$errors->password)

                @foreach($errors->password as $error)

{{$error}}

                @endforeach

        @endif

confirm_password ? 'has-error' : ''}}">
        Confirm Password
        <input class="form-control" name="confirm_password" {{@$errors->confirm_password ? 'autofocus':''}} type="password">
        @if(@$errors->confirm_password)

                @foreach($errors->confirm_password as $error)

{{$error}}

                @endforeach

        @endif

image ? 'has-error' : ''}}">

        <input class="form-control" name="image"  {{@$errors->image ? 'autofocus':''}} type="file"   />
        <input type="hidden" name="oldImageName" value="{{@$userData['image']}}">
        @if(@$errors->image)

                @foreach($errors->image as $error)

{{$error}}

                @endforeach

        @endif

        <button class="btn btn-primary">Update</button>

</form>


text:
title: A Call for Video on the Web
authors:
- hakon-wium-lie
intro: 'To really make a splash on the Web, video needs an open solution that can easily be integrated into web pages without the need for proprietary plugins. The HTML5 `<video>` element and Ogg Theora can provide this, and Opera is proud to announce an experimental build that suppports it. So read this article, and download and play with it today.'
tags:
- video
- open-web
- opera-presto
license: os-asa
---

It's time to make video a first-class citizen of the web. We, the users, have video cameras in our pockets and the bandwidth to tranfer more clips and streams than we can watch. What's missing is a an easy way to integrate video into web pages, and native support for video in browsers. We, the web community, should address this by adding a [video element][1] to HTML.

[1]: https://html.spec.whatwg.org/#video

In addition to giving video an HTML element, we must also agree on a baseline video format that will be universally supported, just like the GIF, JPEG and PNG image format are universally supported. It's important that the video format we choose can be supported by a wide range of devices an that it's royalty-free (RF). RF is a well-establish principle for W3C standards.

The [Ogg Theora][2] format is a promising candidate which has been [chosen by Wikipedia][3].

[2]: http://www.theora.org/
[3]: http://commons.wikimedia.org/wiki/Category:Video

At Opera, we have built an [experimental version][4] that has native support for Ogg Theora. For now, it is only available on Windows.

[4]: http://people.opera.com/howcome/2007/video/op950_8762_video_repack_with_lgpl_signed.exe

**Do not choose to start Opera in the installation process. After installing, exit the installation process and start the the experimental build manually.**


text:
package com.webbiko.pontointeligente.api.security.config;

import com.webbiko.pontointeligente.api.security.JwtAuthenticationEntryPoint;
import com.webbiko.pontointeligente.api.security.filters.JwtAuthenticationTokenFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;

@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

    @Autowired
    private JwtAuthenticationEntryPoint unauthorizedHandler;

    @Autowired
    private UserDetailsService userDetailsService;

    @Autowired
    public void configureAuthentication(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception {
        authenticationManagerBuilder.userDetailsService(this.userDetailsService).passwordEncoder(passwordEncoder());
    }

    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }

    @Bean
    public JwtAuthenticationTokenFilter authenticationTokenFilterBean() throws Exception {
        return new JwtAuthenticationTokenFilter();
    }

    @Override
    protected void configure(HttpSecurity httpSecurity) throws Exception {
        httpSecurity.csrf().disable().exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()
                .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().authorizeRequests()
                .antMatchers("/auth/**", "/api/cadastrar-pj", "/api/cadastrar-pf", "/v2/api-docs",
                        "/swagger-resources/**", "/configuration/security", "/swagger-ui.html", "/webjars/**")
                .permitAll().anyRequest().authenticated();
        httpSecurity.addFilterBefore(authenticationTokenFilterBean(), UsernamePasswordAuthenticationFilter.class);
        httpSecurity.headers().cacheControl();
    }

}


text:
"""
Copyright (c) 2015-2021 Erin Morelli.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
"""

import os
from datetime import date
from threading import Thread

import keen
from flask import Flask
from pkg_resources import get_provider

# Common project metadata
__version__ = open('VERSION').read()
__app_name__ = 'EM Slack Roll'
__copyright__ = f'2015-{str(date.today().year)}'

# Project URLs
base_url = os.environ.get('BASE_URL')
github_url = os.environ.get('GITHUB_URL')

# Project info
project_info = {
    'name': __app_name__,
    'version': __version__,
    'copyright': __copyright__,
    'base_url': base_url,
    'github_url': github_url,
    'client_secret': os.environ.get('SLACK_CLIENT_SECRET'),
    'client_id': os.environ.get('SLACK_CLIENT_ID'),
    'oauth_url': os.environ.get('OAUTH_URL'),
    'auth_url': f'{base_url}/authenticate',
    'valid_url': f'{base_url}/validate',
    'team_url': f'{base_url}/authorize',
    'team_scope': [
        'commands',
        'bot'
    ]
}

# Set the template directory
template_dir = os.path.join(get_provider(__name__).module_path, 'templates')

# Allowed slash commands
allowed_commands = [
    '/roll',
    '/rolldice',
    '/diceroll',
    '/roll_dice',
    '/dice_roll'
]

# Initialize flask app
app = Flask(
    'em-slack-roll',
    template_folder=template_dir,
    static_folder=template_dir
)

# Set up flask config
app.config.update({
    'SECRET_KEY': os.environ.get('SECURE_KEY'),
    'SQLALCHEMY_DATABASE_URI': os.environ.get('DATABASE_URL'),
    'SQLALCHEMY_TRACK_MODIFICATIONS': True
})

def report_event(name, event):
    """Asynchronously report an event."""
    event_report = Thread(
        target=keen.add_event,
        args=(name, event)
    )

    # Set up as asynchronous daemon
    event_report.daemon = True

    # Start event report
    event_report.start()


text:
<?php
/* tradução: franksouza.com.br */

$lang['Articles'] = 																			"Artigos";
$lang['articles'] = 																			"Artigos";
$lang['Articles list'] = 																		"Lista de artigos";
$lang['articles_list'] = 																		"Lista de artigos";
$lang['Article detail'] = 																		"Detalhe de artigo";
$lang['article_detail'] = 																		"Detalhe de artigo";
$lang['detail_view'] = 																			"Visão de detalhe";
$lang['show_article_title'] = 																	"Exibir título do artigo";
$lang['show_title_on_list_view'] = 																"Exibir título";
$lang['show_title_as_link_on_list_view'] = 														"Título como link";
$lang['show_article_category_on_list_view'] = 													"Exibir título da categoria";
$lang['show_article_category_as_link_on_list_view'] = 											"Título da categoria como link";
$lang['show_title_on_detail_view'] = 															"Exibir título";
$lang['show_title_as_link_on_detail_view'] = 													"Título como link";
$lang['select_article'] = 																		"Selecione um artigo";
$lang['articles_from_category'] = 																"Categoria dos artigos";
$lang['all_articles'] = 																		"Todos os artigos";
$lang['article_confirm_delete'] = 																"Você tem certeza que deseja excluir o artigo";

$lang['action_goback_to_articles_list'] = 														"Voltar para lista de artigos";
$lang['articles_categories'] = 																	"Categorias";
$lang['new_article'] = 																			"Novo artigo";
$lang['edit_article'] = 																		"Editar artigo";
$lang['article_published'] = 																	"Artigo publicado";
$lang['article_unpublished'] = 																	"Artigo despublicado";
$lang['articles_category_readmore'] = 															"Veja mais";

$lang['category_has_articles'] = 																"A categoria possui artigos";
$lang['delete_warning_category_has_articles'] = 												"Existem artigos utilizando esta categoria, se você continuar, os mesmos serão descategorizados:";
$lang['delete_warning_category_has_childrens'] = 												"Esta categoria possui sub-categorias, se você continuar, suas categorias pais serão a categoria pai mais próxima:";

$lang['articles_management'] = 																	"Gerenciamento de artigos";

$lang['articles_created_datetime_format'] = 													"%d/%m/%Y às %H:%M:%S";
$lang['articles_created_by_name_date_time'] = 													'Criado por %1$s em %2$s'; // %1$s = Nome do usuário, %2$s = data da criação
$lang['articles_modified_datetime_format'] = 													"%d/%m/%Y às %H:%M:%S";
$lang['articles_last_modification_in_datetime_format'] = 										"Última modificação em %d/%m/%Y às %H:%M:%S";
$lang['articles_modified_by_name_date_time'] = 													'Modificado por %1$s em %2$s'; // %1$s = Nome do usuário, %2$s = data da modificação

// privileges
$lang['articles_management_articles_management'] = 												"Pode gerenciar artigos";
$lang['articles_management_can_add_articles'] = 												"Pode criar artigos";
$lang['editing_articles'] = 																	"Edição de artigos";
$lang['articles_management_can_edit_all_articles'] = 											"Pode editar qualquer artigo";
$lang['articles_management_can_edit_only_same_and_low_group_level'] = 							"Somente de usuários de mesmo nível e inferiores";
$lang['articles_management_can_edit_only_same_group_level'] = 									"Somente de usuários de mesmo nível";
$lang['articles_management_can_edit_only_same_group_and_below'] = 								"Somente de usuários do mesmo grupo e inferiores";
$lang['articles_management_can_edit_only_same_group'] = 										"Somente de usuários do mesmo grupo";
$lang['articles_management_can_edit_only_low_groups'] = 										"Somente de usuários de grupos inferiores";
$lang['articles_management_can_edit_only_your_own_user'] = 										"Apenas seus próprios artigos";

$lang['viewing_articles'] = 																	"Visualização de artigos";
$lang['articles_management_can_view_all_articles'] = 											"Pode ver qualquer artigo";
$lang['articles_management_can_view_only_same_and_low_group_level'] = 							"Somente de usuários de mesmo nível e inferiores";
$lang['articles_management_can_view_only_same_group_level'] = 									"Somente de usuários de mesmo nível";
$lang['articles_management_can_view_only_same_group_and_below'] = 								"Somente de usuários do mesmo grupo e inferiores";
$lang['articles_management_can_view_only_same_group'] = 										"Somente de usuários do mesmo grupo";
$lang['articles_management_can_view_only_low_groups'] = 										"Somente de usuários de grupos inferiores";
$lang['articles_management_can_view_only_your_own_user'] = 										"Apenas seus próprios artigos";

$lang['access_denied_user_does_not_have_privileges_to_view_article'] = 							"Desculpe, você não possui permissão para ver esta página.";

$lang['url_all_articles'] = 																	"todos-os-artigos";
$lang['url_articles_without_categories'] = 														"artigos-sem-categoria";

$lang['error_trying_insert_article_detail_url'] = 												"Erro ao tentar criar url amigável para a página de detalhe de artigo!";
$lang['error_trying_insert_articles_list_url'] = 												"Erro ao tentar criar url amigável para a página de listagem de artigos!";

/* End of file general_lang.php */
/* Location: ./application/language/pt-br/articles_lang.php */


text:
package pl.touk.nussknacker.engine.util.loader

import pl.touk.nussknacker.engine.api.NamedServiceProvider
import pl.touk.nussknacker.engine.util.multiplicity.{Empty, Many, Multiplicity, One}

import java.util.ServiceLoader
import scala.reflect.ClassTag

object ScalaServiceLoader {
  import scala.collection.JavaConverters._

  def load[T](classLoader: ClassLoader)(implicit classTag: ClassTag[T]): List[T] = {
    val claz: Class[T] = toClass(classTag)
    ServiceLoader
      .load(claz, classLoader)
      .asScala
      .toList
  }

  private def toClass[T](implicit classTag: ClassTag[T]): Class[T] = {
    classTag.runtimeClass.asInstanceOf[Class[T]]
  }

  def loadClass[T](classLoader: ClassLoader)(createDefault: => T)(implicit classTag: ClassTag[T]): T
    = chooseClass[T](createDefault, load[T](classLoader))

  def chooseClass[T](createDefault: => T, loaded: List[T]): T = {
    Multiplicity(loaded) match {
      case One(only) => only
      case Empty() => createDefault
      case _ => throw new IllegalArgumentException(s"Error at loading class - default: $createDefault, loaded: $loaded")
    }
  }

  def loadNamed[T<:NamedServiceProvider:ClassTag](name: String, classLoader: ClassLoader = Thread.currentThread().getContextClassLoader): T = {
    val available = load[T](classLoader)
    val className = implicitly[ClassTag[T]].runtimeClass.getName
    Multiplicity(available.filter(_.name == name)) match {
      case Empty() =>
        throw new IllegalArgumentException(s"Failed to find $className with name '$name', available names: ${available.map(_.name).distinct.mkString(", ")}")
      case One(instance) => instance
      case Many(more) =>
        throw new IllegalArgumentException(s"More than one $className with name '$name' found: ${more.map(_.getClass).mkString(", ")}")
    }
  }
}


text:
import os
from threeML.io.package_data import get_path_of_data_file

def test_get_package_data():
    # Try and get the config file
    config_file = get_path_of_data_file("threeML_config.yml")

    assert os.path.exists(config_file)


text:
var express = require('express'),
    http = require('http'),
    path = require('path'),
    model = require('./api/v1/teams');

var app = express();

app.configure(function () {
    app.set('port', process.env.PORT || 3000);
    app.use(express.logger('dev'));
    app.use(express.bodyParser());
    app.use(express.static(path.join(__dirname, 'public')));
});

var server = http.createServer(app);

server.listen(app.get('port'), function () {
    console.log("Express server listening on port " + app.get('port'));
});

app.get('/teams', model.findAll);
app.get('/teams/name/:name', model.findByName);
app.get('/team/:id', model.findById);

app.post('/team', model.addTeam);
app.put('/team/:id', model.updateTeam);
app.delete('/team/:id', model.deleteTeam);

app.get('/testData', model.testData);


text:
ninja -C output/debug cm4all-beng-proxy

export G_SLICE=always-malloc

VALGRIND_FLAGS="--leak-check=yes --show-reachable=yes"
VALGRIND_FLAGS="$VALGRIND_FLAGS --track-fds=yes --track-origins=yes"
VALGRIND_FLAGS="$VALGRIND_FLAGS --suppressions=valgrind.suppressions"

exec valgrind $VALGRIND_FLAGS ./output/debug/cm4all-beng-proxy -vvvvv "$@"


text: this is file 21


text:
<!DOCTYPE HTML>

		<title>Shweta & Baven are getting married.</title>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="description" content="" />
		<meta name="keywords" content="" />

			<link rel="stylesheet" href="css/skel.css" />
			<link rel="stylesheet" href="css/style.css" />
			<link rel="stylesheet" href="css/style-wide.css" />
			<link rel="stylesheet" href="css/style-normal.css" />

Shweta ♥ Baven

We are getting hitched! And you are invited to the celebration.

                    Scroll down for a beautiful song written by our friend.

						More

"In the heart of every parent, there is a warm wish that their child leads a life full of happiness One such occasion has arrived"

				Next

"The highest happiness on earth is the happiness of marriage." —William Lyon Phelps

				Next

 A song for us.

Just like all grown-up girls

Did Shweta go 'bout choosing her belov'd-

Planned, organized, arranged,

A bond that by family is allowed.

The chosen one, hight Baven,

One of the lucky few who made through,

Though more than her a whole foot grow'n,

Yet, In her heart did a liking (for him) grow.

He liked food. And she did as much.

And what she did, he more than touch'd.

They, knowing more of one 'nother,

Knew they were made for each other.

So, with Providence on one side,

Parents happy on the other,

With God's blessings from up above,

And your own wishes from below-

We shall tie the knot in religious ceremony.

And step into the life of holy matrimony.

Baven shall, for Shweta, provide a safe haven.

Shweta, for Baven, shall bring on earth heaven.

♥♥♥♥♥♥♥

Date & Venue

29th December, 2014, 11 AM onwards

                        Holy Trinity CSI Cathedral Church,

                        Near CMS College, Chalukunnu,

                        Kottayam.


text:
class CHudChat;

ConVar default_fov( "default_fov", "90", FCVAR_CHEAT );

IClientMode *g_pClientMode = NULL;

float ClientModeSDKNormal::m_flLastMapChange = -1;

//Tony; add stubs for cycler weapon and cubemap.
STUB_WEAPON_CLASS( cycler_weapon,   WeaponCycler,   C_BaseCombatWeapon );
STUB_WEAPON_CLASS( weapon_cubemap,  WeaponCubemap,  C_BaseCombatWeapon );

//-----------------------------------------------------------------------------
// HACK: the detail sway convars are archive, and default to 0.  Existing CS:S players thus have no detail
// prop sway.  We'll force them to DoD's default values for now.  What we really need in the long run is
// a system to apply changes to archived convars' defaults to existing players.
extern ConVar cl_detail_max_sway;
extern ConVar cl_detail_avoid_radius;
extern ConVar cl_detail_avoid_force;
extern ConVar cl_detail_avoid_recover_speed;
// --------------------------------------------------------------------------------- //
// CSDKModeManager.
// --------------------------------------------------------------------------------- //

class CSDKModeManager : public IVModeManager
{
public:
	virtual void	Init();
	virtual void	SwitchMode( bool commander, bool force ) {}
	virtual void	LevelInit( const char *newmap );
	virtual void	LevelShutdown( void );
	virtual void	ActivateMouse( bool isactive ) {}
};

static CSDKModeManager g_ModeManager;
IVModeManager *modemanager = ( IVModeManager * )&g_ModeManager;

// --------------------------------------------------------------------------------- //
// CSDKModeManager implementation.
// --------------------------------------------------------------------------------- //

#define SCREEN_FILE		"scripts/vgui_screens.txt"

void CSDKModeManager::Init()
{
	g_pClientMode = GetClientModeNormal();

	PanelMetaClassMgr()->LoadMetaClassDefinitionFile( SCREEN_FILE );

	CTeamInfo::ParseTeamKits();
	CShoeInfo::ParseShoes();
	CKeeperGloveInfo::ParseKeeperGloves();
	CBallInfo::ParseBallSkins();

	if (g_pCVar->FindVar("playername")->GetString()[0] == '\0')
		g_pCVar->FindVar("playername")->SetValue(steamapicontext->SteamFriends()->GetPersonaName());
}

void CSDKModeManager::LevelInit( const char *newmap )
{
	g_pClientMode->LevelInit( newmap );
	// HACK: the detail sway convars are archive, and default to 0.  Existing CS:S players thus have no detail
	// prop sway.  We'll force them to DoD's default values for now.
	if ( !cl_detail_max_sway.GetFloat() &&
		!cl_detail_avoid_radius.GetFloat() &&
		!cl_detail_avoid_force.GetFloat() &&
		!cl_detail_avoid_recover_speed.GetFloat() )
	{
		cl_detail_max_sway.SetValue( "5" );
		cl_detail_avoid_radius.SetValue( "64" );
		cl_detail_avoid_force.SetValue( "0.4" );
		cl_detail_avoid_recover_speed.SetValue( "0.25" );
	}

	ClientModeSDKNormal::m_flLastMapChange = gpGlobals->curtime;
}

void CSDKModeManager::LevelShutdown( void )
{
	g_pClientMode->LevelShutdown();
}

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
ClientModeSDKNormal::ClientModeSDKNormal()
{
}

//-----------------------------------------------------------------------------
// Purpose: If you don't know what a destructor is by now, you are probably going to get fired
//-----------------------------------------------------------------------------
ClientModeSDKNormal::~ClientModeSDKNormal()
{
}

void ClientModeSDKNormal::Init()
{
	BaseClass::Init();
}

void ClientModeSDKNormal::InitViewport()
{
	m_pViewport = new SDKViewport();
	m_pViewport->Start( gameuifuncs, gameeventmanager );
}

ClientModeSDKNormal g_ClientModeNormal;

IClientMode *GetClientModeNormal()
{
	return &g_ClientModeNormal;
}

ClientModeSDKNormal* GetClientModeSDKNormal()
{
	Assert( dynamic_cast< ClientModeSDKNormal* >( GetClientModeNormal() ) );

	return static_cast< ClientModeSDKNormal* >( GetClientModeNormal() );
}

float ClientModeSDKNormal::GetViewModelFOV( void )
{
	//Tony; retrieve the fov from the view model script, if it overrides it.
	float viewFov = 74.0;

	C_WeaponSDKBase *pWeapon = (C_WeaponSDKBase*)GetActiveWeapon();
	if ( pWeapon )
	{
		viewFov = pWeapon->GetWeaponFOV();
	}
	return viewFov;
}

int ClientModeSDKNormal::GetDeathMessageStartHeight( void )
{
	return m_pViewport->GetDeathMessageStartHeight();
}

#include "iefx.h"
#include "dlight.h"
#include "view.h"
#include "model_types.h"
#include "iosoptions.h"
#include "materialsystem\imaterialsystem.h"
#include "rendertexture.h"
#include "materialsystem/ITexture.h"

CHandle<C_BaseAnimatingOverlay> g_PlayerPreview = NULL;
CHandle<C_BaseAnimatingOverlay> g_BallPreview = NULL;
Vector camPos = vec3_invalid;
Vector newCamPos = vec3_invalid;
Vector oldCamPos = vec3_invalid;
float oldCamPosTime = FLT_MAX;
int oldBodypart = -1;
bool isAtTarget = false;

void UpdatePlayerPreviewEntity()
{
	C_SDKPlayer* pLocalPlayer = CSDKPlayer::GetLocalSDKPlayer();

	if (!pLocalPlayer)
		return;

	CAppearanceSettingPanel *pPanel = (CAppearanceSettingPanel *)iosOptionsMenu->GetPanel()->GetSettingPanel(SETTING_PANEL_APPEARANCE);

	if (!pPanel->IsVisible())
		return;

	MDLCACHE_CRITICAL_SECTION();

	ITexture *pRenderTarget = GetPlayerModelTexture();

	if(!pRenderTarget)
		return;

	if(!pRenderTarget->IsRenderTarget())
		Msg(" not a render target");

	C_BaseAnimatingOverlay *pPlayerPreview = g_PlayerPreview.Get();

	if (!pPlayerPreview)
	{
		pPlayerPreview = new C_BaseAnimatingOverlay();
		pPlayerPreview->InitializeAsClientEntity("models/player/player.mdl", RENDER_GROUP_OPAQUE_ENTITY);
		pPlayerPreview->AddEffects(EF_NODRAW); // don't let the renderer draw the model normally
		pPlayerPreview->SetSequence(pPlayerPreview->LookupSequence("idle"));
		pPlayerPreview->SetPoseParameter(0, 0.0f); // move_yaw
		pPlayerPreview->SetPoseParameter(1, 0.0f); // body_pitch, look down a bit
		pPlayerPreview->SetPoseParameter(2, 0.0f); // body_yaw
		pPlayerPreview->SetPoseParameter(3, 0.0f); // move_y
		pPlayerPreview->SetPoseParameter(4, 0.0f); // move_x
		g_PlayerPreview = pPlayerPreview;

	}

	C_BaseAnimatingOverlay *pBallPreview = g_BallPreview.Get();

	if (!pBallPreview)
	{
		pBallPreview = new C_BaseAnimatingOverlay();
		pBallPreview->InitializeAsClientEntity("models/ball/ball.mdl", RENDER_GROUP_OPAQUE_ENTITY);
		pBallPreview->AddEffects(EF_NODRAW);
		g_BallPreview = pBallPreview;
	}

	Vector handPos;
	QAngle handAng;
	pPlayerPreview->GetAttachment("ball_right_hand", handPos, handAng);
	pBallPreview->SetLocalOrigin(handPos);
	pBallPreview->SetLocalAngles(handAng);

	static int headBodyGroup = pPlayerPreview->FindBodygroupByName("head");

	int headIndex;

	switch (pPanel->GetPlayerSkinIndex())
	{
	case 0: case 1: case 2: default: headIndex = 0; break;
	case 3: headIndex = 1; break;
	case 4: headIndex = 2; break;
	}

	pPlayerPreview->SetBodygroup(headBodyGroup, headIndex);

	static int hairBodyGroup = pPlayerPreview->FindBodygroupByName("hair");
	pPlayerPreview->SetBodygroup(hairBodyGroup, pPanel->GetPlayerHairIndex());

	static int sleeveBodyGroup = pPlayerPreview->FindBodygroupByName("sleeves");
	pPlayerPreview->SetBodygroup(sleeveBodyGroup, pPanel->GetPlayerSleeveIndex());

	static int armBodyGroup = pPlayerPreview->FindBodygroupByName("arms");
	pPlayerPreview->SetBodygroup(armBodyGroup, pPanel->GetPlayerSleeveIndex() == 0 ? 1 : 0);

	static int handBodyGroup = pPlayerPreview->FindBodygroupByName("hands");
	pPlayerPreview->SetBodygroup(handBodyGroup, pPanel->IsKeeperPreview() ? 1 : 0);

	static int collarBodyGroup = pPlayerPreview->FindBodygroupByName("collar");
	pPlayerPreview->SetBodygroup(collarBodyGroup, pPanel->IsKeeperPreview() ? pPanel->GetPlayerTeamKitInfo()->m_bKeeperHasCollar : pPanel->GetPlayerTeamKitInfo()->m_bOutfieldHasCollar);

	Vector origin = pLocalPlayer->EyePosition();

	float angle = pPanel->GetPlayerPreviewAngle();
	int bodypart = pPanel->GetPlayerBodypart();

	// move player model in front of our view
	pPlayerPreview->SetAbsOrigin( origin );
	pPlayerPreview->SetAbsAngles( QAngle( 0, 180 + angle, 0 ) );

	pPlayerPreview->FrameAdvance( gpGlobals->frametime );

	// Now draw it.
	CViewSetup view;
	// setup the views location, size and fov (amongst others)
	view.x = 0;
	view.y = 0;
	view.width = pRenderTarget->GetActualWidth();
	view.height = pRenderTarget->GetActualHeight();

	view.m_bOrtho = false;
	view.fov = 54;

	// make sure that we see all of the player model
	Vector vMins, vMaxs;
	pPlayerPreview->C_BaseAnimating::GetRenderBounds( vMins, vMaxs );

	Vector target;

	if (bodypart == 0)
	{
		target = origin + Vector(-28, 0, vMaxs.z - 9);
	}
	else if (bodypart == 1)
	{
		target = origin + Vector(-46, 0, (vMins.z + vMaxs.z) * 0.5f + 20);
	}
	else
	{
		target = origin + Vector(-25, 0, vMins.z + 20);
	}

	if (bodypart != oldBodypart)
	{
		if (camPos == vec3_invalid)
		{
			camPos = target;
			isAtTarget = true;
		}
		else
		{
			isAtTarget = false;
			newCamPos = target;
			oldCamPosTime = gpGlobals->curtime;
			oldCamPos = camPos;
		}

		oldBodypart = bodypart;
	}
	else if (bodypart == oldBodypart && !isAtTarget)
	{
		static const float interpTime = 0.75f;
		Vector dir = target - oldCamPos;
		float dist = VectorNormalize(dir);
		float timeFrac = min(1.0f, (gpGlobals->curtime - oldCamPosTime) / interpTime);

		if (timeFrac == 1.0f)
		{
			isAtTarget = true;
			camPos = target;
		}
		else
		{
			float frac = pow(timeFrac, 2) * (3 - 2 * timeFrac);
			camPos = oldCamPos + dir * dist * frac;
		}
	}
	else if (bodypart == oldBodypart && isAtTarget)
	{
		camPos = target;
	}

	view.origin = camPos;
	view.angles = QAngle(15, 0, 0);
	//view.m_vUnreflectedOrigin = view.origin;
	view.zNear = VIEW_NEARZ;
	view.zFar = 1000;
	//view.m_bForceAspectRatio1To1 = false;

	const float v = 1.0f;

	CMatRenderContextPtr pRenderContext( materials );

	pRenderContext->SetLightingOrigin( vec3_origin );
	pRenderContext->SetAmbientLight(v, v, v);

	static Vector white[6] =
	{
		Vector(v, v, v),
		Vector(v, v, v),
		Vector(v, v, v),
		Vector(v, v, v),
		Vector(v, v, v),
		Vector(v, v, v),
	};

	g_pStudioRender->SetAmbientLightColors( white );
	g_pStudioRender->SetLocalLights( 0, NULL );

	// render it out to the new CViewSetup area
	// it's possible that ViewSetup3D will be replaced in future code releases
	Frustum dummyFrustum;

	// New Function instead of ViewSetup3D...
	render->Push3DView( view, VIEW_CLEAR_COLOR | VIEW_CLEAR_DEPTH, pRenderTarget, dummyFrustum );

	modelrender->SuppressEngineLighting( true );
	float color[3] = { 1.0f, 1.0f, 1.0f };
	render->SetColorModulation( color );
	render->SetBlend( 1.0f );

	pPlayerPreview->DrawModel(STUDIO_RENDER);

	if (pPanel->ShowBallPreview())
		pBallPreview->DrawModel( STUDIO_RENDER );

	modelrender->SuppressEngineLighting( false );

	render->PopView( dummyFrustum );
}

void ClientModeSDKNormal::PostRenderVGui()
{
}

void ClientModeSDKNormal::PostRenderVGuiOnTop()
{
	UpdatePlayerPreviewEntity();
}

bool ClientModeSDKNormal::CanRecordDemo( char *errorMsg, int length ) const
{
	C_SDKPlayer *player = C_SDKPlayer::GetLocalSDKPlayer();
	if ( !player )
	{
		return true;
	}

	if ( !player->IsAlive() )
	{
		return true;
	}

	return true;
}