text:
using System;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using Zyan.Communication;
using Zyan.Communication.Protocols.Ipc;
using Zyan.InterLinq;

namespace Zyan.Tests
{
	#region Unit testing platform abstraction layer
#if NUNIT
	using NUnit.Framework;
	using TestClass = NUnit.Framework.TestFixtureAttribute;
	using TestMethod = NUnit.Framework.TestAttribute;
	using ClassInitializeNonStatic = NUnit.Framework.OneTimeSetUpAttribute;
	using ClassInitialize = DummyAttribute;
	using ClassCleanupNonStatic = NUnit.Framework.OneTimeTearDownAttribute;
	using ClassCleanup = DummyAttribute;
	using TestContext = System.Object;
#else
	using Microsoft.VisualStudio.TestTools.UnitTesting;
	using ClassInitializeNonStatic = DummyAttribute;
	using ClassCleanupNonStatic = DummyAttribute;
#endif
	#endregion

	/// <summary>
	/// Test class for streams.
	/// </summary>
	[TestClass]
	public class StreamTests
	{
		#region Interfaces and components

		interface IStreamService
		{
			Stream OpenRead(string fileName = null);

			Stream Create(string fileName = null);

			Stream CopyData(Stream input);

			void CopyData(Stream input, Stream output);
		}

		class StreamService : IStreamService
		{
			public static byte[] SampleData = new byte[] { 1, 65, 12, 55, 22, 23, 126 };

			public static List<string> TempFileNames = new List<string>();

			public static void DeleteTempFiles()
			{
				foreach (var fn in TempFileNames)
				{
					File.Delete(fn);
				}

				TempFileNames.Clear();
			}

			public Stream OpenRead(string fileName)
			{
				if (string.IsNullOrEmpty(fileName))
				{
					return new MemoryStream(SampleData);
				}

				return File.OpenRead(fileName);
			}

			public Stream Create(string fileName)
			{
				if (string.IsNullOrEmpty(fileName))
				{
					return new MemoryStream();
				}

				TempFileNames.Add(fileName);
				return File.Create(fileName);
			}

			public Stream CopyData(Stream input)
			{
				var output = new MemoryStream();
				input.CopyTo(output);
				output.Position = 0;
				return output;
			}

			public void CopyData(Stream input, Stream output)
			{
				var size = 1000;
				var reader = new BinaryReader(input);
				var writer = new BinaryWriter(output);

				try
				{
					var bytes = reader.ReadBytes(size);

					while (bytes.Length > 0)
					{
						writer.Write(bytes);
						bytes = reader.ReadBytes(size);
					}
				}
				finally
				{
					reader.Close();
					writer.Close();
				}
			}
		}

		#endregion

		#region Initialization and cleanup

		public TestContext TestContext { get; set; }

		static ZyanComponentHost ZyanHost { get; set; }

		static ZyanConnection ZyanConnection { get; set; }

		[ClassInitializeNonStatic]
		public void Initialize()
		{
			StartServer(null);
		}

		[ClassCleanupNonStatic]
		public void Cleanup()
		{
			StopServer();
		}

		[ClassInitialize]
		public static void StartServer(TestContext ctx)
		{
			var serverSetup = new IpcBinaryServerProtocolSetup("StreamsTest");
			ZyanHost = new ZyanComponentHost("SampleStreamServer", serverSetup);
			ZyanHost.RegisterComponent<IStreamService, StreamService>();
			ZyanConnection = new ZyanConnection("ipc://StreamsTest/SampleStreamServer");
		}

		[ClassCleanup]
		public static void StopServer()
		{
			ZyanConnection.Dispose();
			ZyanHost.Dispose();
			StreamService.DeleteTempFiles();
		}

		#endregion

		[TestMethod]
		public void ReadRemoteMemoryStream()
		{
			var proxy = ZyanConnection.CreateProxy<IStreamService>();
			using (var stream = proxy.OpenRead())
			{
				var result = new byte[(int)stream.Length];
				stream.Read(result, 0, result.Length);

				Assert.IsTrue(StreamService.SampleData.SequenceEqual(result));
			}
		}

		[TestMethod]
		public void ReadWriteRemoteMemoryStream()
		{
			var proxy = ZyanConnection.CreateProxy<IStreamService>();
			using (var stream = proxy.Create())
			{
				// write data to server
				var result = new byte[StreamService.SampleData.Length];
				stream.Write(StreamService.SampleData, 0, result.Length);
				Assert.IsFalse(StreamService.SampleData.SequenceEqual(result));

				// read data from server
				stream.Position = 0;
				stream.Read(result, 0, result.Length);
				Assert.IsTrue(StreamService.SampleData.SequenceEqual(result));
			}
		}

		[TestMethod]
		public void ReadWriteRemoteMemoryStreamViaBinaryReaderAndWriter()
		{
			var proxy = ZyanConnection.CreateProxy<IStreamService>();
			using (var stream = proxy.OpenRead())
			{
				// read via BinaryReader
				var result = new BinaryReader(stream).ReadBytes((int)stream.Length);
				Assert.IsTrue(StreamService.SampleData.SequenceEqual(result));

				// write via BinaryWriter
				using (var stream2 = proxy.Create())
				{
					new BinaryWriter(stream2).Write(result);

					// read again via BinaryReader
					stream2.Position = 0;
					result = new BinaryReader(stream2).ReadBytes((int)stream2.Length);
					Assert.IsTrue(StreamService.SampleData.SequenceEqual(result));
				}
			}
		}

		[TestMethod]
		public void RemoteCopyMemoryStream()
		{
			var proxy = ZyanConnection.CreateProxy<IStreamService>();
			using (var stream = proxy.CopyData(new MemoryStream(StreamService.SampleData)))
			{
				var result = new byte[(int)stream.Length];
				stream.Read(result, 0, result.Length);
				Assert.IsTrue(StreamService.SampleData.SequenceEqual(result));
			}
		}

		[TestMethod]
		public void CopyRemoteFileStreamToLocalFileStream()
		{
			var inputName = typeof(StreamTests).Assembly.Location;
			var outputName = Path.Combine(Path.GetTempPath(), "TempFile" + Guid.NewGuid());

			var proxy = ZyanConnection.CreateProxy<IStreamService>();
			using (var input = proxy.OpenRead(inputName))
			using (var output = File.Create(outputName))
			{
				try
				{
					// copy data
					input.CopyTo(output);
					input.Close();
					output.Close();

					// validate data locally
					var inputData = File.ReadAllBytes(inputName);
					var outputData = File.ReadAllBytes(outputName);
					Assert.IsTrue(inputData.SequenceEqual(outputData));
				}
				finally
				{
					File.Delete(outputName);
				}
			}
		}

		[TestMethod]
		public void CopyLocalFileStreamToRemoteFileStream()
		{
			var inputName = typeof(StreamTests).Assembly.Location;
			var outputName = Path.Combine(Path.GetTempPath(), "TempFile" + Guid.NewGuid());

			var proxy = ZyanConnection.CreateProxy<IStreamService>();
			using (var input = File.OpenRead(inputName))
			using (var output = proxy.Create(outputName))
			{
				// copy data
				input.CopyTo(output);
				input.Close();
				output.Close();

				// validate data locally
				var inputData = File.ReadAllBytes(inputName);
				var outputData = File.ReadAllBytes(outputName);
				Assert.IsTrue(inputData.SequenceEqual(outputData));
			}
		}

		[TestMethod]
		public void CopyRemoteFileStreamToRemoteFileStream()
		{
			var inputName = typeof(StreamTests).Assembly.Location;
			var outputName = Path.Combine(Path.GetTempPath(), "TempFile" + Guid.NewGuid());

			var proxy = ZyanConnection.CreateProxy<IStreamService>();
			using (var input = proxy.OpenRead(inputName))
			using (var output = proxy.Create(outputName))
			{
				// copy data
				input.CopyTo(output);
				input.Close();
				output.Close();

				// validate data locally
				var inputData = File.ReadAllBytes(inputName);
				var outputData = File.ReadAllBytes(outputName);
				Assert.IsTrue(inputData.SequenceEqual(outputData));
			}
		}

		[TestMethod]
		public void CopyLocalFileStreamsUsingRemoteService()
		{
			var inputName = typeof(StreamTests).Assembly.Location;
			var outputName = Path.Combine(Path.GetTempPath(), "TempFile" + Guid.NewGuid());

			var proxy = ZyanConnection.CreateProxy<IStreamService>();
			using (var input = File.OpenRead(inputName))
			using (var output = File.Create(outputName))
			{
				try
				{
					// copy data
					proxy.CopyData(input, output);
					input.Close();
					output.Close();

					// validate data locally
					var inputData = File.ReadAllBytes(inputName);
					var outputData = File.ReadAllBytes(outputName);
					Assert.IsTrue(inputData.SequenceEqual(outputData));
				}
				finally
				{
					File.Delete(outputName);
				}
			}
		}
	}
}


text:
Wait!

Who is this?

Right!

Wrong!  It's {{multiChoice.person.name}}

{{choice.name}}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Specialized;
using System.Configuration;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Serilog.Sinks.WebRequest.Tests
{
    [TestClass]
    public class WebRequestSinkTests
    {
        private string Url = ConfigurationManager.AppSettings["testUrl"];

        private string glipWebhook = ConfigurationManager.AppSettings["glipWebHook"];

        [TestMethod]
        public void LoggerTest()
        {
            var logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .WriteTo.WebRequest(new Uri(Url))
                .CreateLogger();

            logger.Information("Hello World");
        }

        [TestMethod]
        public void AdditionalHeadersTest()
        {
            var headers = new NameValueCollection();
            headers.Add("X-Test-Header", "Test Header Value");

            var logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .WriteTo.WebRequest(new Uri(glipWebhook), contentType: "application/json", headers: headers)
                .CreateLogger();

            var message = new GlipMessage();

            logger.Information("{{ \"icon\": {icon}, \"activity\": {activity}, \"title\": {title}, \"body\": {body} }}",
                message.Icon, message.Activity, message.Title, message.Body);
        }
    }
}


