{"text": "var videoState={\n\n \n create: function(){\n var video;\n var sprite;\n \n video = game.add.video('storyvideo');\n video.play(false);\n sprite = video.addToWorld(game.world.centerX, game.world.centerY, 0.5, 0.5, 2, 2);\n//pause\n var picLabel= game.add.image(game.width/2, game.height-30, 'skip');\n picLabel.anchor.setTo(-1,1);\n picLabel.inputEnabled = true;\n picLabel.events.onInputDown.add(this.start, this);\n\n//skip video\n// var picLabel= game.add.image(game.width/2, game.height-30, 'skip');\n// picLabel.anchor.setTo(-2,1);\n// picLabel.inputEnabled = true;\n// picLabel.events.onInputDown.add(this.startgame, this);\n\n\n\n\n\n\n // game.time.events.add(Phaser.Timer.SECOND * 10, this.fadeState, this);\n\n // game.stage.backgroundColor= '#ffffff';\n\n game.physics.startSystem(Phaser.Physics. ARCADE);\n game.renderer.renderSession.roundPixels=true;\n \n },\n \n // fadeState: function(){\n // game.state.start('play');\n\n // },\n start: function(){\n game.paused = (game.paused) ? false : true;\n game.state.start('play');\n \n },\n // startgame: function(){\n // game.state.start('play');\n \n // },\n\n};", "meta": {"content_hash": "1c932c7359417cc3e05f3380eabb7fac", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 89, "avg_line_length": 25.41176470588235, "alnum_prop": 0.5601851851851852, "repo_name": "nickchulani99/ITE-445", "id": "d9d5cb9bb5e54f95b73df6a87d4bcecebdc40318", "size": "1296", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "final/alien copy 4/js/video.js", "mode": "33188", "license": "mit", "language": [{"name": "HTML", "bytes": "16832"}, {"name": "JavaScript", "bytes": "451272"}]}} {"text": "package mts\n\n//Licensed under the Apache License, Version 2.0 (the \"License\");\n//you may not use this file except in compliance with the License.\n//You may obtain a copy of the License at\n//\n//http://www.apache.org/licenses/LICENSE-2.0\n//\n//Unless required by applicable law or agreed to in writing, software\n//distributed under the License is distributed on an \"AS IS\" BASIS,\n//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//See the License for the specific language governing permissions and\n//limitations under the License.\n//\n// Code generated by Alibaba Cloud SDK Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is regenerated.\n\nimport (\n\t\"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests\"\n\t\"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses\"\n)\n\n// SearchMedia invokes the mts.SearchMedia API synchronously\nfunc (client *Client) SearchMedia(request *SearchMediaRequest) (response *SearchMediaResponse, err error) {\n\tresponse = CreateSearchMediaResponse()\n\terr = client.DoAction(request, response)\n\treturn\n}\n\n// SearchMediaWithChan invokes the mts.SearchMedia API asynchronously\nfunc (client *Client) SearchMediaWithChan(request *SearchMediaRequest) (<-chan *SearchMediaResponse, <-chan error) {\n\tresponseChan := make(chan *SearchMediaResponse, 1)\n\terrChan := make(chan error, 1)\n\terr := client.AddAsyncTask(func() {\n\t\tdefer close(responseChan)\n\t\tdefer close(errChan)\n\t\tresponse, err := client.SearchMedia(request)\n\t\tif err != nil {\n\t\t\terrChan <- err\n\t\t} else {\n\t\t\tresponseChan <- response\n\t\t}\n\t})\n\tif err != nil {\n\t\terrChan <- err\n\t\tclose(responseChan)\n\t\tclose(errChan)\n\t}\n\treturn responseChan, errChan\n}\n\n// SearchMediaWithCallback invokes the mts.SearchMedia API asynchronously\nfunc (client *Client) SearchMediaWithCallback(request *SearchMediaRequest, callback func(response *SearchMediaResponse, err error)) <-chan int {\n\tresult := make(chan int, 1)\n\terr := client.AddAsyncTask(func() {\n\t\tvar response *SearchMediaResponse\n\t\tvar err error\n\t\tdefer close(result)\n\t\tresponse, err = client.SearchMedia(request)\n\t\tcallback(response, err)\n\t\tresult <- 1\n\t})\n\tif err != nil {\n\t\tdefer close(result)\n\t\tcallback(nil, err)\n\t\tresult <- 0\n\t}\n\treturn result\n}\n\n// SearchMediaRequest is the request struct for api SearchMedia\ntype SearchMediaRequest struct {\n\t*requests.RpcRequest\n\tResourceOwnerId requests.Integer `position:\"Query\" name:\"ResourceOwnerId\"`\n\tDescription string `position:\"Query\" name:\"Description\"`\n\tTitle string `position:\"Query\" name:\"Title\"`\n\tPageNumber requests.Integer `position:\"Query\" name:\"PageNumber\"`\n\tCateId string `position:\"Query\" name:\"CateId\"`\n\tPageSize requests.Integer `position:\"Query\" name:\"PageSize\"`\n\tFrom string `position:\"Query\" name:\"From\"`\n\tTag string `position:\"Query\" name:\"Tag\"`\n\tKeyWord string `position:\"Query\" name:\"KeyWord\"`\n\tResourceOwnerAccount string `position:\"Query\" name:\"ResourceOwnerAccount\"`\n\tOwnerAccount string `position:\"Query\" name:\"OwnerAccount\"`\n\tOwnerId requests.Integer `position:\"Query\" name:\"OwnerId\"`\n\tSortBy string `position:\"Query\" name:\"SortBy\"`\n\tTo string `position:\"Query\" name:\"To\"`\n}\n\n// SearchMediaResponse is the response struct for api SearchMedia\ntype SearchMediaResponse struct {\n\t*responses.BaseResponse\n\tTotalNum int64 `json:\"TotalNum\" xml:\"TotalNum\"`\n\tPageSize int64 `json:\"PageSize\" xml:\"PageSize\"`\n\tRequestId string `json:\"RequestId\" xml:\"RequestId\"`\n\tPageNumber int64 `json:\"PageNumber\" xml:\"PageNumber\"`\n\tMediaList MediaListInSearchMedia `json:\"MediaList\" xml:\"MediaList\"`\n}\n\n// CreateSearchMediaRequest creates a request to invoke SearchMedia API\nfunc CreateSearchMediaRequest() (request *SearchMediaRequest) {\n\trequest = &SearchMediaRequest{\n\t\tRpcRequest: &requests.RpcRequest{},\n\t}\n\trequest.InitWithApiInfo(\"Mts\", \"2014-06-18\", \"SearchMedia\", \"mts\", \"openAPI\")\n\trequest.Method = requests.POST\n\treturn\n}\n\n// CreateSearchMediaResponse creates a response to parse from SearchMedia response\nfunc CreateSearchMediaResponse() (response *SearchMediaResponse) {\n\tresponse = &SearchMediaResponse{\n\t\tBaseResponse: &responses.BaseResponse{},\n\t}\n\treturn\n}\n", "meta": {"content_hash": "4765aae0af2406ea691fb001ea5a83df", "timestamp": "", "source": "github", "line_count": 116, "max_line_length": 144, "avg_line_length": 38.23275862068966, "alnum_prop": 0.7019165727170237, "repo_name": "aliyun/alibaba-cloud-sdk-go", "id": "e23386a31fa5de227e10f19984b8f3e7eb736f22", "size": "4435", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "services/mts/search_media.go", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Go", "bytes": "734307"}, {"name": "Makefile", "bytes": "183"}]}} {"text": "\n\n
\n \nYou can login and set password procceed by link:
\n\n\">\n\n", "meta": {"content_hash": "324efbc1ad28fdfe902cd1e51f7e095e", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 76, "avg_line_length": 23.733333333333334, "alnum_prop": 0.6432584269662921, "repo_name": "vchukhalyonock/calendar", "id": "5ca5e852381e8a65c1d2612696445e148aa8677b", "size": "356", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "application/views/email/invite.php", "mode": "33188", "license": "mit", "language": [{"name": "ApacheConf", "bytes": "366"}, {"name": "CSS", "bytes": "39144"}, {"name": "HTML", "bytes": "5502"}, {"name": "JavaScript", "bytes": "460150"}, {"name": "PHP", "bytes": "1807984"}]}} {"text": "import os\nfrom flask import Flask,render_template,url_for,request,session,redirect\nfrom flask_login import LoginManager\nfrom flask_bootstrap import Bootstrap\nfrom flask_script import Manager,Shell\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_mail import Mail\nfrom flask_moment import Moment\nfrom flask_socketio import SocketIO\nfrom flask_gravatar import Gravatar\n\napp = Flask(__name__)\nbasedir = os.path.abspath(os.path.dirname(__file__))\napp.config['SQLALCHEMY_DATABASE_URI'] =\\\n 'sqlite:///' + os.path.join(basedir, 'data.sqlite')\n#app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://sql6140009:Y1912zwYwC@sql6.freemysqlhosting.net/sql6140009'\napp.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False\napp.config['SECRET_KEY'] = 'hard to guess string'\n\napp.config['MAIL_SERVER'] = 'smtp.googlemail.com'\napp.config['MAIL_PORT'] = 587\napp.config['MAIL_USE_TLS'] = True\napp.config['MAIL_USERNAME'] = os.environ.get('MAIL_USERNAME')\napp.config['MAIL_PASSWORD'] = os.environ.get('MAIL_PASSWORD')\n\nmanager = Manager(app)\nbootstrap = Bootstrap()\ndb = SQLAlchemy(app)\nmail = Mail(app)\nmoment = Moment(app)\nsocketio = SocketIO(app)\ngravatar = Gravatar(app)\n\nlogin_manager = LoginManager()\nlogin_manager.session_protection = 'strong'\nlogin_manager.login_view = 'auth.login'\n# app.config['SECRET_KEY'] = 'hard to guess string'\n# app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = True\n#app = create_app('DEVELOPMENT')\n\nbootstrap.init_app(app)\n#db.init_app(app)\nlogin_manager.init_app(app)\n\nfrom app import models\n\n@app.route('/')\ndef index():\n return render_template('index.html')\n\nfrom app.auth.views import admin\napp.register_blueprint(auth.views.admin,url_prefix = '/authentication')\n\nfrom app.main.views import welcome\napp.register_blueprint(main.views.welcome,url_prefix = '/welcome')\n\nfrom app.twitterAPI.views import api\napp.register_blueprint(twitterAPI.views.api,url_prefix = '/api')\n", "meta": {"content_hash": "a9735eefc6ff4807441825a5f2811599", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 117, "avg_line_length": 32.62068965517241, "alnum_prop": 0.7563424947145877, "repo_name": "sumedh123/debatify", "id": "89d78b1a48e585a5353b33fa5344659ba9f8770a", "size": "1892", "binary": false, "copies": "1", "ref": "refs/heads/UI", "path": "app/__init__.py", "mode": "33188", "license": "mit", "language": [{"name": "C", "bytes": "5939"}, {"name": "CSS", "bytes": "347155"}, {"name": "HTML", "bytes": "102503"}, {"name": "JavaScript", "bytes": "608373"}, {"name": "Python", "bytes": "8393673"}, {"name": "Shell", "bytes": "3298"}]}} {"text": "/*\n * String hash computation (interning).\n */\n\n#include \"duk_internal.h\"\n\n/* constants for duk_hashstring() */\n#define STRING_HASH_SHORTSTRING 4096\n#define STRING_HASH_MEDIUMSTRING (256 * 1024)\n#define STRING_HASH_BLOCKSIZE 256\n\nduk_uint32_t duk_heap_hashstring(duk_heap *heap, duk_uint8_t *str, duk_size_t len) {\n\t/*\n\t * Sampling long strings by byte skipping (like Lua does) is potentially\n\t * a cache problem. Here we do 'block skipping' instead for long strings:\n\t * hash an initial part, and then sample the rest of the string with\n\t * reasonably sized chunks.\n\t *\n\t * Skip should depend on length and bound the total time to roughly\n\t * logarithmic.\n\t *\n\t * With current values:\n\t *\n\t * 1M string => 256 * 241 = 61696 bytes (0.06M) of hashing\n\t * 1G string => 256 * 16321 = 4178176 bytes (3.98M) of hashing\n\t *\n\t * After an initial part has been hashed, an offset is applied before\n\t * starting the sampling. The initial offset is computed from the\n\t * hash of the initial part of the string. The idea is to avoid the\n\t * case that all long strings have certain offset ranges that are never\n\t * sampled.\n\t */\n\t\n\t/* note: mixing len into seed improves hashing when skipping */\n\tduk_uint32_t str_seed = heap->hash_seed ^ len;\n\n\tif (len <= STRING_HASH_SHORTSTRING) {\n\t\treturn duk_util_hashbytes(str, len, str_seed);\n\t} else {\n\t\tduk_uint32_t hash;\n\t\tduk_size_t off;\n\t\tduk_size_t skip;\n\n\t\tif (len <= STRING_HASH_MEDIUMSTRING) {\n\t\t\tskip = (duk_size_t) (16 * STRING_HASH_BLOCKSIZE + STRING_HASH_BLOCKSIZE);\n\t\t} else {\n\t\t\tskip = (duk_size_t) (256 * STRING_HASH_BLOCKSIZE + STRING_HASH_BLOCKSIZE);\n\t\t}\n\n\t\thash = duk_util_hashbytes(str, (duk_size_t) STRING_HASH_SHORTSTRING, str_seed);\n\t\toff = STRING_HASH_SHORTSTRING + (skip * (hash % 256)) / 256;\n\n\t\t/* FIXME: inefficient loop */\n\t\twhile (off < len) {\n\t\t\tduk_size_t left = len - off;\n\t\t\tduk_size_t now = (duk_size_t) (left > STRING_HASH_BLOCKSIZE ? STRING_HASH_BLOCKSIZE : left);\n\t\t\thash ^= duk_util_hashbytes(str + off, now, str_seed);\n\t\t\toff += skip;\n\t\t}\n\n\t\treturn hash;\n\t}\n}\n\n", "meta": {"content_hash": "bab3317c67f40063ff7a69f3bcc74bb0", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 95, "avg_line_length": 32.140625, "alnum_prop": 0.6684491978609626, "repo_name": "JoshEngebretson/duktape", "id": "29411796cbb56b7d91920771a24db254493ccfc8", "size": "2057", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/duk_heap_hashstring.c", "mode": "33188", "license": "mit", "language": [{"name": "C", "bytes": "1972812"}, {"name": "C++", "bytes": "20922"}, {"name": "CoffeeScript", "bytes": "895"}, {"name": "JavaScript", "bytes": "15926045"}, {"name": "Objective-C", "bytes": "6054"}, {"name": "Python", "bytes": "136104"}, {"name": "Shell", "bytes": "12610"}]}} {"text": "--TEST--\nRunkit_Sandbox_Parent Class -- Echo\n--SKIPIF--\n\n--FILE--\nini_set('display_errors', true);\n$php->ini_set('html_errors', false);\n$php->eval('$PARENT = new Runkit_Sandbox_Parent;\n\t\t\techo \"Foo\\n\";\n\t\t\t$PARENT->echo(\"BarBar\\n\");');\n\nfunction test_handler($str) {\n if (strlen($str) == 0) return NULL; /* flush() */\n /* Echoing and returning have the same effect here, both go to parent's output chain */\n echo 'Received string from sandbox: ' . strlen($str) . \" bytes long.\\n\";\n\n return strtoupper($str);\n}\n--EXPECT--\nReceived string from sandbox: 4 bytes long.\nFOO\nReceived string from sandbox: 149 bytes long.\n\nWARNING: RUNKIT_SANDBOX_PARENT::ECHO(): ACCESS TO ECHO DATA IN THE PARENT CONTEXT IS NOT ENABLED IN UNKNOWN(0) : RUNKIT_SANDBOX EVAL CODE ON LINE 3\n", "meta": {"content_hash": "009fcdd5cf234bb851939760b7bb2bec", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 147, "avg_line_length": 36.93333333333333, "alnum_prop": 0.6796028880866426, "repo_name": "lzpfmh/runkit", "id": "44237969acec682b89517ba99d074aa575d5c09a", "size": "1108", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "tests/Runkit_Sandbox_Parent__.echo.access.phpt", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "C", "bytes": "263129"}, {"name": "C++", "bytes": "372"}, {"name": "PHP", "bytes": "141611"}, {"name": "SourcePawn", "bytes": "193"}]}} {"text": "\npackage org.codehaus.groovy.grails.scaffolding;\n\nimport grails.build.logging.GrailsConsole;\nimport groovy.text.SimpleTemplateEngine;\nimport groovy.text.Template;\n\nimport java.io.BufferedWriter;\nimport java.io.File;\nimport java.io.FileWriter;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.Writer;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Set;\n\nimport org.apache.commons.logging.Log;\nimport org.apache.commons.logging.LogFactory;\nimport org.codehaus.groovy.grails.commons.GrailsApplication;\nimport org.codehaus.groovy.grails.commons.GrailsDomainClass;\nimport org.codehaus.groovy.grails.commons.GrailsDomainClassProperty;\nimport org.codehaus.groovy.grails.plugins.GrailsPluginInfo;\nimport org.codehaus.groovy.grails.plugins.GrailsPluginManager;\nimport org.codehaus.groovy.grails.plugins.GrailsPluginUtils;\nimport org.codehaus.groovy.grails.plugins.PluginManagerAware;\nimport org.codehaus.groovy.runtime.IOGroovyMethods;\nimport org.codehaus.groovy.runtime.StringGroovyMethods;\nimport org.springframework.context.ResourceLoaderAware;\nimport org.springframework.core.io.AbstractResource;\nimport org.springframework.core.io.FileSystemResource;\nimport org.springframework.core.io.Resource;\nimport org.springframework.core.io.ResourceLoader;\nimport org.springframework.core.io.support.PathMatchingResourcePatternResolver;\nimport org.springframework.util.Assert;\nimport org.springframework.util.StringUtils;\n\npublic abstract class AbstractGrailsTemplateGenerator implements GrailsTemplateGenerator, ResourceLoaderAware, PluginManagerAware {\n\n\tprotected static final Log log = LogFactory.getLog(AbstractGrailsTemplateGenerator.class);\n\n\tprotected String basedir = \".\";\n\tprotected boolean overwrite = false;\n\tprotected SimpleTemplateEngine engine = new SimpleTemplateEngine();\n\tprotected ResourceLoader resourceLoader;\n\tprotected Template renderEditorTemplate;\n\tprotected String domainSuffix = \"\";\n\tprotected GrailsPluginManager pluginManager;\n\tprotected GrailsApplication grailsApplication;\n\n\tprotected AbstractGrailsTemplateGenerator(ClassLoader classLoader) {\n\t\tengine = new SimpleTemplateEngine(classLoader);\n\t}\n\n\tpublic void generateViews(GrailsDomainClass domainClass, String destDir) throws IOException {\n\t\tAssert.hasText(destDir, \"Argument [destdir] not specified\");\n\n\t\tFile viewsDir = new File(destDir, \"grails-app/views/\" + domainClass.getPropertyName());\n\t\tif (!viewsDir.exists()) {\n\t\t\tviewsDir.mkdirs();\n\t\t}\n\n\t\tfor (String name : getTemplateNames()) {\n if(log.isInfoEnabled())\n\t\t\t log.info(\"Generating [\"+name+\"] view for domain class [\"+domainClass.getFullName()+\"]\");\n\t\t\tgenerateView(domainClass, name, viewsDir.getAbsolutePath());\n\t\t}\n\t}\n\n\tpublic void generateController(GrailsDomainClass domainClass, String destDir) throws IOException {\n\t\tAssert.hasText(destDir, \"Argument [destdir] not specified\");\n\n\t\tif (domainClass == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tString fullName = domainClass.getFullName();\n\t\tString pkg = \"\";\n\t\tint pos = fullName.lastIndexOf('.');\n\t\tif (pos != -1) {\n\t\t\t// Package name with trailing '.'\n\t\t\tpkg = fullName.substring(0, pos + 1);\n\t\t}\n\n\t\tFile destFile = new File(destDir, \"grails-app/controllers/\" + pkg.replace('.', '/') + domainClass.getShortName() + \"Controller.groovy\");\n\t\tif (canWrite(destFile)) {\n\t\t\tdestFile.getParentFile().mkdirs();\n\n\t\t\tBufferedWriter writer = null;\n\t\t\ttry {\n\t\t\t\twriter = new BufferedWriter(new FileWriter(destFile));\n\t\t\t\tgenerateController(domainClass, writer);\n\t\t\t\ttry {\n\t\t\t\t\twriter.flush();\n\t\t\t\t}\n\t\t\t\tcatch (IOException ignored) {}\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tIOGroovyMethods.closeQuietly(writer);\n\t\t\t}\n\n\t\t\tlog.info(\"Controller generated at [\"+destFile+\"]\");\n\t\t}\n\t}\n\n @Override\n public void generateAsyncController(GrailsDomainClass domainClass, String destDir) throws IOException {\n Assert.hasText(destDir, \"Argument [destdir] not specified\");\n\n if (domainClass == null) {\n return;\n }\n\n String fullName = domainClass.getFullName();\n String pkg = \"\";\n int pos = fullName.lastIndexOf('.');\n if (pos != -1) {\n // Package name with trailing '.'\n pkg = fullName.substring(0, pos + 1);\n }\n\n File destFile = new File(destDir, \"grails-app/controllers/\" + pkg.replace('.', '/') + domainClass.getShortName() + \"Controller.groovy\");\n if (canWrite(destFile)) {\n destFile.getParentFile().mkdirs();\n\n BufferedWriter writer = null;\n try {\n writer = new BufferedWriter(new FileWriter(destFile));\n generateAsyncController(domainClass, writer);\n try {\n writer.flush();\n }\n catch (IOException ignored) {}\n }\n finally {\n IOGroovyMethods.closeQuietly(writer);\n }\n\n log.info(\"Controller generated at [\"+destFile+\"]\");\n }\n }\n\n public void generateView(GrailsDomainClass domainClass, String viewName, Writer out) throws IOException {\n\t\tString templateText = getTemplateText(viewName + \".gsp\");\n\n\t\tif (!StringUtils.hasLength(templateText)) {\n\t\t\treturn;\n\t\t}\n\n\t\tGrailsDomainClassProperty multiPart = null;\n\t\tfor (GrailsDomainClassProperty property : domainClass.getProperties()) {\n\t\t\tif (property.getType() == Byte[].class || property.getType() == byte[].class) {\n\t\t\t\tmultiPart = property;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tString packageName = StringUtils.hasLength(domainClass.getPackageName()) ? \"<%@ page import=\\\"\" + domainClass.getFullName() + \"\\\" %>\" : \"\";\n\t\tMap