|
|
|
|
//This is a generated file via gulp generate-test-samples
|
|
|
|
|
define([], function() { return[
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-failing-js.txt",
|
|
|
|
|
"content": "var container = document.getElementById(\"container\");\r\nvar cssCode = [\r\n\t'body {',\r\n\t'\tmargin: 0px;',\r\n\t'\tpadding: 0px;',\r\n\t'}'\r\n].join('\\n');\r\n\r\nMonaco.Editor.create(container, {\r\n\tvalue: cssCode,\r\n\tmode: \"text/css\"\r\n});\r\n\r\nrequire(['vs/platform/platform', 'vs/editor/modes/modesExtensions'], \r\n\tfunction (Platform, ModesExtensions) {\r\n\t\tvar modesRegistry = Platform.Registry.as(ModesExtensions.Extensions.EditorModes);\r\n\t\t\r\n\t\t// Try 'ignore', 'warning', and 'error'\r\n\t\tmodesRegistry.configureMode('text/css', {\r\n\t\t\t\"validationSettings\": {\r\n\t\t\t\t\"lint\": {\r\n\t\t\t\t\tcompatibleVendorPrefixes\": \"warning\",\r\n\t\t\t\t\tvendorPrefix\": \"warning\",\r\n\t\t\t\t\tduplicateProperties\": \"warning\",\r\n\t\t\t\t\temptyRules\": \"warning\",\r\n\t\t\t\t\timportStatement\": \"ignore\",\r\n\t\t\t\t\tboxModel\": \"ignore\",\r\n\t\t\t\t\tuniversalSelector\": \"warning\",\r\n\t\t\t\t\tzeroUnits\": \"ignore\",\r\n\t\t\t\t\tfontFaceProperties\": \"warning\",\r\n\t\t\t\t\thexColorLength\": \"error\",\r\n\t\t\t\t\targumentsInColorFunction\": \"error\",\r\n\t\t\t\t\tunknownProperties\": \"warning\",\r\n\t\t\t\t\tunknownVendorSpecificProperties\": \"warning\",\r\n\t\t\t\t\tpropertyIgnoredDueToDisplay\": \"warning\",\r\n\t\t\t\t\timportant\": \"ignore\",\r\n\t\t\t\t\tfloat\": \"ignore\",\r\n\t\t\t\t\tidSelector\": \"ignore\"\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n);\r\n\r"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-intellisense-js.txt",
|
|
|
|
|
"content": "\r\n\"use strict\";\r\nfunction Person(age) {\r\n\tif (age) {\r\n\t\tthis.age = age;\r\n\t}\r\n}\r\nPerson.prototype.getAge = function () {\r\n\treturn this.age;\r\n};\r\n\r\nfunction Student(age, grade) {\r\n\tPerson.call(this, age);\r\n\tthis.grade = grade;\r\n}\r\nStudent.prototype = new Person();\r\nStudent.prototype.getGrade = function () {\r\n\treturn this.grade;\r\n};\r\n\r\nvar s = new Student(24, 5.75);\r\n//var age = s.\r\n\r\n//delete s.age;\r\n//s.getAge = function() { return {foo:\"bar\"}; };\r\n//s.\r\n//s.getAge().\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-jquery-min-js.txt",
|
|
|
|
|
"content": "نقطة التقاء نهريّ الساڤا والدانوب، حيث يلتقي السهل الپانونّي لأوروبا الوسطى بشبه جزيرة البلقان. يصل عدد سكان المدينة نفسها إلى\r\n//< as\r\n\r\n/*\r\nFour byte: Ext-A 㐀㒣㕴㕵㙉㙊䵯䵰䶴䶵 (Unicode 3.0)\r\nFour byte: Ext-B 𠀀𠀁𠀂𠀃𪛑𪛒𪛓𪛔𪛕𪛖 (Unicode 3.1)\r\nFour byte: Mongolian ᠀᠐᠙ᠠᡷᢀᡨᡩᡪᡫ\r\nFour byte: Tibetan ༀཇཉཪཱྋ྾࿌࿏ྼྙ\r\nFour byte: Yi ꀀꒌꂋꂌꂍꂎꂔꂕ꒐꓆\r\nFour byte: Uighur ،؟ئبتجدرشعەﭖﭙﯓﯿﺉﺒﻺﻼ\r\nFour byte: Tai Le ᥐᥥᥦᥧᥨᥭᥰᥱᥲᥴ\r\nFour byte: Hangul ᄓᄕᇬᇌᇜᇱㄱㅣ가힝\r\n\r\n*/\r\n\r\n//فرعون) هو فيلم وثائقي من إنتاج لجنة تكريم شهداء الحركة الإسلامية العالمية الإيرانية. يتناول الفيلم عملية اغتيال الرئيس المصري السابق\r\n//The Chinese\r\n//العربية/عربي al-ʻarabīyah/ʻarabī language\r\n// (汉语/漢語 Hànyǔ; 华语/華語 Huáyǔ; 中文 Zhōngwén)\r\n/*! jQuery v1.8.2 jquery.com | jquery.org/license */\r\n(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e=\"data-\"+c.replace(I,\"-$1\").toLowerCase();d=a.getAttribute(e);if(typeof d==\"string\"){try{d=d===\"true\"?!0:d===\"false\"?!1:d===\"null\"?null:+d+\"\"===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b===\"data\"&&p.isEmptyObject(a[b]))continue;if(b!==\"toJSON\")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b==\"string\"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split(\"|\"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c===\"object\"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c===\"input\"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c===\"option\"?b.selected=a.defaultSelected:c===\"input\"||c===\"textarea\"?b.defaultValue=a.defaultValue:c===\"script\"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!=\"undefined\"?a.getElementsByTagName(\"*\"):typeof a.querySelectorAll!=\"undefined\"?a.querySelectorAll(\"*\"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bY(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bW.length;while(e--){b=bW[e]+c;if(b in a)return b}return d}function bZ(a,b){return a=b||a,p.css(a,\"display\")===\"none\"||!p.contains(a.ownerDocument,a)}function b$(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,\"olddisplay\"),b?(!e[f]&&c.style.display===\"none\"&&(c.style.display=\"\"),c.style.display===\"\"&&bZ(c)&&(e[f]=p._data(c,\"olddisplay\",cc(c.nodeName))
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-js-validationParticipant.js",
|
|
|
|
|
"content": "define([\r\n\t'vs/base/common/severity'\r\n], function(severity) {\r\n\t'use strict';\r\n\tfunction ValidateParticipant() {\r\n\r\n\t}\r\n\r\n\tValidateParticipant.ID = 'doc.validateParticipant';\r\n\tValidateParticipant.prototype.validate = function(mirrorModel, markerService) {\r\n\r\n\t\tvar marker = {\r\n\t\t\tseverity: severity.Error,\r\n\t\t\tmessage: [\r\n\t\t\t\t{ isText: true, text: '\\u2188 ' },\r\n\t\t\t\t{ tagName: 'span', style: 'color:red', text: 'I AM' },\r\n\t\t\t\t{ isText: true, text: ' A VALIDATION PARTICIPANT \\u2188' }\r\n\t\t\t],\r\n\t\t\tstartLineNumber: 1,\r\n\t\t\tstartColumn: 1,\r\n\t\t\tendLineNumber: 1,\r\n\t\t\tendColumn: 3\r\n\t\t};\r\n\r\n\t\tmarkerService.changeOne(ValidateParticipant.ID, mirrorModel.getAssociatedResource(), [marker]);\r\n\t};\r\n\treturn {\r\n\t\tValidateParticipant: ValidateParticipant\r\n\t};\r\n});"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-korean.txt",
|
|
|
|
|
"content": "/*\r\n\r\n전문\r\n유구한 역사와 전통에 빛나는 우리 대한 국민은 3·1 운동으로 건립된 대한민국 임시 정부의 법통과 불의에 항거한 4·19 민주 이념을 계승하고, 조국의 민주 개혁과 평화적 통일의 사명에 입각하여 정의·인도와 동포애로써 민족의 단결을 공고히 하고, 모든 사회적 폐습과 불의를 타파하며, 자율과 조화를 바탕으로 자유 민주적 기본 질서를 더욱 확고히 하여 정치·경제·사회·문화의 모든 영역에 있어서 각인의 기회를 균등히 하고, 능력을 최고도로 발휘하게 하며, 자유와 권리에 따르는 책임과 의무를 완수하게 하여, 안으로는 국민 생활의 균등한 향상을 기하고 밖으로는 항구적인 세계 평화와 인류 공영에 이바지함으로써 우리들과 우리들의 자손의 안전과 자유와 행복을 영원히 확보할 것을 다짐하면서 1948년 7월 12일에 제정되고 8차에 걸쳐 개정된 헌법을 이제 국회의 의결을 거쳐 국민 투표에 의하여 개정한다.\r\n1987년 10월 29일\r\n前文\r\n悠久한 歷史와 傳統에 빛나는 우리 大韓國民은 3·1 運動으로 建立된 大韓民國臨時政府의 法統과 不義에 抗拒한 4·19 民主理念을 繼承하고, 祖國의 民主改革과 平和的統一의 使命에 立脚하여 正義·人道와 同胞愛로써 民族의 團結을 鞏固히 하고, 모든 社會的弊習과 不義를 打破하며, 自律과 調和를 바탕으로 自由民主的基本秩序를 더욱 確固히 하여 政治·經濟·社會·文化의 모든 領域에 있어서 各人의 機會를 均等히 하고, 能力을 最高度로 發揮하게 하며, 自由와 權利에 따르는 責任과 義務를 完遂하게 하여, 안으로는 國民生活의 均等한 向上을 基하고 밖으로는 恒久的인 世界平和와 人類共榮에 이바지함으로써 우리들과 우리들의 子孫의 安全과 自由와 幸福을 永遠히 確保할 것을 다짐하면서 1948年 7月 12日에 制定되고 8次에 걸쳐 改正된 憲法을 이제 國會의 議決을 거쳐 國民投票에 依하여 改正한다.\r\n1987年 10月 29日\r\n\r\n*/"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-sample-big-css.txt",
|
|
|
|
|
"content": "#wrapper .w12,#wrapper.w12{min-width:972px;width:81em}.pa{margin:0 auto;padding:0 .5em}.pa #area1,.pa #area2,.pa #area3{float:left}.pa #subfoot{clear:both}.pa #area2,.pa #area3{margin-left:1em}.pa #page:after{clear:both;content:\".\";display:block;height:0;visibility:hidden}#wrapper{padding:0 0;text-align:left;margin:0 auto}#wrapper .w1{min-width:70px;width:5.833em}#wrapper .w2{min-width:152px;width:12.667em}#wrapper .w3{min-width:234px;width:19.5em}#wrapper .w3 .w50{min-width:111px;width:9.25em}#wrapper .w4{min-width:316px;width:26.333em}#wrapper .w4 .w33{min-width:97px;width:8.083em}#wrapper .w4 .ce3.w33{min-width:98px;width:8.167em}#wrapper .w5{min-width:398px;width:33.167em}#wrapper .w5 .w33{min-width:124px;width:10.333em}#wrapper .w5 .ce2.w33,#wrapper .w5 .ce3.w33{min-width:125px;width:10.417em}#wrapper .w5 .w50{min-width:193px;width:16.083em}#wrapper .w6{min-width:480px;width:40em}#wrapper .w7{min-width:562px;width:46.833em}#wrapper .w7 .w33{min-width:179px;width:14.917em}#wrapper .w7 .ce3.w33{min-width:180px;width:15em}#wrapper .w7 .w50{min-width:275px;width:22.917em}#wrapper .w8{min-width:644px;width:53.667em}#wrapper .w8 .w33{min-width:206px;width:17.167em}#wrapper .w8 .ce1.w33,#wrapper .w8 .ce3.w33{min-width:206px;width:17.167em}#wrapper .w9{min-width:726px;width:60.5em}#wrapper .w9 .w50{min-width:357px;width:29.75em}#wrapper .w10{min-width:808px;width:67.333em}#wrapper .w10 .w33{min-width:261px;width:21.75em}#wrapper .w10 .ce3.w33{min-width:262px;width:21.833em}#wrapper .w11{min-width:890px;width:74.167em}#wrapper .w11 .w33{min-width:288px;width:24em}#wrapper .w11 .ce2.w33,#wrapper .w11 .ce3.w33{min-width:289px;width:24.083em}#wrapper .w11 .w50{min-width:439px;width:36.583em}#wrapper .w12{min-width:972px;width:81em}#head{min-width:972px;background:transparent}#nav{min-width:972px;background:transparent}#content{background:#fff}#foot{min-width:972px;background:transparent}.wings{background-color:#009ad9;min-width:81em;width:100%}#nav .wings{height:1.667em}#doublerownav .wings{height:3.75em}body{color:#333;font-family:arial,sans-serif;font-size:75%;line-height:1.33em;margin:0;padding:0;text-align:center}a.more,div.br *,.cotb *,.coss *{font-family:arial,sans-serif}@media print{form,object{display:none}}a,a:link,a:visited{color:#333;text-decoration:none}a:hover,a:hover span{color:#000;text-decoration:underline}a img{border:none}input,select,textarea{font-size:15px;line-height:normal}big,div.h2,div.h3,h1,h2,h3,h4,h5,h6,small{font-family:arial,sans-serif;font-size:100%;margin:0;padding:0}.cf:after,ul.cf li:after,.ro:after{clear:both;content:\".\";display:block;height:0;visibility:hidden}.none{display:none}#area1 .ro .co,#area2 .ro .co{margin:.667em}body.ukhp{background:#ededed url(../../i/9e/d11d472df557c51b75b9f0b27752e0.gif) repeat-x center top}#page{background-color:#fff;min-width:972px;background:transparent}#wrapper .msnfoot1{margin:0}#area2 .ro .w4 .co3b2 .br2{min-width:100px;width:8.333em}#wrapper .actfeed1 .ac-head,#wrapper .actfeed1 .ac-status{border-color:#e2f1d4}.headerbar1 .websearch2 .opt,.headerbar1 .websearch2 .opt span,.headerbar1 .websearch2 label{color:#fff}.headerbar1 .websearch2 .scopes span{color:#c1c1c1}#wrapper .searchbar3{padding:5px 0}.ebay1 .simple8 input.image{float:right;margin-top:0}.headerbar3 .websearch2 input.text{width:322px}#head:after,#page:after,#foot:after{clear:both;content:\".\";display:block;height:0;visibility:hidden}#area1 .co,#area2 .co,#wrapper #area1 .cogr,#wrapper #area2 .cogr{margin:.667em}#wrapper.w12,#head .w12,#foot .w12,#nav .w12,#page .w12{width:81.667em;min-width:980px}#subhead .w12{width:81em;min-width:972px}#foot .w12{background-color:#fff}body.cephp{background:#ededed url(../../i/9e/d11d472df557c51b75b9f0b27752e0.gif) repeat-x center top}#wrapper .searchbar2{background-color:#3d8bb6;margin-bottom:0;padding:15px 0}#subhead .flash1{margin:0 1em}#wrapper .w8 .w33.ce1{margin-right:.583em}#wrapper .w8 .w33.ce3{margin-left:.583em}.hminbox1 ul.greet li.first{width:52%}#subfoot .ro{margin-left:.25em}.sitemap .linklist13 li{width:16%;margin:0 .5% 0 0}.men
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-sample-bom-cs.txt",
|
|
|
|
|
"content": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Net.Http;\r\nusing System.Security.Claims;\r\nusing System.Security.Cryptography;\r\nusing System.Threading.Tasks;\r\nusing System.Web;\r\nusing System.Web.Http;\r\nusing System.Web.Http.ModelBinding;\r\nusing Microsoft.AspNet.Identity;\r\nusing Microsoft.AspNet.Identity.EntityFramework;\r\nusing Microsoft.AspNet.Identity.Owin;\r\nusing Microsoft.Owin.Security;\r\nusing Microsoft.Owin.Security.Cookies;\r\nusing Microsoft.Owin.Security.OAuth;\r\nusing WebApplication.Models;\r\nusing WebApplication.Providers;\r\nusing WebApplication.Results;\r\n\r\nnamespace WebApplication.Controllers\r\n{\r\n [Authorize]\r\n [RoutePrefix(\"api/Account\")]\r\n public class AccountController : ApiController\r\n {\r\n private const string LocalLoginProvider = \"Local\";\r\n private ApplicationUserManager _userManager;\r\n\r\n public AccountController()\r\n {\r\n }\r\n\r\n public AccountController(ApplicationUserManager userManager,\r\n ISecureDataFormat<AuthenticationTicket> accessTokenFormat)\r\n {\r\n UserManager = userManager;\r\n AccessTokenFormat = accessTokenFormat;\r\n }\r\n\r\n public ApplicationUserManager UserManager\r\n {\r\n get\r\n {\r\n return _userManager ?? Request.GetOwinContext().GetUserManager<ApplicationUserManager>();\r\n }\r\n private set\r\n {\r\n _userManager = value;\r\n }\r\n }\r\n\r\n public ISecureDataFormat<AuthenticationTicket> AccessTokenFormat { get; private set; }\r\n\r\n // GET api/Account/UserInfo\r\n [HostAuthentication(DefaultAuthenticationTypes.ExternalBearer)]\r\n [Route(\"UserInfo\")]\r\n public UserInfoViewModel GetUserInfo()\r\n {\r\n ExternalLoginData externalLogin = ExternalLoginData.FromIdentity(User.Identity as ClaimsIdentity);\r\n\r\n return new UserInfoViewModel\r\n {\r\n Email = User.Identity.GetUserName(),\r\n HasRegistered = externalLogin == null,\r\n LoginProvider = externalLogin != null ? externalLogin.LoginProvider : null\r\n };\r\n }\r\n\r\n // POST api/Account/Logout\r\n [Route(\"Logout\")]\r\n public IHttpActionResult Logout()\r\n {\r\n Authentication.SignOut(CookieAuthenticationDefaults.AuthenticationType);\r\n return Ok();\r\n }\r\n\r\n // GET api/Account/ManageInfo?returnUrl=%2F&generateState=true\r\n [Route(\"ManageInfo\")]\r\n public async Task<ManageInfoViewModel> GetManageInfo(string returnUrl, bool generateState = false)\r\n {\r\n IdentityUser user = await UserManager.FindByIdAsync(User.Identity.GetUserId());\r\n\r\n if (user == null)\r\n {\r\n return null;\r\n }\r\n\r\n List<UserLoginInfoViewModel> logins = new List<UserLoginInfoViewModel>();\r\n \r\n foreach (IdentityUserLogin linkedAccount in user.Logins)\r\n {\r\n logins.Add(new UserLoginInfoViewModel\r\n {\r\n LoginProvider = linkedAccount.LoginProvider,\r\n ProviderKey = linkedAccount.ProviderKey\r\n });\r\n }\r\n\r\n if (user.PasswordHash != null)\r\n {\r\n logins.Add(new UserLoginInfoViewModel\r\n {\r\n LoginProvider = LocalLoginProvider,\r\n ProviderKey = user.UserName,\r\n });\r\n }\r\n\r\n return new ManageInfoViewModel\r\n {\r\n LocalLoginProvider = LocalLoginProvider,\r\n Email = user.UserName,\r\n Logins = logins,\r\n ExternalLoginProviders = GetExternalLogins(returnUrl, generateState)\r
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-sample-cr-ps1.txt",
|
|
|
|
|
"content": "\r\n# A line that ends only in CR(0x0D) and not LF (0x0A).\rforeach($parameterSet in $ObjInfoArray)\r\n{\r\n\t# This line also ends only in CR(0x0D) and not LF (0x0A).\r\tif ($parameterSet[\"class\"] -eq \"blank\")\r\n\t{\r\n\t\tif ($XenCenterNodeSelected)\r\n\t\t{\r\n\t\t\tcontinue\r\n\t\t}\r\n\t\t$XenCenterNodeSelected = 1;\r\t\t$SelectedObjectNames += \"XenCenter\"\r\n\t}\r\n}"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-sample-dynamic.txt",
|
|
|
|
|
"content": "[Sun Mar 7 16:02:00 2004] [notice] Apache/1.3.29 (Unix) configured -- resuming normal operations\r\n[Sun Mar 7 16:02:00 2004] [info] Server built: Feb 27 2004 13:56:37\r\n[Sun Mar 7 16:02:00 2004] [notice] Accept mutex: sysvsem (Default: sysvsem)\r\n[Sun Mar 7 16:05:49 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 16:45:56 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 17:13:50 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 17:21:44 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 17:23:53 2004] statistics: Use of uninitialized value in concatenation (.) or string at /home/httpd/twiki/lib/TWiki.pm line 528.\r\n[Sun Mar 7 17:23:53 2004] statistics: Can't create file /home/httpd/twiki/data/Main/WebStatistics.txt - Permission denied\r\n[Sun Mar 7 17:27:37 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 17:31:39 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 17:58:00 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 18:00:09 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 18:10:09 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 18:19:01 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 18:42:29 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 18:52:30 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 18:58:52 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 19:03:58 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 19:08:55 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 20:04:35 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 20:11:33 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 20:12:55 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 20:25:31 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 20:44:48 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 20:58:27 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 21:16:17 2004] [error] [client xx.xx.xx.xx] File does not exist: /home/httpd/twiki/view/Main/WebHome\r\n[Sun Mar 7 21:20:14 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 21:31:12 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 21:39:55 2004] [info] [client xx.xx.xx.xx] (104)Connection reset by peer: client stopped connection before send body completed\r\n[Sun Mar 7 21:44:10 2004] [info] [client xx.xx.xx.xx] (104)Conne
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-sample-f12-css.txt",
|
|
|
|
|
"content": "@charset 'UTF-8'; audio,canvas,video {\r\n display: inline-block\r\n}\r\n\r\naudio:not([controls]) {\r\n display: none\r\n}\r\n\r\nhtml {\r\n height: 100%;\r\n font-size: 100%;\r\n -webkit-text-size-adjust: 100%;\r\n -ms-text-size-adjust: 100%;\r\n width: 100%\r\n}\r\n\r\nhtml,button,input,select,textarea {\r\n font-family: sans-serif;\r\n color: #222\r\n}\r\n\r\nbody {\r\n margin: 0;\r\n font-size: 1em;\r\n line-height: 1.4\r\n}\r\n\r\na {\r\n color: #0af;\r\n text-decoration: none\r\n}\r\n\r\na:visited {\r\n color: #4ec4ff\r\n}\r\n\r\na:hover {\r\n color: #1a95d2\r\n}\r\n\r\na:focus {\r\n outline: thin dotted\r\n}\r\n\r\na:hover,a:active {\r\n outline: 0\r\n}\r\n\r\nabbr[title] {\r\n border-bottom: 1px dotted\r\n}\r\n\r\nb,strong {\r\n font-weight: 700\r\n}\r\n\r\nblockquote {\r\n margin: 1em 40px\r\n}\r\n\r\nhr {\r\n display: block;\r\n height: 1px;\r\n border: 0;\r\n border-top: 1px solid #ccc;\r\n margin: 1em 0;\r\n padding: 0\r\n}\r\n\r\npre,code,kbd,samp {\r\n font-family: monospace,serif;\r\n font-size: 1em\r\n}\r\n\r\npre {\r\n white-space: pre;\r\n white-space: pre-wrap;\r\n word-wrap: break-word\r\n}\r\n\r\nsmall {\r\n font-size: 85%\r\n}\r\n\r\nsub,sup {\r\n font-size: 75%;\r\n line-height: 0;\r\n position: relative;\r\n vertical-align: baseline\r\n}\r\n\r\nsup {\r\n top: -.5em}sub{bottom:-.25em\r\n}\r\n\r\nul,ol {\r\n margin: 0;\r\n padding: 0\r\n}\r\n\r\ndd {\r\n margin: 0\r\n}\r\n\r\nnav ul,nav ol {\r\n list-style: none;\r\n list-style-image: none\r\n}\r\n\r\nimg {\r\n border: 0;\r\n vertical-align: middle\r\n}\r\n\r\n.lt-ie9 {\r\n -ms-interpolation-mode: bicubic;\r\n display: block\r\n}\r\n\r\nsvg:not(:root) {\r\n overflow: hidden\r\n}\r\n\r\nfigure {\r\n margin: 0\r\n}\r\n\r\nform {\r\n margin: 0\r\n}\r\n\r\nfieldset {\r\n border: 0;\r\n margin: 0;\r\n padding: 0\r\n}\r\n\r\nlabel {\r\n cursor: pointer\r\n}\r\n\r\nlegend {\r\n border: 0;\r\n padding: 0;\r\n white-space: normal\r\n}\r\n\r\nbutton,input,select,textarea {\r\n font-size: 100%;\r\n margin: 0;\r\n vertical-align: baseline\r\n}\r\n\r\nbutton,input {\r\n line-height: normal\r\n}\r\n\r\nbutton,input[type=button],input[type=reset],input[type=submit] {\r\n cursor: pointer;\r\n -webkit-appearance: button\r\n}\r\n\r\nbutton[disabled],input[disabled] {\r\n cursor: default\r\n}\r\n\r\ninput[type=checkbox],input[type=radio] {\r\n box-sizing: border-box;\r\n padding: 0\r\n}\r\n\r\ninput[type=search] {\r\n -webkit-appearance: textfield;\r\n -moz-box-sizing: content-box;\r\n -webkit-box-sizing: content-box;\r\n box-sizing: content-box\r\n}\r\n\r\ninput[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button {\r\n -webkit-appearance: none\r\n}\r\n\r\nbutton::-moz-focus-inner,input::-moz-focus-inner {\r\n border: 0;\r\n padding: 0\r\n}\r\n\r\ntextarea {\r\n overflow: auto;\r\n vertical-align: top;\r\n resize: vertical\r\n}\r\n\r\ninput:invalid,textarea:invalid {\r\n background-color: #f0dddd\r\n}\r\n\r\ntable {\r\n border-collapse: collapse;\r\n border-spacing: 0\r\n}\r\n\r\ntd {\r\n vertical-align: top\r\n}\r\n\r\n.chromeframe {\r\n margin: .2em 0;\r\n background: #ccc;\r\n color: #000;\r\n padding: .2em 0\r\n}\r\n\r\n.no-touch {\r\n text-rendering: geometricPrecision;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale\r\n}\r\n\r\nbody {\r\n background: #f6f6f6 url(../../images/patterns/noise_f6f6f6.png) repeat top left;\r\n font-family: Arial,sans-serif;\r\n min-height: 100%;\r\n min-width: 980px;\r\n position: relative;\r\n width: 100%\r\n}\r\n\r\nbody.partner-background {\r\n background: #f6f6f6 url(../../images/patterns/noise.png)\r\n}\r\n\r\n@-moz-document url-prefix() {\r\n img {\r\n display: inline-block\r\n }\r\n}\r\n\r\n.clst-main-title,.static-page .page-content>.clst-main-title {\r
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-sample-html.txt",
|
|
|
|
|
"content": "<!DOCTYPE HTML>\r\n<!-- \r\n\tComments are overrated\r\n-->\r\n<html>\r\n<head>\r\n\t<title>HTML Sample</title>\r\n\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\r\n\t<style type=\"text/css\">\r\n\t\th1 {\r\n\t\t\tcolor: #CCA3A3;\r\n\t\t}\r\n\t\tbody {\r\n\t\t}\r\n\t</style>\r\n\t<script type=\"text/javascript\">\r\n\t\twindow.alert(\"I am a sample...\");\r\n\t</script>\r\n</head>\r\n<body>\r\n\t<h1>Heading No.1</h1>\r\n\t<input disabled type=\"button\" value=\"Click me\" />\r\n</body>\r\n</html>"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-sample-js.txt",
|
|
|
|
|
"content": "/*\r\n © Microsoft. All rights reserved.\r\n\r\nhttps://microsoft.com\r\nblablahttp://en.wikipedia.org/wiki/Timisoara bla bla\r\nblabla\thttp://en.wikipedia.org/wiki/Timisoara bla bla\r\n\r\n This library is supported for use in Windows Tailored Apps only.\r\n\r\n Build: 6.2.8100.0 \r\n Version: 0.5 \r\n*/\r\n'a string\\\r\non multiple lines';\r\n(function (global, undefined) {\r\n\t\"use strict\";\r\n\tundefinedVariable = {}; undefinedVariable.bar = 5;\r\n\tundefinedVariable.foo = 5; undefinedVariable.baz = 10;\r\n\r\n function initializeProperties(target, members) { \r\n var keys = Object.keys(members);\r\n var properties;\t\t\t\r\n var i, len;\r\n for (i = 0, len = keys.length; i < len; i++) { \r\n var key = keys[i];\r\n var enumerable = key.charCodeAt(0) !== /*_*/95;\r\n var member = members[key];\r\n if (member && typeof member === 'object') {\r\n if (member.value !== undefined || typeof member.get === 'function' || typeof member.set === 'function') {\t\t\r\n if (member.enumerable === undefined) {\r\n member.enumerable = enumerable;\r\n }\r\n properties = properties || {};\r\n properties[key] = member;\r\n continue;\r\n } \r\n }\r\n if (!enumerable) {\r\n properties = properties || {};\r\n properties[key] = { value: member, enumerable: enumerable, configurable: true, writable: true }\r\n continue;\r\n }\r\n target[key] = member;\r\n }\r\n if (properties) {\r\n Object.defineProperties(target, properties);\r\n }\r\n }\r\n\r\n (function (rootNamespace) {\r\n\r\n // Create the rootNamespace in the global namespace\r\n if (!global[rootNamespace]) {\r\n global[rootNamespace] = Object.create(Object.prototype);\r\n }\r\n\r\n // Cache the rootNamespace we just created in a local variable\r\n var _rootNamespace = global[rootNamespace];\r\n if (!_rootNamespace.Namespace) {\r\n _rootNamespace.Namespace = Object.create(Object.prototype);\r\n }\r\n\r\n function defineWithParent(parentNamespace, name, members) {\r\n /// <summary locid=\"1\">\r\n /// Defines a new namespace with the specified name, under the specified parent namespace.\r\n /// </summary>\r\n /// <param name=\"parentNamespace\" type=\"Object\" locid=\"2\">\r\n /// The parent namespace which will contain the new namespace.\r\n /// </param>\r\n /// <param name=\"name\" type=\"String\" locid=\"3\">\r\n /// Name of the new namespace.\r\n /// </param>\r\n /// <param name=\"members\" type=\"Object\" locid=\"4\">\r\n /// Members in the new namespace.\r\n /// </param>\r\n /// <returns locid=\"5\">\r\n /// The newly defined namespace.\r\n /// </returns>\r\n var currentNamespace = parentNamespace,\r\n namespaceFragments = name.split(\".\");\r\n\r\n for (var i = 0, len = namespaceFragments.length; i < len; i++) {\r\n var namespaceName = namespaceFragments[i];\r\n if (!currentNamespace[namespaceName]) {\r\n Object.defineProperty(currentNamespace, namespaceName, \r\n { value: {}, writable: false, enumerable: true, configurable: true }\r\n );\r\n }\r\n currentNamespace = currentNamespace[namespaceName];\r\n }\r\n\r\n if (members) {\r\n initializeProperties(currentNamespace, members);\r\n }\r\n\r\n return currentNamespace;\r\n };\r\n\r\n function define(name, members) {\r\n /// <summary locid=\"6\">\r\n /// Defines a new na
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "run-editor-sample-msn-js.txt",
|
|
|
|
|
"content": "(function(n){function t(n,i,r){return typeof n==\"number\"&&(t(i)?n>=i:!0)&&(t(r)?n<=r:!0)}function i(n,i){return typeof n==\"string\"&&(t(i)?n.length>=i:!0)}var r=n.isArray;n.extend({isNumber:t,isString:i,isObject:function(n){return typeof n==\"object\"&&n!==null},isDefined:function(n){return typeof n!=\"undefined\"},isArray:function(n,i){return r(n)&&(t(i)?n.length>=i:!0)}})})($vxp),function(n){function i(i){var u={},f,e,r;if(n.isString(i,1)){f=arguments.length>1?n.makeArray(arguments).slice(1).join(\"|\"):\"\\\\w+\",e=new RegExp(\"\\\\b(\"+f+\")=([^&#]+)\",\"ig\");while(r=e.exec(i))u[r[1][t]()]=r[2]}return u}function r(t,r){var e=n.param(n.extend(i(t),u(r))),f=/\\b[^?]*/g.exec(t).join(\"\");return f=e?f+\"?\"+e:f}function u(n){var r={},i;for(i in n)r[i[t]()]=n[i];return r}var t=\"toLowerCase\";n.extend({queryString:{setParam:r,getParam:i}})}($vxp),function(){String.prototype.format=function(){for(var t=this,n=0;n<arguments.length;++n)t=t.replace(new RegExp(\"\\\\{\"+n+\"\\\\}\",\"g\"),arguments[n]);return t}}();(function(n){var i;n.isDefined(window.MsnVideoUx)||(window.MsnVideoUx={}),n.vxpGlobal||(n.vxpGlobal={});var t=window.MsnVideoUx,e=[],r=[],o={},s=function(){return window.navigator.userAgent.match(/iPad/i)},u=function(){return/MSIE (\\d+\\.\\d+)/.test(window.navigator.userAgent)?new Number(RegExp.$1):/\\(IE (\\d+\\.\\d+)/.test(window.navigator.userAgent)?new Number(RegExp.$1):0},h=function(){return u()>0},nt=function(){return u()>=10},f,g=function(){var r,e;if(undefined==f){f=!1;var t=null,i=window.navigator.plugins,n=\"Shockwave Flash\",u=window.ActiveXObject;if(i&&i.length)t=i[n]||i[n+\" 2.0\"],t&&t.description&&(f=!0);else if(u)for(n=n.replace(\" \",\"\")+\".\",r=15;r>2;--r)try{t=new u(n+n+r),e=parseActiveXVersion(getActiveXVersion(t)),f=!0;break}catch(o){}}return f},it=function(n){for(var t in n)n[t]=encodeURIComponent(c(n[t]));return n},c=function(n,t){var i=\"\",e,u,o,f,r;if(n instanceof Array){for(e=t,t.charAt(t.length-1)==\"s\"&&(i+=\"<\"+t+\">\",e=t.substr(0,t.length-1)),u=0;u<n.length;u++)i+=c(n[u],e);t.charAt(t.length-1)==\"s\"&&(i+=\"</\"+t+\">\")}else if(n instanceof Object){t&&t!=\"$\"&&t!=\"value\"&&(i+=\"<\"+t),o=\"\",f={};for(r in n)r.indexOf(\"$\")!=0||r==\"$\"||r==\"value\"?o+=c(n[r],r):f[r.substr(1,r.length-1)]=n[r];if(t&&t!=\"$\"&&t!=\"value\"){for(r in f)i+=\" \"+r+'=\"'+tt(f[r])+'\"';i+=\">\"}i+=o,t&&t!=\"$\"&&t!=\"value\"&&(i+=\"</\"+t+\">\")}else n!=null&&(t&&t!=\"$\"&&t!=\"value\"&&(i+=\"<\"+t+\">\"),i+=k(n.toString()),t&&t!=\"$\"&&t!=\"value\"&&(i+=\"</\"+t+\">\"));return i},k=function(n){return n.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\\\"/g,\""\").replace(/'/g,\"'\")},tt=function(n){return n.replace(/\\\"/g,\""\")},l=function(t,i){n.initHub(t,i)},a=function(){for(var n=0;n<e.length;n++)window.Msn.Video.createWidget2(e[n]);e=[]},p=function(n){var i=document.getElementsByTagName(\"head\")[0],t=document.createElement(\"link\");t.setAttribute(\"rel\",\"stylesheet\"),t.setAttribute(\"type\",\"text/css\"),t.setAttribute(\"href\",n),i.appendChild(t)},y=function(n){var i=document.getElementsByTagName(\"head\")[0],t=document.createElement(\"style\");t.setAttribute(\"type\",\"text/css\"),t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n)),i.appendChild(t)},v=function(){var t=n(\"#vxp_css_load_indicator\"),i;return t.length==0&&(n(\"<meta>\",{id:\"vxp_css_load_indicator\",name:\"vxp_css_load_indicator\",content:\"vxp_css_load_indicator\"}).appendTo(\"head\"),t=n(\"#vxp_css_load_indicator\")),i=t.css(\"font-size\"),i==\"8px\"},b=function(){window.MsnVideoUxStylesRequested||!window.MsnVideoUx.versionedFiles||v()||(window.MsnVideoUxStylesRequested=!0,p(window.MsnVideoUx.versionedFiles.css))},w=function(n){window.MsnVideoUxPaletteStylesRequested||(window.MsnVideoUxPaletteStylesRequested=!0,p(n))},d=function(n){var t=setInterval(function(){v()&&(clearInterval(t),n())},100)};b(),t.render=function(t,i,r,u,f,e){function k(){var k=document.getElementById(i),u=n.queryString.getParam(document.location.href.toSt
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.bat.txt",
|
|
|
|
|
"content": "rem *******Begin Comment**************\nrem This program starts the superapp batch program on the network,\nrem directs the output to a file, and displays the file\nrem in Notepad.\nrem *******End Comment**************\n@echo off\nif exist C:\\output.txt goto EMPTYEXISTS\nsetlocal\n\tpath=g:\\programs\\superapp;%path%\n\tcall superapp>C:\\output.txt\nendlocal\n:EMPTYEXISTS\nstart notepad c:\\output.txt"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.c.txt",
|
|
|
|
|
"content": "#include \"pch.h\"\n#include \"Direct3DBase.h\"\n\nusing namespace Microsoft::WRL;\nusing namespace Windows::UI::Core;\nusing namespace Windows::Foundation;\n\n// Constructor.\nDirect3DBase::Direct3DBase()\n{\n}\n\n// Initialize the Direct3D resources required to run.\nvoid Direct3DBase::Initialize(CoreWindow^ window)\n{\n m_window = window;\n \n CreateDeviceResources();\n CreateWindowSizeDependentResources();\n}\n\n// These are the resources that depend on the device.\nvoid Direct3DBase::CreateDeviceResources()\n{\n // This flag adds support for surfaces with a different color channel ordering than the API default.\n // It is recommended usage, and is required for compatibility with Direct2D.\n UINT creationFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;\n\n#if defined(_DEBUG)\n // If the project is in a debug build, enable debugging via SDK Layers with this flag.\n creationFlags |= D3D11_CREATE_DEVICE_DEBUG;\n#endif\n\n // This array defines the set of DirectX hardware feature levels this app will support.\n // Note the ordering should be preserved.\n // Don't forget to declare your application's minimum required feature level in its\n // description. All applications are assumed to support 9.1 unless otherwise stated.\n D3D_FEATURE_LEVEL featureLevels[] = \n {\n D3D_FEATURE_LEVEL_11_1,\n D3D_FEATURE_LEVEL_11_0,\n D3D_FEATURE_LEVEL_10_1,\n D3D_FEATURE_LEVEL_10_0,\n D3D_FEATURE_LEVEL_9_3,\n D3D_FEATURE_LEVEL_9_2,\n D3D_FEATURE_LEVEL_9_1\n };\n\n // Create the DX11 API device object, and get a corresponding context.\n ComPtr<ID3D11Device> device;\n ComPtr<ID3D11DeviceContext> context;\n DX::ThrowIfFailed(\n D3D11CreateDevice(\n nullptr, // specify null to use the default adapter\n D3D_DRIVER_TYPE_HARDWARE,\n nullptr, // leave as nullptr unless software device\n creationFlags, // optionally set debug and Direct2D compatibility flags\n featureLevels, // list of feature levels this app can support\n ARRAYSIZE(featureLevels), // number of entries in above list\n D3D11_SDK_VERSION, // always set this to D3D11_SDK_VERSION\n &device, // returns the Direct3D device created\n &m_featureLevel, // returns feature level of device created\n &context // returns the device immediate context\n )\n );\n\n // Get the DirectX11.1 device by QI off the DirectX11 one.\n DX::ThrowIfFailed(\n device.As(&m_d3dDevice)\n );\n\n // And get the corresponding device context in the same way.\n DX::ThrowIfFailed(\n context.As(&m_d3dContext)\n );\n}\n\n// Allocate all memory resources that change on a window SizeChanged event.\nvoid Direct3DBase::CreateWindowSizeDependentResources()\n{ \n // Store the window bounds so the next time we get a SizeChanged event we can\n // avoid rebuilding everything if the size is identical.\n m_windowBounds = m_window->Bounds;\n\n // If the swap chain already exists, resize it.\n if(m_swapChain != nullptr)\n {\n DX::ThrowIfFailed(\n m_swapChain->ResizeBuffers(2, 0, 0, DXGI_FORMAT_B8G8R8A8_UNORM, 0)\n );\n }\n // Otherwise, create a new one.\n else\n {\n // Create a descriptor for the swap chain.\n DXGI_SWAP_CHAIN_DESC1 swapChainDesc = {0};\n swapChainDesc.Width = 0; // use automatic sizing\n swapChainDesc.Height = 0;\n swapChainDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; // this is the most common swapchain format\n swapChainDesc.Stereo = false; \n swapChainDesc.SampleDesc.Count = 1; // don't use multi-sampling\n swapChainDesc.SampleDesc.Quality = 0;\n swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;\n sw
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.coffeescript.txt",
|
|
|
|
|
"content": "\"\"\"\nA CoffeeScript sample.\n\"\"\"\n\nclass Vehicle\n constructor: (@name) =>\n \n drive: () =>\n alert \"Conducting #{@name}\"\n\nclass Car extends Vehicle\n drive: () =>\n alert \"Driving #{@name}\"\n\nc = new Car \"Brandie\"\n\nwhile notAtDestination()\n c.drive()\n\nraceVehicles = (new Car for i in [1..100])\n\nstartRace = (vehicles) -> [vehicle.drive() for vehicle in vehicles]\n\nfancyRegExp = ///\n\t(\\d+)\t# numbers\n\t(\\w*)\t# letters\n\t$\t\t# the end\n///\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.cpp.txt",
|
|
|
|
|
"content": "#include \"pch.h\"\n#include \"Direct3DBase.h\"\n\nusing namespace Microsoft::WRL;\nusing namespace Windows::UI::Core;\nusing namespace Windows::Foundation;\n\n// Constructor.\nDirect3DBase::Direct3DBase()\n{\n}\n\n// Initialize the Direct3D resources required to run.\nvoid Direct3DBase::Initialize(CoreWindow^ window)\n{\n m_window = window;\n \n CreateDeviceResources();\n CreateWindowSizeDependentResources();\n}\n\n// These are the resources that depend on the device.\nvoid Direct3DBase::CreateDeviceResources()\n{\n // This flag adds support for surfaces with a different color channel ordering than the API default.\n // It is recommended usage, and is required for compatibility with Direct2D.\n UINT creationFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;\n\n#if defined(_DEBUG)\n // If the project is in a debug build, enable debugging via SDK Layers with this flag.\n creationFlags |= D3D11_CREATE_DEVICE_DEBUG;\n#endif\n\n // This array defines the set of DirectX hardware feature levels this app will support.\n // Note the ordering should be preserved.\n // Don't forget to declare your application's minimum required feature level in its\n // description. All applications are assumed to support 9.1 unless otherwise stated.\n D3D_FEATURE_LEVEL featureLevels[] = \n {\n D3D_FEATURE_LEVEL_11_1,\n D3D_FEATURE_LEVEL_11_0,\n D3D_FEATURE_LEVEL_10_1,\n D3D_FEATURE_LEVEL_10_0,\n D3D_FEATURE_LEVEL_9_3,\n D3D_FEATURE_LEVEL_9_2,\n D3D_FEATURE_LEVEL_9_1\n };\n\n // Create the DX11 API device object, and get a corresponding context.\n ComPtr<ID3D11Device> device;\n ComPtr<ID3D11DeviceContext> context;\n DX::ThrowIfFailed(\n D3D11CreateDevice(\n nullptr, // specify null to use the default adapter\n D3D_DRIVER_TYPE_HARDWARE,\n nullptr, // leave as nullptr unless software device\n creationFlags, // optionally set debug and Direct2D compatibility flags\n featureLevels, // list of feature levels this app can support\n ARRAYSIZE(featureLevels), // number of entries in above list\n D3D11_SDK_VERSION, // always set this to D3D11_SDK_VERSION\n &device, // returns the Direct3D device created\n &m_featureLevel, // returns feature level of device created\n &context // returns the device immediate context\n )\n );\n\n // Get the DirectX11.1 device by QI off the DirectX11 one.\n DX::ThrowIfFailed(\n device.As(&m_d3dDevice)\n );\n\n // And get the corresponding device context in the same way.\n DX::ThrowIfFailed(\n context.As(&m_d3dContext)\n );\n}\n\n// Allocate all memory resources that change on a window SizeChanged event.\nvoid Direct3DBase::CreateWindowSizeDependentResources()\n{ \n // Store the window bounds so the next time we get a SizeChanged event we can\n // avoid rebuilding everything if the size is identical.\n m_windowBounds = m_window->Bounds;\n\n // If the swap chain already exists, resize it.\n if(m_swapChain != nullptr)\n {\n DX::ThrowIfFailed(\n m_swapChain->ResizeBuffers(2, 0, 0, DXGI_FORMAT_B8G8R8A8_UNORM, 0)\n );\n }\n // Otherwise, create a new one.\n else\n {\n // Create a descriptor for the swap chain.\n DXGI_SWAP_CHAIN_DESC1 swapChainDesc = {0};\n swapChainDesc.Width = 0; // use automatic sizing\n swapChainDesc.Height = 0;\n swapChainDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; // this is the most common swapchain format\n swapChainDesc.Stereo = false; \n swapChainDesc.SampleDesc.Count = 1; // don't use multi-sampling\n swapChainDesc.SampleDesc.Quality = 0;\n swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;\n sw
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.csharp.txt",
|
|
|
|
|
"content": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace VS\r\n{\r\n\tclass Program\r\n\t{\r\n\t\tstatic void Main(string[] args)\r\n\t\t{\r\n\t\t\tProcessStartInfo si = new ProcessStartInfo();\r\n\t\t\tfloat load= 3.2e02f;\r\n\r\n\t\t\tsi.FileName = @\"tools\\\\node.exe\";\r\n\t\t\tsi.Arguments = \"tools\\\\simpleserver.js\";\r\n\r\n\t\t\tProcess.Start(si);\r\n\t\t}\r\n\t}\r\n}\r\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.css.txt",
|
|
|
|
|
"content": "html {\r\n background-color: #e2e2e2;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\nbody {\r\n background-color: #fff;\r\n border-top: solid 10px #000;\r\n color: #333;\r\n font-size: .85em;\r\n font-family: \"Segoe UI\",\"HelveticaNeue-Light\", sans-serif;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\na:link, a:visited, \r\na:active, a:hover {\r\n color: #333;\r\n outline: none;\r\n padding-left: 0;\r\n padding-right: 3px;\r\n text-decoration: none;\r\n \r\n}\r\n\r\n\r\na:hover {\r\n background-color: #c7d1d6;\r\n}\r\n\r\n\r\nheader, footer, hgroup\r\nnav, section {\r\n display: block;\r\n}\r\n\r\n.float-left {\r\n float: left;\r\n}\r\n\r\n.float-right {\r\n float: right;\r\n}\r\n\r\n.highlight {\r\n/* background-color: #a6dbed;\r\n padding-left: 5px;\r\n padding-right: 5px;*/\r\n}\r\n\r\n.clear-fix:after {\r\n content: \".\";\r\n clear: both;\r\n display: block;\r\n height: 0;\r\n visibility: hidden;\r\n}\r\n\r\nh1, h2, h3, \r\nh4, h5, h6 {\r\n color: #000;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n \r\n}\r\n\r\nh1 {\r\n font-size: 2em; \r\n}\r\n\r\nh2 {\r\n font-size: 1.75em;\r\n}\r\n\r\nh3 {\r\n font-size: 1.2em;\r\n}\r\n\r\nh4 {\r\n font-size: 1.1em;\r\n}\r\n\r\nh5, h6 {\r\n font-size: 1em;\r\n}\r\n\r\n\r\n.tile {\r\n /* 2px solid #7ac0da; */\r\n border: 0;\r\n \r\n float: left;\r\n width: 200px;\r\n height: 325px;\r\n \r\n padding: 5px;\r\n margin-right: 5px;\r\n margin-bottom: 20px;\r\n margin-top: 20px;\r\n -webkit-perspective: 0;\r\n -webkit-transform-style: preserve-3d;\r\n -webkit-transition: -webkit-transform 0.2s;\r\n -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.3);\r\n background-position: center center;\r\n background-repeat: no-repeat;\r\n \r\n background-color: #fff;\r\n}\r\n\r\n.tile-item {\r\n /* 2px solid #7ac0da; */\r\n border-color: inherit;\r\n float: left;\r\n width: 50px;\r\n height: 70px;\r\n margin-right: 20px;\r\n margin-bottom: 20px;\r\n margin-top: 20px;\r\n background-image: url('../Images/documents.png');\r\n background-repeat: no-repeat;\r\n \r\n}\r\n\r\n.tile-wrapper {\r\n width: 100%;\r\n font-family: \"Segoe UI\" , Tahoma, Geneva, Verdana, sans-serif;\r\n line-height: 21px;\r\n font-size: 14px;\r\n}\r\n\r\na.blue-box {\r\n font-size: 28px;\r\n height: 100px;\r\n display: block;\r\n border-style: solid;\r\n border-width: 1px 1px 4px 1px;\r\n border-color: #C0C0C0 #C0C0C0 #8ABAE4 #C0C0C0;\r\n padding-top: 15px;\r\n padding-left: 15px;\r\n}\r\n\r\n a.blue-box:hover {\r\n border: 4px solid #8ABAE4; \r\n padding-top: 12px;\r\n padding-left: 12px;\r\n background-color: #FFFFFF;\r\n}\r\n \r\na.green-box {\r\n font-size: 28px;\r\n height: 100px;\r\n display: block;\r\n border-style: solid;\r\n border-width: 1px 1px 4px 1px;\r\n border-color: #C0C0C0 #C0C0C0 #9CCF42 #C0C0C0;\r\n padding-top: 15px;\r\n padding-left: 15px;\r\n}\r\n\r\n a.green-box:hover {\r\n border: 4px solid #9CCF42; \r\n padding-top: 12px;\r\n padding-left: 12px;\r\n background-color: #FFFFFF;\r\n}\r\n\r\n\r\na.green-box2 {\r\n font-size: 14px;\r\n height: 48px;\r\n width: 48px;\r\n display: block; /* border-color: #C0C0C0; */\r\n padding-top: 6px;\r\n font-weight: bold;\r\n \r\n}\r\n\r\n a.green-box2:hover {\r\n border: solid #8ABAE4;\r\n padding-top: 0px;\r\n padding-left: 0px;\r\n background-image: url('../Images/documents.png');\r\n background-color: #EFEFEF;\r\n}\r\n\r\na.yellow-box {\r\n font-size: 28px;\r\n height: 100px;\r\n display: block;\r\n border-style: solid;\r\n border-width: 1px 1px 4px 1px;\r\n border-color: #C0C0C0 #C0C0C0 #DECF6B #C0C0C0;\r\n padding-top: 15px;\r\n padding-left: 15px;\r\n}\r\n\r\n a.yellow-box:hover {\r\n border: 4px solid #DECF6B; \r\n padding-top: 12px;\r\n padding-left: 12px;\r\n
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.dockerfile.txt",
|
|
|
|
|
"content": "FROM mono:3.12\r\n\r\nENV KRE_FEED https://www.myget.org/F/aspnetvnext/api/v2\r\nENV KRE_USER_HOME /opt/kre\r\n\r\nRUN apt-get -qq update && apt-get -qqy install unzip \r\n\r\nONBUILD RUN curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/kvminstall.sh | sh\r\nONBUILD RUN bash -c \"source $KRE_USER_HOME/kvm/kvm.sh \\\r\n && kvm install latest -a default \\\r\n && kvm alias default | xargs -i ln -s $KRE_USER_HOME/packages/{} $KRE_USER_HOME/packages/default\"\r\n\r\n# Install libuv for Kestrel from source code (binary is not in wheezy and one in jessie is still too old)\r\nRUN apt-get -qqy install \\\r\n autoconf \\\r\n automake \\\r\n build-essential \\\r\n libtool \r\nRUN LIBUV_VERSION=1.0.0-rc2 \\\r\n && curl -sSL https://github.com/joyent/libuv/archive/v${LIBUV_VERSION}.tar.gz | tar zxfv - -C /usr/local/src \\\r\n && cd /usr/local/src/libuv-$LIBUV_VERSION \\\r\n && sh autogen.sh && ./configure && make && make install \\\r\n && rm -rf /usr/local/src/libuv-$LIBUV_VERSION \\\r\n && ldconfig\r\n\r\nENV PATH $PATH:$KRE_USER_HOME/packages/default/bin\r\n\r\n# Extra things to test\r\nRUN echo \"string at end\"\r\nRUN echo must work 'some str' and some more\r\nRUN echo hi this is # not a comment\r\nRUN echo 'String with ${VAR} and another $one here'"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.fsharp.txt",
|
|
|
|
|
"content": "(* Sample F# application *)\r\n[<EntryPoint>]\r\nlet main argv = \r\n printfn \"%A\" argv\r\n System.Console.WriteLine(\"Hello from F#\")\r\n 0 // return an integer exit code\r\n\r\n//-------------------------------------------------------- \r\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.go.txt",
|
|
|
|
|
"content": "// We often need our programs to perform operations on\r\n// collections of data, like selecting all items that\r\n// satisfy a given predicate or mapping all items to a new\r\n// collection with a custom function.\r\n\r\n// In some languages it's idiomatic to use [generic](http://en.wikipedia.org/wiki/Generic_programming)\r\n// data structures and algorithms. Go does not support\r\n// generics; in Go it's common to provide collection\r\n// functions if and when they are specifically needed for\r\n// your program and data types.\r\n\r\n// Here are some example collection functions for slices\r\n// of `strings`. You can use these examples to build your\r\n// own functions. Note that in some cases it may be\r\n// clearest to just inline the collection-manipulating\r\n// code directly, instead of creating and calling a\r\n// helper function.\r\n\r\npackage main\r\n\r\nimport \"strings\"\r\nimport \"fmt\"\r\n\r\n// Returns the first index of the target string `t`, or\r\n// -1 if no match is found.\r\nfunc Index(vs []string, t string) int {\r\n for i, v := range vs {\r\n if v == t {\r\n return i\r\n }\r\n }\r\n return -1\r\n}\r\n\r\n// Returns `true` if the target string t is in the\r\n// slice.\r\nfunc Include(vs []string, t string) bool {\r\n return Index(vs, t) >= 0\r\n}\r\n\r\n// Returns `true` if one of the strings in the slice\r\n// satisfies the predicate `f`.\r\nfunc Any(vs []string, f func(string) bool) bool {\r\n for _, v := range vs {\r\n if f(v) {\r\n return true\r\n }\r\n }\r\n return false\r\n}\r\n\r\n// Returns `true` if all of the strings in the slice\r\n// satisfy the predicate `f`.\r\nfunc All(vs []string, f func(string) bool) bool {\r\n for _, v := range vs {\r\n if !f(v) {\r\n return false\r\n }\r\n }\r\n return true\r\n}\r\n\r\n// Returns a new slice containing all strings in the\r\n// slice that satisfy the predicate `f`.\r\nfunc Filter(vs []string, f func(string) bool) []string {\r\n vsf := make([]string, 0)\r\n for _, v := range vs {\r\n if f(v) {\r\n vsf = append(vsf, v)\r\n }\r\n }\r\n return vsf\r\n}\r\n\r\n// Returns a new slice containing the results of applying\r\n// the function `f` to each string in the original slice.\r\nfunc Map(vs []string, f func(string) string) []string {\r\n vsm := make([]string, len(vs))\r\n for i, v := range vs {\r\n vsm[i] = f(v)\r\n }\r\n return vsm\r\n}\r\n\r\nfunc main() {\r\n\r\n // Here we try out our various collection functions.\r\n var strs = []string{\"peach\", \"apple\", \"pear\", \"plum\"}\r\n\r\n fmt.Println(Index(strs, \"pear\"))\r\n\r\n fmt.Println(Include(strs, \"grape\"))\r\n\r\n fmt.Println(Any(strs, func(v string) bool {\r\n return strings.HasPrefix(v, \"p\")\r\n }))\r\n\r\n fmt.Println(All(strs, func(v string) bool {\r\n return strings.HasPrefix(v, \"p\")\r\n }))\r\n\r\n fmt.Println(Filter(strs, func(v string) bool {\r\n return strings.Contains(v, \"e\")\r\n }))\r\n\r\n // The above examples all used anonymous functions,\r\n // but you can also use named functions of the correct\r\n // type.\r\n fmt.Println(Map(strs, strings.ToUpper))\r\n\r\n}\r\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.handlebars.txt",
|
|
|
|
|
"content": "\n<div class=\"entry\">\n\t<h1>{{title}}</h1>\n\t{{#if author}}\n\t<h2>{{author.firstName}} {{author.lastName}}</h2>\n\t{{else}}\n\t<h2>Unknown Author</h2>\n\t{{/if}}\n\t{{contentBody}}\n</div>\n\n{{#unless license}}\n <h3 class=\"warning\">WARNING: This entry does not have a license!</h3>\n{{/unless}}\n\n<div class=\"footnotes\">\n\t<ul>\n\t\t{{#each footnotes}}\n\t\t<li>{{this}}</li>\n\t\t{{/each}}\n\t</ul>\n</div>\n\n<h1>Comments</h1>\n\n<div id=\"comments\">\n\t{{#each comments}}\n\t<h2><a href=\"/posts/{{../permalink}}#{{id}}\">{{title}}</a></h2>\n\t<div>{{body}}</div>\n\t{{/each}}\n</div>\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.html.txt",
|
|
|
|
|
"content": "<!DOCTYPE HTML>\r\n<!-- \r\n\tComments are overrated\r\n-->\r\n<html>\r\n<head>\r\n\t<title>HTML Sample</title>\r\n\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\r\n\t<style type=\"text/css\">\r\n\t\th1 {\r\n\t\t\tcolor: #CCA3A3;\r\n\t\t}\r\n\t</style>\r\n\t<script type=\"text/javascript\">\r\n\t\twindow.alert(\"I am a sample...\");\r\n\t</script>\r\n</head>\r\n<body>\r\n\t<h1>Heading No.1</h1>\r\n\t<input disabled type=\"button\" value=\"Click me\" />\r\n</body>\r\n</html>"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.ini.txt",
|
|
|
|
|
"content": "# Example of a .gitconfig file\r\n\r\n[core]\r\n\trepositoryformatversion = 0\r\n\tfilemode = false\r\n\tbare = false\r\n\tlogallrefupdates = true\r\n\tsymlinks = false\r\n\tignorecase = true\r\n\thideDotFiles = dotGitOnly\r\n\r\n# Defines the master branch\r\n[branch \"master\"]\r\n\tremote = origin\r\n\tmerge = refs/heads/master\r\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.jade.txt",
|
|
|
|
|
"content": "doctype 5\nhtml(lang=\"en\")\n head\n title= pageTitle\n script(type='text/javascript')\n if (foo) {\n bar()\n }\n body\n // Disclaimer: You will need to turn insertSpaces to true in order for the\n syntax highlighting to kick in properly (especially for comments)\n Enjoy :)\n h1 Jade - node template engine\n #container\n if youAreUsingJade\n p You are amazing\n else\n p Get on it!"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.java.txt",
|
|
|
|
|
"content": "import java.util.ArrayList;\nimport org.junit.Test;\n\npublic class Example {\n @Test \n public void method() {\n org.junit.Assert.assertTrue( \"isEmpty\", new ArrayList<Integer>().isEmpty());\n }\n\t\n @Test(timeout=100) public void infinity() {\n while(true);\n }\n }\n "
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.javascript.txt",
|
|
|
|
|
"content": "/*\r\n © Microsoft. All rights reserved.\r\n\r\n This library is supported for use in Windows Tailored Apps only.\r\n\r\n Build: 6.2.8100.0 \r\n Version: 0.5 \r\n*/\r\n\r\n(function (global, undefined) {\r\n\t\"use strict\";\r\n\tundefinedVariable = {};\r\n\tundefinedVariable.prop = 5;\r\n\r\n\tfunction initializeProperties(target, members) {\r\n\t\tvar keys = Object.keys(members);\r\n\t\tvar properties;\r\n\t\tvar i, len;\r\n\t\tfor (i = 0, len = keys.length; i < len; i++) {\r\n\t\t\tvar key = keys[i];\r\n\t\t\tvar enumerable = key.charCodeAt(0) !== /*_*/95;\r\n\t\t\tvar member = members[key];\r\n\t\t\tif (member && typeof member === 'object') {\r\n\t\t\t\tif (member.value !== undefined || typeof member.get === 'function' || typeof member.set === 'function') {\r\n\t\t\t\t\tif (member.enumerable === undefined) {\r\n\t\t\t\t\t\tmember.enumerable = enumerable;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tproperties = properties || {};\r\n\t\t\t\t\tproperties[key] = member;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t\tif (!enumerable) {\r\n\t\t\t\tproperties = properties || {};\r\n\t\t\t\tproperties[key] = { value: member, enumerable: enumerable, configurable: true, writable: true }\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\ttarget[key] = member;\r\n\t\t}\r\n\t\tif (properties) {\r\n\t\t\tObject.defineProperties(target, properties);\r\n\t\t}\r\n\t}\r\n\r\n\t(function (rootNamespace) {\r\n\r\n\t\t// Create the rootNamespace in the global namespace\r\n\t\tif (!global[rootNamespace]) {\r\n\t\t\tglobal[rootNamespace] = Object.create(Object.prototype);\r\n\t\t}\r\n\r\n\t\t// Cache the rootNamespace we just created in a local variable\r\n\t\tvar _rootNamespace = global[rootNamespace];\r\n\t\tif (!_rootNamespace.Namespace) {\r\n\t\t\t_rootNamespace.Namespace = Object.create(Object.prototype);\r\n\t\t}\r\n\r\n\t\tfunction defineWithParent(parentNamespace, name, members) {\r\n\t\t\t/// <summary locid=\"1\">\r\n\t\t\t/// Defines a new namespace with the specified name, under the specified parent namespace.\r\n\t\t\t/// </summary>\r\n\t\t\t/// <param name=\"parentNamespace\" type=\"Object\" locid=\"2\">\r\n\t\t\t/// The parent namespace which will contain the new namespace.\r\n\t\t\t/// </param>\r\n\t\t\t/// <param name=\"name\" type=\"String\" locid=\"3\">\r\n\t\t\t/// Name of the new namespace.\r\n\t\t\t/// </param>\r\n\t\t\t/// <param name=\"members\" type=\"Object\" locid=\"4\">\r\n\t\t\t/// Members in the new namespace.\r\n\t\t\t/// </param>\r\n\t\t\t/// <returns locid=\"5\">\r\n\t\t\t/// The newly defined namespace.\r\n\t\t\t/// </returns>\r\n\t\t\tvar currentNamespace = parentNamespace,\r\n\t\t\t\tnamespaceFragments = name.split(\".\");\r\n\r\n\t\t\tfor (var i = 0, len = namespaceFragments.length; i < len; i++) {\r\n\t\t\t\tvar namespaceName = namespaceFragments[i];\r\n\t\t\t\tif (!currentNamespace[namespaceName]) {\r\n\t\t\t\t\tObject.defineProperty(currentNamespace, namespaceName, \r\n\t\t\t\t\t\t{ value: {}, writable: false, enumerable: true, configurable: true }\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\tcurrentNamespace = currentNamespace[namespaceName];\r\n\t\t\t}\r\n\r\n\t\t\tif (members) {\r\n\t\t\t\tinitializeProperties(currentNamespace, members);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentNamespace;\r\n\t\t}\r\n\r\n\t\tfunction define(name, members) {\r\n\t\t\t/// <summary locid=\"6\">\r\n\t\t\t/// Defines a new namespace with the specified name.\r\n\t\t\t/// </summary>\r\n\t\t\t/// <param name=\"name\" type=\"String\" locid=\"7\">\r\n\t\t\t/// Name of the namespace. This could be a dot-separated nested name.\r\n\t\t\t/// </param>\r\n\t\t\t/// <param name=\"members\" type=\"Object\" locid=\"4\">\r\n\t\t\t/// Members in the new namespace.\r\n\t\t\t/// </param>\r\n\t\t\t/// <returns locid=\"5\">\r\n\t\t\t/// The newly defined namespace.\r\n\t\t\t/// </returns>\r\n\t\t\treturn defineWithParent(global, name, members);\r\n\t\t}\r\n\r\n\t\t// Establish members of the \"WinJS.Namespace\" namespace\r\n\t\tObject.defineProperties(_rootNamespace.Namespace, {\r\n\r\n\t\t\tdefineWithParent: { value: defineWithParent, writab
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.json.txt",
|
|
|
|
|
"content": "{\r\n\t\"type\": \"team\",\r\n\t\"test\": {\r\n\t\t\"testPage\": \"tools/testing/run-tests.htm\",\r\n\t\t\"enabled\": true\r\n\t},\r\n \"search\": {\r\n \"excludeFolders\": [\r\n\t\t\t\".git\",\r\n\t\t\t\"node_modules\",\r\n\t\t\t\"tools/bin\",\r\n\t\t\t\"tools/counts\",\r\n\t\t\t\"tools/policheck\",\r\n\t\t\t\"tools/tfs_build_extensions\",\r\n\t\t\t\"tools/testing/jscoverage\",\r\n\t\t\t\"tools/testing/qunit\",\r\n\t\t\t\"tools/testing/chutzpah\",\r\n\t\t\t\"server.net\"\r\n ]\r\n },\r\n\t\"languages\": {\r\n\t\t\"vs.languages.typescript\": {\r\n\t\t\t\"validationSettings\": [{\r\n\t\t\t\t\"scope\":\"/\",\r\n\t\t\t\t\"noImplicitAny\":true,\r\n\t\t\t\t\"noLib\":false,\r\n\t\t\t\t\"extraLibs\":[],\r\n\t\t\t\t\"semanticValidation\":true,\r\n\t\t\t\t\"syntaxValidation\":true,\r\n\t\t\t\t\"codeGenTarget\":\"ES5\",\r\n\t\t\t\t\"moduleGenTarget\":\"\",\r\n\t\t\t\t\"lint\": {\r\n \"emptyBlocksWithoutComment\": \"warning\",\r\n \"curlyBracketsMustNotBeOmitted\": \"warning\",\r\n \"comparisonOperatorsNotStrict\": \"warning\",\r\n \"missingSemicolon\": \"warning\",\r\n \"unknownTypeOfResults\": \"warning\",\r\n \"semicolonsInsteadOfBlocks\": \"warning\",\r\n \"functionsInsideLoops\": \"warning\",\r\n \"functionsWithoutReturnType\": \"warning\",\r\n \"tripleSlashReferenceAlike\": \"warning\",\r\n \"unusedImports\": \"warning\",\r\n \"unusedVariables\": \"warning\",\r\n \"unusedFunctions\": \"warning\",\r\n \"unusedMembers\": \"warning\"\r\n }\r\n\t\t\t}, \r\n\t\t\t{\r\n\t\t\t\t\"scope\":\"/client\",\r\n\t\t\t\t\"baseUrl\":\"/client\",\r\n\t\t\t\t\"moduleGenTarget\":\"amd\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"scope\":\"/server\",\r\n\t\t\t\t\"moduleGenTarget\":\"commonjs\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"scope\":\"/build\",\r\n\t\t\t\t\"moduleGenTarget\":\"commonjs\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"scope\":\"/node_modules/nake\",\r\n\t\t\t\t\"moduleGenTarget\":\"commonjs\"\r\n\t\t\t}],\r\n\t\t\t\"allowMultipleWorkers\": true\r\n\t\t}\r\n\t}\r\n}"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.less.txt",
|
|
|
|
|
"content": "@base: #f938ab;\r\n\r\n.box-shadow(@style, @c) when (iscolor(@c)) {\r\n\tborder-radius: @style @c;\r\n}\r\n\r\n.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {\r\n\t.box-shadow(@style, rgba(0, 0, 0, @alpha));\r\n}\r\n\r\n.box { \r\n\tcolor: saturate(@base, 5%);\r\n\tborder-color: lighten(@base, 30%);\r\n\t\r\n\tdiv {\r\n\t\t.box-shadow((0 0 5px), 30%);\r\n\t}\r\n}\r\n\r\n#header {\r\n\th1 {\r\n\t\tfont-size: 26px;\r\n\t\tfont-weight: bold;\r\n\t}\r\n\t\r\n\tp { font-size: 12px;\r\n\t\ta { text-decoration: none;\r\n\t\t\t&:hover { border-width: 1px }\r\n\t\t}\r\n\t}\r\n}\r\n\r\n@the-border: 1px;\r\n@base-color: #111;\r\n@red: #842210;\r\n\r\n#header {\r\n\tcolor: (@base-color * 3);\r\n\tborder-left: @the-border;\r\n\tborder-right: (@the-border * 2);\r\n}\r\n\r\n#footer {\r\n\tcolor: (@base-color + #003300);\r\n\tborder-color: desaturate(@red, 10%);\r\n}\r\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.lua.txt",
|
|
|
|
|
"content": " -- defines a factorial function\n function fact (n)\n if n == 0 then\n return 1\n else\n return n * fact(n-1)\n end\n end\n \n print(\"enter a number:\")\n a = io.read(\"*number\") -- read a number\n print(fact(a))"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.markdown.txt",
|
|
|
|
|
"content": "# Header 1 #\r\n## Header 2 ##\r\n### Header 3 ### (Hashes on right are optional)\r\n## Markdown plus h2 with a custom ID ## {#id-goes-here}\r\n[Link back to H2](#id-goes-here)\r\n\r\n<!-- html madness -->\r\n<div class=\"custom-class\" markdown=\"1\">\r\n <div>\r\n nested div\r\n </div>\r\n <script type='text/x-koka'>\r\n function( x: int ) { return x*x; }\r\n </script>\r\n This is a div _with_ underscores\r\n and a & <b class=\"bold\">bold</b> element.\r\n <style>\r\n body { font: \"Consolas\" }\r\n </style>\r\n</div>\r\n\r\n* Bullet lists are easy too\r\n- Another one\r\n+ Another one\r\n\r\nThis is a paragraph, which is text surrounded by \r\nwhitespace. Paragraphs can be on one \r\nline (or many), and can drone on for hours. \r\n\r\nNow some inline markup like _italics_, **bold**, \r\nand `code()`. Note that underscores \r\nin_words_are ignored.\r\n\r\n````application/json\r\n { value: [\"or with a mime type\"] }\r\n````\r\n\r\n> Blockquotes are like quoted text in email replies\r\n>> And, they can be nested\r\n\r\n1. A numbered list\r\n2. Which is numbered\r\n3. With periods and a space\r\n\r\nAnd now some code:\r\n\r\n // Code is just text indented a bit\r\n which(is_easy) to_remember();\r\n\r\nAnd a block\r\n\r\n~~~\r\n// Markdown extra adds un-indented code blocks too\r\n\r\nif (this_is_more_code == true && !indented) {\r\n // tild wrapped code blocks, also not indented\r\n}\r\n~~~\r\n\r\nText with \r\ntwo trailing spaces \r\n(on the right) \r\ncan be used \r\nfor things like poems \r\n\r\n### Horizontal rules\r\n\r\n* * * *\r\n****\r\n--------------------------\r\n\r\n \r\n\r\n## Markdown plus tables ##\r\n\r\n| Header | Header | Right |\r\n| ------ | ------ | -----: |\r\n| Cell | Cell | $10 |\r\n| Cell | Cell | $20 |\r\n\r\n* Outer pipes on tables are optional\r\n* Colon used for alignment (right versus left)\r\n\r\n## Markdown plus definition lists ##\r\n\r\nBottled water\r\n: $ 1.25\r\n: $ 1.55 (Large)\r\n\r\nMilk\r\nPop\r\n: $ 1.75\r\n\r\n* Multiple definitions and terms are possible\r\n* Definitions can include multiple paragraphs too\r\n\r\n*[ABBR]: Markdown plus abbreviations (produces an <abbr> tag)"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.objective-c.txt",
|
|
|
|
|
"content": "//\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n//\r\n\r\n#import \"UseQuotes.h\"\r\n#import <Use/GTLT.h> \r\n\r\n/*\r\n\tMulti \r\n\tLine\r\n\tComments \r\n*/\r\n@implementation Test\r\n\r\n- (void) applicationWillFinishLaunching:(NSNotification *)notification\r\n{\r\n}\r\n\r\n- (IBAction)onSelectInput:(id)sender\r\n{\r\n NSString* defaultDir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0];\r\n \r\n NSOpenPanel* panel = [NSOpenPanel openPanel];\r\n [panel setAllowedFileTypes:[[NSArray alloc] initWithObjects:@\"ipa\", @\"xcarchive\", @\"app\", nil]];\r\n \r\n [panel beginWithCompletionHandler:^(NSInteger result)\r\n {\r\n if (result == NSFileHandlingPanelOKButton)\r\n [self.inputTextField setStringValue:[panel.URL path]];\r\n }];\r\n return YES;\r\n\r\n int hex = 0xFEF1F0F;\r\n\t float ing = 3.14;\r\n\t ing = 3.14e0;\r\n\t ing = 31.4e-2;\r\n}\r\n\r\n-(id) initWithParams:(id<anObject>) aHandler withDeviceStateManager:(id<anotherObject>) deviceStateManager\r\n{\r\n // add a tap gesture recognizer\r\n UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];\r\n NSMutableArray *gestureRecognizers = [NSMutableArray array];\r\n [gestureRecognizers addObject:tapGesture];\r\n [gestureRecognizers addObjectsFromArray:scnView.gestureRecognizers];\r\n scnView.gestureRecognizers = gestureRecognizers;\r\n\r\n\treturn tapGesture;\r\n\treturn nil;\r\n}\r\n\r\n@end\r\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.php.txt",
|
|
|
|
|
"content": "<?php\r\n// The next line contains a syntax error:\r\nif () {\r\n\treturn \"The parser recovers from this type of syntax error\";\r\n}\r\n?>\r\n<html>\r\n<head>\r\n\t<title>Example page</title>\r\n</head>\r\n\r\n<body>\r\n\r\n<script type=\"text/javascript\">\r\n\t// Some PHP embedded inside JS\r\n\t// Generated <?=date('l, F jS, Y')?>\r\n\t\r\n\tvar server_token = <?=rand(5, 10000)?>\r\n\tif (typeof server_token === 'number') {\r\n\t\talert('token: ' + server_token);\r\n\t}\r\n</script>\r\n\r\n<div>\r\nHello\r\n<? if (isset($user)) { ?>\r\n\t<b><?=$user?></b>\r\n<? } else { ?>\r\n\t<i>guest</i>\r\n<? } ?>\r\n!\r\n</div>\r\n\r\n<?php\r\n\r\n\t/* Example PHP file\r\n\tmultiline comment\r\n\t*/\r\n\r\n\t$cards = array(\"ah\", \"ac\", \"ad\", \"as\",\r\n\t\t\"2h\", \"2c\", \"2d\", \"2s\",\r\n\t\t\"3h\", \"3c\", \"3d\", \"3s\",\r\n\t\t\"4h\", \"4c\", \"4d\", \"4s\",\r\n\t\t\"5h\", \"5c\", \"5d\", \"5s\",\r\n\t\t\"6h\", \"6c\", \"6d\", \"6s\",\r\n\t\t\"7h\", \"7c\", \"7d\", \"7s\",\r\n\t\t\"8h\", \"8c\", \"8d\", \"8s\",\r\n\t\t\"9h\", \"9c\", \"9d\", \"9s\",\r\n\t\t\"th\", \"tc\", \"td\", \"ts\",\r\n\t\t\"jh\", \"jc\", \"jd\", \"js\",\r\n\t\t\"qh\", \"qc\", \"qd\", \"qs\",\r\n\t\t\"kh\", \"kc\", \"kd\", \"ks\");\r\n\r\n\tsrand(time());\r\n\r\n\tfor($i = 0; $i < 52; $i++) {\r\n\t\t$count = count($cards);\r\n\t\t$random = (rand()%$count);\r\n\r\n\t\tif($cards[$random] == \"\") {\r\n\t\t\t$i--;\r\n\t\t} else {\r\n\t\t\t$deck[] = $cards[$random];\r\n\t\t\t$cards[$random] = \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tsrand(time());\r\n\t$starting_point = (rand()%51);\r\n\tprint(\"Starting point for cut cards is: $starting_point<p>\");\r\n\r\n\t// display shuffled cards (EXAMPLE ONLY)\r\n\tfor ($index = 0; $index < 52; $index++) {\r\n\t\tif ($starting_point == 52) { $starting_point = 0; }\r\n\t\tprint(\"Uncut Point: <strong>$deck[$index]</strong> \");\r\n\t\tprint(\"Starting Point: <strong>$deck[$starting_point]</strong><br>\");\r\n\t\t$starting_point++;\r\n\t}\r\n?>\r\n\r\n</body>\r\n</html>"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.plaintext.txt",
|
|
|
|
|
"content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec cursus aliquet sapien, sed rhoncus leo ullamcorper ornare. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus feugiat eleifend nisl, aliquet rhoncus quam scelerisque vel. Morbi eu pellentesque ex. Nam suscipit maximus leo blandit cursus. Aenean sollicitudin nisi luctus, ornare nibh viverra, laoreet ex. Donec eget nibh sit amet dolor ornare elementum. Morbi sollicitudin enim vitae risus pretium vestibulum. Ut pretium hendrerit libero, non vulputate ante volutpat et. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam malesuada turpis vitae est porttitor, id tincidunt neque dignissim. Integer rhoncus vestibulum justo in iaculis. Praesent nec augue ut dui scelerisque gravida vel id velit. Donec vehicula feugiat mollis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.\r\n\r\nPraesent diam lorem, luctus quis ullamcorper non, consequat quis orci. Ut vel massa vel nunc sagittis porttitor a vitae ante. Quisque euismod lobortis imperdiet. Vestibulum tincidunt vehicula posuere. Nulla facilisi. Donec sodales imperdiet risus id ullamcorper. Nulla luctus orci tortor, vitae tincidunt urna aliquet nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam consequat dapibus massa. Sed ac pharetra magna, in imperdiet neque. Nullam nunc nisi, consequat vel nunc et, sagittis aliquam arcu. Aliquam non orci magna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed id sem ut sem pulvinar rhoncus. Aenean venenatis nunc eget mi ornare, vitae maximus lacus varius. Quisque quis vestibulum justo.\r\n\r\nDonec euismod luctus volutpat. Donec sed lacinia enim. Vivamus aliquam elit cursus, convallis diam at, volutpat turpis. Sed lacinia nisl in auctor dapibus. Nunc turpis mi, mattis ut rhoncus id, lacinia sed lectus. Donec sodales tellus quis libero gravida pretium et quis magna. Etiam ultricies mollis purus, eget consequat velit. Duis vitae nibh vitae arcu tincidunt congue. Maecenas ut velit in ipsum condimentum dictum quis eget urna. Sed mattis nulla arcu, vitae mattis ligula dictum at.\r\n\r\nPraesent at dignissim dolor. Donec quis placerat sem. Cras vitae placerat sapien, eu sagittis ex. Mauris nec luctus risus. Cras imperdiet semper neque suscipit auctor. Mauris nisl massa, commodo sit amet dignissim id, malesuada sed ante. Praesent varius sapien eget eros vehicula porttitor.\r\n\r\nMauris auctor nunc in quam tempor, eget consectetur nisi rhoncus. Donec et nulla imperdiet, gravida dui at, accumsan velit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin sollicitudin condimentum auctor. Sed lacinia eleifend nisi, id scelerisque leo laoreet sit amet. Morbi congue augue a malesuada pulvinar. Curabitur nec ante finibus, commodo orci vel, aliquam libero. Morbi molestie purus non nunc placerat fermentum. Pellentesque commodo ligula sed pretium aliquam. Praesent ut nibh ex. Vivamus vestibulum velit in leo suscipit, vitae pellentesque urna vulputate. Suspendisse pretium placerat ligula eu ullamcorper. Nam eleifend mi tellus, ut tristique ante ultricies vitae. Quisque venenatis dapibus tellus sit amet mattis. Donec erat arcu, elementum vel nisl at, sagittis vulputate nisi."
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.powershell.txt",
|
|
|
|
|
"content": "$SelectedObjectNames=@();\n$XenCenterNodeSelected = 0;\n#the object info array contains hashmaps, each of which represent a parameter set and describe a target in the XenCenter resource list\nforeach($parameterSet in $ObjInfoArray)\n{\n\tif ($parameterSet[\"class\"] -eq \"blank\")\n\t{\n\t\t#When the XenCenter node is selected a parameter set is created for each of your connected servers with the class and objUuid keys marked as blank\n\t\tif ($XenCenterNodeSelected)\n\t\t{\n\t\t\tcontinue\n\t\t}\n\t\t$XenCenterNodeSelected = 1;\n\t\t$SelectedObjectNames += \"XenCenter\"\n\t}\n\telseif ($parameterSet[\"sessionRef\"] -eq \"null\")\n\t{\n\t\t#When a disconnected server is selected there is no session information, we get null for everything except class\n\t}\n\t\t$SelectedObjectNames += \"a disconnected server\"\n\telse\n\t{\n\t\tConnect-XenServer -url $parameterSet[\"url\"] -opaqueref $parameterSet[\"sessionRef\"]\n\t\t#Use $class to determine which server objects to get\n\t\t#-properties allows us to filter the results to just include the selected object\n\t\t$exp = \"Get-XenServer:{0} -properties @{{uuid='{1}'}}\" -f $parameterSet[\"class\"], $parameterSet[\"objUuid\"]\n\t\t$obj = Invoke-Expression $exp\n\t\t$SelectedObjectNames += $obj.name_label;\n\t} \n}"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.python.txt",
|
|
|
|
|
"content": "from banana import *\r\n\r\nclass Monkey:\r\n\t# Bananas the monkey can eat.\r\n\tcapacity = 10\r\n\tdef eat(self, N):\r\n\t\t'''Make the monkey eat N bananas!'''\r\n\t\tcapacity = capacity - N*banana.size\r\n\r\n\tdef feeding_frenzy(self):\r\n\t\teat(9.25)\r\n\t\treturn \"Yum yum\""
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.r.txt",
|
|
|
|
|
"content": "# © Microsoft. All rights reserved.\r\n\r\n#' Add together two numbers.\r\n#' \r\n#' @param x A number.\r\n#' @param y A number.\r\n#' @return The sum of \\code{x} and \\code{y}.\r\n#' @examples\r\n#' add(1, 1)\r\n#' add(10, 1)\r\nadd <- function(x, y) {\r\n x + y\r\n}\r\n\r\nadd(1, 2)\r\nadd(1.0, 2.0)\r\nadd(-1, -2)\r\nadd(-1.0, -2.0)\r\nadd(1.0e10, 2.0e10)\r\n\r\n\r\n#' Concatenate together two strings.\r\n#' \r\n#' @param x A string.\r\n#' @param y A string.\r\n#' @return The concatenated string built of \\code{x} and \\code{y}.\r\n#' @examples\r\n#' strcat(\"one\", \"two\")\r\nstrcat <- function(x, y) {\r\n paste(x, y)\r\n}\r\n\r\npaste(\"one\", \"two\")\r\npaste('one', 'two')\r\npaste(NULL, NULL)\r\npaste(NA, NA)\r\n\r\npaste(\"multi-\r\n line\",\r\n 'multi-\r\n line')\r\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.razor.txt",
|
|
|
|
|
"content": "@{\r\n var total = 0;\r\n var totalMessage = \"\";\r\n @* a multiline\r\n razor comment embedded in csharp *@\r\n if (IsPost) {\r\n\r\n // Retrieve the numbers that the user entered.\r\n var num1 = Request[\"text1\"];\r\n var num2 = Request[\"text2\"];\r\n\r\n // Convert the entered strings into integers numbers and add.\r\n total = num1.AsInt() + num2.AsInt();\r\n\t\t<italic><bold>totalMessage = \"Total = \" + total;</bold></italic>\r\n }\r\n}\r\n\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n <head>\r\n <title>Add Numbers</title>\r\n <meta charset=\"utf-8\" />\r\n </head>\r\n<body>\r\n <p>Enter two whole numbers and then click <strong>Add</strong>.</p>\r\n <form action=\"\" method=\"post\">\r\n <p><label for=\"text1\">First Number:</label>\r\n <input type=\"text\" name=\"text1\" />\r\n </p>\r\n <p><label for=\"text2\">Second Number:</label>\r\n <input type=\"text\" name=\"text2\" />\r\n </p>\r\n <p><input type=\"submit\" value=\"Add\" /></p>\r\n </form>\r\n\r\n\t@* now we call the totalMessage method \r\n\t (a multi line razor comment outside code) *@\r\n\r\n <p>@totalMessage</p>\r\n \r\n <p>@(totalMessage+\"!\")</p>\r\n \r\n An email address (with escaped at character): name@@domain.com\r\n \r\n</body>\r\n</html>\r\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.ruby.txt",
|
|
|
|
|
"content": "#-------------------------------------------------------------------------\r\n# Copyright (c) Microsoft. All rights reserved.\r\n#--------------------------------------------------------------------------\r\n\r\nmodule Azure\r\n module Blob\r\n class Blob\r\n \r\n def initialize\r\n @properties = {}\r\n @metadata = {}\r\n yield self if block_given?\r\n end\r\n\r\n attr_accessor :name\r\n attr_accessor :snapshot\r\n attr_accessor :properties\r\n attr_accessor :metadata\r\n end\r\n end\r\nend"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.scss.txt",
|
|
|
|
|
"content": "$baseFontSizeInPixels: 14;\r\n\r\n@function px2em ($font_size, $base_font_size: $baseFontSizeInPixels) { \r\n @return ($font_size / $base_font_size) + em; \r\n}\r\n\r\nh1 {\r\n font-size: px2em(36, $baseFontSizeInPixels);\r\n}\r\nh2 {\r\n font-size: px2em(28, $baseFontSizeInPixels);\r\n}\r\n.class {\r\n font-size: px2em(14, $baseFontSizeInPixels);\r\n}\r\n\r\nnav {\r\n ul {\r\n margin: 0;\r\n padding: 0;\r\n list-style: none;\r\n }\r\n\r\n li { display: inline-block; }\r\n\r\n a {\r\n display: block;\r\n padding: 6px 12px;\r\n text-decoration: none;\r\n }\r\n \r\n @each $animal in puma, sea-slug, egret, salamander {\r\n .#{$animal}-icon {\r\n background-image: url('/images/#{$animal}.png');\r\n }\r\n }\r\n}"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.sql.txt",
|
|
|
|
|
"content": "CREATE TABLE dbo.EmployeePhoto\n(\n EmployeeId INT NOT NULL PRIMARY KEY,\n Photo VARBINARY(MAX) FILESTREAM NULL,\n MyRowGuidColumn UNIQUEIDENTIFIER NOT NULL ROWGUIDCOL\n UNIQUE DEFAULT NEWID()\n);\n\nGO\n\n/*\ntext_of_comment\n/* nested comment */\n*/\n\n-- line comment\n\nCREATE NONCLUSTERED INDEX IX_WorkOrder_ProductID\n ON Production.WorkOrder(ProductID)\n WITH (FILLFACTOR = 80,\n PAD_INDEX = ON,\n DROP_EXISTING = ON);\nGO\n\nWHILE (SELECT AVG(ListPrice) FROM Production.Product) < $300\nBEGIN\n UPDATE Production.Product\n SET ListPrice = ListPrice * 2\n SELECT MAX(ListPrice) FROM Production.Product\n IF (SELECT MAX(ListPrice) FROM Production.Product) > $500\n BREAK\n ELSE\n CONTINUE\nEND\nPRINT 'Too much for the market to bear';\n\nMERGE INTO Sales.SalesReason AS [Target]\nUSING (VALUES ('Recommendation','Other'), ('Review', 'Marketing'), ('Internet', 'Promotion'))\n AS [Source] ([NewName], NewReasonType)\nON [Target].[Name] = [Source].[NewName]\nWHEN MATCHED\nTHEN UPDATE SET ReasonType = [Source].NewReasonType\nWHEN NOT MATCHED BY TARGET\nTHEN INSERT ([Name], ReasonType) VALUES ([NewName], NewReasonType)\nOUTPUT $action INTO @SummaryOfChanges;\n\nSELECT ProductID, OrderQty, SUM(LineTotal) AS Total\nFROM Sales.SalesOrderDetail\nWHERE UnitPrice < $5.00\nGROUP BY ProductID, OrderQty\nORDER BY ProductID, OrderQty\nOPTION (HASH GROUP, FAST 10);\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.swift.txt",
|
|
|
|
|
"content": "import Foundation\r\n\r\nprotocol APIControllerProtocol {\r\n func didReceiveAPIResults(results: NSArray)\r\n}\r\n\r\nclass APIController {\r\n var delegate: APIControllerProtocol\r\n\r\n init(delegate: APIControllerProtocol) {\r\n self.delegate = delegate\r\n }\r\n\r\n func get(path: String) {\r\n let url = NSURL(string: path)\r\n let session = NSURLSession.sharedSession()\r\n let task = session.dataTaskWithURL(url!, completionHandler: {data, response, error -> Void in\r\n println(\"Task completed\")\r\n if(error != nil) {\r\n // If there is an error in the web request, print it to the console\r\n println(error.localizedDescription)\r\n }\r\n var err: NSError?\r\n if let jsonResult = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error: &err) as? NSDictionary {\r\n if(err != nil) {\r\n // If there is an error parsing JSON, print it to the console\r\n println(\"JSON Error \\(err!.localizedDescription)\")\r\n }\r\n if let results: NSArray = jsonResult[\"results\"] as? NSArray {\r\n self.delegate.didReceiveAPIResults(results)\r\n }\r\n }\r\n })\r\n\r\n // The task is just an object with all these properties set\r\n // In order to actually make the web request, we need to \"resume\"\r\n task.resume()\r\n }\r\n\r\n func searchItunesFor(searchTerm: String) {\r\n // The iTunes API wants multiple terms separated by + symbols, so replace spaces with + signs\r\n let itunesSearchTerm = searchTerm.stringByReplacingOccurrencesOfString(\" \", withString: \"+\", options: NSStringCompareOptions.CaseInsensitiveSearch, range: nil)\r\n\r\n // Now escape anything else that isn't URL-friendly\r\n if let escapedSearchTerm = itunesSearchTerm.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding) {\r\n let urlPath = \"https://itunes.apple.com/search?term=\\(escapedSearchTerm)&media=music&entity=album\"\r\n }\r\n }\r\n\r\n}"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.typescript.txt",
|
|
|
|
|
"content": "/* Game of Life\r\n * Implemented in TypeScript\r\n * To learn more about TypeScript, please visit http://www.typescriptlang.org/\r\n */\r\n \r\nmodule Conway {\r\n\r\n\texport class Cell {\r\n\t\tpublic row: number;\r\n\t\tpublic col: number;\r\n\t\tpublic live: boolean;\r\n\t\t\r\n\t\tconstructor(row: number, col: number, live: boolean) {\r\n\t\t\tthis.row = row;\r\n\t\t\tthis.col = col;\r\n\t\t\tthis.live = live\r\n\t\t}\r\n\t}\r\n\t\r\n\texport class GameOfLife {\r\n\t\tprivate gridSize: number;\r\n\t\tprivate canvasSize: number;\r\n\t\tprivate lineColor: string;\r\n\t\tprivate liveColor: string;\r\n\t\tprivate deadColor: string;\r\n\t\tprivate initialLifeProbability: number;\r\n\t\tprivate animationRate: number;\r\n\t\tprivate cellSize: number;\r\n\t\tprivate context: CanvasRenderingContext2D;\r\n\t\tprivate world;\r\n\t\t\r\n\t\t\r\n\t\tconstructor() {\r\n\t\t\tthis.gridSize = 50;\r\n\t\t\tthis.canvasSize = 600;\r\n\t\t\tthis.lineColor = '#cdcdcd';\r\n\t\t\tthis.liveColor = '#666';\r\n\t\t\tthis.deadColor = '#eee';\r\n\t\t\tthis.initialLifeProbability = 0.5;\r\n\t\t\tthis.animationRate = 60;\r\n\t\t\tthis.cellSize = 0;\r\n\t\t\tthis.world = this.createWorld();\r\n\t\t\tthis.circleOfLife();\r\n\t\t}\r\n\t\r\n\t\tpublic createWorld() {\r\n\t\t\treturn this.travelWorld( (cell : Cell) => {\r\n\t\t\t\tcell.live = Math.random() < this.initialLifeProbability;\r\n\t\t\t\treturn cell;\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tpublic circleOfLife() : void {\r\n\t\t\tthis.world = this.travelWorld( (cell: Cell) => {\r\n\t\t\t\tcell = this.world[cell.row][cell.col];\r\n\t\t\t\tthis.draw(cell);\r\n\t\t\t\treturn this.resolveNextGeneration(cell);\r\n\t\t\t});\r\n\t\t\tsetTimeout( () => {this.circleOfLife()}, this.animationRate);\r\n\t\t} \r\n\t\r\n\t\tpublic resolveNextGeneration(cell : Cell) {\r\n\t\t\tvar count = this.countNeighbors(cell);\r\n\t\t\tvar newCell = new Cell(cell.row, cell.col, cell.live);\r\n\t\t\tif(count < 2 || count > 3) newCell.live = false;\r\n\t\t\telse if(count == 3) newCell.live = true;\r\n\t\t\treturn newCell;\r\n\t\t}\r\n\t\r\n\t\tpublic countNeighbors(cell : Cell) {\r\n\t\t\tvar neighbors = 0;\r\n\t\t\tfor(var row = -1; row <=1; row++) {\r\n\t\t\t\tfor(var col = -1; col <= 1; col++) {\r\n\t\t\t\t\tif(row == 0 && col == 0) continue;\r\n\t\t\t\t\tif(this.isAlive(cell.row + row, cell.col + col)) {\r\n\t\t\t\t\t\tneighbors++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn neighbors;\r\n\t\t}\r\n\t\r\n\t\tpublic isAlive(row : number, col : number) {\r\n\t\t\tif(row < 0 || col < 0 || row >= this.gridSize || col >= this.gridSize) return false;\r\n\t\t\treturn this.world[row][col].live;\r\n\t\t}\r\n\t\r\n\t\tpublic travelWorld(callback) {\r\n\t\t\tvar result = [];\r\n\t\t\tfor(var row = 0; row < this.gridSize; row++) {\r\n\t\t\t\tvar rowData = [];\r\n\t\t\t\tfor(var col = 0; col < this.gridSize; col++) {\r\n\t\t\t\t\trowData.push(callback(new Cell(row, col, false)));\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(rowData);\r\n\t\t\t} \r\n\t\t\treturn result;\r\n\t\t}\r\n\t\r\n\t\tpublic draw(cell : Cell) {\r\n\t\t\tif(this.context == null) this.context = this.createDrawingContext();\r\n\t\t\tif(this.cellSize == 0) this.cellSize = this.canvasSize/this.gridSize;\r\n\t\r\n\t\t\tthis.context.strokeStyle = this.lineColor;\r\n\t\t\tthis.context.strokeRect(cell.row * this.cellSize, cell.col*this.cellSize, this.cellSize, this.cellSize);\r\n\t\t\tthis.context.fillStyle = cell.live ? this.liveColor : this.deadColor;\r\n\t\t\tthis.context.fillRect(cell.row * this.cellSize, cell.col*this.cellSize, this.cellSize, this.cellSize);\r\n\t\t} \r\n\t\t\r\n\t\tpublic createDrawingContext() {\r\n\t\t\tvar canvas = <HTMLCanvasElement> document.getElementById('conway-canvas');\r\n\t\t\tif(canvas == null) {\r\n\t\t\t\t\tcanvas = document.createElement('canvas');\r\n\t\t\t\t\tcanvas.id = 'conway-canvas';\r\n\t\t\t\t\tcanvas.width = this.canvasSize;\r\n\t\t\t\t\tcanvas.height = this.canvasSize;\r\n\t\t\t\t\tdocument.body.appendChild(canvas);\r\n\t\t\t}\r\n\t\t\treturn canvas.getContext('2d');\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvar
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.vb.txt",
|
|
|
|
|
"content": "Imports System\r\nImports System.Collections.Generic\r\n\r\nModule Module1\r\n\r\n Sub Main()\r\n Dim a As New M8Ball\r\n\r\n Do While True\r\n\r\n Dim q As String = \"\"\r\n Console.Write(\"ask me about the future... \")\r\n q = Console.ReadLine()\r\n\r\n If q.Trim <> \"\" Then\r\n Console.WriteLine(\"the answer is... {0}\", a.getAnswer(q))\r\n Else\r\n Exit Do\r\n End If\r\n Loop\r\n\r\n End Sub\r\n\r\nEnd Module\r\n\r\nClass M8Ball\r\n\r\n Public Answers As System.Collections.Generic.Dictionary(Of Integer, String)\r\n\r\n Public Sub New()\r\n Answers = New System.Collections.Generic.Dictionary(Of Integer, String)\r\n Answers.Add(0, \"It is certain\")\r\n Answers.Add(1, \"It is decidedly so\")\r\n Answers.Add(2, \"Without a doubt\")\r\n Answers.Add(3, \"Yes, definitely\")\r\n Answers.Add(4, \"You may rely on \")\r\n Answers.Add(5, \"As I see it, yes\")\r\n Answers.Add(6, \"Most likely\")\r\n Answers.Add(7, \"Outlook good\")\r\n Answers.Add(8, \"Signs point to yes\")\r\n Answers.Add(9, \"Yes\")\r\n Answers.Add(10, \"Reply hazy, try again\")\r\n Answers.Add(11, \"Ask again later\")\r\n Answers.Add(12, \"Better not tell you now\")\r\n Answers.Add(13, \"Cannot predict now\")\r\n Answers.Add(14, \"Concentrate and ask again\")\r\n Answers.Add(15, \"Don't count on it\")\r\n Answers.Add(16, \"My reply is no\")\r\n Answers.Add(17, \"My sources say no\")\r\n Answers.Add(18, \"Outlook not so\")\r\n Answers.Add(19, \"Very doubtful\")\r\n End Sub\r\n\r\n Public Function getAnswer(theQuestion As String) As String\r\n Dim r As New Random\r\n Return Answers(r.Next(0, 19))\r\n End Function\r\n\r\nEnd Class\r\n"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "sample.xml.txt",
|
|
|
|
|
"content": "<?xml version=\"1.0\"?>\r\n<configuration xmlns:xdt=\"http://schemas.microsoft.com/XML-Document-Transform\">\r\n <connectionStrings>\r\n <add name=\"MyDB\" \r\n connectionString=\"value for the deployed Web.config file\" \r\n xdt:Transform=\"SetAttributes\" xdt:Locator=\"Match(name)\"/>\r\n </connectionStrings>\r\n <system.web>\r\n <customErrors defaultRedirect=\"GenericError.htm\"\r\n mode=\"RemoteOnly\" xdt:Transform=\"Replace\">\r\n <error statusCode=\"500\" redirect=\"InternalError.htm\"/>\r\n </customErrors>\r\n </system.web>\r\n</configuration>"
|
|
|
|
|
}
|
|
|
|
|
]; });
|