text:
Wondering if a point is inside a city park? Know your latitude and longitude but not sure which city council district you're in?
Want to know all the Seattle-related boundaries that a point is inside?

## More info
- Site: https://boundaries.seattle.io
- API: https://boundaries-api.seattle.io
  - API repo: https://github.com/seattleio/boundaries-api

## API
There's also an API! Send a request like this:

```
https://boundaries-api.seattle.io/boundaries?long=-122.345002&lat=47.667044
```

Get a `FeatureCollection` of the matching features from each dataset in response.

## Data
This project uses [seattle-boundaries](https://github.com/openseattle/seattle-boundaries), a collection of geojson boundaries for the city of Seattle.

## Development

To get this project running on your computer:

- `git clone https://github.com/seattleio/boundaries.git`
- `cd boundaries`
- `npm install`
- `npm start`

## License
[MIT](LICENSE.md)


text:
package com.swara.examples.learn

import com.swara.learn.markov.DiscreteMarkovChain

/**
 * A random writer generates a string of words via a discrete markov chain. Random writers learn the
 * probability distribution of each word given the previous k words and then use this distribution
 * to generate a sequence of words beginning from a randomly selected seed.
 */
object RandomTextExample {

  def apply(source: String): String = {
    val markov = DiscreteMarkovChain.empty[String](4)
    markov.train(source.toLowerCase().split("\\W+").toSeq)
    markov.generate().take(100).foldRight("")((word, rest) => word + " " + rest)
  }

}


text:
class ProjectAccount < ActiveRecord::Base
  belongs_to :project
  belongs_to :bank
end


text:
import { has } from "lodash";
import { useEffect, useState } from "react";
import location from "@/services/location";

export default function useFullscreenHandler() {
  const [fullscreen, setFullscreen] = useState(has(location.search, "fullscreen"));
  useEffect(() => {
    document.body.classList.toggle("headless", fullscreen);
    location.setSearch({ fullscreen: fullscreen ? true : null }, true);
  }, [fullscreen]);

  const toggleFullscreen = () => setFullscreen(!fullscreen);
  return [fullscreen, toggleFullscreen];
}


text:
Angular2 app with routing, directives, services

For more details - fwward2011@gmail.com


text:
<!DOCTYPE html>

	<title>

            Surrey Digital Printing- Your Wide Format Printing Specialists! -

    Complete profile - Canadian Company Capabilities - Industries and Business - Industry Canada
  </title>

<meta charset="utf-8" />
<meta name="dcterms.language" title="ISO639-2" content="eng" />
<meta name="dcterms.title" content="" />
<meta name="description" content="" />
<meta name="dcterms.description" content="" />
<meta name="dcterms.type" content="report, data set" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.issued" title="W3CDTF" content="" />
<meta name="dcterms.modified" title="W3CDTF" content="" />
<meta name="keywords" content="" />

<meta name="dcterms.creator" content="" />
<meta name="author" content="" />
<meta name="dcterms.created" title="W3CDTF" content="" />
<meta name="dcterms.publisher" content="" />
<meta name="dcterms.audience" title="icaudience" content="" />
<meta name="dcterms.spatial" title="ISO3166-1" content="" />
<meta name="dcterms.spatial" title="gcgeonames" content="" />
<meta name="dcterms.format" content="HTML" />
<meta name="dcterms.identifier" title="ICsiteProduct" content="536" />

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta content="width=device-width,initial-scale=1" name="viewport">

<meta name = "format-detection" content = "telephone=no">

<meta name="robots" content="noarchive">

<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/wet-boew.min.css">

<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/theme.min.css">

<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/noscript.min.css" />

<link rel="stylesheet" href="/eic/home.nsf/css/add_WET_4-0_Canada_Apps.css">

  	<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
  	<link href="/app/ccc/srch/css/print.css" media="print" rel="stylesheet" type="text/css" />

<meta property="legalName" content="Department_of_Industry">

Skip to main content

Skip to "About this site"

Language selection

Français

<object type="image/svg+xml" tabindex="-1" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/sig-blk-en.svg"></object> Government of Canada

Search and menus

Search and menus

Topics menu

Jobs

Immigration

Travel

Business

Benefits

Health

Taxes

More services

You are here:

Home

Industries and Business

Canadian Company Capabilities

<input id="showMore" type="hidden" value='more'/>
<input id="showLess" type="hidden" value='less'/>

 Company profile - Canadian Company Capabilities

New Search |

<form name="searchForm" method="post" action="/app/ccc/srch/bscSrch.do">

          <input type="hidden" name="lang" value="eng" />
          <input type="hidden" name="profileId" value="" />
          <input type="hidden" name="prtl" value="1" />
          <input type="hidden" name="searchPage" value="%2Fapp%2Fccc%2Fsrch%2FcccBscSrch.do%3Flang%3Deng%26amp%3Bprtl%3D1%26amp%3Btagid%3D"  />

          <input type="hidden" name="V_SEARCH.scopeCategory" value="CCC.Root" />

          <input type="hidden" name="V_SEARCH.depth" value="1" />
          <input type="hidden" name="V_SEARCH.showStricts" value="false" />
          <input id="repeatSearchBtn" class="btn btn-link" type="submit" value="Return to search results" />

  </form>

| Previous Company

| Next Company

      Third-Party Information Liability Disclaimer

Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.

      Surrey Digital 2009 Ltd.

Legal Name:

Surrey Digital 2009 Ltd.

Operating Name:

Surrey Digital Printing- Your Wide Format Printing Specialists!

http://www.surreydigital.com

info@surreydigital.com

Mailing Address:

              	<address class="mrgn-bttm-md">

                   150-7881 128th St

                    SURREY,

                    British Columbia

                  V3W 4E7

                </address>

Location Address:

              	         <address class="mrgn-bttm-md">

                   150-7881 128th St

                    SURREY,

                    British Columbia

                  V3W 4E7

                         </address>

Tel.:
		      (604) 572-8100

Fax:

Company Profile

            Welcome to Surrey Digital- Your Wide Format Print Specialists!

Surrey Digital is a family owned printer and a genuine one stop print shop under one roof!  We offer quality design services and as wide format printing specialists,  we offer excellent Cad Plotting, Blueprinting, Plan Printing, Indoor/Outdoor Signage, & Banners at great prices. Our talented staff also produces an aray of the best, yet cost effective marketing materials and everyday business necessitites such as envelopes, letterhead, business cards and forms at the best possible price. As an Authorisded Large Format Printer dealer (Canon, HP, Seiko, Oce), we are able to sell a full range of Wide Format Printer Equipment, Engineering Plotting Bond Paper and Rolls, Media and Supplies.

The distinctive characteristics of quick turnaround and high quality workmanship are found to provide advantages to the many industries we serve. High speed plan printing, short run/customized colour brochures/pamphlets allow firms to promote their business to highly specific market segments, maximizing their promotion dollar. Large format/short run colour banners, posters and presentation boards accomplish high end image creation for specific customer applications.

The practiced art of job pick-up/delivery, shipping services, and distribution make complete fulfillment a natural extension of the services provided to our clients.

If we've not had the pleasure of serving you before, please give us a try. Contact us via our website or visit us at our shop, conveniently located in central Surrey.

				Full profile

				Full profile

				Contact information

                Leah
                Hutton

	                  Title:

  						VP Sales & Marketing

                  Telephone:

                (604) 572-8100

                    Email:

                  leah@surreydigital.com

  top of page

				Company description

            Exporting:

              No

                Primary Industry (NAICS):

				323119 - Other Printing

            Alternate Industries (NAICS):

            323114 - Quick Printing

            323120 - Support Activities for Printing

            561430 - Business Service Centres

            Primary Business Activity:

            Services

				Product / Service / Licensing

                              Product Name:

                            Wide Format Printers & Scanners & Consumables

                            Wide Format Printers & Scanners

At Surrey digital we are dealers for the following lines of printers and Accessories:

•HP wide format inkjet printers and multi function printer/scanners.

•HP desktop inkjet and laser printers.

•Canon wide format inkjet printers and multi function printer/scanners.

•Seiko Teriostar wide format Laser Printers.

•Oce Plotwave Laser Printers.

•Contex Wide format Scanners

Further information on all our printer products is available in our online store www.surreydigital.com

Available Media

Surrey Digital Printing carries a wide range of media for Manual Drafting, Cad Drafting, Wide Format Inkjet Printers and Laser Printers. In addition we carry copy paper for all your small format printers and copiers.

Click the media type to view in our online store. www.surreydigital.com

•Drafting Vellum, Films & Sketch Papers

•Large Format Papers & Films

•Small Format Copy Papers

Further information on all our printer products is available in our online store. www.surreydigital.com

Ink and Toner

At surrey digital we carry a wide array of inkjet ink for most HP and Canon printers, both small and large format. Please go to our online store for the ink of your choice.

In addition we carry toners for HP small format printers. We also carry toners for the following wide format printers- Oce, Kip, Ricoh, Xerox, Seiko. Please go to our online store for the toner of your choice.

•Large Format Inks & Toners

Further information on all our printer products is available in our online store. www.surreydigital.com

Wide Format Printer Service & Repairs

Need service or repairs for your printer?  Our Team of Certified Technicians can help you!

Call 604-572-8100 to place a service call.

                              Service Name:

                            Large Format Printing

                            As a leader  in Surrey for Wide Format Printing, the demand for large format colour printing is growing. Large Format graphiccs on flexible or rigid media have hundreds of uses, and are amazingly cost effective. Some of the advantages that we extend to our customer base are photo-realistic, colourful, complex image reproduction and, most importantly, quick turnaround times.

•Banners

•Billboards

•Calendars

•Canvas

•Corporate Signage

•Decals

•Foam Core Presentation Boards

•Giclee

•Magnets

•Photos

•Posters

•Presentation Boards

•Retail and Point of Purchase Displays

•Signage

•Trade Show Displays

•Window Graphics

 Flexible Stock Materials

Surrey Digital can provide you with professional, photo-quality images with brilliant, accurate colours and smooth, subtle skin tones on a wide variety of materials.

•Presentation grade paper

•Photo gloss paper

•Photo matte paper

•Canvas

•Floor graphics

•Adhesive back vinyl (permanent or removable)

•Backlit film

•Clear film

Rigid Stock Materials

•Aluminum Composite

•Clear Polycabonate

•Coroplast

•Foamcore

•Gatorplast

•MDO Board

•Plywood

•Sintra

•Styrene

•Specialty Substrates

                              Service Name:

                            Reprographics

                            At the heart of our business is our ability to provide high quality, time sensitive reprographic printing (blueprinting) for our engineering, architectural and construction customers.  Utilizing the latest in wide format equipment, we have the capability to provide both black and white as well as color Cad prints in a timely manner. We accept a wide variety of file formats for printing and your files can be sent via e-mail, our on-line order form, or uploaded onto our FTP site for fast, convenient file transfer.

We offer the following services:

•Digital black and white AEC prints from PLT, PDF, DWG files  (Cad Plotting)

•Reduction and enlargement of AEC drawings

•Color Cad plotting of AEC files

•Spec printing up to 11" x 17" in color or black and white

•Scanning and Archiving

•Blueprinting, now called wide format digital printing

                              Service Name:

                            Small Format Print Services

                            Surrey Digital has the latest technology for full-color, high quality, yet affordable printing.  Our talented graphic designers will be able to turn your dream into reality.  We can help you with:

•Booklets

•Books

•Brochures

•Bumper Stickers

•Business Cards

•Business Forms

•Calendars

•Carbonless Forms

•Catalogues

•CD Covers and Labels

•Cheques

•Continuous Forms

•Coupons

•Custom Stamps

•Photocopying

•Post Cards

•Direct Print from an Electronic File

•Envelopes

•Flyers

•Foil Stamping

•Invitations

•Labels

•Letterhead

•Limited Edition Prints

•Magazines

•Magnets

•Manuals

•Menus

•Newsletters

•Notepads

•Offset Full Colour & B&W Printing

•Presentation Folders

•Rack Cards

•Reports

•Stickers

•Tags

•Transparencies

                              Service Name:

                            Laminating, Bindery & Finishing Services

                            Bindery equipment and capabilities:

At Surrey Digital, we offer a wide range of finishing options: Saddle stitching, stapling, coil binding, cerlox binding, tape binding, folding, numbering, scoring, perforating, cutting,  we do it all!

•Folding

•Grommeting / Eyeleting

•Scoring

•Perforating

•Numbering

•Cutting

•Collating

•Padding & Gluing

•Die-Cutting

•Kiss Cutting

•Saddle-Stitching

•Drilling

•Stapling

•Hole Punching

•Booklet Making

•Laminating

•Index Tabbing

•Calendar Tinning

•Spiral Binding

•Embossing

•Laminating

With the addition of our new 60" wide format laminator, we can no produce high quality posters and banners with outdoor protection on all types of media and substrates including foamcore, aluminum, and plywood boards. Keep us in mind for all your presentation boards.

                              Service Name:

                            Plotter Repair & Maintenance

                            At Surrey Digital we provide full large format plotter repair, maintenance and service support on HP, Canon and Oce and Seiko wide format printers. We utilize factory trained technicians to service all your wide format equipment needs.

For both service contract pricing and hourly rates please contact our customer service department 1-604-572-8100

Printing equipment lines we presently service:

•HP wide format Designjet printers

•Canon ImagePrograf (ipf) wide format inkjet printers

•Seiko Teriostar wide format LED monochrome printers

•Oce Plotwave 300 series LED print systems

•Contex wide format Scanners

  top of page

					Third-Party Information Liability Disclaimer

					Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.

				Contacts

				Contact information

                Leah
                Hutton

	                  Title:

  						VP Sales & Marketing

                  Telephone:

                (604) 572-8100

                    Email:

                  leah@surreydigital.com

				Description

				Company description

            Exporting:

              No

                Primary Industry (NAICS):

				323119 - Other Printing

            Alternate Industries (NAICS):

            323114 - Quick Printing

            323120 - Support Activities for Printing

            561430 - Business Service Centres

            Primary Business Activity:

            Services

				Products, services and licensing

				Product / Service / Licensing

                              Product Name:

                            Wide Format Printers & Scanners & Consumables

                            Wide Format Printers & Scanners

At Surrey digital we are dealers for the following lines of printers and Accessories:

•HP wide format inkjet printers and multi function printer/scanners.

•HP desktop inkjet and laser printers.

•Canon wide format inkjet printers and multi function printer/scanners.

•Seiko Teriostar wide format Laser Printers.

•Oce Plotwave Laser Printers.

•Contex Wide format Scanners

Further information on all our printer products is available in our online store www.surreydigital.com

Available Media

Surrey Digital Printing carries a wide range of media for Manual Drafting, Cad Drafting, Wide Format Inkjet Printers and Laser Printers. In addition we carry copy paper for all your small format printers and copiers.

Click the media type to view in our online store. www.surreydigital.com

•Drafting Vellum, Films & Sketch Papers

•Large Format Papers & Films

•Small Format Copy Papers

Further information on all our printer products is available in our online store. www.surreydigital.com

Ink and Toner

At surrey digital we carry a wide array of inkjet ink for most HP and Canon printers, both small and large format. Please go to our online store for the ink of your choice.

In addition we carry toners for HP small format printers. We also carry toners for the following wide format printers- Oce, Kip, Ricoh, Xerox, Seiko. Please go to our online store for the toner of your choice.

•Large Format Inks & Toners

Further information on all our printer products is available in our online store. www.surreydigital.com

Wide Format Printer Service & Repairs

Need service or repairs for your printer?  Our Team of Certified Technicians can help you!

Call 604-572-8100 to place a service call.

                              Service Name:

                            Large Format Printing

                            As a leader  in Surrey for Wide Format Printing, the demand for large format colour printing is growing. Large Format graphiccs on flexible or rigid media have hundreds of uses, and are amazingly cost effective. Some of the advantages that we extend to our customer base are photo-realistic, colourful, complex image reproduction and, most importantly, quick turnaround times.

•Banners

•Billboards

•Calendars

•Canvas

•Corporate Signage

•Decals

•Foam Core Presentation Boards

•Giclee

•Magnets

•Photos

•Posters

•Presentation Boards

•Retail and Point of Purchase Displays

•Signage

•Trade Show Displays

•Window Graphics

 Flexible Stock Materials

Surrey Digital can provide you with professional, photo-quality images with brilliant, accurate colours and smooth, subtle skin tones on a wide variety of materials.

•Presentation grade paper

•Photo gloss paper

•Photo matte paper

•Canvas

•Floor graphics

•Adhesive back vinyl (permanent or removable)

•Backlit film

•Clear film

Rigid Stock Materials

•Aluminum Composite

•Clear Polycabonate

•Coroplast

•Foamcore

•Gatorplast

•MDO Board

•Plywood

•Sintra

•Styrene

•Specialty Substrates

                              Service Name:

                            Reprographics

                            At the heart of our business is our ability to provide high quality, time sensitive reprographic printing (blueprinting) for our engineering, architectural and construction customers.  Utilizing the latest in wide format equipment, we have the capability to provide both black and white as well as color Cad prints in a timely manner. We accept a wide variety of file formats for printing and your files can be sent via e-mail, our on-line order form, or uploaded onto our FTP site for fast, convenient file transfer.

We offer the following services:

•Digital black and white AEC prints from PLT, PDF, DWG files  (Cad Plotting)

•Reduction and enlargement of AEC drawings

•Color Cad plotting of AEC files

•Spec printing up to 11" x 17" in color or black and white

•Scanning and Archiving

•Blueprinting, now called wide format digital printing

                              Service Name:

                            Small Format Print Services

                            Surrey Digital has the latest technology for full-color, high quality, yet affordable printing.  Our talented graphic designers will be able to turn your dream into reality.  We can help you with:

•Booklets

•Books

•Brochures

•Bumper Stickers

•Business Cards

•Business Forms

•Calendars

•Carbonless Forms

•Catalogues

•CD Covers and Labels

•Cheques

•Continuous Forms

•Coupons

•Custom Stamps

•Photocopying

•Post Cards

•Direct Print from an Electronic File

•Envelopes

•Flyers

•Foil Stamping

•Invitations

•Labels

•Letterhead

•Limited Edition Prints

•Magazines

•Magnets

•Manuals

•Menus

•Newsletters

•Notepads

•Offset Full Colour & B&W Printing

•Presentation Folders

•Rack Cards

•Reports

•Stickers

•Tags

•Transparencies

                              Service Name:

                            Laminating, Bindery & Finishing Services

                            Bindery equipment and capabilities:

At Surrey Digital, we offer a wide range of finishing options: Saddle stitching, stapling, coil binding, cerlox binding, tape binding, folding, numbering, scoring, perforating, cutting,  we do it all!

•Folding

•Grommeting / Eyeleting

•Scoring

•Perforating

•Numbering

•Cutting

•Collating

•Padding & Gluing

•Die-Cutting

•Kiss Cutting

•Saddle-Stitching

•Drilling

•Stapling

•Hole Punching

•Booklet Making

•Laminating

•Index Tabbing

•Calendar Tinning

•Spiral Binding

•Embossing

•Laminating

With the addition of our new 60" wide format laminator, we can no produce high quality posters and banners with outdoor protection on all types of media and substrates including foamcore, aluminum, and plywood boards. Keep us in mind for all your presentation boards.

                              Service Name:

                            Plotter Repair & Maintenance

                            At Surrey Digital we provide full large format plotter repair, maintenance and service support on HP, Canon and Oce and Seiko wide format printers. We utilize factory trained technicians to service all your wide format equipment needs.

For both service contract pricing and hourly rates please contact our customer service department 1-604-572-8100

Printing equipment lines we presently service:

•HP wide format Designjet printers

•Canon ImagePrograf (ipf) wide format inkjet printers

•Seiko Teriostar wide format LED monochrome printers

•Oce Plotwave 300 series LED print systems

•Contex wide format Scanners

    Last Update Date 2016-03-23

Date Modified:

      <time>2017-03-02</time>

About government

Contact us

Departments and agencies

Public service and military

News

Treaties, laws and regulations

Government-wide reporting

Prime Minister

How government works

Open government

About this site

Social media

Mobile applications

About Canada.ca

Terms and conditions

Privacy

Top of Page

<object type="image/svg+xml" tabindex="-1" role="img" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/wmms-blk.svg" aria-label="Symbol of the Government of Canada"></object>


text:
package com.malalaoshi.android.events;

import com.malalaoshi.android.core.event.BusEvent;

/**
 * Created by kang on 16/5/10.
 */
public class NoticeEvent extends BusEvent {

    private Long unpayCount = new Long(-1);
    private Long uncommentCount = new Long(-1);
    public NoticeEvent(int eventType) {
        super(eventType);
    }

    public Long getUnpayCount() {
        return unpayCount;
    }

    public void setUnpayCount(Long unpayCount) {
        this.unpayCount = unpayCount;
    }

    public Long getUncommentCount() {
        return uncommentCount;
    }

    public void setUncommentCount(Long uncommentCount) {
        this.uncommentCount = uncommentCount;
    }
}


text:
from verbs.baseforms import forms

class InsertForm(forms.VerbForm):

    name = "insert"
    slug = "insert"

    edit_what_remark = forms.CharField()
    describe_where = forms.CharField()
    specify_machine = forms.CharField()
    duration_min_time = forms.IntegerField()
    edit_remarks = forms.CharField()
    edit_why_step = forms.CharField()
    edit_from = forms.CharField()
    specify_tool = forms.CharField()


text:
var util = require('util'),
	async = require('async'),
	path = require('path'),
	buffer = require('buffer'),
	fs = require('fs'),
	jszip = require('./jszip');

function EasyZip(){
	jszip.JSZip.apply(this,arguments);
}

util.inherits(EasyZip, jszip.JSZip);

function toArrayBuffer(buffer) {
    var ab = new ArrayBuffer(buffer.length),
    	view = new Uint8Array(ab);
    for (var i = 0; i < buffer.length; ++i) {
        view[i] = buffer[i];
    }
    return ab;
}

EasyZip.prototype.addFile = function(file,filePath,callback){
	var datas = [],
		me = this,
		rs = fs.createReadStream(filePath);

	rs.on('data',function(data){
		datas.push(data);
	})

	rs.on('end',function(){
		var buf = Buffer.concat(datas);
		me.file(file, toArrayBuffer(buf),{base64:false, binary: true});
		callback();
	})
}

EasyZip.prototype.batchAdd = function(files,callback) {
	var me = this;
	async.each(files,function(item,callback){
		var source = item.source,
			target = item.target,
			appender = me,
			folder = item.folder,
			fileName = path.basename(target),
			dirname = path.dirname(target);

		if(dirname!='.'){
			appender = me.folder(dirname);
		}

		if(source != null && source.trim()!=''){
			appender.addFile(fileName,source,function(){
				callback();
			});
		}else{
			//if no source ,make the target as folder
			me.folder(target);
			callback();
		}

	},function(){
		callback(me);
	});
}

EasyZip.prototype.zipFolder = function(folder,callback) {
	if(!fs.existsSync(folder)){
		callback(new Error('Folder not found'),me);
	}else{
		var me = this,
			files = fs.readdirSync(folder),
			rootFolder = path.basename(folder),
			zips = [],
			file,stat,targetPath,sourcePath;

		while(files.length > 0){
			file = files.shift();
			sourcePath = path.join(folder,file);
			targetPath = path.join(rootFolder,file);
			stat = fs.statSync(sourcePath);

			if(stat.isFile()){
				zips.push({
					target : targetPath,
					source : sourcePath
				});
			}else{
				zips.push({
					target : targetPath
				});

				//join the path
				async.map(fs.readdirSync(sourcePath),function(item,callback){
					callback(null,path.join(file,item));
				},function(erro,result){
					files = files.concat(result);
				});

			}
		}

		me.batchAdd(zips,function(){callback(null,me)});

	}
}

EasyZip.prototype.writeToResponse = function(response,attachmentName){
	attachmentName = attachmentName || new Date().getTime();
	attachmentName += '.zip';
	response.setHeader('Content-Disposition', 'attachment; filename="' +attachmentName + '"');
	response.write(this.generate({base64:false,compression:'DEFLATE'}),"binary");
	response.end();
}

EasyZip.prototype.writeToFile = function(filePath,callback){
		var data = this.generate({base64:false,compression:'DEFLATE'});
		fs.writeFile(filePath, data, 'binary',callback);
}

EasyZip.prototype.writeToFileSycn = function(filePath){
	  var data = this.generate({base64:false,compression:'DEFLATE'});
	  fs.writeFileSync(filePath, data, 'binary');
}

EasyZip.prototype.clone = function() {
   var newObj = new EasyZip();
   for (var i in this) {
      if (typeof this[i] !== "function") {
         newObj[i] = this[i];
      }
   }
   return newObj;
}

exports.EasyZip = EasyZip;


text:
require("colors");

interface IConsoleSettings {
    verbose: boolean;
    enabled: boolean;
}

var settings: IConsoleSettings = {
    verbose: false,
    enabled: false
}

var eventHandlers : {(type:string, content:any) : void}[];
eventHandlers = [];

export function on(handler){
    eventHandlers.push(handler);
}

function trigger(type:string, content:any){
    eventHandlers.forEach(function(handler){
        handler(type, content);
    });
}

export function setConfig<T>(name: string, value: T): void {
    settings[name] = value;
}

function convertToString(obj: any): string {
    if (typeof obj == "string") {
        return obj;
    }
    if (obj instanceof Array) {
        return (<string[]>obj).join(", ");
    }
    if (typeof obj == "object") {
        return JSON.stringify(obj, null, 2);
    }
    return obj.toString();
}

function parseArgs(args: any[]): string[]{
    var parsedArgs: string[] = [];
    for (var i = 0, l = args.length; i < l; i++) {
        parsedArgs.push( convertToString(args[i]) );
    }
    return parsedArgs;
}

function printToScreen(args: string[], color: string): void {
   if (settings.enabled) {
        console.log(args.join(", " + "\r\n")[color]);
   }
}

export function info(...args: any[]): void {
    trigger("info", args);
    printToScreen(parseArgs(args), "white");
}

export function warn(...args: any[]): void {
    trigger("warn", args);
    printToScreen(parseArgs(args), "yellow");
}

export function error(...args: any[]): void {
    trigger("error", args);
    printToScreen(parseArgs(args), "red");
}

export function success(...args: any[]): void {
    trigger("success", args);
    printToScreen(parseArgs(args), "green");
}

export function log(...args: any[]): void {
    trigger("log", args);
    if (settings.verbose) {
         printToScreen(parseArgs(args), "white");
    }
}


text:
#ifndef __EEPROM_17XX_40XX_H_
#define __EEPROM_17XX_40XX_H_

#ifdef __cplusplus
extern "C" {
#endif

/** @defgroup EEPROM_17XX_40XX CHIP: LPC17xx/40xx EEPROM driver
 * @ingroup CHIP_17XX_40XX_Drivers
 * @{
 */

#if defined(CHIP_LPC177X_8X) || defined(CHIP_LPC40XX)

/**
 * @brief EEPROM register block structure
 */
typedef struct {				/*  EEPROM Structure */
	__IO uint32_t CMD;			/*!< EEPROM command register */
	__IO uint32_t ADDR;			/*!< EEPROM address register */
	__O  uint32_t WDATA;		/*!< EEPROM write data register */
	__I  uint32_t RDATA;		/*!< EEPROM read data register */
	__IO uint32_t WSTATE;		/*!< EEPROM wait state register */
	__IO uint32_t CLKDIV;		/*!< EEPROM clock divider register */
	__IO uint32_t PWRDWN;		/*!< EEPROM power-down register */
	uint32_t RESERVED0[975];
	__O  uint32_t INTENCLR;		/*!< EEPROM interrupt enable clear */
	__O  uint32_t INTENSET;		/*!< EEPROM interrupt enable set */
	__I  uint32_t INTSTAT;		/*!< EEPROM interrupt status */
	__I  uint32_t INTEN;		/*!< EEPROM interrupt enable */
	__O  uint32_t INTSTATCLR;	/*!< EEPROM interrupt status clear */
	__O  uint32_t INTSTATSET;	/*!< EEPROM interrupt status set */
} LPC_EEPROM_T;

#define EEPROM_PAGE_SIZE                64		/*!< EEPROM byes per page */
#define EEPROM_PAGE_NUM                 63		/*!<  EEPROM pages */

/*
 * @brief Macro defines for EEPROM command register
 */
#define EEPROM_CMD_8BITS_READ           (0)		/*!< EEPROM 8-bit read command */
#define EEPROM_CMD_16BITS_READ          (1)		/*!< EEPROM 16-bit read command */
#define EEPROM_CMD_32BITS_READ          (2)		/*!< EEPROM 32-bit read command */
#define EEPROM_CMD_8BITS_WRITE          (3)		/*!< EEPROM 8-bit write command */
#define EEPROM_CMD_16BITS_WRITE         (4)		/*!< EEPROM 16-bit write command */
#define EEPROM_CMD_32BITS_WRITE         (5)		/*!< EEPROM 32-bit write command */
#define EEPROM_CMD_ERASE_PRG_PAGE       (6)		/*!< EEPROM erase/program command */
#define EEPROM_CMD_RDPREFETCH           (1 << 3)/*!< EEPROM read pre-fetch enable */

/*
 * @brief Macro defines for EEPROM power down register
 */
#define EEPROM_PWRDWN                   (1 << 0)

/*
 * @brief Macro defines for EEPROM interrupt related registers
 */
#define EEPROM_INT_ENDOFRW                 (1 << 26)
#define EEPROM_INT_ENDOFPROG               (1 << 28)

/**
 * @brief EEPROM Mode type definition
 */
typedef enum IP_EEPROM_RWSIZE {
	EEPROM_RWSIZE_8BITS = 1,
	EEPROM_RWSIZE_16BITS = 2,
	EEPROM_RWSIZE_32BITS = 4
} EEPROM_RWSIZE_T;

/**
 * @brief	Put EEPROM device in power down mode
 * @param	pEEPROM		: The base of EEPROM peripheral on the chip
 * @return	Nothing
 */
STATIC INLINE void Chip_EEPROM_EnablePowerDown(LPC_EEPROM_T *pEEPROM)
{
	pEEPROM->PWRDWN = EEPROM_PWRDWN;
}

/**
 * @brief	Bring EEPROM device out of power down mode
 * @param	pEEPROM		: The base of EEPROM peripheral on the chip
 * @return	Nothing
 */
STATIC INLINE void Chip_EEPROM_DisablePowerDown(LPC_EEPROM_T *pEEPROM)
{
	pEEPROM->PWRDWN = 0;
}

/**
 * @brief	Initializes EEPROM
 * @param	pEEPROM	: The base of EEPROM peripheral on the chip
 * @return	Nothing
 */
void Chip_EEPROM_Init(LPC_EEPROM_T *pEEPROM);

/**
 * @brief	De-initializes EEPROM
 * @param	pEEPROM	: The base of EEPROM peripheral on the chip
 * @return	Nothing
 */
STATIC INLINE void Chip_EEPROM_DeInit(LPC_EEPROM_T *pEEPROM)
{
	/* Enable EEPROM power down mode */
	Chip_EEPROM_EnablePowerDown(pEEPROM);
}

/**
 * @brief	Select an EEPROM command
 * @param	pEEPROM	: pointer to EEPROM peripheral block
 * @param	cmd	: EEPROM command.
 * @return	Nothing
 * @note	 cmd is or-ed bits value of EEPROM_CMD_[8|16|32]BITS_READ/EEPROM_CMD_[8|16|32]BITS_WRITE
 * with EEPROM_CMD_RDPREFETCH flag.
 *		Read and erase/program operations are started on the EEPROM device as a side-effect of calling this function.
 * Write operations are started as a side-effect of writing data to data register.
 */
STATIC INLINE void Chip_EEPROM_SetCmd(LPC_EEPROM_T *pEEPROM, uint32_t cmd)
{
	pEEPROM->CMD = cmd;
}

/**
 * @brief	Set EEPROM address
 * @param	pEEPROM	: pointer to EEPROM peripheral block
 * @param	pageAddr	: Page address.
 * @param	pageOffset	: Page address.
 * @return	Nothing
 */
STATIC INLINE void Chip_EEPROM_SetAddr(LPC_EEPROM_T *pEEPROM, uint32_t pageAddr, uint32_t pageOffset)
{
	pEEPROM->ADDR = (pageAddr << 6) | pageOffset;
}

/**
 * @brief	Write EEPROM data
 * @param	pEEPROM	: pointer to EEPROM peripheral block
 * @param	data	: EEPROM data.
 * @return	Nothing
 */
STATIC INLINE void Chip_EEPROM_WriteData(LPC_EEPROM_T *pEEPROM, uint32_t data)
{
	pEEPROM->WDATA = data;
}

/**
 * @brief	Read EEPROM data
 * @param	pEEPROM	: pointer to EEPROM peripheral block
 * @return	data
 */
STATIC INLINE uint32_t Chip_EEPROM_ReadData(LPC_EEPROM_T *pEEPROM)
{
	return pEEPROM->RDATA;
}

/**
 * @brief	Set EEPROM wait state
 * @param	pEEPROM	: pointer to EEPROM peripheral block
 * @param	ws	: Wait State value.
 * @return	Nothing
 */
STATIC INLINE void Chip_EEPROM_SetWaitState(LPC_EEPROM_T *pEEPROM, uint32_t ws)
{
	pEEPROM->WSTATE = ws;
}

/**
 * @brief	Write data to EEPROM at specific address
 * @param	pEEPROM		: The base of EEPROM peripheral on the chip
 * @param	pageOffset	: offset of data in page register(0 - 63)
 * @param	pageAddress: page address (0-62)
 * @param	pData		: buffer that contain data that will be written to buffer
 * @param	wsize			: Write size:

 *                  - EEPROM_RWSIZE_8BITS    : 8-bit read/write mode

 *                  - EEPROM_RWSIZE_16BITS   : 16-bit read/write mode

 *                  - EEPROM_RWSIZE_32BITS   : 32-bit read/write mode

 * @param	byteNum		: number written data (bytes)
 * @return	SUCCESS on successful write of data, or ERROR
 * @note	This function actually write data into EEPROM memory and automatically
 * write into next page if current page is overflowed
 */
Status Chip_EEPROM_Write(LPC_EEPROM_T *pEEPROM, uint16_t pageOffset,
						 uint16_t pageAddress,
						 void *pData,
						 EEPROM_RWSIZE_T wsize,
						 uint32_t byteNum);

/**
 * @brief	Read data to EEPROM at specific address
 * @param	pEEPROM		: The base of EEPROM peripheral on the chip
 * @param	pageOffset	: offset of data in page register(0 - 63)
 * @param	pageAddress: page address (0-62)
 * @param	pData		: buffer that contain data read from read data register
 * @param	rsize		: Read size:

 *                  - EEPROM_RWSIZE_8BITS    : 8-bit read/write mode

 *                  - EEPROM_RWSIZE_16BITS   : 16-bit read/write mode

 *                  - EEPROM_RWSIZE_32BITS   : 32-bit read/write mode

 * @param	byteNum		: number read data (bytes)
 * @return	Nothing
 */
void Chip_EEPROM_Read(LPC_EEPROM_T *pEEPROM, uint16_t pageOffset,
					  uint16_t pageAddress,
					  void *pData,
					  EEPROM_RWSIZE_T rsize,
					  uint32_t byteNum);

/**
 * @brief	Erase a page at the specific address
 * @param	pEEPROM		: The base of EEPROM peripheral on the chip
 * @param	address		: EEPROM page address (0-62)
 * @return	Nothing
 */
void Chip_EEPROM_Erase(LPC_EEPROM_T *pEEPROM, uint16_t address);

/**
 * @brief	Enable EEPROM interrupt
 * @param	pEEPROM		: pointer to EEPROM peripheral block
 * @param	mask		: interrupt mask (or-ed bits value of EEPROM_INT_*)
 * @return	Nothing
 */
STATIC INLINE void Chip_EEPROM_EnableInt(LPC_EEPROM_T *pEEPROM, uint32_t mask)
{
	pEEPROM->INTENSET =  mask;
}

/**
 * @brief	Disable EEPROM interrupt
 * @param	pEEPROM		: pointer to EEPROM peripheral block
 * @param	mask		: interrupt mask (or-ed bits value of EEPROM_INT_*)
 * @return	Nothing
 */
STATIC INLINE void Chip_EEPROM_DisableInt(LPC_EEPROM_T *pEEPROM, uint32_t mask)
{
	pEEPROM->INTENCLR =  mask;
}

/**
 * @brief	Get the value of the EEPROM interrupt enable register
 * @param	pEEPROM		: pointer to EEPROM peripheral block
 * @return	Or-ed bits value of EEPROM_INT_*
 */
STATIC INLINE uint32_t Chip_EEPROM_GetIntEnable(LPC_EEPROM_T *pEEPROM)
{
	return pEEPROM->INTEN;
}

/**
 * @brief	Get EEPROM interrupt status
 * @param	pEEPROM		: pointer to EEPROM peripheral block
 * @return	Or-ed bits value of EEPROM_INT_*
 */
STATIC INLINE uint32_t Chip_EEPROM_GetIntStatus(LPC_EEPROM_T *pEEPROM)
{
	return pEEPROM->INTSTAT;
}

/**
 * @brief	Set EEPROM interrupt status
 * @param	pEEPROM		: pointer to EEPROM peripheral block
 * @param	mask		: interrupt mask (or-ed bits value of EEPROM_INT_*)
 * @return	Nothing
 */
STATIC INLINE void Chip_EEPROM_SetIntStatus(LPC_EEPROM_T *pEEPROM, uint32_t mask)
{
	pEEPROM->INTSTATSET =  mask;
}

/**
 * @brief	Clear EEPROM interrupt status
 * @param	pEEPROM		: pointer to EEPROM peripheral block
 * @param	mask		: interrupt mask (or-ed bits value of EEPROM_INT_*)
 * @return	Nothing
 */
STATIC INLINE void Chip_EEPROM_ClearIntStatus(LPC_EEPROM_T *pEEPROM, uint32_t mask)
{
	pEEPROM->INTSTATCLR =  mask;
}

#endif /* defined(CHIP_LPC177X_8X) || defined(CHIP_LPC40XX) */

/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#endif /* __EEPROM_17XX_40XX_H_ */


text:
using UnityEngine;
using UnityEditor;

[CanEditMultipleObjects, CustomEditor(typeof(MegaAttach))]
public class MegaAttachEditor : Editor
{
	public override void OnInspectorGUI()
	{
		MegaAttach mod = (MegaAttach)target;

#if !UNITY_5 && !UNITY_2017
		EditorGUIUtility.LookLikeControls();
#endif
		//DrawDefaultInspector();

		mod.target = (MegaModifiers)EditorGUILayout.ObjectField("Target", mod.target, typeof(MegaModifiers), true);

		mod.attachforward = EditorGUILayout.Vector3Field("Attach Fwd", mod.attachforward);
		mod.AxisRot = EditorGUILayout.Vector3Field("Axis Rot", mod.AxisRot);
		mod.radius = EditorGUILayout.FloatField("Radius", mod.radius);
		mod.up = EditorGUILayout.Vector3Field("Up", mod.up);
		mod.worldSpace = EditorGUILayout.Toggle("World Space", mod.worldSpace);

		if ( GUI.changed )
		{
			EditorUtility.SetDirty(mod);
		}

		if ( !mod.attached )
		{
			if ( GUILayout.Button("Attach") )
			{
				mod.AttachIt();
				EditorUtility.SetDirty(mod);
			}
		}
		else
		{
			if ( GUILayout.Button("Detach") )
			{
				mod.DetachIt();
				EditorUtility.SetDirty(mod);
			}
		}
	}
}


text:
<?xml version='1.0' encoding='utf-8'?>
<category id="Tutorials::Serialization::Hash aproximation" name="Hash aproximation" xmlns="http://jessevdk.github.com/cldoc/1.0">
  <brief>Unordered name dependent serialization</brief>
  <doc>Same as previous example but using hash-like serialization
Note that in this case we can put the elements directly on the root

#### json file, "file.json"
```json
{
  "integer"    : 10,
  "likeThis"   : true,
  "accurancy"  : 0.5661,
  "songLyrics" : "And though your dead and gone, believe me, your memory will carry on"
}
```
#### code
```c++
#include <iostream>
#include <string>
#include "serializable.hpp"

class A : public json::Serializable {               // derivate from 'Serializable'
private:
  int         number;
  bool        boolean;
  double      precision;
  std::string blckprde;

  SERIAL_START                                      // asociate each parameter with its name (which must be the same as in 'file.json')
    "likeThis",   boolean,                          // note the comma in between the name and its parameter.
    "accurancy",  precision,                        // parameters are order independent
    "songLyrics", blckprde,                         // the macro is the same
    "integer",    number                            // last element has no comma
  SERIAL_END
public:
  void changeContent () {
    number    = 78;
    boolean   = false;
    precision = 10.1;
    blckprde  = "We'll carry on";
  }
};

int main (void) {
  A obj;
  obj.serializeIn("file.json");  // as the elements are at root, we don't need to specify the path
  std::cout << obj.toText() << std::endl;
  obj.changeContent();
  obj.serializeOut("file.json"); // rewrites "file.json" with the information of the object 'obj', at path 'some_path'
}
```

#### output
Note the order of the elements has changed and now is the same than used in **SERIAL_START** macro. Obviously that is not a problem
if we wanted to run the program again as it would be if we used _vector-like_ mode.
```
{
  "likeThis" : true,
  "accurancy" : 0.5661000000000000476,
  "songLyrics" : "And though your dead and gone, believe me, your memory will carry on",
  "integer" : 10
}
```

#### modified json file, "file.json"
```json
{
  "likeThis" : false,
  "accurancy" : 10.09999999999999964,
  "songLyrics" : "We'll carry on",
  "integer" : 78
}
```
</doc>
</category>


text:
function deletecookie(name) {
    document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}

describe("Language select and change", function(){
  // Destroy language cookies
  deletecookie("language", null);

  //create a new pad before each test run
  beforeEach(function(cb){
    helper.newPad(cb);
    this.timeout(60000);
  });

  // Destroy language cookies

  it("makes text german", function(done) {
    var inner$ = helper.padInner$;
    var chrome$ = helper.padChrome$;

    //click on the settings button to make settings visible
    var $settingsButton = chrome$(".buttonicon-settings");
    $settingsButton.click();

    //click the language button
    var $language = chrome$("#languagemenu");
    var $languageoption = $language.find("[value=de]");

    //select german
    $languageoption.attr('selected','selected');
    $language.change();

    helper.waitFor(function() {
      return chrome$(".buttonicon-bold").parent()[0]["title"] == "Fett (Strg-B)";
     })
    .done(function(){
      //get the value of the bold button
      var $boldButton = chrome$(".buttonicon-bold").parent();

      //get the title of the bold button
      var boldButtonTitle = $boldButton[0]["title"];

      //check if the language is now german
      expect(boldButtonTitle).to.be("Fett (Strg-B)");
      done();
    });
  });

  it("makes text English", function(done) {
    var inner$ = helper.padInner$;
    var chrome$ = helper.padChrome$;

    //click on the settings button to make settings visible
    var $settingsButton = chrome$(".buttonicon-settings");
    $settingsButton.click();

    //click the language button
    var $language = chrome$("#languagemenu");
    var $languageoption = $language.find("[value=en]");

    //select german
    $languageoption.attr('selected','selected');
    $language.change();

    //get the value of the bold button
    var $boldButton = chrome$(".buttonicon-bold").parent();

    helper.waitFor(function() { return $boldButton[0]["title"] != "Fett (Strg-B)";})
    .done(function(){

      //get the value of the bold button
      var $boldButton = chrome$(".buttonicon-bold").parent();

      //get the title of the bold button
      var boldButtonTitle = $boldButton[0]["title"];

      //check if the language is now English
      expect(boldButtonTitle).to.be("Bold (Ctrl-B)");
      done();

    });
  });

  it("changes direction when picking an rtl lang", function(done) {
    var inner$ = helper.padInner$;
    var chrome$ = helper.padChrome$;

    //click on the settings button to make settings visible
    var $settingsButton = chrome$(".buttonicon-settings");
    $settingsButton.click();

    //click the language button
    var $language = chrome$("#languagemenu");
    var $languageoption = $language.find("[value=ar]");

    //select arabic
    $languageoption.attr('selected','selected');
    $language.change();

    helper.waitFor(function() {
      return chrome$("html")[0]["dir"] != 'ltr';
     })
    .done(function(){
      // check if the document's direction was changed
      expect(chrome$("html")[0]["dir"]).to.be("rtl");
      done();
    });
  });

});


text:
package com.google.api.gax.grpc;

import com.google.api.gax.rpc.ApiStreamObserver;
import io.grpc.stub.StreamObserver;

/**
 * A delegate class that transfers calls to the StreamObserver object.
 *
 * <p>Package-private for internal use.
 */
class StreamObserverDelegate<V> implements ApiStreamObserver<V> {

  private final StreamObserver<V> delegate;

  public StreamObserverDelegate(StreamObserver<V> delegate) {
    this.delegate = delegate;
  }

  @Override
  public void onNext(V v) {
    delegate.onNext(v);
  }

  @Override
  public void onError(Throwable throwable) {
    delegate.onError(throwable);
  }

  @Override
  public void onCompleted() {
    delegate.onCompleted();
  }
}


text:
package org.terasology.launcher.repositories;

import com.google.common.base.Preconditions;
import com.google.gson.Gson;
import com.google.gson.JsonIOException;
import com.google.gson.JsonSyntaxException;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Arrays;
import java.util.Optional;
import java.util.Properties;

class JenkinsClient {

    private static final Logger logger = LoggerFactory.getLogger(JenkinsClient.class);

    private static final String ARTIFACT = "artifact/";

    private final Gson gson;

    final OkHttpClient client;

    JenkinsClient(OkHttpClient httpClient, Gson gson) {
        this.gson = gson;

        // We have to work around some inconvenience with our own Jenkins by tweaking the cache control headers a bit.
        // The 'Expires' header would cause the 'versionInfo.properties' file to be fetched each and every time again.
        // To prevent this, we use an OkHttp Interceptor to remove the 'Expires' header and replace it with a custom
        // 'Cache-control' header.
        //
        // See https://square.github.io/okhttp/features/interceptors/
        var interceptor = new Interceptor() {
            @Override
            public Response intercept(Interceptor.Chain chain) throws IOException {
                var request = chain.request();
                var originalResponse = chain.proceed(request);
                if (request.tag(PropertiesRequest.class) != null) {
                    // for requests for properties (e.g., versionInfo.properties) we use a long caching period
                    return originalResponse.newBuilder()
                            .removeHeader("Expires")
                            .header("Cache-control", "max-age=" + Duration.ofDays(30).toSeconds())
                            .build();
                }
                return originalResponse;
            }
        };

        client = httpClient.newBuilder()
                .addNetworkInterceptor(interceptor)
                .build();
    }

    Jenkins.ApiResult request(URL url) throws InterruptedException {
        Preconditions.checkNotNull(url);

        var request = new Request.Builder().url(url).build();
        try (var response = client.newCall(request).execute()) {
            logger.debug("{}{}", response, response.cacheResponse() != null ? " (cached)" : "");
            return gson.fromJson(response.body().string(), Jenkins.ApiResult.class);
        } catch (JsonSyntaxException | JsonIOException e) {
            logger.warn("Failed to read JSON from '{}'", url.toExternalForm(), e);
        } catch (IOException e) {
            logger.warn("Failed to read from URL '{}'\n\t{}", url.toExternalForm(), e.getMessage());
        }
        return null;
    }

    // a) request for 'versionInfo.properties' have the PropertiesRequest tag
    // b) request for other resources don't have it
    // c) the 'Expires' header is removed from response for requests with PropertiesRequest

    @Nullable
    Properties requestProperties(final URL artifactUrl) {
        Preconditions.checkNotNull(artifactUrl);

        var request = new Request.Builder()
                .url(artifactUrl)
                .tag(PropertiesRequest.class, new PropertiesRequest())
                .build();

        try (var response = client.newCall(request).execute()) {
            logger.debug("{}{}", response.request().url(), response.cacheResponse() != null ? " (cached)" : "");
            final Properties properties = new Properties();
            properties.load(response.body().charStream());
            return properties;
        } catch (IOException e) {
            logger.warn("Error while fetching {}", artifactUrl, e);
        }
        return null;
    }

    @Nullable
    URL getArtifactUrl(Jenkins.Build build, String regex) {
        if (build.artifacts == null || build.url == null) {
            return null;
        }
        Optional<String> url = Arrays.stream(build.artifacts)
                .filter(artifact -> artifact.fileName.matches(regex))
                .findFirst()
                .map(artifact -> build.url + ARTIFACT + artifact.relativePath);

        if (url.isPresent()) {
            try {
                return new URL(url.get());
            } catch (MalformedURLException e) {
                logger.debug("Invalid URL: '{}'", url, e);
            }
        }
        return null;
    }

    static final class PropertiesRequest { }
}


text:
My final project for the Udacity "Developing Android Apps" course

### The Movie Database API Key is required.
In order for the PopularMovies app to function properly, an API key for themoviedb.org must be included with the build.

Use instructions here to obtain the key: http://docs.themoviedb.apiary.io/#

Include the unique key for the build by adding the following line to [USER_HOME]/.gradle/gradle.properties
`TheMovieDatabaseApiKey="<UNIQUE_API_KEY>"`


text:
from django.forms import Form
from django.forms import BooleanField
from django.forms import CharField
from django.forms import Textarea
from django.forms import ValidationError
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from apps.asset import control as asset_control

class Create(Form):

  description = CharField(
    label=_("DESCRIPTION"),
    widget=Textarea(attrs={'class' : 'pagedownBootstrap'})
  )
  address = CharField(label=_("ADDRESS"))

  terms = BooleanField(label=mark_safe(_("ACCEPT_TERMS")), initial=False)

  def __init__(self, *args, **kwargs):
    self.bounty = kwargs.pop("bounty")
    super(Create, self).__init__(*args, **kwargs)

  def clean_address(self):
    am = asset_control.get_manager(self.bounty.asset)
    address = self.cleaned_data["address"]
    if not am.validate(address):
      raise ValidationError(_("ERROR_INVALID_ADDRESS"))
    return address

class Edit(Form):

  description = CharField(
    label=_("DESCRIPTION"),
    widget=Textarea(attrs={'class' : 'pagedownBootstrap'})
  )

  def __init__(self, *args, **kwargs):
    self.claim = kwargs.pop("claim")
    super(Edit, self).__init__(*args, **kwargs)
    self.fields["description"].initial = self.claim.description

class ChangeAddress(Form):

  address = CharField(label=_("ADDRESS"))

  def __init__(self, *args, **kwargs):
    self.claim = kwargs.pop("claim")
    super(ChangeAddress, self).__init__(*args, **kwargs)
    self.fields["address"].initial = self.claim.address

  def clean_address(self):
    am = asset_control.get_manager(self.claim.bounty.asset)
    address = self.cleaned_data["address"]
    if not am.validate(address):
      raise ValidationError(_("ERROR_INVALID_ADDRESS"))
    return address


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
Bull. Torrey bot. Club 24: 205 (1897)

#### Original name
Kneiffiella Underw.

### Remarks
null


text:
//
//  HTMLNamespaces.h
//  HTMLKit
//
//  Created by Iska on 03/11/14.
//  Copyright (c) 2014 BrainCookie. All rights reserved.
//

/**
 HTML Namespaces
 https://html.spec.whatwg.org/multipage/infrastructure.html#namespaces
 */
typedef NS_ENUM(NSInteger, HTMLNamespace)
{
	/** The default HTML namespace. */
	HTMLNamespaceHTML,

	/** The namespace for most of the <math> elements. */
	HTMLNamespaceMathML,

	/** The namespace for most of the <svg> elements. */
	HTMLNamespaceSVG
};


text:
grunt-sencha-dependencies-testinfra
===================================

This is the dependencies for the tests in grunt-sencha-dependencies and includes the various Ext.js and Sencha Touch releases that aren't needed by ended users


text:
class func_to_dict(object):
    ''' Converts function of one hashable argument to dictionary-like
        object which "contains" all it returning values. '''
    def __init__(self, f):
        self.f = f

    def __getitem__(self, key):
        return f.f(key)


text:
<?php
namespace Titon\Test\Stub\Repository;

use Titon\Event\Event;
use Titon\Db\Query;

class UserSaveCallbacks extends User {

    public function preSave(Event $event, $id, array &$data) {
        if ($id === 1) {
            return false;
        }

        if ($id) {
            $data['firstName'] = 'UPDATE';
        } else {
            $data['firstName'] = 'CREATE';
        }

        return true;
    }

    public function postSave(Event $event, $id, $created = false) {
        $this->data = ['id' => $id, 'created' => $created];
    }

}


text:
/**
  * jQuery.enllax.js v1.2
  * https://github.com/numanWD/enllax.js
  *
  * This content is released under the MIT license
 **/

/* global jQuery */

(function($){
    'use strict';

    $.fn.enllax = function(opt){

        var winHeight = $(window).height();
        var docHeight = $(document).height();

        var options = $.extend({
            ratio: 0,
            type: 'background', //foreground
            direction: 'vertical' //horizontal
        }, opt);

        var elem = $('[data-enllax-ratio]');

        elem.each(function(){
            var ratio;
            var type;
            var dir;
            var $this = $(this);
            var offset = $this.offset().top;
            var height = $this.outerHeight();
            var dataRat = $this.data('enllax-ratio');
            var dataType = $this.data('enllax-type');
            var dataDir = $this.data('enllax-direction');

            if(dataRat) {
                ratio = dataRat;
            }
            else { ratio = options.ratio; }

            if(dataType) {
                type = dataType;
            }
            else { type = options.type; }

            if(dataDir) {
                dir = dataDir;
            }
            else { dir = options.direction; }

            var bgY = offset * ratio;
            var transform = (offset - (winHeight / 2) + height) * ratio;

            if(type === 'background') {
                if(dir === 'vertical') {
                    $this.css({
                        'background-position': 'center ' + -bgY + 'px'
                    });
                }
                else if(dir === 'horizontal') {
                    $this.css({
                        'background-position': -bgY + 'px' + ' center'
                    });
                }
            }
            else if(type === 'foreground') {
                if(dir === 'vertical') {
                    $this.css({
                        '-webkit-transform': 'translateY(' + transform + 'px)',
                        '-moz-transform': 'translateY(' + transform + 'px)',
                        'transform': 'translateY(' + transform + 'px)'
                    });
                }
                else if(dir === 'horizontal') {
                    $this.css({
                        '-webkit-transform': 'translateX(' + transform + 'px)',
                        '-moz-transform': 'translateX(' + transform + 'px)',
                        'transform': 'translateX(' + transform + 'px)'
                    });
                }
            }

            $(window).on('scroll', function(){
                var scrolling = $(this).scrollTop();

                bgY = (offset - scrolling) * ratio;
                transform = ((offset - (winHeight / 2) + height) - scrolling) * ratio;

                if(type === 'background') {
                    if(dir === 'vertical') {
                        $this.css({
                            'background-position': 'center ' + -bgY + 'px'
                        });
                    }
                    else if(dir === 'horizontal') {
                        $this.css({
                            'background-position': -bgY + 'px' + ' center'
                        });
                    }
                }
                else if((type === 'foreground') && (scrolling < docHeight)) {
                    if(dir === 'vertical') {
                        $this.css({
                            '-webkit-transform': 'translateY(' + transform + 'px)',
                            '-moz-transform': 'translateY(' + transform + 'px)',
                            'transform': 'translateY(' + transform + 'px)'
                        });
                    }
                    else if(dir === 'horizontal') {
                        $this.css({
                            '-webkit-transform': 'translateX(' + transform + 'px)',
                            '-moz-transform': 'translateX(' + transform + 'px)',
                            'transform': 'translateX(' + transform + 'px)'
                        });
                    }
                }
            });
        });
    };

})(jQuery);


text:
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: >
    Refer 12.6.3;
    The production
    IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement
    is evaluated as follows:
es5id: 12.6.3_2-3-a-ii-1
description: >
    The for Statement - (normal, V, empty) will be returned when first
    Expression is an Object with value false
---*/

        var accessed = false;
        var obj = { value: false };
        for (var i = 0; obj; ) {
            accessed = true;
            break;
        }

assert(accessed, 'accessed !== true');


text:
package com.cmwebgame.core;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Method annotation for mapping URL.

 * For example:

 *

 * public class Blog {
 *     @Mapping("/")
 *     public String index() {
 *         // handle index page...
 *     }
 *
 *     @Mapping("/blog/$1")
 *     public String show(int id) {
 *         // show blog with id...
 *     }
 *
 *     @Mapping("/blog/edit/$1")
 *     public void edit(int id) {
 *         // edit blog with id...
 *     }
 * }
 *

 *
 * @author Michael Liao (askxuefeng@gmail.com)
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Mapping {

    String value();

}


text:
package com.github.aha.sat.core.testing.profile;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import com.github.aha.sat.core.config.User;

@SpringBootTest(classes = { RichardConfig.class, BarbaraConfig.class })
abstract class AbstractConfigTest {

    @Autowired
    protected User user;

}


text:
title: Image
order: 7
---

## Image

A built-in node Circle has the default style as below, the label is drawed on the bottom of it.

## Usage

As stated in [Built-in Nodes](/en/docs/manual/middle/elements/nodes/defaultNode) , there are three methods to configure nodes: Configure nodes globally when instantiating a Graph; Configure nodes in their data; Configure nodes by `graph.node(nodeFn)`. Their priorities are:

`graph.node(nodeFn)` > Configure in data > Configure globally

⚠ Attention: Expect for `id`, and `label` which should be assigned to every single node data, the other configurations in [The Common Property](/en/docs/manual/middle/elements/nodes/defaultNode#common-property) and in each node type (refer to doc of each node type) support to be assigned by the three ways.

### 1 实例化图时全局配置

Assign `type` to `'image'` in the `defaultNode` object when instantiating a Graph:

```javascript
const graph = new G6.Graph({
  container: 'mountNode',
  width: 800,
  height: 600,
  defaultNode: {
    type: 'image',
    label: 'AntV Team',
    // Other configuraltions
  },
});
```

### 2 Configure in the Data

To configure different nodes with different properties, you can write the properties into the node data.

```javascript
const data = {
  nodes: [{
    id: 'node0',
  	img: 'https://yyb.gtimg.com/aiplat/page/product/visionimgidy/img/demo6-16a47e5d31.jpg?max_age=31536000',
    type: 'image',
    size: 200,
    label: 'AntV Team',
    labelCfg: {
      position: 'bottom'
    },
    // The configurations for clipping the image
    clipCfg: {
      show: false,
      type: 'circle',
      r: 15
    }
  },
    ... // Other nodes
  ],
  edges: [
    ... // edges
  ]
}
```

## Property

The [Node Common Properties](/en/docs/manual/middle/elements/nodes/defaultNode/#common-property) are available for Image node, some special properties are shown below. The property with Object type will be described after the table:

```javascript
img: 'https://yyb.gtimg.com/aiplat/page/product/visionimgidy/img/demo6-16a47e5d31.jpg?max_age=31536000',
size: 200,
  labelCfg: {
    position: 'bottom'
  },
  // The configurations for clipping the image
  clipCfg: {
    show: false,
    type: 'circle',
    // circle
    r: 15,
    // ellipse
    rx: 10,
    ry: 15,
    // rect
    width: 15,
    height: 15,
    // Coordinates
    x: 0,
    y: 0
  }
```

| Name | Description | Type | Remark |
| --- | --- | --- | --- | --- |
| **img** | **The URL addgress** | **String** | **special property for image node** |
| size | The size of the node | Number | Array | When it is a number, the width and the height are the same |
| label | The text of the label | String |  |
| labelCfg | The configurations for the label | Object | The [Node Common Label Configurations](/en/docs/manual/middle/elements/nodes/defaultNode/#label-and-labelcfg) are available. |
| **clipCfg** | **The configurations for clipping** | **Object** | **Do not clip by default. It is a special property for image node** |

### clipCfg

| Name | Description | Type | Remark |
| --- | --- | --- | --- |
| type | The type of shape of clipping | String | Options: `'circle'`, `'rect'`, `'ellipse'` |
| x | The x coordinate of the clipping shape | Number | 0 by default. Only takes effect when the `type` is `'circle'`, `'rect'`, or `'ellipse'` |
| y | The y coordinate of the clipping shape | Number | 0 by default. Only takes effect when the `type` is `'circle'`, `'rect'`, or `'ellipse' |
| show | Whether to clip the image | Boolean | Do not clip by default. |
| r | The radius of circle clipping | Number | Takes effect when the `type` is `'circle'` |
| width | The width of the clipping | Number | Takes effect when the `type` is `'rect'` |
| height | The height of the clipping | Number | Takes effect when the `type` is `'rect'` |
| rx | The major radius of the ellipse clipping | Number | Takes effect when the `type` is `'ellipse'` |
| ry | The minor radius of the ellipse clipping | Number | Takes effect when the `type` is `'ellipse'` |

There are default values for all the types of clipping. The following code shows how to configure the `clipCfg` when instantiating a Graph:

```javascript
const data = {
  nodes: [
    {
      x: 100,
      y: 100,
      type: 'image',
      label: 'image',
    },
  ],
};
const graph = new G6.Graph({
  container: 'mountNode',
  width: 800,
  height: 600,
  defaultNode: {
    // type: 'image',  // The type has been assigned in the data, we do not have to define it any more
    clipCfg: {
      show: true,
      type: 'circle',
    },
  },
});
graph.data(data);
graph.render();
```

#### Clippling Type

##### Cicle Clipping

`circle` When the `type` in `clipCfg` is `'circle'`:

```javascript
clipCfg: {
  show: true,
  type: 'circle',
  r: 100
}
```

##### Rect Clipping

`rect`

When the `type` in `clipCfg` is `'rect'`:

```javascript
clipCfg: {
  show: true,
  type: 'rect',
  x: -50,
  y: -50,
  width: 100,
  height: 100
}
```

##### Ellipse Clipping

`ellipse`

When the `type` in `clipCfg` is `'ellipse'`:

```javascript
clipCfg: {
  show: true,
  type: 'ellipse',
  rx: 100,
  ry: 60
}
```


text:
title: "Grunt: Install and Setup"
author: "StanGeorge"
created: "April 5, 2014"
edited: "April 5, 2014"
layout: "default"
isPage: true
preview: "Grun can automate reperitive tasks for you. It is a JavaScript Task Runner. This post discusses how to install Grunt a automate a few tasks."
---
Lets start by installing Grunt and a few plugins:

npm install grunt safeps --save
npm install grunt-cli -g
npm install grunt-contrib-uglify --save-dev
npm install grunt-contrib-htmlmin --save-dev
npm install --save-dev grunt-shell

After the install we need configure the automation in a  Gruntfile. I wrote a CoffeeScript version of the configuration. It does executes the command docpad generate --env static. The other thing it does is minify the HTML that is generated. Here is my Gruntfile.coffee:

module.exports = (grunt) ->
  grunt.initConfig
    #http://blog.hypercubed.com/archives/2013/10/05/docpad-and-grunt/
    shell:
      docpad:
        options:
          stdout: true
        command: "docpad generate --env static" #command to process files

    htmlmin: # Task to minimize the HTML files
      dist: # Target
        expand: true
        cwd: '/home/stan/make' #This is the current working directory
        src: ['out/*.html'] #Process html files from the source folder called 'out'
        dest: '' #*Put the processed files back in the same source folder*
        options: # Target options
          removeComments: true
          collapseWhitespace: true
          minifyJS:true

  grunt.loadNpmTasks('grunt-shell');
  grunt.loadNpmTasks('grunt-contrib-htmlmin');
  grunt.loadNpmTasks('grunt-contrib-uglify');

  grunt.registerTask('generate', ['shell:docpad']);
  grunt.registerTask "default", ['generate', 'htmlmin']


text:
/**
 * Unicorn Admin Template
 * Version 2.2.0
 * Diablo9983 -> diablo9983@gmail.com
**/

$(document).ready(function(){

	$('.data-table').dataTable({
		"bJQueryUI": true,
		"sPaginationType": "full_numbers",
		"sDom": '<""l>t<"F"fp>'
	});

	var checkboxClass = 'icheckbox_flat-blue';
	var radioClass = 'iradio_flat-blue';
	$('input[type=checkbox],input[type=radio]').iCheck({
    	checkboxClass: checkboxClass,
    	radioClass: radioClass
	});

	$('select').select2();

	$("span.icon input:checkbox, th input:checkbox").on('ifChecked || ifUnchecked',function() {
		var checkedStatus = this.checked;
		var checkbox = $(this).parents('.widget-box').find('tr td:first-child input:checkbox');
		checkbox.each(function() {
			this.checked = checkedStatus;
			if (checkedStatus == this.checked) {
				$(this).closest('.' + checkboxClass).removeClass('checked');
			}
			if (this.checked) {
				$(this).closest('.' + checkboxClass).addClass('checked');
			}
		});
	});
});


text:
using Microsoft.AspNet.SignalR;

namespace NoCms.Net.Hubs
{
	internal class ChatHub : Hub
	{
		 public void Send(string name, string message)
		 {
			 Clients.All.broadcastMessage(name, message);
		 }
	}
}


text:
<?php
/**
 * @package Greyzed
 */

// Do not delete these lines
	if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');

	if ( post_password_required() ) { ?>

<?php _e( 'This post is password protected. Enter the password to view comments.', 'greyzed' ); ?>

	<?php
		return;
	}
?>

<?php if ( have_comments() ) : ?>

<?php _e( 'Comments', 'greyzed' ); ?>

	<?php wp_list_comments('avatar_size=40'); ?>

<?php previous_comments_link() ?>

<?php next_comments_link() ?>

<?php else : // this is displayed if there are no comments so far ?>
	<?php if ( comments_open() ) : ?>

	<?php else : // comments are closed ?>

<?php _e( 'Comments are closed.', 'greyzed' ); ?>

	<?php endif; ?>
<?php endif; ?>

<?php if ( comments_open() ) : ?>

	<?php comment_form(); ?>

<?php endif; // if you delete this the sky will fall on your head ?>


text:
class RenameBackerTotalsToUserTotals < ActiveRecord::Migration
  def up
    execute "DROP VIEW backer_totals"
    execute <<SQL
    CREATE OR REPLACE VIEW user_totals AS
    SELECT
      b.user_id as id,
      b.user_id,
      sum(b.value) AS sum,
      count(*) AS count,
      sum(CASE
        WHEN p.finished AND NOT p.successful AND NOT b.credits AND NOT b.requested_refund THEN b.value
        WHEN (NOT p.finished OR p.successful) AND b.credits THEN b.value * -1
        ELSE 0
      END) AS credits
    FROM
      backers b
      JOIN projects p ON (b.project_id = p.id)
    WHERE b.confirmed = true
    GROUP BY b.user_id;
SQL
  end

  def down
    execute "DROP VIEW user_totals"
  end
end


text:
{% load staticfiles %}

    <meta charset="ISO-8859-1">

    <link rel="import" href="{% static "bower_components/polymer/polymer.html" %}">
    <link rel="import" href="{% static "bower_components/paper-input/paper-input.html" %}">
    <link rel="import" href="{% static "bower_components/paper-button/paper-button.html" %}">
    <link rel="import" href="{% static "bower_components/paper-spinner/paper-spinner.html" %}">

    EcuReport

            {% if not user.is_authenticated %}

            <paper-button onclick="window.location.href='/login/'">Iniciar Sesion</paper-button>

            {% else %}

Usuario: {{ user.username }}

                <paper-button onclick="window.location.href='/mesas/'">Seleccionar Mesa</paper-button>

                <paper-button onclick="window.location.href='/logout/'">Cerrar Sesion</paper-button>

{#
#}
{#                    Cerrar sesion#}
{#
#}

{#
#}
{#                    Seleccionar Mesa#}
{#
#}

            {% endif %}