\r\n\r\n#include \"../DebugNew.h\"\r\n\r\nnamespace Urho3D\r\n{\r\n\r\nconst StringHash StringHash::ZERO;\r\n\r\nStringHash::StringHash(const char* str) noexcept :\r\n value_(Calculate(str))\r\n{\r\n}\r\n\r\nStringHash::StringHash(const String& str) noexcept :\r\n value_(Calculate(str.CString()))\r\n{\r\n}\r\n\r\nunsigned StringHash::Calculate(const char* str, unsigned hash)\r\n{\r\n if (!str)\r\n return hash;\r\n\r\n while (*str)\r\n {\r\n // Perform the actual hashing as case-insensitive\r\n char c = *str;\r\n hash = SDBMHash(hash, (unsigned char)tolower(c));\r\n ++str;\r\n }\r\n\r\n return hash;\r\n}\r\n\r\nString StringHash::ToString() const\r\n{\r\n char tempBuffer[CONVERSION_BUFFER_LENGTH];\r\n sprintf(tempBuffer, \"%08X\", value_);\r\n return String(tempBuffer);\r\n}\r\n\r\n}\r\n", "meta": {"content_hash": "0fcd3d919b139550937694076bcb75e2", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 62, "avg_line_length": 18.122448979591837, "alnum_prop": 0.6081081081081081, "repo_name": "victorholt/Urho3D", "id": "7a30f2e214ef14ac1b11dffc3f48ea0c807b8192", "size": "2037", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "Source/Urho3D/Math/StringHash.cpp", "mode": "33188", "license": "mit", "language": [{"name": "AngelScript", "bytes": "1435828"}, {"name": "Batchfile", "bytes": "16483"}, {"name": "C++", "bytes": "8325877"}, {"name": "CMake", "bytes": "446542"}, {"name": "GLSL", "bytes": "154112"}, {"name": "HLSL", "bytes": "178063"}, {"name": "HTML", "bytes": "1375"}, {"name": "Java", "bytes": "78624"}, {"name": "Lua", "bytes": "568614"}, {"name": "MAXScript", "bytes": "94704"}, {"name": "Objective-C", "bytes": "6539"}, {"name": "Ruby", "bytes": "65069"}, {"name": "Shell", "bytes": "27373"}]}}
{"text": "\ufeff//\t\tThis file was generated by St4mpede.Poco 2016-06-08 22:18:52\n\n\n/* \t\t\t\nReading xml C:\\DATA\\PROJEKT\\St4mpede\\St4mpede\\St4mpede\\RdbSchema\\St4mpede.RdbSchema.xml.\nRead database with tables: Customer, Project, User.\nIncluded classes are:\nName=Customer\nName=Project\nName=User\nWriting the output file C:\\DATA\\PROJEKT\\St4mpede\\St4mpede\\St4mpede\\Poco\\PocoGenerator.xml.\nWriting 3 classes in C:\\DATA\\PROJEKT\\St4mpede\\St4mpede\\St4mpede\\..\\..\\TheDAL\\Poco.\n*/\n\n//\n//\n//\n//\n//\n//\n//\n//\n", "meta": {"content_hash": "928c42c20fba38c6343e5ad8317a1a9f", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 90, "avg_line_length": 21.727272727272727, "alnum_prop": 0.7364016736401674, "repo_name": "LosManos/St4mpede", "id": "d431056b37b6b1b0534e5cbceb4481788390d7fb", "size": "480", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "St4mpede/St4mpede/St4mpede.Poco.cs", "mode": "33188", "license": "apache-2.0", "language": [{"name": "C#", "bytes": "111411"}]}}
{"text": "\n\n \n \n \n classical-realizability: Not compatible\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n
\u00ab Up\n
\n classical-realizability\n \n 8.7.0\n Not compatible\n \n
\n
(2020-07-19 14:21:56 UTC)
\n
Context
\n
# Packages matching: installed\n# Name # Installed # Synopsis\nbase-bigarray base\nbase-num base Num library distributed with the OCaml compiler\nbase-threads base\nbase-unix base\ncamlp5 7.12 Preprocessor-pretty-printer of OCaml\nconf-findutils 1 Virtual package relying on findutils\ncoq 8.5.1 Formal proof management system.\nnum 0 The Num library for arbitrary-precision integer and rational arithmetic\nocaml 4.05.0 The OCaml compiler (virtual package)\nocaml-base-compiler 4.05.0 Official 4.05.0 release\nocaml-config 1 OCaml Switch Configuration\n# opam file:\nopam-version: "2.0"\nmaintainer: "Hugo.Herbelin@inria.fr"\nhomepage: "https://github.com/coq-contribs/classical-realizability"\nlicense: "BSD"\nbuild: [make "-j%{jobs}%"]\ninstall: [make "install"]\nremove: ["rm" "-R" "%{lib}%/coq/user-contrib/ClassicalRealizability"]\ndepends: [\n "ocaml"\n "coq" {>= "8.7" & < "8.8~"}\n]\ntags: [ "keyword: classical realizability" "keyword: Krivine's realizability" "keyword: primitive datatype" "keyword: non determinism" "keyword: quote" "keyword: axiom of countable choice" "keyword: real numbers" "category: Mathematics/Logic/Foundations" ]\nauthors: [ "Lionel Rieg <lionel.rieg@ens-lyon.org>" ]\nbug-reports: "https://github.com/coq-contribs/classical-realizability/issues"\ndev-repo: "git+https://github.com/coq-contribs/classical-realizability.git"\nsynopsis: "Krivine's classical realizability"\ndescription: """\nThe aim of this Coq library is to provide a framework for checking\nproofs in Krivine's classical realizability for second-order Peano arithmetic.\nIt is designed to be as extensible as the original theory by Krivine and to\nsupport on-the-fly extensions by new instructions with their evaluation\nrules."""\nflags: light-uninstall\nurl {\n src:\n "https://github.com/coq-contribs/classical-realizability/archive/v8.7.0.tar.gz"\n checksum: "md5=6299c2ee7d52c1535eece3376983263c"\n}\n
\n
Lint
\n
\n - Command
\n true
\n - Return code
\n - 0
\n
\n
Dry install
\n
Dry install with the current Coq version:
\n
\n - Command
\n opam install -y --show-action coq-classical-realizability.8.7.0 coq.8.5.1
\n - Return code
\n - 5120
\n - Output
\n [NOTE] Package coq is already installed (current version is 8.5.1).\nThe following dependencies couldn't be met:\n - coq-classical-realizability -> coq >= 8.7\nYour request can't be satisfied:\n - No available version of coq satisfies the constraints\nNo solution found, exiting\n
\n
\n
Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:
\n
\n - Command
\n opam remove -y coq; opam install -y --show-action --unlock-base coq-classical-realizability.8.7.0
\n - Return code
\n - 0
\n
\n
Install dependencies
\n
\n - Command
\n true
\n - Return code
\n - 0
\n - Duration
\n - 0 s
\n
\n
Install
\n
\n - Command
\n true
\n - Return code
\n - 0
\n - Duration
\n - 0 s
\n
\n
Installation size
\n
No files were installed.
\n
Uninstall
\n
\n - Command
\n true
\n - Return code
\n - 0
\n - Missing removes
\n - \n none\n
\n - Wrong removes
\n - \n none\n
\n
\n
\n
\n
\n
\n \n
\n \n \n \n\n", "meta": {"content_hash": "6953417c96203c08c70ca885216d50c6", "timestamp": "", "source": "github", "line_count": 168, "max_line_length": 340, "avg_line_length": 43.81547619047619, "alnum_prop": 0.5651406058959381, "repo_name": "coq-bench/coq-bench.github.io", "id": "7a2fb7424f897c58b824ccbe499d4bd7f93f33f2", "size": "7363", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "clean/Linux-x86_64-4.05.0-2.0.6/released/8.5.1/classical-realizability/8.7.0.html", "mode": "33188", "license": "mit", "language": []}}
{"text": "import React from 'react'\nimport '!style!css!react-loading-bar/dist/index.css'\nexport default function Loading() {\n return (\n \n \n Loading...\n
\n )\n}\n", "meta": {"content_hash": "79f42d9ca7021bd62d432c1472260f62", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 68, "avg_line_length": 27.9, "alnum_prop": 0.6415770609318996, "repo_name": "moimikey/react-boilerplate", "id": "0c6503845d209715b51d2b93dbf7650d78360700", "size": "279", "binary": false, "copies": "1", "ref": "refs/heads/redux", "path": "src/app/components/Loading.js", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "4797"}, {"name": "HTML", "bytes": "3946"}, {"name": "JavaScript", "bytes": "29033"}]}}
{"text": "from __future__ import unicode_literals\nfrom django.conf import settings\nfrom django.contrib.contenttypes import generic\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import models\nfrom django.dispatch.dispatcher import receiver\nfrom model_utils.models import TimeStampedModel\nfrom registration.signals import user_registered\n\n_all = [\"Asset\", \"Profile\", \"user_registered_callback\"]\n__author__ = \"pmeier82\"\n\n\n# PROFILE\n\nclass Profile(models.Model):\n \"\"\"user profile model\"\"\"\n\n class Meta:\n app_label = \"base\"\n\n user = models.OneToOneField(\n settings.AUTH_USER_MODEL,\n unique=True)\n title = models.CharField(\n max_length=255,\n default=\"\",\n )\n affiliation = models.CharField(\n max_length=255,\n default=\"\",\n )\n research_area = models.TextField(\n default=\"\"\n )\n # TODO: build a meaningful profile\n\n # special\n def __str__(self):\n return self.user.username\n\n def __unicode__(self):\n return unicode(self.__str__())\n\n\ndef user_registered_callback(user, request, **kwargs):\n profile, is_new = Profile.objects.get_or_create(user=user)\n profile.title = request.POST.get(\"title\", \"test\")\n profile.save()\n\n\nuser_registered.connect(user_registered_callback)\n\n# ASSET\n\ndef UPLOAD_TO_HANDLER(obj, fname):\n folder = getattr(obj, \"kind\", \"default\")\n return \"{}/{}\".format(folder, fname)\n\n\nclass Asset(TimeStampedModel):\n \"\"\"generic file asset model\"\"\"\n\n class Meta:\n app_label = \"base\"\n\n UPLOAD_TO = \"default\"\n\n # fields\n name = models.CharField(max_length=255, unique=False)\n data_orig_name = models.CharField(max_length=255, unique=False)\n data = models.FileField(upload_to=UPLOAD_TO_HANDLER)\n kind = models.CharField(max_length=255, unique=False, null=False, default=UPLOAD_TO)\n\n # generic foreign key\n content_type = models.ForeignKey(ContentType, null=True)\n object_id = models.PositiveIntegerField(null=True)\n content_object = generic.GenericForeignKey()\n\n # special methods\n def __unicode__(self):\n return unicode(\"{}: {}\".format(self.__class__.__name__, self.name))\n\n # django special methods\n @models.permalink\n def get_absolute_url(self):\n return \"asset:serve\", (self.pk,), {}\n\n @models.permalink\n def get_delete_url(self):\n return \"asset:delete\", (self.pk,), {}\n\n # interface\n def save(self, *args, **kwargs):\n super(Asset, self).save(*args, **kwargs)\n\n def delete(self, *args, **kwargs):\n super(Asset, self).delete(*args, **kwargs)\n\n\n@receiver(models.signals.pre_delete, sender=Asset)\ndef asset_file_delete(sender, instance, **kwargs):\n instance.data.delete()\n\n\nif __name__ == \"__main__\":\n pass\n", "meta": {"content_hash": "85f7dee85ba6de3d5a267ea68a913604", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 88, "avg_line_length": 25.757009345794394, "alnum_prop": 0.6556603773584906, "repo_name": "pmeier82/spike_gnode", "id": "2411abbf4b4c2c62fd144aaa9261d587c405219b", "size": "2781", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "base/models.py", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "CSS", "bytes": "11360"}, {"name": "HTML", "bytes": "56070"}, {"name": "JavaScript", "bytes": "734"}, {"name": "Nginx", "bytes": "4758"}, {"name": "Python", "bytes": "37001"}, {"name": "Shell", "bytes": "2475"}]}}
{"text": "\npackage org.eclipse.lsp4j;\n\nimport java.util.List;\nimport org.eclipse.lsp4j.Position;\nimport org.eclipse.lsp4j.TextDocumentIdentifier;\nimport org.eclipse.lsp4j.WorkDoneProgressAndPartialResultParams;\nimport org.eclipse.lsp4j.jsonrpc.validation.NonNull;\nimport org.eclipse.lsp4j.util.Preconditions;\nimport org.eclipse.xtext.xbase.lib.Pure;\nimport org.eclipse.xtext.xbase.lib.util.ToStringBuilder;\n\n/**\n * A parameter literal used in selection range requests.\n * \n * Since 3.15.0\n */\n@SuppressWarnings(\"all\")\npublic class SelectionRangeParams extends WorkDoneProgressAndPartialResultParams {\n /**\n * The text document.\n */\n @NonNull\n private TextDocumentIdentifier textDocument;\n \n /**\n * The positions inside the text document.\n */\n @NonNull\n private List positions;\n \n public SelectionRangeParams() {\n }\n \n public SelectionRangeParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final List positions) {\n this.textDocument = Preconditions.checkNotNull(textDocument, \"textDocument\");\n this.positions = Preconditions.>checkNotNull(positions, \"positions\");\n }\n \n /**\n * The text document.\n */\n @Pure\n @NonNull\n public TextDocumentIdentifier getTextDocument() {\n return this.textDocument;\n }\n \n /**\n * The text document.\n */\n public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {\n this.textDocument = Preconditions.checkNotNull(textDocument, \"textDocument\");\n }\n \n /**\n * The positions inside the text document.\n */\n @Pure\n @NonNull\n public List getPositions() {\n return this.positions;\n }\n \n /**\n * The positions inside the text document.\n */\n public void setPositions(@NonNull final List positions) {\n this.positions = Preconditions.checkNotNull(positions, \"positions\");\n }\n \n @Override\n @Pure\n public String toString() {\n ToStringBuilder b = new ToStringBuilder(this);\n b.add(\"textDocument\", this.textDocument);\n b.add(\"positions\", this.positions);\n b.add(\"workDoneToken\", getWorkDoneToken());\n b.add(\"partialResultToken\", getPartialResultToken());\n return b.toString();\n }\n \n @Override\n @Pure\n public boolean equals(final Object obj) {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n if (!super.equals(obj))\n return false;\n SelectionRangeParams other = (SelectionRangeParams) obj;\n if (this.textDocument == null) {\n if (other.textDocument != null)\n return false;\n } else if (!this.textDocument.equals(other.textDocument))\n return false;\n if (this.positions == null) {\n if (other.positions != null)\n return false;\n } else if (!this.positions.equals(other.positions))\n return false;\n return true;\n }\n \n @Override\n @Pure\n public int hashCode() {\n final int prime = 31;\n int result = super.hashCode();\n result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());\n return prime * result + ((this.positions== null) ? 0 : this.positions.hashCode());\n }\n}\n", "meta": {"content_hash": "1fc19c21c3959ccaf37336d3bc383346", "timestamp": "", "source": "github", "line_count": 116, "max_line_length": 124, "avg_line_length": 27.396551724137932, "alnum_prop": 0.6913152926368785, "repo_name": "smarr/SOMns-vscode", "id": "ca95621514251184457f1372dec09436068539dd", "size": "3598", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "server/org.eclipse.lsp4j-gen/org/eclipse/lsp4j/SelectionRangeParams.java", "mode": "33188", "license": "mit", "language": [{"name": "ANTLR", "bytes": "12820"}, {"name": "Java", "bytes": "1782848"}, {"name": "Shell", "bytes": "182"}, {"name": "Slash", "bytes": "241"}, {"name": "TypeScript", "bytes": "26804"}, {"name": "Vim Script", "bytes": "3730"}, {"name": "Xtend", "bytes": "197426"}]}}
{"text": "package com.github.mortido.extra.behavioral.nullObject;\n\npublic class NullUser extends User {\n @Override\n public String getName() {\n return \"User doesn't exist\";\n }\n\n @Override\n public int getId() {\n return -1;\n }\n}\n", "meta": {"content_hash": "13680e8fb0ec1fd4f5088b9f8c0ac55a", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 55, "avg_line_length": 19.076923076923077, "alnum_prop": 0.625, "repo_name": "mortido/DesignPatterns-Java", "id": "56cf92ed5e528869f70fcc4d8bd985ba8f3b2836", "size": "248", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/com/github/mortido/extra/behavioral/nullObject/NullUser.java", "mode": "33188", "license": "mit", "language": [{"name": "Java", "bytes": "72591"}]}}
{"text": "import { Arr, Optional } from '@ephox/katamari';\nimport { SugarElement } from '@ephox/sugar';\n\nimport * as Structs from '../api/Structs';\nimport * as GridRow from '../model/GridRow';\nimport { CellElement, CompElm } from '../util/TableTypes';\n\ntype Subst = () => SugarElement;\n\n// substitution: () -> item\nconst merge = (grid: Structs.RowCells[], bounds: Structs.Bounds, comparator: CompElm, substitution: Subst): Structs.RowCells[] => {\n const rows = GridRow.extractGridDetails(grid).rows;\n // Mutating. Do we care about the efficiency gain?\n if (rows.length === 0) {\n return grid;\n }\n for (let i = bounds.startRow; i <= bounds.finishRow; i++) {\n for (let j = bounds.startCol; j <= bounds.finishCol; j++) {\n // We can probably simplify this again now that we aren't reusing merge.\n const row = rows[i];\n const isLocked = GridRow.getCell(row, j).isLocked;\n GridRow.mutateCell(row, j, Structs.elementnew(substitution(), false, isLocked));\n }\n }\n return grid;\n};\n\n// substitution: () -> item\nconst unmerge = (grid: Structs.RowCells[], target: SugarElement, comparator: CompElm, substitution: Subst): Structs.RowCells[] => {\n const rows = GridRow.extractGridDetails(grid).rows;\n // Mutating. Do we care about the efficiency gain?\n let first = true;\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < rows.length; i++) {\n for (let j = 0; j < GridRow.cellLength(rows[0]); j++) {\n const row = rows[i];\n const currentCell = GridRow.getCell(row, j);\n const currentCellElm = currentCell.element;\n const isToReplace = comparator(currentCellElm, target);\n\n if (isToReplace && !first) {\n GridRow.mutateCell(row, j, Structs.elementnew(substitution(), true, currentCell.isLocked));\n } else if (isToReplace) {\n first = false;\n }\n }\n }\n return grid;\n};\n\nconst uniqueCells = (row: Structs.ElementNew[], comparator: CompElm): Structs.ElementNew[] => {\n return Arr.foldl(row, (rest, cell) => {\n return Arr.exists(rest, (currentCell) => {\n return comparator(currentCell.element, cell.element);\n }) ? rest : rest.concat([ cell ]);\n }, [] as Structs.ElementNew[]);\n};\n\nconst splitCols = (grid: Structs.RowCells[], index: number, comparator: CompElm, substitution: Subst): Structs.RowCells[] => {\n // We don't need to split rows if we're inserting at the first or last row of the old table\n if (index > 0 && index < grid[0].cells.length) {\n Arr.each(grid, (row) => {\n const prevCell = row.cells[index - 1];\n let offset = 0;\n const substitute = substitution();\n\n while (row.cells.length > index + offset && comparator(prevCell.element, row.cells[index + offset].element)) {\n GridRow.mutateCell(row, index + offset, Structs.elementnew(substitute, true, row.cells[index + offset].isLocked));\n offset++;\n }\n });\n }\n\n return grid;\n};\n\nconst splitRows = (grid: Structs.RowCells[], index: number, comparator: CompElm, substitution: Subst): Structs.RowCells[] => {\n // We don't need to split rows if we're inserting at the first or last row of the old table\n const rows = GridRow.extractGridDetails(grid).rows;\n if (index > 0 && index < rows.length) {\n const rowPrevCells = rows[index - 1].cells;\n const cells = uniqueCells(rowPrevCells, comparator);\n Arr.each(cells, (cell) => {\n // only make a sub when we have to\n let replacement = Optional.none>();\n for (let i = index; i < rows.length; i++) {\n for (let j = 0; j < GridRow.cellLength(rows[0]); j++) {\n const row = rows[i];\n const current = GridRow.getCell(row, j);\n const isToReplace = comparator(current.element, cell.element);\n\n if (isToReplace) {\n if (replacement.isNone()) {\n replacement = Optional.some(substitution());\n }\n replacement.each((sub) => {\n GridRow.mutateCell(row, j, Structs.elementnew(sub, true, current.isLocked));\n });\n }\n }\n }\n });\n }\n\n return grid;\n};\n\nexport {\n merge,\n unmerge,\n splitCols,\n splitRows\n};\n", "meta": {"content_hash": "ca65adc511ae0aedbdd6e75bf700d63b", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 144, "avg_line_length": 37.13274336283186, "alnum_prop": 0.6348903717826502, "repo_name": "tinymce/tinymce", "id": "98e0abc2909ea0a3267c1a8d7d87f92f13e3584d", "size": "4196", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "modules/snooker/src/main/ts/ephox/snooker/operate/MergingOperations.ts", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "9733"}, {"name": "HTML", "bytes": "183264"}, {"name": "JavaScript", "bytes": "117530"}, {"name": "Less", "bytes": "182379"}, {"name": "TypeScript", "bytes": "11764279"}]}}
{"text": "\n\n", "meta": {"content_hash": "6b3dadea3ba647025bc678e04d6487e0", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 54, "avg_line_length": 47.0, "alnum_prop": 0.648936170212766, "repo_name": "RBMHTechnology/ttt", "id": "af62bb6ae91ead9584202716b1b01ca7703b5c03", "size": "94", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "ttt-ttv/src/main/resources/com/skynav/ttv/app/config.xml", "mode": "33188", "license": "bsd-2-clause", "language": [{"name": "CSS", "bytes": "22996"}, {"name": "HTML", "bytes": "2348"}, {"name": "Java", "bytes": "2833329"}, {"name": "Shell", "bytes": "2808"}, {"name": "XSLT", "bytes": "5232"}]}}
{"text": "from __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import division\n\nimport json\n\nfrom django.conf import settings\nfrom django.contrib.gis.geos import Polygon\nfrom django.core.urlresolvers import reverse\nfrom django.db import transaction\nfrom django.db.models import Q\nfrom django.http import HttpResponseRedirect, HttpResponseForbidden, Http404\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.timezone import now\n\nfrom libs.data import merge\nfrom libs.formatters import humanize_bytes\nfrom libs.pdf_maps import create_event_map_pdf\nfrom libs.sql import get_group_tree_count\n\nfrom apps.core.helpers import (user_is_group_admin,\n user_is_eligible_to_become_trusted_mapper)\nfrom apps.core.decorators import group_request\nfrom apps.core.models import Group\n\nfrom apps.mail.views import notify_group_mapping_approved\n\nfrom apps.users.models import Follow, TrustedMapper\nfrom apps.users.forms import GroupSettingsForm\n\nfrom apps.survey.models import Territory, Survey, Blockface\nfrom apps.survey.layer_context import (get_context_for_territory_layer,\n get_context_for_territory_admin_layer)\n\nfrom apps.event.models import Event, EventRegistration\nfrom apps.event.event_list import EventList\n\nGROUP_EVENTS_ID = 'group-events'\nGROUP_EDIT_EVENTS_TAB_ID = 'events'\n\n\ndef group_list_page(request):\n # TODO: pagination\n groups = Group.objects.filter(is_active=True).order_by('name')\n group_ids = Follow.objects.filter(user_id=request.user.id) \\\n .values_list('group_id', flat=True)\n user_is_following = [group.id in group_ids for group in groups]\n\n group_infos = zip(groups, user_is_following)\n return {\n 'groups': group_infos,\n 'groups_count': len(group_infos),\n }\n\n\n@group_request\ndef _group_events(request):\n qs = Event.objects.filter(group=request.group, is_private=False)\n user_can_edit_group = user_is_group_admin(request.user,\n request.group)\n extra_context = {'user_can_edit_group': user_can_edit_group,\n 'group_slug': request.group.slug}\n return qs, extra_context\n\n\ngroup_detail_events = EventList(\n _group_events,\n name=\"group_detail_events\",\n template_path='groups/partials/detail_event_list.html')\n\n\ngroup_edit_events = EventList(\n _group_events,\n name=\"group_edit_events\",\n template_path='groups/partials/edit_event_list.html')\n\n\ndef group_detail(request):\n user = request.user\n group = request.group\n\n if not user_is_group_admin(user, group) and not request.group.is_active:\n raise Http404('Must be a group admin to view an inactive group')\n\n event_list = (group_detail_events\n .configure(chunk_size=2,\n active_filter=EventList.Filters.CURRENT,\n filterset_name=EventList.chronoFilters)\n .as_context(request, group_slug=group.slug))\n user_is_following = Follow.objects.filter(user_id=request.user.id,\n group=group).exists()\n\n show_mapper_request = user_is_eligible_to_become_trusted_mapper(user,\n group)\n\n follow_count = Follow.objects.filter(group=group).count()\n tree_count = get_group_tree_count(group)\n\n group_blocks = Territory.objects \\\n .filter(group=group) \\\n .values_list('blockface_id', flat=True)\n\n group_blocks_count = group_blocks.count()\n\n if group_blocks_count > 0:\n completed_blocks = Survey.objects \\\n .filter(blockface_id__in=group_blocks) \\\n .distinct('blockface')\n block_percent = \"{:.1%}\".format(\n float(completed_blocks.count()) / float(group_blocks.count()))\n else:\n block_percent = \"0.0%\"\n\n events_held = Event.objects.filter(group=group, ends_at__lt=now())\n num_events_held = events_held.count()\n\n num_event_attendees = EventRegistration.objects \\\n .filter(event__in=events_held) \\\n .filter(did_attend=True) \\\n .count()\n\n return {\n 'group': group,\n 'event_list': event_list,\n 'user_is_following': user_is_following,\n 'edit_url': reverse('group_edit', kwargs={'group_slug': group.slug}),\n 'show_mapper_request': show_mapper_request,\n 'counts': {\n 'tree': tree_count,\n 'block': block_percent,\n 'event': num_events_held,\n 'attendees': num_event_attendees,\n 'follows': follow_count\n },\n 'group_events_id': GROUP_EVENTS_ID,\n 'layer': get_context_for_territory_layer(request, request.group.id),\n 'territory_bounds': _group_territory_bounds(request.group),\n 'render_follow_button_without_count': request.POST.get(\n 'render_follow_button_without_count', False)\n }\n\n\ndef redirect_to_group_detail(request):\n return HttpResponseRedirect(\n reverse('group_detail', kwargs={\n 'group_slug': request.group.slug\n }))\n\n\ndef _group_territory_bounds(group):\n blockfaces = Blockface.objects \\\n .filter(territory__group=group) \\\n .collect()\n\n if blockfaces:\n return list(blockfaces.extent)\n else:\n return None\n\n\ndef edit_group(request, form=None):\n group = request.group\n if not form:\n form = GroupSettingsForm(instance=request.group, label_suffix='')\n event_list = (group_edit_events\n .configure(chunk_size=2,\n active_filter=EventList.Filters.CURRENT,\n filterset_name=EventList.chronoFilters)\n .as_context(request, group_slug=group.slug))\n pending_mappers = TrustedMapper.objects.filter(group=request.group,\n is_approved__isnull=True)\n all_mappers = TrustedMapper.objects.filter(group=request.group,\n is_approved__isnull=False)\n return {\n 'group': group,\n 'event_list': event_list,\n 'form': form,\n 'group_slug': group.slug,\n 'max_image_size': humanize_bytes(\n settings.MAX_GROUP_IMAGE_SIZE_IN_BYTES, 0),\n 'pending_mappers': pending_mappers,\n 'all_mappers': all_mappers,\n 'group_edit_events_tab_id': GROUP_EDIT_EVENTS_TAB_ID,\n }\n\n\ndef update_group_settings(request):\n form = GroupSettingsForm(request.POST, request.FILES,\n instance=request.group)\n if form.is_valid():\n form.save()\n return HttpResponseRedirect(request.group.get_absolute_url())\n else:\n return edit_group(request, form=form)\n\n\ndef follow_group(request):\n Follow.objects.get_or_create(user_id=request.user.id, group=request.group)\n return group_detail(request)\n\n\ndef unfollow_group(request):\n Follow.objects.filter(user_id=request.user.id, group=request.group) \\\n .delete()\n return group_detail(request)\n\n\ndef start_group_map_print_job(request):\n # TODO: implement\n pass\n\n\ndef give_user_mapping_priveleges(request, username):\n mapper_context = _grant_mapping_access(request.group, username,\n is_approved=True)\n mail_context = notify_group_mapping_approved(request, request.group,\n username)\n return merge(mapper_context, mail_context)\n\n\ndef remove_user_mapping_priveleges(request, username):\n return _grant_mapping_access(request.group, username, is_approved=False)\n\n\ndef _grant_mapping_access(group, username, is_approved):\n mapper, created = TrustedMapper.objects.update_or_create(\n group=group,\n user__username=username,\n defaults={'is_approved': is_approved})\n return {\n 'mapper': mapper\n }\n\n\ndef request_mapper_status(request):\n user, group = request.user, request.group\n if not user_is_eligible_to_become_trusted_mapper(user, group):\n return HttpResponseForbidden()\n mapper, created = TrustedMapper.objects.update_or_create(\n group=group, user=user)\n return {\n 'success': True\n }\n\n\ndef group_unmapped_territory_geojson(request, group_id):\n # Get unmapped blockfaces\n blockfaces = Blockface.objects.filter(is_available=True)\n\n my_territory_q = Q(territory__group_id=group_id)\n\n if request.body:\n # Get potentially selectable blockfaces in polygon\n # (those in my territory or unclaimed)\n point_list = json.loads(request.body)\n point_list.append(point_list[0]) # Close the polygon\n polygon = Polygon((point_list))\n\n no_reservations_q = \\\n Q(blockfacereservation__isnull=True) \\\n | Q(blockfacereservation__canceled_at__isnull=False) \\\n | Q(blockfacereservation__expires_at__lt=now())\n nobodys_territory_q = Q(territory__group_id=None)\n unclaimed_q = no_reservations_q & nobodys_territory_q\n\n blockfaces = blockfaces \\\n .filter(geom__within=polygon) \\\n .filter(my_territory_q | unclaimed_q) \\\n .distinct()\n\n # Return just blockface data\n # (skipping expensive queries to make tiler URLs)\n return _make_blockface_data_result(blockfaces)\n\n else:\n # Get all blockfaces in group's territory\n blockfaces = blockfaces.filter(my_territory_q)\n return _make_blockface_and_tiler_urls_result(\n request, blockfaces, group_id)\n\n\ndef group_update_territory(request, group_id):\n group = get_object_or_404(Group, id=group_id)\n\n _update_territory(group, request)\n\n # Recreate PDF maps to show updated group territory\n _update_event_maps(request, group)\n\n result_blockfaces = Blockface.objects.filter(territory__group=group)\n return _make_blockface_and_tiler_urls_result(\n request, result_blockfaces, group_id)\n\n\n@transaction.atomic\ndef _update_territory(group, request):\n new_block_ids = set([int(id) for id in json.loads(request.body)])\n old_block_ids = set(Territory.objects\n .filter(group=group)\n .values_list('blockface_id', flat=True))\n ids_to_add = new_block_ids - old_block_ids\n ids_to_kill = old_block_ids - new_block_ids\n # Make sure no unavailable or already-assigned blocks slipped in\n filtered_ids_to_add = Blockface.objects \\\n .filter(id__in=ids_to_add) \\\n .filter(is_available=True) \\\n .filter(territory=None) \\\n .values_list('id', flat=True)\n new_territory = [Territory(group=group, blockface_id=id)\n for id in filtered_ids_to_add]\n Territory.objects.bulk_create(new_territory)\n Territory.objects \\\n .filter(blockface_id__in=ids_to_kill) \\\n .delete()\n\n\ndef _update_event_maps(request, group):\n events = Event.objects \\\n .filter(group_id=group.id, begins_at__gt=now()) \\\n .select_related('group')\n for event in events:\n create_event_map_pdf(request, event)\n\n\ndef _make_blockface_and_tiler_urls_result(request, blockfaces, group_id):\n result = {\n 'blockDataList': _make_blockface_data_result(blockfaces),\n 'tilerUrls': get_context_for_territory_admin_layer(request, group_id)\n }\n return result\n\n\ndef _make_blockface_data_result(blockfaces):\n block_data_list = [{'id': bf.id, 'geojson': bf.geom.json}\n for bf in blockfaces]\n return block_data_list\n", "meta": {"content_hash": "245a3f944cd4eac948a49263f01aee37", "timestamp": "", "source": "github", "line_count": 336, "max_line_length": 78, "avg_line_length": 34.25595238095238, "alnum_prop": 0.635881841876629, "repo_name": "RickMohr/nyc-trees", "id": "0430d00d3c50a470409f54b8f021ae97848c2ee7", "size": "11534", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "src/nyc_trees/apps/users/views/group.py", "mode": "33188", "license": "apache-2.0", "language": [{"name": "CSS", "bytes": "171372"}, {"name": "CartoCSS", "bytes": "878"}, {"name": "HTML", "bytes": "157969"}, {"name": "JavaScript", "bytes": "286316"}, {"name": "Makefile", "bytes": "1524"}, {"name": "PLpgSQL", "bytes": "3210"}, {"name": "Python", "bytes": "404021"}, {"name": "Shell", "bytes": "23399"}]}}
{"text": "function configure() {\n # List n-application using most space\n # @param $1|size number of biggest application to list\n # @return void\n function du-app() {\n size=\"${1:-10}\"\n dpkg-query --show --showformat=\"\\${Package;-50}\\t\\${Installed-Size}\\n\" \\\n | sort -k 2 -n \\\n | grep -v deinstall \\\n | awk '{printf \"%.1f MB \\t %s\\n\", $2/(1024), $1}' \\\n | tail -n \"$size\"\n }\n\n # human-readable sizes\n function df() { \n command df \\\n --human-readable \\\n --print-type \\\n --exclude-type squashfs \\\n --exclude-type tmpfs \\\n --exclude-type devtmpfs \\\n \"$@\"\n }\n\n # show sizes in MB\n function free() { command free -m; }\n}\nconfigure\n", "meta": {"content_hash": "73da57189a7a28882b91e1fe9a32a92a", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 80, "avg_line_length": 27.357142857142858, "alnum_prop": 0.49216710182767626, "repo_name": "edouard-lopez/dotfiles", "id": "4d9fd2c0bf074292bae2b10a9a53a4d841befd56", "size": "787", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "includes/posix/monitoring.bash", "mode": "33188", "license": "mit", "language": [{"name": "Python", "bytes": "63"}, {"name": "Shell", "bytes": "38660"}, {"name": "Vim Script", "bytes": "5525"}]}}
{"text": "\npackage org.ops4j.pax.exam.sample2.model;\n\nimport javax.persistence.Entity;\nimport javax.persistence.GeneratedValue;\nimport javax.persistence.GenerationType;\nimport javax.persistence.Id;\nimport javax.persistence.Lob;\nimport javax.persistence.ManyToOne;\nimport javax.persistence.Table;\n\n@Entity\n@Table(name = \"rating\")\npublic class Rating {\n\n @Id\n @GeneratedValue(strategy = GenerationType.AUTO)\n private int id;\n\n private int stars;\n\n @Lob\n private String comment;\n\n @ManyToOne\n private User user;\n @ManyToOne\n private Movie movie;\n\n /**\n * @return the id\n */\n public int getId() {\n return id;\n }\n\n /**\n * @param id\n * the id to set\n */\n public void setId(int id) {\n this.id = id;\n }\n\n /**\n * @return the stars\n */\n public int getStars() {\n return stars;\n }\n\n /**\n * @param stars\n * the stars to set\n */\n public void setStars(int stars) {\n this.stars = stars;\n }\n\n /**\n * @return the comment\n */\n public String getComment() {\n return comment;\n }\n\n /**\n * @param comment\n * the comment to set\n */\n public void setComment(String comment) {\n this.comment = comment;\n }\n\n /**\n * @return the user\n */\n public User getUser() {\n return user;\n }\n\n /**\n * @param user\n * the user to set\n */\n public void setUser(User user) {\n this.user = user;\n }\n\n /**\n * @return the movie\n */\n public Movie getMovie() {\n return movie;\n }\n\n /**\n * @param movie\n * the movie to set\n */\n public void setMovie(Movie movie) {\n this.movie = movie;\n }\n}\n", "meta": {"content_hash": "4901789fd2534feffdc9e9d6efb0ceb9", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 51, "avg_line_length": 17.009615384615383, "alnum_prop": 0.5313736574335783, "repo_name": "bimargulies/org.ops4j.pax.exam2", "id": "0188ac1c47c0896fbf7d103e1a14246e8d489d25", "size": "2379", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "samples/pax-exam-sample2-model/src/main/java/org/ops4j/pax/exam/sample2/model/Rating.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Java", "bytes": "1271799"}, {"name": "Shell", "bytes": "198"}]}}
{"text": "\n//\n// MODULE: JdbcDebug.cpp\n//\n#include \"org_apache_trafodion_jdbc_t2_JdbcDebug.h\"\n#include \"Debug.h\"\n\n/*\n * Class: org_apache_trafodion_jdbc_t2_JdbcDebug\n * Method: getDebugHandle\n * Signature: (I)I\n */\nJNIEXPORT jlong JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_getDebugHandle(JNIEnv *jenv, jclass jcls,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t jlong method_name_handle)\n{\n\tjlong handle = 0;\n#if defined(_BENCHMARK)\n\thandle = (jlong) new Benchmark((const char *) method_name_handle);\n#endif /* _BENCHMARK */\n\treturn(handle);\n}\n\n/*\n * Class: org_apache_trafodion_jdbc_t2_JdbcDebug\n * Method: getMethodNameHandle\n * Signature: (Ljava/lang/String;)I\n */\nJNIEXPORT jlong JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_getMethodNameHandle(JNIEnv *jenv, jclass jcls,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t jstring method_name)\n{\n\tjlong rc = 0;\n#if defined(_DEBUG) || defined(_BENCHMARK)\n\tif (method_name) rc = (jlong) jenv->GetStringUTFChars(method_name,NULL);\n\tif (rc==0) rc = (jlong) \"Unknown\";\n#endif /* _DEBUG || _BENCHMARK */\n\treturn(rc);\n}\n\n/*\n * Class: org_apache_trafodion_jdbc_t2_JdbcDebug\n * Method: methodEntry\n * Signature: (III)V\n */\nJNIEXPORT void JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_methodEntry(JNIEnv *jenv, jclass jcls,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t jlong debug_handle,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t jint debug_level,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t jlong method_name_handle)\n{\n#if defined(_DEBUG)\n\tDebugFunctionEntry((const char *) method_name_handle, debug_level, NULL , NULL, 0);\n#endif /* _DEBUG */\n#if defined(_BENCHMARK)\n\t((Benchmark *) debug_handle)->Entry();\n#endif /* _BENCHMARK */\n}\n\n/*\n * Class: org_apache_trafodion_jdbc_t2_JdbcDebug\n * Method: methodReturn\n * Signature: (ILjava/lang/String;)V\n */\nJNIEXPORT void JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_methodReturn(JNIEnv *jenv, jclass jcls,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjlong debug_handle,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjstring comment)\n{\n#if defined(_DEBUG)\n\tconst char *commentStr;\n\tif (comment) commentStr = jenv->GetStringUTFChars(comment,NULL);\n\telse commentStr = NULL;\n\tDebugFunctionReturn(\"JAVA\", commentStr, false, \"RETURNING\", NULL, 0);\n\tif (commentStr) jenv->ReleaseStringUTFChars(comment,commentStr);\n#endif /* _DEBUG */\n}\n\n/*\n * Class: org_apache_trafodion_jdbc_t2_JdbcDebug\n * Method: methodExit\n * Signature: (I)V\n */\nJNIEXPORT void JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_methodExit(JNIEnv *jenv, jclass jcls,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t jlong debug_handle)\n{\n#if defined(_DEBUG)\n\tDebugFunctionReturn(\"JAVA\", NULL, true, \"EXITING\", NULL, 0);\n#endif /* _DEBUG */\n\n#if defined(_BENCHMARK)\n\t((Benchmark *) debug_handle)->Exit();\n#endif /* _BENCHMARK */\n}\n\n/*\n * Class: org_apache_trafodion_jdbc_t2_JdbcDebug\n * Method: traceOut\n * Signature: (IILjava/lang/String;)V\n */\nJNIEXPORT void JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_traceOut(JNIEnv *jenv, jclass jcls,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjlong debug_handle,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjint debug_level,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjstring comment)\n{\n#if defined(_DEBUG)\n\tconst char *commentStr;\n\tif (comment) commentStr = jenv->GetStringUTFChars(comment,NULL);\n\telse commentStr = NULL;\n\tif (DebugActive(debug_level,NULL,0)) DebugOutput(commentStr , NULL, 0);\n\tif (commentStr) jenv->ReleaseStringUTFChars(comment,commentStr);\n#endif /* _DEBUG */\n}\n", "meta": {"content_hash": "1abd718dce3bc752ab0955f9348f9b61", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 114, "avg_line_length": 29.853211009174313, "alnum_prop": 0.6717885679164106, "repo_name": "mashengchen/incubator-trafodion", "id": "25ae2a001185445481545ef9e80b702621cbfedb", "size": "4264", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "core/conn/jdbc_type2/native/JdbcDebug.cpp", "mode": "33188", "license": "apache-2.0", "language": [{"name": "1C Enterprise", "bytes": "27762"}, {"name": "Awk", "bytes": "20971"}, {"name": "Batchfile", "bytes": "27013"}, {"name": "C", "bytes": "18877152"}, {"name": "C++", "bytes": "68786466"}, {"name": "CSS", "bytes": "99092"}, {"name": "GDB", "bytes": "62692"}, {"name": "Groff", "bytes": "46673"}, {"name": "HTML", "bytes": "4618"}, {"name": "Inno Setup", "bytes": "14579"}, {"name": "Java", "bytes": "12232679"}, {"name": "JavaScript", "bytes": "883279"}, {"name": "LLVM", "bytes": "42952"}, {"name": "Makefile", "bytes": "321639"}, {"name": "Objective-C", "bytes": "637659"}, {"name": "PHP", "bytes": "8438"}, {"name": "PLpgSQL", "bytes": "197622"}, {"name": "Perl", "bytes": "549860"}, {"name": "Protocol Buffer", "bytes": "121282"}, {"name": "Python", "bytes": "330201"}, {"name": "QMake", "bytes": "3622"}, {"name": "Ruby", "bytes": "8053"}, {"name": "SQLPL", "bytes": "60330"}, {"name": "Shell", "bytes": "1999068"}, {"name": "Tcl", "bytes": "2763"}, {"name": "XSLT", "bytes": "6100"}, {"name": "Yacc", "bytes": "1368077"}]}}
{"text": "\npackage com.alibaba.dubbo.common.serialize.support.java;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\n\nimport com.alibaba.dubbo.common.URL;\nimport com.alibaba.dubbo.common.serialize.ObjectInput;\nimport com.alibaba.dubbo.common.serialize.ObjectOutput;\nimport com.alibaba.dubbo.common.serialize.Serialization;\n\n/**\n * @author ding.lid\n */\npublic class CompactedJavaSerialization implements Serialization {\n\n public byte getContentTypeId() {\n return 4;\n }\n\n public String getContentType() {\n return \"x-application/compactedjava\";\n }\n\n public ObjectOutput serialize(URL url, OutputStream out) throws IOException {\n return new JavaObjectOutput(out, true);\n }\n\n public ObjectInput deserialize(URL url, InputStream is) throws IOException {\n return new JavaObjectInput(is, true);\n }\n\n}", "meta": {"content_hash": "51165a6abb524dd739da671e283beb68", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 81, "avg_line_length": 25.61764705882353, "alnum_prop": 0.7416762342135477, "repo_name": "kaven12/dubboo", "id": "f0a0f0a249f804c6984b2925e343fb0702f0600c", "size": "1480", "binary": false, "copies": "20", "ref": "refs/heads/master", "path": "dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/java/CompactedJavaSerialization.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Batchfile", "bytes": "3343"}, {"name": "CSS", "bytes": "18582"}, {"name": "Java", "bytes": "5237817"}, {"name": "JavaScript", "bytes": "63151"}, {"name": "Lex", "bytes": "2077"}, {"name": "Shell", "bytes": "7011"}, {"name": "Thrift", "bytes": "668"}]}}
{"text": "package com.jxd.android.bookinventtory.bean;\n\nimport io.realm.RealmModel;\nimport io.realm.RealmObject;\nimport io.realm.annotations.RealmClass;\n\n/**\n * \u56fe\u4e66\u76d8\u70b9\n * Created by Administrator on 2017/10/17.\n */\n@RealmClass\npublic class ShelfBookScanBean implements RealmModel {\n\n private String title;\n private String barcode;\n private String shelfno;\n private String updatetime;\n private String uid;\n private String callno;\n private int inshelf;\n private String status;\n private String machine_mac;\n\n /**\n * \u76d8\u70b9\u72b6\u6001\n */\n private String scanStatus;\n\n public String getTitle() {\n return title;\n }\n\n public void setTitle(String title) {\n this.title = title;\n }\n\n public String getBarcode() {\n return barcode;\n }\n\n public void setBarcode(String barcode) {\n this.barcode = barcode;\n }\n\n public String getShelfno() {\n return shelfno;\n }\n\n public void setShelfno(String shelfno) {\n this.shelfno = shelfno;\n }\n\n public String getUpdatetime() {\n return updatetime;\n }\n\n public void setUpdatetime(String updatetime) {\n this.updatetime = updatetime;\n }\n\n public String getUid() {\n return uid;\n }\n\n public void setUid(String uid) {\n this.uid = uid;\n }\n\n public String getCallno() {\n return callno;\n }\n\n public void setCallno(String callno) {\n this.callno = callno;\n }\n\n public int getInshelf() {\n return inshelf;\n }\n\n public void setInshelf(int inshelf) {\n this.inshelf = inshelf;\n }\n\n public String getMachine_mac() {\n return machine_mac;\n }\n\n public void setMachine_mac(String machine_mac) {\n this.machine_mac = machine_mac;\n }\n\n public String getStatus() {\n return status;\n }\n\n public void setStatus(String status) {\n this.status = status;\n }\n\n public String getScanStatus() {\n return scanStatus;\n }\n\n public void setScanStatus(String scanStatus) {\n this.scanStatus = scanStatus;\n }\n\n public void transfor(BookBean bookBean){\n this.setBarcode( bookBean.getBarcode() );\n this.setCallno(bookBean.getCallno());\n this.setInshelf(bookBean.getInshelf());\n this.setMachine_mac(bookBean.getMachine_mac());\n this.setTitle(bookBean.getTitle());\n this.setUid(bookBean.getUid());\n this.setShelfno(bookBean.getShelfno());\n this.setStatus( bookBean.getStatus() );\n this.setUpdatetime(bookBean.getUpdatetime());\n }\n\n @Override\n public int hashCode() {\n return super.hashCode();\n }\n\n @Override\n public boolean equals(Object obj) {\n return super.equals(obj);\n }\n}\n", "meta": {"content_hash": "1cc8e2853ac762829180de45eeec8132", "timestamp": "", "source": "github", "line_count": 130, "max_line_length": 55, "avg_line_length": 21.0, "alnum_prop": 0.6201465201465202, "repo_name": "jxdong1013/bookinventory", "id": "577e0a27b8901851282783433ef072283019b34b", "size": "2746", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/android/bookinventory/app/src/main/java/com/jxd/android/bookinventtory/bean/ShelfBookScanBean.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "ASP", "bytes": "98"}, {"name": "C#", "bytes": "199875"}, {"name": "CSS", "bytes": "21629"}, {"name": "HTML", "bytes": "6682"}, {"name": "Java", "bytes": "261073"}, {"name": "JavaScript", "bytes": "438316"}, {"name": "PowerShell", "bytes": "112665"}]}}
{"text": "\n\n#include \"../../inc/MarlinConfig.h\"\n\n#if HAS_M206_COMMAND\n\n#include \"../gcode.h\"\n#include \"../../module/motion.h\"\n#include \"../../lcd/marlinui.h\"\n#include \"../../libs/buzzer.h\"\n#include \"../../MarlinCore.h\"\n\nvoid M206_report() {\n SERIAL_ECHOLNPAIR_P(\n LIST_N(DOUBLE(LINEAR_AXES),\n PSTR(\"M206 X\"), home_offset.x,\n SP_Y_STR, home_offset.y,\n SP_Z_STR, home_offset.z,\n SP_I_STR, home_offset.i,\n SP_J_STR, home_offset.j,\n SP_K_STR, home_offset.k,\n )\n );\n}\n\n/**\n * M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y\n *\n * *** @thinkyhead: I recommend deprecating M206 for SCARA in favor of M665.\n * *** M206 for SCARA will remain enabled in 1.1.x for compatibility.\n * *** In the 2.0 release, it will simply be disabled by default.\n */\nvoid GcodeSuite::M206() {\n LOOP_LINEAR_AXES(i)\n if (parser.seen(AXIS_CHAR(i)))\n set_home_offset((AxisEnum)i, parser.value_linear_units());\n\n #if ENABLED(MORGAN_SCARA)\n if (parser.seen('T')) set_home_offset(A_AXIS, parser.value_float()); // Theta\n if (parser.seen('P')) set_home_offset(B_AXIS, parser.value_float()); // Psi\n #endif\n\n if (!parser.seen(LINEAR_AXIS_GANG(\"X\", \"Y\", \"Z\", \"I\", \"J\", \"K\")))\n M206_report();\n else\n report_current_position();\n}\n\n/**\n * M428: Set home_offset based on the distance between the\n * current_position and the nearest \"reference point.\"\n * If an axis is past center its endstop position\n * is the reference-point. Otherwise it uses 0. This allows\n * the Z offset to be set near the bed when using a max endstop.\n *\n * M428 can't be used more than 2cm away from 0 or an endstop.\n *\n * Use M206 to set these values directly.\n */\nvoid GcodeSuite::M428() {\n if (homing_needed_error()) return;\n\n xyz_float_t diff;\n LOOP_LINEAR_AXES(i) {\n diff[i] = base_home_pos((AxisEnum)i) - current_position[i];\n if (!WITHIN(diff[i], -20, 20) && home_dir((AxisEnum)i) > 0)\n diff[i] = -current_position[i];\n if (!WITHIN(diff[i], -20, 20)) {\n SERIAL_ERROR_MSG(STR_ERR_M428_TOO_FAR);\n LCD_ALERTMESSAGEPGM_P(PSTR(\"Err: Too far!\"));\n BUZZ(200, 40);\n return;\n }\n }\n\n LOOP_LINEAR_AXES(i) set_home_offset((AxisEnum)i, diff[i]);\n report_current_position();\n LCD_MESSAGEPGM(MSG_HOME_OFFSETS_APPLIED);\n BUZZ(100, 659);\n BUZZ(100, 698);\n}\n\n#endif // HAS_M206_COMMAND\n", "meta": {"content_hash": "d5f7b1a89aaf43eebda85cc3e0a7bc6e", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 82, "avg_line_length": 28.771084337349397, "alnum_prop": 0.6134840871021775, "repo_name": "limtbk/3dprinting", "id": "51f3e7c14c049e582236c468f1a1c40acf5e4c5a", "size": "3249", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Firmware/src/Marlin/src/gcode/geometry/M206_M428.cpp", "mode": "33188", "license": "apache-2.0", "language": [{"name": "C", "bytes": "16427042"}, {"name": "C++", "bytes": "1508812"}, {"name": "Makefile", "bytes": "58317"}, {"name": "Objective-C", "bytes": "195319"}, {"name": "Processing", "bytes": "407203"}, {"name": "Python", "bytes": "11892"}, {"name": "Scilab", "bytes": "10211"}]}}
{"text": "/*\n\n A helper function to diagram all routes in a `fluid.express` instance.\n\n */\n\n\"use strict\";\nvar fluid = fluid || require(\"infusion\");\n\nfluid.registerNamespace(\"fluid.test.express\");\n\n/**\n *\n * Diagram all routes within an express instance.\n *\n * @param {Object} expressComponent - A `fluid.express` component.\n * @return {Object} A JSON Object representing all routes within a `fluid.express` instance.\n *\n */\nfluid.test.express.diagramAllRoutes = function (expressComponent) {\n return fluid.test.express.diagramOneLevel(expressComponent, expressComponent.router._router);\n};\n\n/**\n *\n * Diagram the routes for a single component. To preserve the routing order of the stack, each level's children\n * are represented in a `children` Array.\n *\n * @param {Object} component - A `fluid.express.middleware` component.\n * @param {Object} router - The router instance within the component (if there is one).\n * @return {Object} A JSON Object representing the routes from this level down as well as the method and path for this level.\n */\nfluid.test.express.diagramOneLevel = function (component, router) {\n var thisLevel = fluid.filterKeys(component.options, [\"method\", \"path\"]);\n thisLevel.typeName = component.typeName;\n\n if (router) {\n thisLevel.children = fluid.transform(router.stack, function (layer) {\n // This is a `fluid.express.router` instance\n if (layer.handle && layer.handle.that) {\n return fluid.test.express.diagramOneLevel(layer.handle.that, layer.handle.that.router);\n }\n // This is a `fluid.express.middleware` instance\n else if (layer.route) {\n var wrapper = fluid.filterKeys(layer.route, [\"path\", \"methods\"]);\n wrapper.children = fluid.transform(layer.route.stack, function (middlewareLayer) {\n return fluid.test.express.diagramOneLevel(middlewareLayer.handle.that, middlewareLayer.handle.that.router);\n });\n return wrapper;\n }\n // This is something outside of our scope (i.e. native middleware).\n else {\n return \"Native middleware '\" + (layer.name || \"unknown\") + \"'\";\n }\n });\n }\n\n return thisLevel;\n};\n", "meta": {"content_hash": "1e7085b56a339027cd32730d523f680f", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 127, "avg_line_length": 38.389830508474574, "alnum_prop": 0.6512141280353201, "repo_name": "GPII/gpii-express", "id": "34a60008e12253be09206b56a5d1c3b76b4d7c29", "size": "2265", "binary": false, "copies": "2", "ref": "refs/heads/main", "path": "tests/js/lib/diagramAllRoutes.js", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "HTML", "bytes": "214"}, {"name": "JavaScript", "bytes": "208501"}]}}
{"text": "package com.lru.memory.disk.cache;\n\n/**\n *\n * @author sathayeg\n */\npublic interface DirLocate {\n public String getPathToFile(String key) throws Exception;\n public boolean isDiskPersistent();\n}\n", "meta": {"content_hash": "3f8be3bb0d892f5fdc57eeeaa392bc41", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 61, "avg_line_length": 20.0, "alnum_prop": 0.72, "repo_name": "gaurangsathaye/JavaSimpleCache", "id": "00f1f658cb5c38b6e518eccef7f979c9316fdd38", "size": "200", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/main/java/com/lru/memory/disk/cache/DirLocate.java", "mode": "33188", "license": "apache-2.0", "language": []}}
{"text": "\n\n\n\t\n\n\n\u041a\u043b\u0430\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0458\u0430\n\n\n\n\n\n\n\n\n\n
\n\n
\n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u0412\u0438\u0434\u043e\u0432\u0438\u0442\u0435 \u043d\u0430 \u0440\u0430\u043a \u0441\u0435 \u043a\u043b\u0430\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0430\u0430\u0442 \u0441\u043f\u043e\u0440\u0435\u0434 \u0432\u0438\u0434\u043e\u0442 \u043d\u0430 \u043a\u043b\u0435\u0442\u043a\u0438 \u043a\u043e\u0438 \u043d\u0430\u043b\u0438\u043a\u0443\u0432\u0430\u0430\u0442 \u043d\u0430 \u0442\u0443\u043c\u043e\u0440, \u0438 \u0441\u043f\u043e\u0440\u0435\u0434 \u0442\u043e\u0430, \n\t\u043d\u0430 \u0442\u043a\u0438\u0432\u043e\u0442\u043e \u0437\u0430 \u043a\u043e\u0435 \u0441\u0435 \u043f\u0440\u0435\u0442\u043f\u043e\u0441\u0442\u0430\u0432\u0443\u0432\u0430 \u0434\u0435\u043a\u0430 \u0435 \u0437\u0430\u0447\u0435\u0442\u043e\u043a \u043d\u0430 \u0442\u0443\u043c\u043e\u0440\u043e\u0442. \u041f\u043e\u0434\u043e\u043b\u0443 \u0435 \u0445\u0438\u0441\u0442\u043e\u043b\u043e\u0433\u0438\u0458\u0430\u0442\u0430 \u0438 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0431\u0430\u0442\u0430 \u043d\u0430 \u0432\u0438\u0434\u043e\u0432\u0438\u0442\u0435 \u0440\u0430\u043a. \u041f\u0440\u0438\u043c\u0435\u0440\u0438 \u0437\u0430 \u043d\u0435\u043a\u043e\u043b\u043a\u0443 \n\t\u043e\u043f\u0448\u0442\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0441\u0435: \u041a\u0430\u0440\u0446\u0438\u043d\u043e\u043c: \u041c\u0430\u043b\u0438\u0433\u043d\u0438 \u0442\u0443\u043c\u043e\u0440\u0438 \u043a\u043e\u0438 \u043f\u043e\u0442\u0435\u043a\u043d\u0443\u0432\u0430\u0430\u0442 \u043e\u0434 \u0435\u043f\u0438\u0442\u0435\u043b\u043d\u0438 \u043a\u043b\u0435\u0442\u043a\u0438. \u0412\u043e \u043e\u0432\u0430\u0430 \u0433\u0440\u0443\u043f\u0430 \u043f\u0440\u0438\u043f\u0430\u0453\u0430\u0430\u0442 \u043d\u0430\u0458\u0447\u0435\u0441\u0442\u0438\u0442\u0435 \u0432\u0438\u0434\u043e\u0432\u0438 \u043d\u0430 \u0440\u0430\u043a, \n\t\u0432\u043a\u043b\u0443\u0447\u0443\u0432\u0430\u0458\u045c\u0438 \u0433\u0438 \u0440\u0430\u043a\u043e\u0442 \u043d\u0430 \u0434\u043e\u0458\u043a\u0430\u0442\u0430, \u043f\u0440\u043e\u0441\u0442\u0430\u0442\u0430\u0442\u0430, \u0431\u0435\u043b\u0438\u0442\u0435 \u0434\u0440\u043e\u0431\u043e\u0432\u0438 \u0438 \u0434\u0435\u0431\u0435\u043b\u043e\u0442\u043e \u0446\u0440\u0435\u0432\u043e. \u0421\u0430\u0440\u043a\u043e\u043c: \u041c\u0430\u043b\u0438\u0433\u043d\u0438 \u0442\u0443\u043c\u043e\u0440\u0438 \u043a\u043e\u0438 \u043f\u043e\u0442\u0435\u043a\u043d\u0443\u0432\u0430\u0430\u0442 \u043e\u0434 \u0441\u0432\u0440\u0437\u043d\u0438\u0442\u0435 \u0442\u043a\u0438\u0432\u0430,\n\t \u0438\u043b\u0438 \u043c\u0435\u0437\u0435\u043d\u0445\u0438\u043c\u0430\u043b\u043d\u0438\u0442\u0435 \u043a\u043b\u0435\u0442\u043a\u0438. \u041b\u0438\u043c\u0444\u043e\u043c \u0438 \u043b\u0435\u0443\u043a\u0435\u043c\u0438\u0458\u0430: \u041c\u0430\u043b\u0438\u0433\u043d\u043e\u043c\u0438 \u043a\u043e\u0438 \u043f\u043e\u0442\u0435\u043a\u043d\u0443\u0432\u0430\u0430\u0442 \u043e\u0434 \u0445\u0435\u043c\u0430\u0442\u043e\u043f\u043e\u0435\u0442\u0441\u043a\u0438\u0442\u0435 (\u043a\u0440\u0432\u043e\u0442\u0432\u043e\u0440\u043d\u0438\u0442\u0435) \u043a\u043b\u0435\u0442\u043a\u0438 \u0411\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u043a\u0438 \u0440\u0430\u043a: \n\t \u0422\u0443\u043c\u043e\u0440\u0438 \u043a\u043e\u0438 \u043f\u043e\u0442\u0435\u043a\u043d\u0443\u0432\u0430\u0430\u0442 \u043e\u0434 \u0442\u043e\u0442\u0438\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u0438\u0442\u0435 \u043a\u043b\u0435\u0442\u043a\u0438. \u041a\u0430\u0458 \u0432\u043e\u0437\u0440\u0430\u0441\u043d\u0438\u0442\u0435 \u043d\u0430\u0458\u0447\u0435\u0441\u0442\u043e \u043c\u043e\u0436\u0435 \u0434\u0430 \u0441\u0435 \u043d\u0430\u0458\u0434\u0435 \u0432\u043e \u0442\u0435\u0441\u0442\u0438\u0441\u0438\u0442\u0435 \u0438 \u0458\u0430\u0458\u0447\u043d\u0438\u0446\u0438\u0442\u0435, \u0434\u043e\u0434\u0435\u043a\u0430 \u043a\u0430\u0458 \u0444\u0435\u0442\u0443\u0441\u0438\u0442\u0435, \n\t \u0431\u0435\u0431\u0438\u045a\u0430\u0442\u0430 \u0438 \u043c\u0430\u043b\u0438\u0442\u0435 \u0434\u0435\u0446\u0430 \u043d\u0430\u0458\u0447\u0435\u0441\u0442\u043e \u0441\u0435 \u043d\u0430\u043e\u0453\u0430\u0430\u0442 \u0432\u043e \u0441\u0440\u0435\u0434\u0438\u0448\u043d\u0438\u043e\u0442 \u0434\u0435\u043b \u043d\u0430 \u0442\u0435\u043b\u043e\u0442\u043e, \u043d\u0430 \u0432\u0440\u0432\u043e\u0442 \u043d\u0430 \u043e\u043f\u0430\u0448\u043d\u0430\u0442\u0430 \u043a\u043e\u0441\u043a\u0430, \u0430 \u043a\u0430\u0458 \u043a\u043e\u045a\u0438\u0442\u0435 \u0432\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0430 \u043d\u0430 \u0447\u0435\u0440\u0435\u043f\u043e\u0442. \n\t \u0411\u043b\u0430\u0441\u0442\u0435\u043d \u0442\u0443\u043c\u043e\u0440 \u0438\u043b\u0438 \u0431\u043b\u0430\u0441\u0442\u043e\u043c: \u0422\u0443\u043c\u043e\u0440 (\u043e\u0431\u0438\u0447\u043d\u043e \u043c\u0430\u043b\u0438\u0433\u043d\u0435\u043d) \u043a\u043e\u0458 \u043d\u0430\u043b\u0438\u043a\u0443\u0432\u0430 \u043d\u0430 \u043d\u0435\u0437\u0440\u0435\u043b\u043e \u0438\u043b\u0438 \u0435\u043c\u0431\u0440\u0438\u043e\u043d\u0441\u043a\u043e \u0442\u043a\u0438\u0432\u043e. \u041e\u0432\u0438\u0435 \u0442\u0443\u043c\u043e\u0440\u0438 \u0441\u0435 \u043d\u0430\u0458\u0447\u0435\u0441\u0442\u0438 \u043a\u0430\u0458 \u0434\u0435\u0446\u0430\u0442\u0430. \n \u0442\u0443\u043c\u043e\u0440\u0438 (\u0432\u0438\u0434\u043e\u0432\u0438 \u0440\u0430\u043a) \u043e\u0431\u0438\u0447\u043d\u043e \u0441\u0435 \u0438\u043c\u0435\u043d\u0443\u0432\u0430\u0430\u0442 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u0458\u045c\u0438 \u2013\u043a\u0430\u0440\u0446\u0438\u043d\u043e\u043c, -\u0441\u0430\u0440\u043a\u043e\u043c \u0438\u043b\u0438 \u2013\u0431\u043b\u0430\u0441\u0442\u043e\u043c \u043a\u0430\u043a\u043e \u0441\u0443\u0444\u0438\u043a\u0441, \u0438 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u043e\u0442 \u0438\u043b\u0438 \u0433\u0440\u0447\u043a\u0438\u043e\u0442 \u0437\u0431\u043e\u0440 \u0437\u0430 \u043e\u0440\u0433\u0430\u043d\u043e\u0442\n \u043e\u0434 \u043a\u043e\u0458 \u043f\u043e\u0442\u0435\u043a\u043d\u0443\u0432\u0430\u0430\u0442 \u043a\u0430\u043a\u043e \u043a\u043e\u0440\u0435\u043d \u043d\u0430 \u0438\u043c\u0435\u0442\u043e. \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u043a\u043e\u0442 \u043d\u0430 \u0446\u0440\u043d\u0438\u043e\u0442 \u0434\u0440\u043e\u0431 \u0441\u0435 \u043d\u0430\u0440\u0435\u043a\u0443\u0432\u0430 \u0445\u0435\u043f\u0430\u0442\u043e\u043a\u0430\u0440\u0446\u0438\u043d\u043e\u043c, \u0440\u0430\u043a\u043e\u0442 \u043d\u0430 \u043c\u0430\u0441\u043d\u0438\u0442\u0435 \u043a\u043b\u0435\u0442\u043a\u0438- \u043b\u0438\u043f\u043e\u0441\u0430\u0440\u043a\u043e\u043c\n \u0438\u0442\u043d. \u0411\u0435\u043d\u0438\u0433\u043d\u0438\u0442\u0435 \u0442\u0443\u043c\u043e\u0440\u0438 (\u043a\u043e\u0438 \u043d\u0435 \u0441\u0435 \u0440\u0430\u043a) \u0441\u0435 \u0438\u043c\u0435\u043d\u0443\u0432\u0430\u0430\u0442 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u0458\u045c\u0438 \u2013\u043e\u043c \u043a\u0430\u043a\u043e \u0441\u0443\u0444\u0438\u043a\u0441, \u0438 \u0438\u043c\u0435\u0442\u043e \u043d\u0430 \u043e\u0440\u0433\u0430\u043d\u043e\u0442 \u043a\u0430\u043a\u043e \u043a\u043e\u0440\u0435\u043d. \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440, \u0431\u0435\u043d\u0438\u0433\u043d\u0435\u043d \u0442\u0443\u043c\u043e\u0440 \n \u043d\u0430 \u043c\u0430\u0437\u043d\u0430\u0442\u0430 \u043c\u0443\u0441\u043a\u0443\u043b\u0430\u0442\u0443\u0440\u0430 \u043d\u0430 \u043c\u0430\u0442\u043a\u0430\u0442\u0430 \u0441\u0435 \u043d\u0430\u0440\u0435\u043a\u0443\u0432\u0430 \u043b\u0435\u0438\u043e\u043c\u0438\u043e\u043c (\u043f\u043e\u0447\u0435\u0441\u0442 \u0438\u0437\u0440\u0430\u0437 \u0437\u0430 \u043e\u0432\u043e\u0458 \u0432\u0438\u0434 \u0442\u0443\u043c\u043e\u0440 \u0435 \u0444\u0438\u0431\u0440\u043e\u0438\u0434). \u0417\u0430 \u0436\u0430\u043b, \n\t\u0438 \u043d\u0435\u043a\u043e\u0438 \u0432\u0438\u0434\u043e\u0432\u0438 \u0440\u0430\u043a \u0433\u043e \u043a\u043e\u0440\u0438\u0441\u0442\u0430\u0442 \u0441\u0443\u0444\u0438\u043a\u0441\u043e\u0442 \u2013\u043e\u043c, \u043a\u0430\u043a\u043e \u0448\u0442\u043e \u0435 \u0441\u043b\u0443\u0447\u0430\u0458\u043e\u0442 \u0441\u043e \u043c\u0435\u043b\u0430\u043d\u043e\u043c \u0438 \u0441\u0435\u043c\u0438\u043d\u043e\u043c\n\t\t
\n\n\n\t \n\n\n\n\n\n", "meta": {"content_hash": "5fe8f5d153cd27a362025ba442a3f87d", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 140, "avg_line_length": 45.84782608695652, "alnum_prop": 0.7159791370317686, "repo_name": "majaradichevich/majaradichevich.github.io", "id": "7ed025a1c9e8db3faad7a92693291f6f197a9621", "size": "5642", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "klasifikacija.html", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "6042"}, {"name": "HTML", "bytes": "185244"}, {"name": "JavaScript", "bytes": "11231"}]}}
{"text": "Installing XFramework Generator
\n\nYou don't need to download the source code from the repo, create all the necessary files for the web app, writing two thousands line of code just to create a Hello world!
app. XFramework Generator can make everything for you.
\n\nXF Generator has a number of dependencies such as:
\n\n\n\nTo install first two of them on Mac OS X or Windows computers you just need to download a package from nodejs.org/download/. For other platforms see the readme.
\n\nAfter installing node.js and npm go to terminal and install Yeoman writing npm install -g yo
(with sudo
if necessary).
\n\nAlmost there! After these steps you need to install XF Generator with npm install -g generator-xf
.
", "meta": {"content_hash": "7ec5a698f2b1bcd09b1e097b90fbd031", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 257, "avg_line_length": 60.705882352941174, "alnum_prop": 0.7199612403100775, "repo_name": "epam/xframework", "id": "4127893e601400216714eb907402287b68e38251", "size": "1032", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/data/installing_xframework_generator.html", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "CSS", "bytes": "275950"}, {"name": "JavaScript", "bytes": "730289"}]}}
{"text": "namespace Azure.ResourceManager.EdgeOrder.Models\n{\n /// Represents subscription registered features. \n public partial class CustomerSubscriptionRegisteredFeatures\n {\n /// Initializes a new instance of CustomerSubscriptionRegisteredFeatures. \n public CustomerSubscriptionRegisteredFeatures()\n {\n }\n\n /// Name of subscription registered feature. \n public string Name { get; set; }\n /// State of subscription registered feature. \n public string State { get; set; }\n }\n}\n", "meta": {"content_hash": "ac471d3f33987dd6c7e35e349847293a", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 102, "avg_line_length": 38.4375, "alnum_prop": 0.6813008130081301, "repo_name": "Azure/azure-sdk-for-net", "id": "1888fb1a8203597c021c5a97aa4c2106984a672a", "size": "753", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionRegisteredFeatures.cs", "mode": "33188", "license": "mit", "language": []}}
{"text": "\n\n\n\n\n\nUses of Interface org.wildfly.swarm.config.messaging.activemq.server.BindingsDirectoryPathConsumer (BOM: * : All 2.3.1.Final-SNAPSHOT API)\n\n\n\n\n\n\n\n\n\n\n\n
\n
\n\n\n
\n
Thorntail API, 2.3.1.Final-SNAPSHOT
\n
\n\n\n\n\n\n\n\n\n
\n
\n\n\n
\n
Thorntail API, 2.3.1.Final-SNAPSHOT
\n
\n\n\nCopyright © 2019 JBoss by Red Hat. All rights reserved.
\n\n\n", "meta": {"content_hash": "9d4a959a17bfed5d67d358e525d7f8e4", "timestamp": "", "source": "github", "line_count": 206, "max_line_length": 793, "avg_line_length": 64.10194174757281, "alnum_prop": 0.6843619840969329, "repo_name": "wildfly-swarm/wildfly-swarm-javadocs", "id": "1e14ac35a7c49488433c20a72a70ed6f7111d9be", "size": "13205", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "2.3.1.Final-SNAPSHOT/apidocs/org/wildfly/swarm/config/messaging/activemq/server/class-use/BindingsDirectoryPathConsumer.html", "mode": "33188", "license": "apache-2.0", "language": []}}
{"text": "\n\nimport ReactSharedInternals from 'shared/ReactSharedInternals';\nimport type {Transition} from './ReactFiberTracingMarkerComponent.new';\n\nconst {ReactCurrentBatchConfig} = ReactSharedInternals;\n\nexport const NoTransition = null;\n\nexport function requestCurrentTransition(): Transition | null {\n return ReactCurrentBatchConfig.transition;\n}\n", "meta": {"content_hash": "dace65b4e7262d44f7cf8c5ddcea517a", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 71, "avg_line_length": 28.5, "alnum_prop": 0.8216374269005848, "repo_name": "camsong/react", "id": "d63b99a1862ef22435389d30a9298476688a7c25", "size": "542", "binary": false, "copies": "2", "ref": "refs/heads/main", "path": "packages/react-reconciler/src/ReactFiberTransition.js", "mode": "33188", "license": "mit", "language": [{"name": "C", "bytes": "5225"}, {"name": "C++", "bytes": "44278"}, {"name": "CSS", "bytes": "64729"}, {"name": "CoffeeScript", "bytes": "16826"}, {"name": "HTML", "bytes": "119964"}, {"name": "JavaScript", "bytes": "6161428"}, {"name": "Makefile", "bytes": "189"}, {"name": "Python", "bytes": "259"}, {"name": "Shell", "bytes": "2306"}, {"name": "TypeScript", "bytes": "20868"}]}}
{"text": "\n\n/*!\n * Copyright (c) 2019 by Contributors\n * \\file moments-inl.h\n * \\brief Moments operator\n * \\author Hao Jin\n*/\n\n#ifndef MXNET_OPERATOR_NN_MOMENTS_INL_H_\n#define MXNET_OPERATOR_NN_MOMENTS_INL_H_\n\n#include \n#include \"../tensor/broadcast_reduce_op.h\"\n\nnamespace mxnet {\nnamespace op {\n\nstruct MomentsParam : public dmlc::Parameter {\n dmlc::optional axes;\n bool keepdims;\n DMLC_DECLARE_PARAMETER(MomentsParam) {\n DMLC_DECLARE_FIELD(axes).set_default(dmlc::optional())\n .describe(\"Array of ints. Axes along which to compute mean and variance.\");\n DMLC_DECLARE_FIELD(keepdims).set_default(false)\n .describe(\"produce moments with the same dimensionality as the input.\");\n }\n};\n\ninline bool MomentsShape(const nnvm::NodeAttrs& attrs,\n mxnet::ShapeVector* in_attrs,\n mxnet::ShapeVector* out_attrs) {\n const MomentsParam& param = nnvm::get(attrs.parsed);\n CHECK_EQ(in_attrs->size(), 1U);\n CHECK_EQ(out_attrs->size(), 2U);\n\n mxnet::TShape out_shape =\n ReduceAxesShapeImpl((*in_attrs)[0], param.axes, param.keepdims, false);\n if (!param.axes.has_value() || param.axes.value().ndim() == 0) {\n LOG(FATAL) << \"Empty axes is not supported, if you would like to do global moments, \"\n << \"please pass all axes to axes argument\";\n }\n SHAPE_ASSIGN_CHECK(*out_attrs, 0, out_shape);\n SHAPE_ASSIGN_CHECK(*out_attrs, 1, out_shape);\n return true;\n}\n\ninline bool MomentsType(const nnvm::NodeAttrs& attrs,\n std::vector* in_attrs,\n std::vector* out_attrs) {\n CHECK_EQ(in_attrs->size(), 1U);\n CHECK_EQ(out_attrs->size(), 2U);\n\n TYPE_ASSIGN_CHECK(*out_attrs, 0, in_attrs->at(0));\n TYPE_ASSIGN_CHECK(*out_attrs, 1, in_attrs->at(0));\n TYPE_ASSIGN_CHECK(*in_attrs, 0, out_attrs->at(0));\n TYPE_ASSIGN_CHECK(*in_attrs, 0, out_attrs->at(1));\n return out_attrs->at(0) != -1 && out_attrs->at(1) != -1;\n}\n\nstruct VarBroadcastKernel {\n template\n MSHADOW_XINLINE static void Map(int i,\n DType *out,\n const DType *data,\n const DType *mean,\n mshadow::Shape<6> data_shape,\n mshadow::Shape<6> mean_shape) {\n size_t data_idx = i;\n size_t mean_idx = i;\n size_t data_stride = 1;\n size_t mean_stride = 1;\n for (int axis = 5; axis >= 0; --axis) {\n size_t axis_idx = data_idx % data_shape[axis];\n mean_idx -= axis_idx * data_stride;\n if (mean_shape[axis] != 1) {\n mean_idx += axis_idx * mean_stride;\n }\n data_idx /= data_shape[axis];\n data_stride *= data_shape[axis];\n mean_stride *= mean_shape[axis];\n }\n DType res = (data[i] - mean[mean_idx]);\n out[i] = res * res;\n }\n};\n\ntemplate\ninline void MomentsForwardImpl(const OpContext& ctx,\n const std::vector& inputs,\n const std::vector& req,\n const std::vector& outputs,\n const dmlc::optional& axes,\n const bool keepdims) {\n using namespace mshadow;\n using namespace mshadow_op;\n using namespace mxnet_op;\n\n Stream *s = ctx.get_stream();\n\n const TBlob& data = inputs[0];\n const TBlob& mean = outputs[0];\n const TBlob& var = outputs[1];\n\n mxnet::TShape small;\n if (keepdims) {\n small = outputs[0].shape_;\n } else {\n small = ReduceAxesShapeImpl(inputs[0].shape_, axes, true, false);\n }\n\n ReduceAxesComputeImpl(ctx, {data}, {req[0]}, {mean}, small);\n MSHADOW_TYPE_SWITCH(data.type_flag_, DType, {\n Shape<6> data_shape, mean_shape;\n for (int i = 0; i < 6; ++i) {\n data_shape[i] = (i < data.shape_.ndim()) ? data.shape_[i] : 1;\n mean_shape[i] = (i < small.ndim()) ? small[i] : 1;\n }\n Tensor temp_data =\n ctx.requested[0].get_space_typed(Shape1(data.shape_.Size()), s);;\n Kernel::Launch(s, data.shape_.Size(), temp_data.dptr_,\n data.dptr(), mean.dptr(), data_shape, mean_shape);\n ReduceAxesComputeImpl(\n ctx, {TBlob(temp_data).reshape(data.shape_)}, {kWriteTo}, {var}, small);\n });\n}\n\ntemplate\ninline void MomentsForward(const nnvm::NodeAttrs& attrs,\n const OpContext& ctx,\n const std::vector& inputs,\n const std::vector& req,\n const std::vector& outputs) {\n using namespace mshadow;\n using namespace mshadow_op;\n using namespace mxnet_op;\n\n CHECK_EQ(inputs.size(), 1U);\n CHECK_EQ(outputs.size(), 2U);\n\n const MomentsParam& param = nnvm::get(attrs.parsed);\n\n MomentsForwardImpl(ctx, inputs, req, outputs, param.axes, param.keepdims);\n}\n\ntemplate\nstruct VarBackwardKernel {\n template\n MSHADOW_XINLINE static void Map(int i,\n DType *igrad,\n const DType *ograd,\n const DType *data,\n const DType *mean,\n mshadow::Shape<6> data_shape,\n mshadow::Shape<6> mean_shape,\n const float N,\n const float ddof = 0.0f) {\n size_t data_idx = i;\n size_t mean_idx = i;\n size_t data_stride = 1;\n size_t mean_stride = 1;\n for (int axis = 5; axis >= 0; --axis) {\n size_t axis_idx = data_idx % data_shape[axis];\n mean_idx -= axis_idx * data_stride;\n if (mean_shape[axis] != 1) {\n mean_idx += axis_idx * mean_stride;\n }\n data_idx /= data_shape[axis];\n data_stride *= data_shape[axis];\n mean_stride *= mean_shape[axis];\n }\n KERNEL_ASSIGN(igrad[i], req, ograd[mean_idx] * (data[i] - mean[mean_idx]) * 2 / (N - ddof));\n }\n};\n\ntemplate\ninline void MomentsBackwardImpl(const nnvm::NodeAttrs& attrs,\n const OpContext& ctx,\n const std::vector& inputs,\n const std::vector& req,\n const std::vector& outputs,\n const dmlc::optional& axes) {\n using namespace mshadow;\n using namespace mshadow::expr;\n using namespace mshadow_op;\n using namespace mxnet_op;\n\n Stream *s = ctx.get_stream();\n\n const TBlob& mean_grad = inputs[0];\n const TBlob& var_grad = inputs[1];\n const TBlob& data = inputs[2];\n const TBlob& mean = inputs[3];\n const TBlob& var = inputs[4];\n const TBlob& data_grad = outputs[0];\n\n mxnet::TShape small = ReduceAxesShapeImpl(data.shape_, axes, true, false);\n BroadcastComputeImpl(attrs, ctx, {mean_grad}, req, outputs, small);\n MSHADOW_TYPE_SWITCH(outputs[0].type_flag_, DType, {\n Tensor igrad = outputs[0].FlatTo1D(s);\n igrad /= scalar(outputs[0].Size()/inputs[0].Size());\n });\n\n Shape<6> data_shape, var_shape;\n float N = data_grad.Size() / var.Size();\n for (int i = 0; i < 6; ++i) {\n data_shape[i] = (i < data.shape_.ndim()) ? data.shape_[i] : 1;\n var_shape[i] = (i < small.ndim()) ? small[i] : 1;\n }\n MSHADOW_TYPE_SWITCH(data_grad.type_flag_, DType, {\n Kernel, xpu>::Launch(\n s, data_grad.shape_.Size(), data_grad.dptr(), var_grad.dptr(),\n data.dptr(), mean.dptr(), data_shape, var_shape, N);\n });\n}\n\ntemplate\ninline void MomentsBackward(const nnvm::NodeAttrs& attrs,\n const OpContext& ctx,\n const std::vector& inputs,\n const std::vector& req,\n const std::vector& outputs) {\n using namespace mshadow;\n using namespace mshadow_op;\n using namespace mxnet_op;\n\n CHECK_EQ(inputs.size(), 5U);\n CHECK_EQ(outputs.size(), 1U);\n\n const MomentsParam& param = nnvm::get(attrs.parsed);\n\n MomentsBackwardImpl(attrs, ctx, inputs, req, outputs, param.axes);\n}\n\n} // namespace op\n} // namespace mxnet\n#endif // MXNET_OPERATOR_NN_MOMENTS_INL_H_\n", "meta": {"content_hash": "1379c25c73b10bf4cbf94d1e3e5177af", "timestamp": "", "source": "github", "line_count": 237, "max_line_length": 96, "avg_line_length": 36.08438818565401, "alnum_prop": 0.5748362956033677, "repo_name": "reminisce/mxnet", "id": "6a9bdc54b9059e922e80bdd01e6bde06bf84326b", "size": "9359", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "src/operator/nn/moments-inl.h", "mode": "33188", "license": "apache-2.0", "language": [{"name": "ANTLR", "bytes": "1731"}, {"name": "Batchfile", "bytes": "13130"}, {"name": "C", "bytes": "215572"}, {"name": "C++", "bytes": "7680259"}, {"name": "CMake", "bytes": "99958"}, {"name": "Clojure", "bytes": "622688"}, {"name": "Cuda", "bytes": "970884"}, {"name": "Dockerfile", "bytes": "85151"}, {"name": "Groovy", "bytes": "122800"}, {"name": "HTML", "bytes": "40277"}, {"name": "Java", "bytes": "205196"}, {"name": "Julia", "bytes": "436326"}, {"name": "Jupyter Notebook", "bytes": "3660387"}, {"name": "MATLAB", "bytes": "34903"}, {"name": "Makefile", "bytes": "201597"}, {"name": "Perl", "bytes": "1550163"}, {"name": "Perl 6", "bytes": "7280"}, {"name": "PowerShell", "bytes": "13786"}, {"name": "Python", "bytes": "7842403"}, {"name": "R", "bytes": "357807"}, {"name": "Scala", "bytes": "1305036"}, {"name": "Shell", "bytes": "427407"}, {"name": "Smalltalk", "bytes": "3497"}]}}
{"text": "class DeviceSettingListener < AsakusaSatellite::Hook::Listener\n render_on :account_setting_item, :partial => \"device_setting\"\nend\n\n", "meta": {"content_hash": "46ad3aa3b2c9fc525d06733f4de789d0", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 63, "avg_line_length": 33.0, "alnum_prop": 0.7803030303030303, "repo_name": "mallowlabs/AsakusaSatellite", "id": "fc863576a1861c4131cf2c1c604d62a735622fb0", "size": "132", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "plugins/as_device_setting/lib/device_setting_listener.rb", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "4295"}, {"name": "JavaScript", "bytes": "70132"}, {"name": "Ruby", "bytes": "176805"}, {"name": "Shell", "bytes": "1621"}]}}
{"text": "require_relative '../../spec_helper'\n\nVALID_UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i\nUUID_STRING1 = 'de305d54-75b4-431b-adb2-eb6b9e546014'\nUUID_STRING2 = 'de305d54-75b4-431b-adb2-eb6b9e546020'\nUUID_PACKED_STRING1 = \"\\xde\\x30\\x5d\\x54\\x75\\xb4\\x43\\x1b\\xad\\xb2\\xeb\\x6b\\x9e\\x54\\x60\\x14\"\nUUID_PACKED_STRING2 = \"\\xde\\x30\\x5d\\x54\\x75\\xb4\\x43\\x1b\\xad\\xb2\\xeb\\x6b\\x9e\\x54\\x60\\x20\"\n\nRSpec.describe Lobster::Uuid do\n\n describe '::DEFAULT' do\n subject { Lobster::Uuid::DEFAULT }\n\n it 'is all zeroes' do\n expect(subject).to eq(\"\\x0\" * 16)\n end\n\n it 'is frozen' do\n is_expected.to be_frozen\n end\n end\n \n describe '#new' do\n context 'with a valid value' do\n subject(:uuid) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n\n describe 'the value' do\n subject { uuid.value }\n\n it 'is stored' do\n is_expected.to eq UUID_PACKED_STRING1\n end\n end\n end\n\n context 'with an invalid value' do\n it 'rejects a malformed string' do\n expect { Lobster::Uuid.new('foobar') }.to raise_error(ArgumentError)\n end\n end\n\n end\n\n context '.generate' do\n subject(:uuid) { Lobster::Uuid.generate }\n\n describe 'the value' do\n subject { uuid.value }\n\n # The chances of a randomly generated empty UUID is virtually impossible.\n # Besides, the UUID standards don't allow generated UUID to be all zeroes.\n it 'is random' do\n is_expected.not_to eq(\"\\x0\" * 16)\n end\n end\n\n describe 'the string' do\n subject { uuid.to_s }\n\n it 'is valid' do\n is_expected.to match VALID_UUID_REGEX\n end\n end\n end\n\n describe '.parse' do\n\n context 'with a valid UUID' do\n subject { Lobster::Uuid.parse(UUID_STRING1) }\n\n it 'parses correctly' do\n expect(subject.to_s).to eq(UUID_STRING1)\n end\n end\n\n context 'with a malformed string' do\n it 'returns nil' do\n expect(Lobster::Uuid.parse('foobar')).to be_nil\n end\n end\n\n context 'with an invalid argument' do\n it 'rejects a non-string' do\n expect { Lobster::Uuid.parse(5) }.to raise_error(ArgumentError)\n end\n end\n end\n\n describe '#value' do\n subject(:uuid) { Lobster::Uuid.new(UUID_PACKED_STRING1).value }\n\n it 'is a string' do\n is_expected.to be_a(String)\n end\n\n it 'is frozen' do\n is_expected.to be_frozen\n end\n\n describe '.length' do\n subject { uuid.length }\n\n it 'is 16 bytes' do\n is_expected.to be 16\n end\n end\n end\n\n describe '#eql?' do\n subject(:uuid) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n subject { uuid.eql?(other) }\n\n context 'with two identical UUIDs' do\n let(:other) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n\n it 'returns true' do\n is_expected.to eq true\n end\n end\n\n context 'with two different UUIDs' do\n let(:other) { Lobster::Uuid.new(UUID_PACKED_STRING2) }\n\n it 'returns false' do\n is_expected.to eq false\n end\n end\n\n context 'without a UUID' do\n let(:other) { 'foobar' }\n\n it 'returns false' do\n is_expected.to eq false\n end\n end\n end\n\n describe '#==' do\n subject { first == second }\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n\n context 'with equal UUIDs' do\n let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n it 'is true' do\n is_expected.to be true\n end\n end\n\n context 'with the same instance' do\n let(:second) { first }\n it 'is true' do\n is_expected.to be true\n end\n end\n\n context 'with unequal UUIDs' do\n let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING2) }\n it 'is false' do\n is_expected.to be false\n end\n end\n\n context 'with nil' do\n let(:second) { nil }\n it 'is false' do\n is_expected.to be false\n end\n end\n\n context 'with a malformed string' do\n let(:second) { 'foobar' }\n it 'is false' do\n is_expected.to be false\n end\n end\n\n context 'with a non-string' do\n let(:second) { 5 }\n it 'is false' do\n is_expected.to be false\n end\n end\n\n context 'with identical value' do\n let(:second) { first.value }\n it 'is true' do\n is_expected.to be true\n end\n end\n\n context 'with identical string' do\n let(:second) { first.to_s }\n it 'is true' do\n is_expected.to be true\n end\n end\n end\n\n describe '#<=>' do\n subject { first <=> second }\n\n context 'with an equal UUID' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n it 'is 0' do\n is_expected.to eq 0\n end\n end\n\n context 'with the same instance' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n let(:second) { first }\n it 'is 0' do\n is_expected.to eq 0\n end\n end\n\n context 'with a lesser UUID' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING2) }\n let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n it 'is 1' do\n is_expected.to eq 1\n end\n end\n\n context 'with a greater UUID' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING2) }\n it 'is -1' do\n is_expected.to eq(-1)\n end\n end\n\n context 'with nil' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n let(:second) { nil }\n it 'is nil' do\n is_expected.to be_nil\n end\n end\n\n context 'with a number' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n let(:second) { 500 }\n it 'is nil' do\n is_expected.to be_nil\n end\n end\n\n context 'with an identical value' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n let(:second) { UUID_PACKED_STRING1 }\n it 'is 0' do\n is_expected.to eq 0\n end\n end\n\n context 'with a lesser value' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING2) }\n let(:second) { UUID_PACKED_STRING1 }\n it 'is 1' do\n is_expected.to eq 1\n end\n end\n\n context 'with a greater value' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n let(:second) { UUID_PACKED_STRING2 }\n it 'is -1' do\n is_expected.to eq(-1)\n end\n end\n\n context 'with an equal string' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n let(:second) { UUID_STRING1 }\n it 'is 0' do\n is_expected.to eq 0\n end\n end\n\n context 'with a lesser string' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING2) }\n let(:second) { UUID_STRING1 }\n it 'is 1' do\n is_expected.to eq 1\n end\n end\n\n context 'with a greater string' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1) }\n let(:second) { UUID_STRING2 }\n it 'is -1' do\n is_expected.to eq(-1)\n end\n end\n\n context 'with an invalid string' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING2) }\n let(:second) { 'foobar' }\n it 'is nil' do\n is_expected.to be_nil\n end\n end\n end\n\n describe '#hash' do\n subject { Lobster::Uuid.new(UUID_PACKED_STRING1).hash }\n\n it 'is a Fixnum' do\n is_expected.to be_a(Fixnum)\n end\n\n context 'with identical UUIDs' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1).hash }\n let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING1).hash }\n\n it 'returns identical values' do\n expect(first).to eq(second)\n end\n end\n\n context 'with different UUIDs' do\n let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1).hash }\n let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING2).hash }\n\n it 'returns different values' do\n expect(first).to_not eq(second)\n end\n end\n end\n\n describe '#to_s' do\n subject { Lobster::Uuid.new(UUID_PACKED_STRING1).to_s }\n\n it 'is a String' do\n is_expected.to be_a String\n end\n\n it 'is a valid UUID string' do\n is_expected.to match(VALID_UUID_REGEX)\n end\n\n it 'equals the initial value' do\n is_expected.to eq(UUID_STRING1)\n end\n\n context 'with bytes less than 16' do\n subject { Lobster::Uuid.new(\"\\x05\\x30\\x5d\\x54\\x75\\x02\\x43\\x1b\\xad\\xb2\\xeb\\x6b\\x9e\\x54\\x60\\x00\").to_s }\n\n it 'pads with zeroes' do\n is_expected.to eq('05305d54-7502-431b-adb2-eb6b9e546000')\n end\n end\n end\n\nend\n", "meta": {"content_hash": "1642c878d4fcdc5ebd2a9e8b8905586d", "timestamp": "", "source": "github", "line_count": 357, "max_line_length": 108, "avg_line_length": 23.946778711484594, "alnum_prop": 0.5853316177330682, "repo_name": "gachapon/lobster-common", "id": "ed5b0f0b607bf7c015be4f064dfa501f5129bfd2", "size": "8549", "binary": false, "copies": "1", "ref": "refs/heads/dev", "path": "spec/lib/lobster/uuid_spec.rb", "mode": "33188", "license": "mit", "language": [{"name": "Ruby", "bytes": "44314"}]}}
{"text": "package com.asksunny.schema.parser;\r\n\r\nimport java.util.HashMap;\r\nimport java.util.Map;\r\nimport java.util.Set;\r\n\r\npublic class KeywordDictionary extends HashMap {\r\n\r\n\t/**\r\n\t * \r\n\t */\r\n\tprivate static final long serialVersionUID = 1L;\r\n\r\n\tpublic KeywordDictionary() {\r\n\t\tthis.put(\"CREATE\", Keyword.CREATE);\r\n\t\tthis.put(\"TABLE\", Keyword.TABLE);\r\n\t\tthis.put(\"NOT\", Keyword.NOT);\r\n\t\tthis.put(\"NULL\", Keyword.NULL);\r\n\t\tthis.put(\"PRIMARY\", Keyword.PRIMARY);\r\n\t\tthis.put(\"KEY\", Keyword.KEY);\r\n\t\tthis.put(\"VARCHAR\", Keyword.VARCHAR);\r\n\t\tthis.put(\"NUMBER\", Keyword.NUMBER);\r\n\t\tthis.put(\"INT\", Keyword.INT);\r\n\t\tthis.put(\"BIGINT\", Keyword.BIGINT);\r\n\t\tthis.put(\"INTEGER\", Keyword.INTEGER);\r\n\t\tthis.put(\"DOUBLE\", Keyword.DOUBLE);\r\n\t\tthis.put(\"VARCHAR2\", Keyword.VARCHAR);\r\n\t\tthis.put(\"BINARY\", Keyword.BINARY);\r\n\t\tthis.put(\"LONG\", Keyword.LONG);\r\n\t\tthis.put(\"DATE\", Keyword.DATE);\r\n\t\tthis.put(\"TIME\", Keyword.TIME);\r\n\t\tthis.put(\"TIMESTAMP\", Keyword.TIMESTAMP);\r\n\t\tthis.put(\"ALTER\", Keyword.ALTER);\r\n\t\tthis.put(\"ADD\", Keyword.ADD);\r\n\t\tthis.put(\"CHAR\", Keyword.CHAR);\r\n\t\tthis.put(\"CONSTRAINT\", Keyword.CONSTRAINT);\r\n\t\tthis.put(\"FOREIGN\", Keyword.FOREIGN);\r\n\t\tthis.put(\"REFERENCES\", Keyword.REFERENCES);\r\n\t\tthis.put(\"UNIQUE\", Keyword.UNIQUE);\r\n\t\tthis.put(\"INDEX\", Keyword.INDEX);\r\n\t\tthis.put(\"BYTE\", Keyword.BYTE);\r\n\t\tthis.put(\"NOPARALLELCREATE\", Keyword.CREATE);\r\n\t\tthis.put(\"NOPARALLEL\", Keyword.NOPARALLEL);\r\n\t\tthis.put(\"PARALLEL\", Keyword.PARALLEL);\r\n\t\tthis.put(\"*\", Keyword.ASTERISK);\r\n\t\tthis.put(\"IMAGE\", Keyword.IMAGE);\r\n\t\tthis.put(\"TEXT\", Keyword.TEXT);\r\n\t\tthis.put(\"IDENTITY\", Keyword.IDENTITY);\r\n\t\tthis.put(\"AUTOINCREMENT\", Keyword.IDENTITY);\r\n\t\tthis.put(\"AUTO_INCREMENT\", Keyword.IDENTITY);\r\n\t\tthis.put(\"DEFAULT\", Keyword.DEFAULT);\r\n\t\tthis.put(\"COLUMN_FORMAT\", Keyword.FORMAT);\r\n\t\tthis.put(\"FORMAT\", Keyword.FORMAT);\t\t\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\r\n\t@Override\r\n\tpublic Keyword get(Object key) {\r\n\t\t\r\n\t\treturn super.get(key.toString().toUpperCase());\r\n\t}\r\n\r\n\t@Override\r\n\tpublic Keyword put(String key, Keyword value) {\r\n\t\treturn super.put(key.toUpperCase(), value);\r\n\t}\r\n\r\n\t@Override\r\n\tpublic void putAll(Map extends String, ? extends Keyword> m) {\r\n\t\tSet extends String> keys = m.keySet();\r\n\t\tfor (String string : keys) {\r\n\t\t\tsuper.put(string.toUpperCase(), m.get(string));\r\n\t\t}\r\n\t}\r\n\r\n\t@Override\r\n\tpublic boolean containsKey(Object key) {\r\n\t\t\r\n\t\treturn super.containsKey(key.toString().toUpperCase());\r\n\t}\r\n\r\n}\r\n", "meta": {"content_hash": "17e0844e355090632f0e6aef8dd4ab5e", "timestamp": "", "source": "github", "line_count": 84, "max_line_length": 65, "avg_line_length": 28.75, "alnum_prop": 0.6650103519668737, "repo_name": "devsunny/jscaffold", "id": "0e5042958a41441b8acf16b22b7e71f333e3239b", "size": "2415", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/asksunny/schema/parser/KeywordDictionary.java", "mode": "33188", "license": "mit", "language": [{"name": "FreeMarker", "bytes": "37206"}, {"name": "Java", "bytes": "312644"}]}}
{"text": "\n#include \"arm_math.h\"\n\n/** \n * @ingroup groupMath \n */\n\n/** \n * @defgroup offset Vector Offset \n * \n * Adds a constant offset to each element of a vector. \n * \n * \n * pDst[n] = pSrc[n] + offset, 0 <= n < blockSize. \n *
\n * \n * There are separate functions for floating-point, Q7, Q15, and Q31 data types. \n */\n\n/** \n * @addtogroup offset \n * @{ \n */\n\n/** \n * @brief Adds a constant offset to a floating-point vector. \n * @param[in] *pSrc points to the input vector \n * @param[in] offset is the offset to be added \n * @param[out] *pDst points to the output vector \n * @param[in] blockSize number of samples in the vector \n * @return none. \n */\n\n\nvoid arm_offset_f32(\n float32_t * pSrc,\n float32_t offset,\n float32_t * pDst,\n uint32_t blockSize)\n{\n uint32_t blkCnt; /* loop counter */\n\n#ifndef ARM_MATH_CM0\n\n/* Run the below code for Cortex-M4 and Cortex-M3 */\n float32_t in1, in2, in3, in4;\n\n /*loop Unrolling */\n blkCnt = blockSize >> 2u;\n\n /* First part of the processing with loop unrolling. Compute 4 outputs at a time. \n ** a second loop below computes the remaining 1 to 3 samples. */\n while(blkCnt > 0u)\n {\n /* C = A + offset */\n /* Add offset and then store the results in the destination buffer. */\n /* read samples from source */\n in1 = *pSrc;\n in2 = *(pSrc + 1);\n\n /* add offset to input */\n in1 = in1 + offset;\n\n /* read samples from source */\n in3 = *(pSrc + 2);\n\n /* add offset to input */\n in2 = in2 + offset;\n\n /* read samples from source */\n in4 = *(pSrc + 3);\n\n /* add offset to input */\n in3 = in3 + offset;\n\n /* store result to destination */\n *pDst = in1;\n\n /* add offset to input */\n in4 = in4 + offset;\n\n /* store result to destination */\n *(pDst + 1) = in2;\n\n /* store result to destination */\n *(pDst + 2) = in3;\n\n /* store result to destination */\n *(pDst + 3) = in4;\n\n /* update pointers to process next samples */\n pSrc += 4u;\n pDst += 4u;\n\n /* Decrement the loop counter */\n blkCnt--;\n }\n\n /* If the blockSize is not a multiple of 4, compute any remaining output samples here. \n ** No loop unrolling is used. */\n blkCnt = blockSize % 0x4u;\n\n#else\n\n /* Run the below code for Cortex-M0 */\n\n /* Initialize blkCnt with number of samples */\n blkCnt = blockSize;\n\n#endif /* #ifndef ARM_MATH_CM0 */\n\n while(blkCnt > 0u)\n {\n /* C = A + offset */\n /* Add offset and then store the result in the destination buffer. */\n *pDst++ = (*pSrc++) + offset;\n\n /* Decrement the loop counter */\n blkCnt--;\n }\n}\n\n/** \n * @} end of offset group \n */\n", "meta": {"content_hash": "f2b978d8b36fff3a0eae28c44484593c", "timestamp": "", "source": "github", "line_count": 125, "max_line_length": 96, "avg_line_length": 22.592, "alnum_prop": 0.5439093484419264, "repo_name": "jys0305/highspeedlogger", "id": "d7ca663bbddb46767e61f4c926942e9b5892f6e8", "size": "3945", "binary": false, "copies": "56", "ref": "refs/heads/master", "path": "sw/libs/STM32F4xx_DSP_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/DSP_Lib/Source/BasicMathFunctions/arm_offset_f32.c", "mode": "33188", "license": "mit", "language": [{"name": "Assembly", "bytes": "280928"}, {"name": "C", "bytes": "21114329"}, {"name": "C++", "bytes": "100991"}, {"name": "HTML", "bytes": "455966"}, {"name": "LSL", "bytes": "47664"}, {"name": "Makefile", "bytes": "4331"}, {"name": "Objective-C", "bytes": "1718"}]}}
{"text": "\n\npackage javassist.bytecode.stackmap;\n\nimport javassist.bytecode.*;\nimport java.util.HashMap;\nimport java.util.ArrayList;\n\n/**\n * A basic block is a sequence of bytecode that does not contain jump/branch\n * instructions except at the last bytecode.\n * Since Java7 or later does not allow JSR, this class throws an exception when\n * it finds JSR.\n */\npublic class BasicBlock {\n static class JsrBytecode extends BadBytecode {\n JsrBytecode() { super(\"JSR\"); }\n }\n\n protected int position, length;\n protected int incoming; // the number of incoming branches.\n protected BasicBlock[] exit; // null if the block is a leaf.\n protected boolean stop; // true if the block ends with an unconditional jump. \n protected Catch toCatch;\n\n protected BasicBlock(int pos) {\n position = pos;\n length = 0;\n incoming = 0;\n }\n\n public static BasicBlock find(BasicBlock[] blocks, int pos)\n throws BadBytecode\n {\n for (int i = 0; i < blocks.length; i++) {\n int iPos = blocks[i].position;\n if (iPos <= pos && pos < iPos + blocks[i].length)\n return blocks[i];\n }\n\n throw new BadBytecode(\"no basic block at \" + pos);\n }\n\n public static class Catch {\n public Catch next;\n public BasicBlock body;\n public int typeIndex;\n Catch(BasicBlock b, int i, Catch c) {\n body = b;\n typeIndex = i;\n next = c;\n }\n }\n\n public String toString() {\n StringBuffer sbuf = new StringBuffer();\n String cname = this.getClass().getName();\n int i = cname.lastIndexOf('.');\n sbuf.append(i < 0 ? cname : cname.substring(i + 1));\n sbuf.append(\"[\");\n toString2(sbuf);\n sbuf.append(\"]\");\n return sbuf.toString();\n }\n\n protected void toString2(StringBuffer sbuf) {\n sbuf.append(\"pos=\").append(position).append(\", len=\")\n .append(length).append(\", in=\").append(incoming)\n .append(\", exit{\");\n if (exit != null) {\n for (int i = 0; i < exit.length; i++)\n sbuf.append(exit[i].position).append(\",\");\n }\n\n sbuf.append(\"}, {\");\n Catch th = toCatch;\n while (th != null) {\n sbuf.append(\"(\").append(th.body.position).append(\", \")\n .append(th.typeIndex).append(\"), \");\n th = th.next;\n }\n\n sbuf.append(\"}\");\n }\n\n static class Mark implements Comparable {\n int position;\n BasicBlock block;\n BasicBlock[] jump;\n boolean alwaysJmp; // true if an unconditional branch.\n int size; // 0 unless the mark indicates RETURN etc. \n Catch catcher;\n\n Mark(int p) {\n position = p;\n block = null;\n jump = null;\n alwaysJmp = false;\n size = 0;\n catcher = null;\n }\n\n public int compareTo(Object obj) {\n if (obj instanceof Mark) {\n int pos = ((Mark)obj).position;\n return position - pos;\n }\n\n return -1;\n }\n\n void setJump(BasicBlock[] bb, int s, boolean always) {\n jump = bb;\n size = s;\n alwaysJmp = always;\n }\n }\n\n public static class Maker {\n /* Override these two methods if a subclass of BasicBlock must be\n * instantiated.\n */\n protected BasicBlock makeBlock(int pos) {\n return new BasicBlock(pos);\n }\n\n protected BasicBlock[] makeArray(int size) {\n return new BasicBlock[size];\n }\n\n private BasicBlock[] makeArray(BasicBlock b) {\n BasicBlock[] array = makeArray(1);\n array[0] = b;\n return array;\n }\n\n private BasicBlock[] makeArray(BasicBlock b1, BasicBlock b2) {\n BasicBlock[] array = makeArray(2);\n array[0] = b1;\n array[1] = b2;\n return array;\n }\n\n public BasicBlock[] make(MethodInfo minfo) throws BadBytecode {\n CodeAttribute ca = minfo.getCodeAttribute();\n if (ca == null)\n return null;\n\n CodeIterator ci = ca.iterator();\n return make(ci, 0, ci.getCodeLength(), ca.getExceptionTable());\n }\n\n public BasicBlock[] make(CodeIterator ci, int begin, int end,\n ExceptionTable et)\n throws BadBytecode\n {\n HashMap marks = makeMarks(ci, begin, end, et);\n BasicBlock[] bb = makeBlocks(marks);\n addCatchers(bb, et);\n return bb;\n }\n\n /* Branch target\n */\n private Mark makeMark(HashMap table, int pos) {\n return makeMark0(table, pos, true, true);\n }\n\n /* Branch instruction.\n * size > 0\n */\n private Mark makeMark(HashMap table, int pos, BasicBlock[] jump,\n int size, boolean always) {\n Mark m = makeMark0(table, pos, false, false);\n m.setJump(jump, size, always);\n return m;\n }\n\n private Mark makeMark0(HashMap table, int pos,\n boolean isBlockBegin, boolean isTarget) {\n Integer p = new Integer(pos);\n Mark m = (Mark)table.get(p);\n if (m == null) {\n m = new Mark(pos);\n table.put(p, m);\n }\n\n if (isBlockBegin) {\n if (m.block == null)\n m.block = makeBlock(pos);\n\n if (isTarget)\n m.block.incoming++;\n }\n\n return m;\n }\n\n private HashMap makeMarks(CodeIterator ci, int begin, int end,\n ExceptionTable et)\n throws BadBytecode\n {\n ci.begin();\n ci.move(begin);\n HashMap marks = new HashMap();\n while (ci.hasNext()) {\n int index = ci.next();\n if (index >= end)\n break;\n\n int op = ci.byteAt(index);\n if ((Opcode.IFEQ <= op && op <= Opcode.IF_ACMPNE)\n || op == Opcode.IFNULL || op == Opcode.IFNONNULL) {\n Mark to = makeMark(marks, index + ci.s16bitAt(index + 1));\n Mark next = makeMark(marks, index + 3);\n makeMark(marks, index, makeArray(to.block, next.block), 3, false);\n }\n else if (Opcode.GOTO <= op && op <= Opcode.LOOKUPSWITCH)\n switch (op) {\n case Opcode.GOTO :\n makeGoto(marks, index, index + ci.s16bitAt(index + 1), 3);\n break;\n case Opcode.JSR :\n makeJsr(marks, index, index + ci.s16bitAt(index + 1), 3);\n break;\n case Opcode.RET :\n makeMark(marks, index, null, 2, true);\n break;\n case Opcode.TABLESWITCH : {\n int pos = (index & ~3) + 4;\n int low = ci.s32bitAt(pos + 4);\n int high = ci.s32bitAt(pos + 8);\n int ncases = high - low + 1;\n BasicBlock[] to = makeArray(ncases + 1);\n to[0] = makeMark(marks, index + ci.s32bitAt(pos)).block; // default branch target\n int p = pos + 12;\n int n = p + ncases * 4;\n int k = 1;\n while (p < n) {\n to[k++] = makeMark(marks, index + ci.s32bitAt(p)).block;\n p += 4;\n }\n makeMark(marks, index, to, n - index, true);\n break; }\n case Opcode.LOOKUPSWITCH : {\n int pos = (index & ~3) + 4;\n int ncases = ci.s32bitAt(pos + 4);\n BasicBlock[] to = makeArray(ncases + 1);\n to[0] = makeMark(marks, index + ci.s32bitAt(pos)).block; // default branch target\n int p = pos + 8 + 4;\n int n = p + ncases * 8 - 4;\n int k = 1;\n while (p < n) {\n to[k++] = makeMark(marks, index + ci.s32bitAt(p)).block;\n p += 8;\n }\n makeMark(marks, index, to, n - index, true);\n break; }\n }\n else if ((Opcode.IRETURN <= op && op <= Opcode.RETURN) || op == Opcode.ATHROW)\n makeMark(marks, index, null, 1, true);\n else if (op == Opcode.GOTO_W)\n makeGoto(marks, index, index + ci.s32bitAt(index + 1), 5);\n else if (op == Opcode.JSR_W)\n makeJsr(marks, index, index + ci.s32bitAt(index + 1), 5);\n else if (op == Opcode.WIDE && ci.byteAt(index + 1) == Opcode.RET)\n makeMark(marks, index, null, 4, true);\n }\n\n if (et != null) {\n int i = et.size();\n while (--i >= 0) {\n makeMark0(marks, et.startPc(i), true, false);\n makeMark(marks, et.handlerPc(i));\n }\n }\n\n return marks;\n }\n\n private void makeGoto(HashMap marks, int pos, int target, int size) {\n Mark to = makeMark(marks, target);\n BasicBlock[] jumps = makeArray(to.block);\n makeMark(marks, pos, jumps, size, true);\n }\n\n /*\n * We could ignore JSR since Java 7 or later does not allow it.\n * See The JVM Spec. Sec. 4.10.2.5.\n */\n protected void makeJsr(HashMap marks, int pos, int target, int size) throws BadBytecode {\n /*\n Mark to = makeMark(marks, target);\n Mark next = makeMark(marks, pos + size);\n BasicBlock[] jumps = makeArray(to.block, next.block);\n makeMark(marks, pos, jumps, size, false);\n */\n throw new JsrBytecode();\n }\n\n private BasicBlock[] makeBlocks(HashMap markTable) {\n Mark[] marks = (Mark[])markTable.values()\n .toArray(new Mark[markTable.size()]);\n java.util.Arrays.sort(marks);\n ArrayList blocks = new ArrayList();\n int i = 0;\n BasicBlock prev;\n if (marks.length > 0 && marks[0].position == 0 && marks[0].block != null)\n prev = getBBlock(marks[i++]);\n else\n prev = makeBlock(0);\n\n blocks.add(prev);\n while (i < marks.length) {\n Mark m = marks[i++];\n BasicBlock bb = getBBlock(m);\n if (bb == null) {\n // the mark indicates a branch instruction\n if (prev.length > 0) {\n // the previous mark already has exits.\n prev = makeBlock(prev.position + prev.length);\n blocks.add(prev);\n }\n\n prev.length = m.position + m.size - prev.position;\n prev.exit = m.jump;\n prev.stop = m.alwaysJmp;\n }\n else {\n // the mark indicates a branch target\n if (prev.length == 0) {\n prev.length = m.position - prev.position;\n bb.incoming++;\n prev.exit = makeArray(bb);\n }\n else {\n // the previous mark already has exits.\n int prevPos = prev.position;\n if (prevPos + prev.length < m.position) {\n prev = makeBlock(prevPos + prev.length);\n prev.length = m.position - prevPos;\n // the incoming flow from dead code is not counted\n // bb.incoming++;\n prev.exit = makeArray(bb);\n }\n }\n\n blocks.add(bb);\n prev = bb;\n }\n }\n\n return (BasicBlock[])blocks.toArray(makeArray(blocks.size()));\n }\n\n private static BasicBlock getBBlock(Mark m) {\n BasicBlock b = m.block;\n if (b != null && m.size > 0) {\n b.exit = m.jump;\n b.length = m.size;\n b.stop = m.alwaysJmp;\n }\n\n return b;\n }\n\n private void addCatchers(BasicBlock[] blocks, ExceptionTable et)\n throws BadBytecode\n {\n if (et == null)\n return;\n\n int i = et.size();\n while (--i >= 0) {\n BasicBlock handler = find(blocks, et.handlerPc(i));\n int start = et.startPc(i);\n int end = et.endPc(i);\n int type = et.catchType(i);\n handler.incoming--;\n for (int k = 0; k < blocks.length; k++) {\n BasicBlock bb = blocks[k];\n int iPos = bb.position;\n if (start <= iPos && iPos < end) {\n bb.toCatch = new Catch(handler, type, bb.toCatch);\n handler.incoming++;\n }\n }\n }\n }\n }\n}\n", "meta": {"content_hash": "f1a0cceb83de5d2bb6046c9fcb64b93d", "timestamp": "", "source": "github", "line_count": 391, "max_line_length": 107, "avg_line_length": 35.18414322250639, "alnum_prop": 0.4474085919895326, "repo_name": "oneliang/third-party-lib", "id": "6213e22a64b2b627e9be31e387205d826fb1866d", "size": "14461", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "javassist/javassist/bytecode/stackmap/BasicBlock.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "HTML", "bytes": "31084"}, {"name": "Java", "bytes": "14382753"}]}}
{"text": "/* System calls. */\n#define SEND\t\t 1\t/* function code for sending messages */\n#define RECEIVE\t\t 2\t/* function code for receiving messages */\n#define BOTH\t\t 3\t/* function code for SEND + RECEIVE */\n#define ANY (NR_PROCS+100)\t/* receive(ANY, buf) accepts from any source */\n\n/* Task numbers, function codes and reply codes. */\n\n#define TTY -NR_TASKS\t/* terminal I/O class */\n#\tdefine TTY_READ\t 3\t/* fcn code for reading from tty */\n#\tdefine TTY_WRITE 4\t/* fcn code for writing to tty */\n#\tdefine TTY_IOCTL 5\t/* fcn code for ioctl */\n#\tdefine TTY_SETPGRP 6\t/* fcn code for setpgrp */\n#\tdefine TTY_OPEN 7\t/* fcn code for opening tty */\n#\tdefine TTY_CLOSE 8\t/* fcn code for closing tty */\n#\tdefine SUSPEND\t -998\t/* used in interrupts when tty has no data */\n\n#ifdef AM_KERNEL\n#define\tAMOEBA\n#endif\n\n#ifdef AMOEBA\n\n/* There are AM_NTASK copies of the amoeba kernel task.\n * If you change AM_NTASKS be sure to adjust kernel/table.c and fs/table.c\n */\n#define AM_NTASKS\t 4\t/* number of kernel tasks of this class */\n\n#define\tAMINT_CLASS\t (TTY+1)\t/* Amoeba event handler */\n#define AMOEBA_CLASS \t (AMINT_CLASS+AM_NTASKS) /* transaction handlers */\n#\tdefine ETHER_ARRIV 1\t/* fcn code for packet arrival */\n#\tdefine AM_TRANS 2\t/* amoeba transaction */\t\t\n#\tdefine AM_GETREQ 3\t/* amoeba getrequest */\n#\tdefine AM_PUTREP 4\t/* amoeba putrep */\n#\tdefine AM_REVIVE 6\t/* used by kernel task to revive luser task */\n#\tdefine AM_TIMEOUT 8\t/* used to talk to clock task */\n#\tdefine AM_PUTSIG 9\t/* when the luser hits the DEL ! */\n#\tdefine AM_TASK_DIED 10 /* sent if task died during a transaction */\n\n#else\t/* if AMOEBA not defined */\n\n#define\tAMOEBA_CLASS\tTTY\n\n#endif /* AMOEBA */\n\n/*\n * New class definitions should go here and should be defined relative\n * to AMOEBA_CLASS (ie. as AMOEBA_CLASS+n, for the nth task added).\n */\n\n#define IDLE (AMOEBA_CLASS+1)\t/* task to run when there's nothing to run */\n\n#define PRINTER -7\t\t/* printer I/O class */\n/* The printer uses the same commands as TTY. */\n\n#define WINCHESTER -6\t/* winchester (hard) disk class */\n#define FLOPPY -5\t/* floppy disk class */\n#\tdefine DISK_READ 3\t/* fcn code to DISK (must equal TTY_READ) */\n#\tdefine DISK_WRITE 4\t/* fcn code to DISK (must equal TTY_WRITE) */\n#\tdefine DISK_IOCTL 5\t/* fcn code for setting up RAM disk */\n#\tdefine SCATTERED_IO 6\t/* fcn code for multiple reads/writes */\n#\tdefine OPTIONAL_IO 16\t/* modifier to DISK_* codes within vector */\n\n#define MEM -4\t/* /dev/ram, /dev/(k)mem and /dev/null class */\n#\tdefine RAM_DEV 0\t/* minor device for /dev/ram */\n#\tdefine MEM_DEV 1\t/* minor device for /dev/mem */\n#\tdefine KMEM_DEV 2\t/* minor device for /dev/kmem */\n#\tdefine NULL_DEV 3\t/* minor device for /dev/null */\n#if (CHIP == INTEL)\n#\tdefine PORT_DEV 4\t/* minor device for /dev/port */\n#endif\n\n#define CLOCK -3\t/* clock class */\n#\tdefine SET_ALARM 1\t/* fcn code to CLOCK, set up alarm */\n#\tdefine GET_TIME\t 3\t/* fcn code to CLOCK, get real time */\n#\tdefine SET_TIME\t 4\t/* fcn code to CLOCK, set real time */\n#\tdefine REAL_TIME 1\t/* reply from CLOCK: here is real time */\n\n#define SYSTASK -2\t/* internal functions */\n#\tdefine SYS_XIT 1\t/* fcn code for sys_xit(parent, proc) */\n#\tdefine SYS_GETSP 2\t/* fcn code for sys_sp(proc, &new_sp) */\n#\tdefine SYS_SIG 3\t/* fcn code for sys_sig(proc, sig) */\n#\tdefine SYS_FORK 4\t/* fcn code for sys_fork(parent, child) */\n#\tdefine SYS_NEWMAP 5\t/* fcn code for sys_newmap(procno, map_ptr) */\n#\tdefine SYS_COPY 6\t/* fcn code for sys_copy(ptr) */\n#\tdefine SYS_EXEC 7\t/* fcn code for sys_exec(procno, new_sp) */\n#\tdefine SYS_TIMES 8\t/* fcn code for sys_times(procno, bufptr) */\n#\tdefine SYS_ABORT 9\t/* fcn code for sys_abort() */\n#\tdefine SYS_FRESH 10\t/* fcn code for sys_fresh() (Atari only) */\n#\tdefine SYS_KILL 11\t/* fcn code for sys_kill(proc, sig) */\n#\tdefine SYS_GBOOT 12\t/* fcn code for sys_gboot(procno, bootptr) */\n#\tdefine SYS_UMAP 13\t/* fcn code for sys_umap(procno, etc) */\n#\tdefine SYS_MEM 14\t/* fcn code for sys_mem() */\n#\tdefine SYS_TRACE 15\t/* fcn code for sys_trace(req,pid,addr,data) */\n\n#define HARDWARE -1\t/* used as source on interrupt generated msgs*/\n\n/* Names of message fields for messages to CLOCK task. */\n#define DELTA_TICKS m6_l1\t/* alarm interval in clock ticks */\n#define FUNC_TO_CALL m6_f1\t/* pointer to function to call */\n#define NEW_TIME m6_l1\t/* value to set clock to (SET_TIME) */\n#define CLOCK_PROC_NR m6_i1\t/* which proc (or task) wants the alarm? */\n#define SECONDS_LEFT m6_l1\t/* how many seconds were remaining */\n\n/* Names of message fields used for messages to block and character tasks. */\n#define DEVICE m2_i1\t/* major-minor device */\n#define PROC_NR m2_i2\t/* which (proc) wants I/O? */\n#define COUNT m2_i3\t/* how many bytes to transfer */\n#define POSITION m2_l1\t/* file offset */\n#define ADDRESS m2_p1\t/* core buffer address */\n\n/* Names of message fields for messages to TTY task. */\n#define TTY_LINE m2_i1\t/* message parameter: terminal line */\n#define TTY_REQUEST m2_i3\t/* message parameter: ioctl request code */\n#define TTY_SPEK m2_l1\t/* message parameter: ioctl speed, erasing */\n#define TTY_FLAGS m2_l2\t/* message parameter: ioctl tty mode */\n#define TTY_PGRP m2_i3 /* message parameter: process group */\n\n/* Names of messages fields used in reply messages from tasks. */\n#define REP_PROC_NR m2_i1\t/* # of proc on whose behalf I/O was done */\n#define REP_STATUS m2_i2\t/* bytes transferred or error number */\n\n/* Names of fields for copy message to SYSTASK. */\n#define SRC_SPACE m5_c1\t/* T or D space (stack is also D) */\n#define SRC_PROC_NR m5_i1\t/* process to copy from */\n#define SRC_BUFFER m5_l1\t/* virtual address where data come from */\n#define DST_SPACE m5_c2\t/* T or D space (stack is also D) */\n#define DST_PROC_NR m5_i2\t/* process to copy to */\n#define DST_BUFFER m5_l2\t/* virtual address where data go to */\n#define COPY_BYTES m5_l3\t/* number of bytes to copy */\n\n/* Field names for accounting, SYSTASK and miscellaneous. */\n#define USER_TIME m4_l1\t/* user time consumed by process */\n#define SYSTEM_TIME m4_l2\t/* system time consumed by process */\n#define CHILD_UTIME m4_l3\t/* user time consumed by process' children */\n#define CHILD_STIME m4_l4\t/* sys time consumed by process' children */\n\n#define PROC1 m1_i1\t/* indicates a process */\n#define PROC2 m1_i2\t/* indicates a process */\n#define PID m1_i3\t/* process id passed from MM to kernel */\n#define STACK_PTR m1_p1\t/* used for stack ptr in sys_exec, sys_getsp */\n#define PR m6_i1\t/* process number for sys_sig */\n#define SIGNUM m6_i2\t/* signal number for sys_sig */\n#define FUNC m6_f1\t/* function pointer for sys_sig */\n#define MEM_PTR m1_p1\t/* tells where memory map is for sys_newmap */\n#define CANCEL 0 /* general request to force a task to cancel */\n#define SIG_MAP m1_i2\t/* used by kernel for passing signal bit map */\n\n#ifdef AMOEBA\n\n/* Names of message fields for amoeba tasks */\n#define\tAM_OP\t\tm2_i1\t/* one of the above operators */\n#define\tAM_PROC_NR\tm2_i2\t/* process # of proc doing operation */\n#define\tAM_COUNT\tm2_i3\t/* size of buffer for operation */\n#define\tAM_ADDRESS\tm2_p1\t/* address of buffer for operation */\n\n/* For communication between MM and AMOEBA_CLASS kernel tasks */\n#define\tAM_STATUS\tm2_i3\t/* same use as REP_STATUS but for amoeba */\n#define\tAM_FREE_IT\tm2_l1\t/* 1=not a getreq, 0=is a getreq */\n\n/* Special for passing a physical address from the ethernet driver */\n#define\tAM_PADDR\tm2_l1\t/* to the transaction layer */\n\n#endif /* AMOEBA */\n\n#define HARD_INT 2\t/* fcn code for all hardware interrupts */\n", "meta": {"content_hash": "f9df1ef6dac46637021009afd24c97de", "timestamp": "", "source": "github", "line_count": 166, "max_line_length": 79, "avg_line_length": 47.506024096385545, "alnum_prop": 0.6505199086989601, "repo_name": "macminix/MacMinix", "id": "2096f8ba765448daed32f1f58c71692b6eaa5fdd", "size": "7886", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "include/minix/com.h", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "Assembly", "bytes": "360566"}, {"name": "C", "bytes": "3820041"}, {"name": "C++", "bytes": "18889"}, {"name": "IDL", "bytes": "54"}, {"name": "Smalltalk", "bytes": "3572"}]}}
{"text": "\n\n - \n \n \n \n \n
\n\n", "meta": {"content_hash": "0c5c532741b17d9555e504f006cb4d6f", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 69, "avg_line_length": 37.77777777777778, "alnum_prop": 0.6176470588235294, "repo_name": "coderwjq/ZhaZhaShop", "id": "18d9057e931dc1eec93e181d35fb48d50721ab45", "size": "340", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "shop/src/main/res/drawable/bg_tv_indicator.xml", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Java", "bytes": "942134"}]}}
{"text": "\ufeff#region Mr. Advice MVVM\n// // Mr. Advice MVVM\n// // A simple MVVM package using Mr. Advice aspect weaver\n// // https://github.com/ArxOne/MrAdvice.MVVM\n// // Released under MIT license http://opensource.org/licenses/mit-license.php\n#endregion\n\nnamespace ArxOne.MrAdvice.MVVM.Properties\n{\n /// \n /// Marks a simple auto property to be bound to a DependencyProperty\n /// Note: use , this class will be deprecated soon\n /// \n public class DependencyProperty : Dependency\n {\n }\n}\n", "meta": {"content_hash": "e6f968f6bcaa02164d63a014a40698b9", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 79, "avg_line_length": 31.764705882352942, "alnum_prop": 0.6888888888888889, "repo_name": "ArxOne/MrAdvice.MVVM", "id": "44988b339a9dae3106bd24bb29f525eac790a6ff", "size": "542", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "MrAdvice.MVVM/MVVM/Properties/DependencyProperty.cs", "mode": "33188", "license": "mit", "language": [{"name": "C#", "bytes": "174074"}]}}
{"text": "package org.ringojs.util;\n\nimport org.mozilla.javascript.Context;\nimport org.mozilla.javascript.Scriptable;\nimport org.mozilla.javascript.ContextFactory;\nimport org.mozilla.javascript.debug.DebugFrame;\nimport org.mozilla.javascript.debug.DebuggableScript;\nimport org.mozilla.javascript.debug.Debugger;\n\nimport java.util.logging.Level;\nimport java.util.logging.Logger;\n\n/**\n * A base class for Debuggers and Profilers implemented in Javascript.\n * This allows to exclude the debugger/profiler module and all modules\n * it uses to be excluded from debugging/profiling.\n */\npublic abstract class DebuggerBase implements Debugger {\n\n String debuggerScript;\n int debuggerScriptDepth = 0;\n final Logger log = Logger.getLogger(DebuggerBase.class.getName());\n\n public abstract DebuggerBase createDebugger();\n\n public abstract Object createContextData();\n\n public abstract void handleCompilationDone(Context cx, DebuggableScript fnOrScript, String source);\n\n public abstract DebugFrame getScriptFrame(Context cx, DebuggableScript fnOrScript);\n\n public void attach() {\n attach(createContextData());\n }\n\n public void setDebuggerScript(String path) {\n debuggerScript = path;\n }\n\n public void install() {\n ContextFactory factory = Context.getCurrentContext().getFactory();\n factory.addListener(new ContextFactory.Listener() {\n public void contextCreated(Context cx) {\n DebuggerBase debugger = createDebugger();\n if (debugger != null) {\n debugger.attach(createContextData());\n }\n }\n public void contextReleased(Context cx) {\n }\n });\n }\n\n public void attach(Object contextData) {\n Context cx = Context.getCurrentContext();\n cx.setDebugger(this, contextData);\n cx.setOptimizationLevel(-1);\n cx.setGeneratingDebug(true);\n }\n\n public void detach() {\n Context cx = Context.getCurrentContext();\n cx.setDebugger(null, null);\n }\n\n public Object getContextData() {\n return Context.getCurrentContext().getDebuggerContextData();\n }\n\n public synchronized void suspend() {\n try {\n wait();\n } catch (InterruptedException ir) {\n Thread.currentThread().interrupt();\n }\n }\n\n public synchronized void resume() {\n notify();\n }\n\n public DebugFrame getFrame(Context cx, DebuggableScript fnOrScript) {\n String path = fnOrScript.getSourceName();\n if (log.isLoggable(Level.FINE)) {\n log.fine(\"Getting Frame for \" + path +\n \", debugger script depth is \" + debuggerScriptDepth);\n }\n if (debuggerScriptDepth > 0 || path.equals(debuggerScript)) {\n return new DebuggerScriptFrame();\n } else {\n return getScriptFrame(cx, fnOrScript);\n }\n }\n\n /**\n * Get a string representation for the given script\n * @param script a function or script\n * @return the file and/or function name of the script\n */\n static String getScriptName(DebuggableScript script) {\n if (script.isFunction()) {\n return script.getSourceName() + \": \" + script.getFunctionName();\n } else {\n return script.getSourceName();\n }\n }\n\n class DebuggerScriptFrame implements DebugFrame {\n\n public void onEnter(Context cx, Scriptable activation, Scriptable thisObj, Object[] args) {\n log.fine(\"Entering debugger script frame\");\n debuggerScriptDepth ++;\n }\n\n public void onExit(Context cx, boolean byThrow, Object resultOrException) {\n log.fine(\"Exiting debugger script frame\");\n debuggerScriptDepth --;\n }\n\n public void onLineChange(Context cx, int lineNumber) {}\n\n public void onExceptionThrown(Context cx, Throwable ex) {}\n\n public void onDebuggerStatement(Context cx) {}\n }\n\n}\n", "meta": {"content_hash": "7bc72a3b9cca751d9857aa4ea38a39f2", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 103, "avg_line_length": 31.275590551181104, "alnum_prop": 0.6467774420946626, "repo_name": "ringo/ringojs", "id": "28b86371965cce8c9e11aa1af139908c3c679f4d", "size": "3972", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "src/org/ringojs/util/DebuggerBase.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Batchfile", "bytes": "141"}, {"name": "CSS", "bytes": "613"}, {"name": "Dockerfile", "bytes": "1007"}, {"name": "HTML", "bytes": "2026"}, {"name": "Java", "bytes": "363438"}, {"name": "JavaScript", "bytes": "913850"}, {"name": "Shell", "bytes": "2989"}]}}
{"text": "\n\n \n \n \n \n Facecat\n\n \n \n\n \n \n \n \n \n \n \n \n\n\n
\n\n\n\n % if 'error' in locals():\n
An error happend while processing your request.
\n % end\n
\n
Upload a picture It's more fun if it's the picture of someone.
\n\n
\n\n
\n\n\n
\n\n \n \n \n\n\n \n\n\n", "meta": {"content_hash": "0ff5431891cb2864bd51ef0adfd0e451", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 129, "avg_line_length": 36.68181818181818, "alnum_prop": 0.5241635687732342, "repo_name": "NicolasLM/python-runabove", "id": "c289353c9893e03aa4228b58f31f19256ca86a72", "size": "4035", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "examples/facecat/views/index.html", "mode": "33188", "license": "mit", "language": []}}
{"text": "\ufeffnamespace AH.ModuleController.UI.DIET.Forms\n{\n partial class frmPatientListDietAssign\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();\n System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();\n System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();\n System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();\n System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();\n System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();\n this.groupBox4 = new System.Windows.Forms.GroupBox();\n this.btnShow = new System.Windows.Forms.Button();\n this.smartLabel4 = new AtiqsControlLibrary.SmartLabel();\n this.cboReceivingNurseStation = new AtiqsControlLibrary.SmartComboBox();\n this.dgvDietList = new AtiqsControlLibrary.SmartDataGridView();\n this.dgvPatientList = new AtiqsControlLibrary.SmartDataGridView();\n this.txtAdmissionID = new System.Windows.Forms.TextBox();\n this.txtDeitID = new System.Windows.Forms.TextBox();\n this.pnlMain.SuspendLayout();\n this.pnlTop.SuspendLayout();\n this.groupBox4.SuspendLayout();\n ((System.ComponentModel.ISupportInitialize)(this.dgvDietList)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.dgvPatientList)).BeginInit();\n this.SuspendLayout();\n // \n // btnTopClose\n // \n this.btnTopClose.Location = new System.Drawing.Point(1128, 12);\n // \n // frmLabel\n // \n this.frmLabel.Location = new System.Drawing.Point(393, 9);\n this.frmLabel.Size = new System.Drawing.Size(406, 33);\n this.frmLabel.Text = \"Assign Diet For Admitted Patient \";\n // \n // pnlMain\n // \n this.pnlMain.Controls.Add(this.dgvDietList);\n this.pnlMain.Controls.Add(this.groupBox4);\n this.pnlMain.Controls.Add(this.dgvPatientList);\n this.pnlMain.Location = new System.Drawing.Point(0, 58);\n this.pnlMain.Size = new System.Drawing.Size(1260, 606);\n // \n // pnlTop\n // \n this.pnlTop.Controls.Add(this.txtDeitID);\n this.pnlTop.Controls.Add(this.txtAdmissionID);\n this.pnlTop.Size = new System.Drawing.Size(1260, 58);\n this.pnlTop.Controls.SetChildIndex(this.frmLabel, 0);\n this.pnlTop.Controls.SetChildIndex(this.btnTopClose, 0);\n this.pnlTop.Controls.SetChildIndex(this.txtAdmissionID, 0);\n this.pnlTop.Controls.SetChildIndex(this.txtDeitID, 0);\n // \n // btnEdit\n // \n this.btnEdit.Location = new System.Drawing.Point(110, 673);\n this.btnEdit.Size = new System.Drawing.Size(19, 27);\n this.btnEdit.Visible = false;\n // \n // btnSave\n // \n this.btnSave.Location = new System.Drawing.Point(135, 681);\n this.btnSave.Size = new System.Drawing.Size(33, 17);\n this.btnSave.Visible = false;\n // \n // btnDelete\n // \n this.btnDelete.Location = new System.Drawing.Point(50, 673);\n this.btnDelete.Size = new System.Drawing.Size(21, 27);\n this.btnDelete.Visible = false;\n // \n // btnNew\n // \n this.btnNew.Location = new System.Drawing.Point(1026, 670);\n this.btnNew.Click += new System.EventHandler(this.btnNew_Click);\n // \n // btnClose\n // \n this.btnClose.Location = new System.Drawing.Point(1140, 670);\n this.btnClose.TabIndex = 3;\n // \n // btnPrint\n // \n this.btnPrint.Location = new System.Drawing.Point(77, 673);\n this.btnPrint.Size = new System.Drawing.Size(27, 27);\n this.btnPrint.Visible = false;\n // \n // groupBox1\n // \n this.groupBox1.Location = new System.Drawing.Point(0, 709);\n this.groupBox1.Size = new System.Drawing.Size(1260, 25);\n // \n // groupBox4\n // \n this.groupBox4.BackColor = System.Drawing.Color.PaleTurquoise;\n this.groupBox4.Controls.Add(this.btnShow);\n this.groupBox4.Controls.Add(this.smartLabel4);\n this.groupBox4.Controls.Add(this.cboReceivingNurseStation);\n this.groupBox4.Font = new System.Drawing.Font(\"Microsoft Sans Serif\", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n this.groupBox4.ForeColor = System.Drawing.Color.DarkBlue;\n this.groupBox4.Location = new System.Drawing.Point(3, 2);\n this.groupBox4.Name = \"groupBox4\";\n this.groupBox4.Size = new System.Drawing.Size(1256, 104);\n this.groupBox4.TabIndex = 5;\n this.groupBox4.TabStop = false;\n this.groupBox4.MouseHover += new System.EventHandler(this.groupBox4_MouseHover);\n // \n // btnShow\n // \n this.btnShow.BackColor = System.Drawing.Color.DarkSalmon;\n this.btnShow.Location = new System.Drawing.Point(540, 40);\n this.btnShow.Name = \"btnShow\";\n this.btnShow.Size = new System.Drawing.Size(238, 30);\n this.btnShow.TabIndex = 158;\n this.btnShow.Text = \"Click Patient List to Add Diet\";\n this.btnShow.UseVisualStyleBackColor = false;\n this.btnShow.Click += new System.EventHandler(this.btnShow_Click);\n // \n // smartLabel4\n // \n this.smartLabel4.AutoSize = true;\n this.smartLabel4.BackColor = System.Drawing.Color.PaleTurquoise;\n this.smartLabel4.Font = new System.Drawing.Font(\"Times New Roman\", 9.75F, System.Drawing.FontStyle.Bold);\n this.smartLabel4.Location = new System.Drawing.Point(42, 46);\n this.smartLabel4.Name = \"smartLabel4\";\n this.smartLabel4.Size = new System.Drawing.Size(120, 15);\n this.smartLabel4.TabIndex = 157;\n this.smartLabel4.Text = \"Select Nurse Station\";\n // \n // cboReceivingNurseStation\n // \n this.cboReceivingNurseStation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n this.cboReceivingNurseStation.Font = new System.Drawing.Font(\"Microsoft Sans Serif\", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n this.cboReceivingNurseStation.ForeColor = System.Drawing.Color.Blue;\n this.cboReceivingNurseStation.FormattingEnabled = true;\n this.cboReceivingNurseStation.Items.AddRange(new object[] {\n \"1\",\n \"2\"});\n this.cboReceivingNurseStation.Location = new System.Drawing.Point(168, 43);\n this.cboReceivingNurseStation.Name = \"cboReceivingNurseStation\";\n this.cboReceivingNurseStation.Size = new System.Drawing.Size(356, 26);\n this.cboReceivingNurseStation.TabIndex = 156;\n // \n // dgvDietList\n // \n this.dgvDietList.AllowUserToAddRows = false;\n this.dgvDietList.AllowUserToDeleteRows = false;\n this.dgvDietList.AllowUserToOrderColumns = true;\n this.dgvDietList.AllowUserToResizeColumns = false;\n this.dgvDietList.AllowUserToResizeRows = false;\n this.dgvDietList.BackgroundColor = System.Drawing.Color.White;\n this.dgvDietList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;\n dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\n dataGridViewCellStyle1.BackColor = System.Drawing.Color.LightGreen;\n dataGridViewCellStyle1.Font = new System.Drawing.Font(\"Tahoma\", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black;\n dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;\n this.dgvDietList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;\n this.dgvDietList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;\n dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\n dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;\n dataGridViewCellStyle2.Font = new System.Drawing.Font(\"Tahoma\", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;\n dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Lavender;\n dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.Crimson;\n dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\n this.dgvDietList.DefaultCellStyle = dataGridViewCellStyle2;\n this.dgvDietList.Location = new System.Drawing.Point(865, 75);\n this.dgvDietList.MultiSelect = false;\n this.dgvDietList.Name = \"dgvDietList\";\n this.dgvDietList.RowHeadersVisible = false;\n dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;\n this.dgvDietList.RowsDefaultCellStyle = dataGridViewCellStyle3;\n this.dgvDietList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\n this.dgvDietList.Size = new System.Drawing.Size(272, 395);\n this.dgvDietList.TabIndex = 159;\n this.dgvDietList.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvDietList_CellMouseDoubleClick);\n // \n // dgvPatientList\n // \n this.dgvPatientList.AllowUserToAddRows = false;\n this.dgvPatientList.AllowUserToDeleteRows = false;\n this.dgvPatientList.AllowUserToOrderColumns = true;\n this.dgvPatientList.AllowUserToResizeColumns = false;\n this.dgvPatientList.AllowUserToResizeRows = false;\n this.dgvPatientList.BackgroundColor = System.Drawing.Color.White;\n this.dgvPatientList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;\n dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\n dataGridViewCellStyle4.BackColor = System.Drawing.Color.LightGreen;\n dataGridViewCellStyle4.Font = new System.Drawing.Font(\"Tahoma\", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;\n dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;\n this.dgvPatientList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;\n this.dgvPatientList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;\n dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\n dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;\n dataGridViewCellStyle5.Font = new System.Drawing.Font(\"Tahoma\", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black;\n dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.Lavender;\n dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.Crimson;\n dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\n this.dgvPatientList.DefaultCellStyle = dataGridViewCellStyle5;\n this.dgvPatientList.Location = new System.Drawing.Point(2, 106);\n this.dgvPatientList.MultiSelect = false;\n this.dgvPatientList.Name = \"dgvPatientList\";\n this.dgvPatientList.RowHeadersVisible = false;\n dataGridViewCellStyle6.BackColor = System.Drawing.Color.White;\n this.dgvPatientList.RowsDefaultCellStyle = dataGridViewCellStyle6;\n this.dgvPatientList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\n this.dgvPatientList.Size = new System.Drawing.Size(1253, 497);\n this.dgvPatientList.TabIndex = 6;\n this.dgvPatientList.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPatientList_CellClick);\n // \n // txtAdmissionID\n // \n this.txtAdmissionID.Location = new System.Drawing.Point(916, 9);\n this.txtAdmissionID.Name = \"txtAdmissionID\";\n this.txtAdmissionID.Size = new System.Drawing.Size(100, 20);\n this.txtAdmissionID.TabIndex = 161;\n this.txtAdmissionID.Visible = false;\n // \n // txtDeitID\n // \n this.txtDeitID.Location = new System.Drawing.Point(1022, 7);\n this.txtDeitID.Name = \"txtDeitID\";\n this.txtDeitID.Size = new System.Drawing.Size(100, 20);\n this.txtDeitID.TabIndex = 162;\n this.txtDeitID.Visible = false;\n // \n // frmPatientListDietAssign\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n this.ClientSize = new System.Drawing.Size(1260, 734);\n this.isEnterTabAllow = true;\n this.Name = \"frmPatientListDietAssign\";\n this.Load += new System.EventHandler(this.frmPatientList_Load);\n this.pnlMain.ResumeLayout(false);\n this.pnlTop.ResumeLayout(false);\n this.pnlTop.PerformLayout();\n this.groupBox4.ResumeLayout(false);\n this.groupBox4.PerformLayout();\n ((System.ComponentModel.ISupportInitialize)(this.dgvDietList)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.dgvPatientList)).EndInit();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.GroupBox groupBox4;\n private AtiqsControlLibrary.SmartDataGridView dgvPatientList;\n private AtiqsControlLibrary.SmartLabel smartLabel4;\n private AtiqsControlLibrary.SmartComboBox cboReceivingNurseStation;\n private System.Windows.Forms.Button btnShow;\n public System.Windows.Forms.TextBox txtAdmissionID;\n public System.Windows.Forms.TextBox txtDeitID;\n private AtiqsControlLibrary.SmartDataGridView dgvDietList;\n\n }\n}\n", "meta": {"content_hash": "7577a20e44e72cb7e2da2aed635be20c", "timestamp": "", "source": "github", "line_count": 286, "max_line_length": 184, "avg_line_length": 56.45454545454545, "alnum_prop": 0.6495726495726496, "repo_name": "atiq-shumon/DotNetProjects", "id": "63424a60f594df942497663d5c4bfb6bbaeb0f9a", "size": "16148", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Hospital_ERP_VS13-WCF_WF/AH.ModuleController/UI/DIET/Forms/frmPatientListDietAssign.Designer.cs", "mode": "33188", "license": "apache-2.0", "language": [{"name": "ASP", "bytes": "1059021"}, {"name": "C#", "bytes": "39389238"}, {"name": "CSS", "bytes": "683218"}, {"name": "HTML", "bytes": "44772"}, {"name": "JavaScript", "bytes": "1343054"}, {"name": "PLpgSQL", "bytes": "340074"}, {"name": "Pascal", "bytes": "81971"}, {"name": "PowerShell", "bytes": "175142"}, {"name": "Puppet", "bytes": "2111"}, {"name": "Smalltalk", "bytes": "9"}, {"name": "XSLT", "bytes": "12347"}]}}
{"text": "\npackage org.medipi.clinical.dao;\n\nimport java.util.List;\nimport org.medipi.clinical.entities.PatientGroup;\nimport org.springframework.stereotype.Repository;\n\n/**\n * Implementation of Data Access Object for Patient\n * @author rick@robinsonhq.com\n */\n@Repository\npublic class PatientGroupDAOImpl extends GenericDAOImpl implements PatientGroupDAO {\n @Override\n public List getAllGroups() {\n return this.getEntityManager().createNamedQuery(\"PatientGroup.findAll\", PatientGroup.class)\n .getResultList();\n }\n}", "meta": {"content_hash": "3bf94388278a7d76abcb340256e75471", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 99, "avg_line_length": 29.63157894736842, "alnum_prop": 0.7602131438721137, "repo_name": "Samuel789/MediPi", "id": "33522f5a6540bd8fb6f89dd443207ac049bb383a", "size": "1167", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Clinician/MediPiClinical/src/main/java/org/medipi/clinical/dao/PatientGroupDAOImpl.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Batchfile", "bytes": "10012"}, {"name": "CSS", "bytes": "847678"}, {"name": "HTML", "bytes": "4238145"}, {"name": "Java", "bytes": "1942198"}, {"name": "JavaScript", "bytes": "2308166"}, {"name": "PHP", "bytes": "1684"}, {"name": "Python", "bytes": "66091"}, {"name": "Ruby", "bytes": "1183"}, {"name": "Shell", "bytes": "17053"}]}}
{"text": "package enums;\n\npublic enum GameStatusType {\n\tGAME_WAITING,\n\tGAME_READY,\n\tGAME_PAUSE,\n\tGAME_RUNNING,\n\tGAME_END\n}\n", "meta": {"content_hash": "f493082fa8f2d360462e63e43976d837", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 28, "avg_line_length": 12.555555555555555, "alnum_prop": 0.7345132743362832, "repo_name": "ptutak/Warcaby", "id": "b49884d68c81fb001a43a5b878b7d5aac2c17e36", "size": "701", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/enums/GameStatusType.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Java", "bytes": "103900"}]}}
{"text": "package com.taotao.model;\n\nimport java.util.Date;\n\n/**\n * TITLE:\u5e7f\u544a\u7684model\n * USER:TAOTK\n * DATA:2016/9/14\n * TIME:10:48\n * COMPANY:www.51pjia.com\n */\npublic class PjPoster {\n\n private Integer id; //int(11) NOT NULL,\n private Integer category_id;// int(11) DEFAULT NULL,\n private String category_name; //varchar(32) DEFAULT NULL,\n private Integer poster_sort; //int(11) DEFAULT NULL,\n private String poster_url; //varchar(50) DEFAULT NULL,\n private String poster_size; //varchar(32) DEFAULT NULL,\n private Date create_time;//datetime DEFAULT NULL,\n private Integer poster_status; //int(11) DEFAULT NULL,\n private Integer poster_address;\n private String categoryName;\n private String poster_small_url;//\u5c0f\u56fe\u7247\n\n public String getPoster_small_url() {\n return poster_small_url;\n }\n public void setPoster_small_url(String poster_small_url) {\n this.poster_small_url = poster_small_url;\n }\n public String getCategoryName() {\n return categoryName;\n }\n\n public void setCategoryName(String categoryName) {\n this.categoryName = categoryName;\n }\n\n public Integer getPoster_address() {\n return poster_address;\n }\n\n public void setPoster_address(Integer poster_address) {\n this.poster_address = poster_address;\n }\n\n public Integer getId() {\n return id;\n }\n\n public void setId(Integer id) {\n this.id = id;\n }\n\n public Integer getCategory_id() {\n return category_id;\n }\n\n public void setCategory_id(Integer category_id) {\n this.category_id = category_id;\n }\n\n public String getCategory_name() {\n return category_name;\n }\n\n public void setCategory_name(String category_name) {\n this.category_name = category_name;\n }\n\n public Integer getPoster_sort() {\n return poster_sort;\n }\n\n public void setPoster_sort(Integer poster_sort) {\n this.poster_sort = poster_sort;\n }\n\n public String getPoster_url() {\n return poster_url;\n }\n\n public void setPoster_url(String poster_url) {\n this.poster_url = poster_url;\n }\n\n public String getPoster_size() {\n return poster_size;\n }\n\n public void setPoster_size(String poster_size) {\n this.poster_size = poster_size;\n }\n\n public Date getCreate_time() {\n return create_time;\n }\n\n public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }\n\n public Integer getPoster_status() {\n return poster_status;\n }\n\n public void setPoster_status(Integer poster_status) {\n this.poster_status = poster_status;\n }\n\n\n @Override\n public String toString() {\n return \"PjPoster{\" +\n \"id=\" + id +\n \", category_id=\" + category_id +\n \", category_name='\" + category_name + '\\'' +\n \", poster_sort=\" + poster_sort +\n \", poster_url='\" + poster_url + '\\'' +\n \", poster_size='\" + poster_size + '\\'' +\n \", create_time=\" + create_time +\n \", poster_status=\" + poster_status +\n \", poster_address=\" + poster_address +\n \", categoryName='\" + categoryName + '\\'' +\n \", poster_small_url='\" + poster_small_url + '\\'' +\n '}';\n }\n}\n", "meta": {"content_hash": "7ab49f595d4875b5c338cb3b1ae66c93", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 66, "avg_line_length": 25.88372093023256, "alnum_prop": 0.5882000598981731, "repo_name": "17755332301/Tao-", "id": "c90f72f6b45864fc59a103913265bc15df0b29bc", "size": "3351", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "taotao-web/src/main/java/com/taotao/model/PjPoster.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "ASP", "bytes": "31784"}, {"name": "C#", "bytes": "16030"}, {"name": "CSS", "bytes": "625671"}, {"name": "HTML", "bytes": "558187"}, {"name": "Java", "bytes": "280551"}, {"name": "JavaScript", "bytes": "4548934"}, {"name": "PHP", "bytes": "32951"}]}}
{"text": "'use strict';\nvar $;\nvar _default = {\n\t'emission': '-',\n\t'qte': '-',\n\t'dist': '-'\n};\n\nfunction toggleCentre(type) {\n\tvar selector = ['.from-', ', .to-', ''].join(type + ' circle');\n\t$(selector).attr('r', function (idx, old) {return !old; })\n\t.toggleClass('highlight')\n\t;\n}\n\n/**\n * Toggle visibility of given route type. If 'type' is 'route' then display all types\n * @param {[type]} type of routes to display.\n * @param {[type]} state of input (checked or not)\n */\nfunction toggleRoute(type, state) {\n\tvar routeSet;\n\trouteSet = (type === 'route' ? $('.route')\n\t\t\t\t\t: $('.route.from-' + type + ', .route.to-' + type)\n\t\t\t\t);\n\n\trouteSet\n\t\t.attr('marker-mid', function (i, val) {return state ? 'url(#arw-mid)' : ''; })\n\t\t.attr('marker-end', function (i, val) {return state ? 'url(#arw-end)' : ''; })\n\t\t.toggleClass('show')\n\t;\n}\n\n/**\n * Sum values from 'selector' items list\n * @param {string} selector selector\n * @return {int} sum\n*/\nfunction sumData(selector) {\n\tvar sum = 0;\n\tvar formatNumber = d3.format(',.0f');\n\n\t$(selector).each(function () {\n\t\tsum += +$(this).text().replace(/(k[gm]| t)/i, '');\n\t});\n\treturn formatNumber(Math.round(sum)).replace(/,/, ' ');\n}\n\n\nfunction updateTotal() {\n\n}\n\n$('input.route').change(function () {\n\tvar type = $(this).attr('id').replace('centre-', '');\n\t$('path.route').toggleClass('show');\n\ttoggleRoute(type, $(this).prop('checked'));\n\t$('#centre-epci, #centre-transfert, #centre-traitement')\n\t\t.attr('disabled', function (idx, old) {\n\t\t\treturn !old;\n\t\t});\n});\n$('input.emission').change(function () {\n\t$('text.emission').toggleClass('show');\n\t$('.emission .value').text(function (idx, old) {\n\t\treturn (old === _default.emission ? sumData('svg text.emission'): _default.emission);\n\t});\n});\n$('input.qte').change(function () {\n\t$('text.qte').toggleClass('show');\n\t$('.qte .value').text(function (idx, old) {\n\t\treturn (old === _default.qte ? sumData('svg text.qte'): _default.qte);\n\t});\n});\n$('input.dist').change(function () {\n\t$('text.dist').toggleClass('show');\n\t$('.dist .value').text(function (idx, old) {\n\t\treturn (old === _default.dist ? sumData('svg text.dist'): _default.dist);\n\t});\n});\n\n$('input').change(function () {\n\tvar type = $(this).attr('id').replace('centre-', '');\n\ttoggleCentre(type);\n\ttoggleRoute(type, $(this).prop('checked'));\n});\n\n\n/**\n * Update counter with data from given entity\n * @param {string} id entity id (used as selector)\n * @return {void} directly update UI\n */\nfunction updateCounter(id) {\n\t$('.emission .value').text(function () {\n\t\treturn sumData('svg text' + '.' + idify(id) + '.emission');\n\t});\n\t$('.qte .value').text(function () {\n\t\treturn sumData('svg text' + '.' + idify(id) + '.qte');\n\t});\n\t$('.dist .value').text(function () {\n\t\treturn sumData('svg text' + '.' + idify(id) + '.dist');\n\t});\n}\n\n/**\n * Highlight entity's area\n * @param {string} eid entity's id\n * @return {void} directly update UI\n */\nfunction highlightEntity(eid) {\n\t// reset style on others elements\n\td3.selectAll('.entity').classed('active', false);\n\n\t// apply style to element(s)\n\td3.select('.entity.' + eid).classed('active', true);\n}\n\n/**\n * Show entity's *label*\n * @param {string} eid entity's id\n * @return {void} directly update UI\n */\nfunction showEntityLabel(eid) {\n\td3.selectAll('.entity-label').classed('show', false);\n\td3.selectAll('.entity-label.' + eid).classed('show', true);\n}\n\n/**\n * Show entity's *routes*\n * @param {string} eid entity's id\n * @return {void} directly update UI\n */\nfunction showEntityRoute(eid) {\n\td3.selectAll('.route')\n\t\t.classed('show', false)\n\t\t.attr('marker-mid', null)\n\t\t.attr('marker-end', null)\n\t;\n\td3.selectAll('.route.' + eid)\n\t\t.classed('show', true)\n\t\t.attr('marker-mid', 'url(#arw-mid)')\n\t\t.attr('marker-end', 'url(#arw-end)')\n\t;\n}", "meta": {"content_hash": "7f49a82e511dfbb1990e3eb35005e8a0", "timestamp": "", "source": "github", "line_count": 145, "max_line_length": 87, "avg_line_length": 25.917241379310344, "alnum_prop": 0.6003193187865886, "repo_name": "edouard-lopez/ECV-IJBA", "id": "b277ac6769c9e9281f4a5287b6adb9dffac04376", "size": "3758", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/scripts/ui.utils.js", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "30095"}, {"name": "JavaScript", "bytes": "24947"}]}}
{"text": "package org.radargun.stages.cache.generators;\n\nimport java.io.Serializable;\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Constructor;\nimport java.util.Random;\n\nimport org.radargun.config.DefinitionElement;\nimport org.radargun.config.Init;\nimport org.radargun.config.Property;\nimport org.radargun.logging.Log;\nimport org.radargun.logging.LogFactory;\n\n/**\n * @author Radim Vansa <rvansa@redhat.com>\n */\n@DefinitionElement(name = \"jpa\", doc = \"Instantiates JPA entities. The constructor for the entities must match to the generateValue() method.\")\npublic class JpaValueGenerator implements ValueGenerator {\n protected static Log log = LogFactory.getLog(JpaValueGenerator.class);\n\n @Property(name = \"class\", doc = \"Fully qualified name of the value class.\", optional = false)\n private String clazzName;\n\n private Class> clazz;\n private Class extends Annotation> entityClazz;\n private Constructor> ctor;\n\n @Init\n public void init() {\n try {\n entityClazz = (Class extends Annotation>) Class.forName(\"javax.persistence.Entity\");\n clazz = Class.forName(clazzName);\n if (!clazz.isAnnotationPresent(entityClazz)) {\n throw new IllegalArgumentException(\"Class \" + clazz.getName() + \" is not an entity - no @Entity present\");\n }\n ctor = clazz.getConstructor(Object.class, int.class, Random.class);\n } catch (Exception e) {\n // trace as this can happen on master node\n log.trace(\"Could not initialize generator \" + this, e);\n }\n }\n\n @Override\n public Object generateValue(Object key, int size, Random random) {\n if (ctor == null) throw new IllegalStateException(\"The generator was not properly initialized\");\n try {\n return ctor.newInstance(key, size, random);\n } catch (Exception e) {\n throw new IllegalStateException(e);\n }\n }\n\n @Override\n public int sizeOf(Object value) {\n if (value instanceof JpaValue) {\n return ((JpaValue) value).size();\n } else {\n throw new IllegalArgumentException();\n }\n }\n\n @Override\n public boolean checkValue(Object value, Object key, int expectedSize) {\n if (clazz == null) throw new IllegalStateException(\"The generator was not properly initialized\");\n return clazz.isInstance(value) && ((JpaValue) value).check(expectedSize);\n }\n\n public static String getRandomString(int size, Random random) {\n StringBuilder sb = new StringBuilder(size);\n for (int i = 0; i < size; ++i) {\n sb.append((char) (random.nextInt(26) + 'A'));\n }\n return sb.toString();\n }\n\n public abstract static class JpaValue implements Serializable {\n public int size() {\n throw new UnsupportedOperationException();\n }\n\n public boolean check(int expectedSize) {\n return true;\n }\n }\n\n}\n", "meta": {"content_hash": "c5f03379a0c571b80855feb4f6da4571", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 143, "avg_line_length": 33.372093023255815, "alnum_prop": 0.6721254355400696, "repo_name": "rmacor/radargun", "id": "f132c47f96782b6dc7cb7cbe91a98983f4bdbf73", "size": "2870", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "extensions/cache/src/main/java/org/radargun/stages/cache/generators/JpaValueGenerator.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "CSS", "bytes": "1168"}, {"name": "FreeMarker", "bytes": "31553"}, {"name": "Java", "bytes": "1681217"}, {"name": "JavaScript", "bytes": "1900"}, {"name": "Protocol Buffer", "bytes": "809"}, {"name": "Python", "bytes": "625"}, {"name": "Shell", "bytes": "33354"}]}}
{"text": "\n\n\n#include \"mitkGeometry2D.h\"\n#include \n\n\nmitk::Geometry2D::Geometry2D()\n : m_ScaleFactorMMPerUnitX( 1.0 ),\n m_ScaleFactorMMPerUnitY( 1.0 ),\n m_ReferenceGeometry( NULL )\n{\n}\n\nmitk::Geometry2D::Geometry2D(const Geometry2D& other)\n : Geometry3D(other), m_ScaleFactorMMPerUnitX( other.m_ScaleFactorMMPerUnitX),\n m_ScaleFactorMMPerUnitY( other.m_ScaleFactorMMPerUnitY),\n m_ReferenceGeometry( other.m_ReferenceGeometry )\n{\n}\n\n\n\nmitk::Geometry2D::~Geometry2D()\n{\n}\n\n\nvoid\nmitk::Geometry2D::SetIndexToWorldTransform(\n mitk::AffineTransform3D* transform)\n{\n Superclass::SetIndexToWorldTransform(transform);\n\n m_ScaleFactorMMPerUnitX=GetExtentInMM(0)/GetExtent(0);\n m_ScaleFactorMMPerUnitY=GetExtentInMM(1)/GetExtent(1);\n\n assert(m_ScaleFactorMMPerUnitX(m_BoundingBox.GetPointer())->IsInside(pt3d_units);\n}\n\n\nvoid\nmitk::Geometry2D::Map(const mitk::Point2D &pt2d_mm, mitk::Point3D &pt3d_mm) const\n{\n Point3D pt3d_units;\n pt3d_units[0]=pt2d_mm[0]/m_ScaleFactorMMPerUnitX;\n pt3d_units[1]=pt2d_mm[1]/m_ScaleFactorMMPerUnitY;\n pt3d_units[2]=0;\n pt3d_mm = GetParametricTransform()->TransformPoint(pt3d_units);\n}\n\n\nvoid\nmitk::Geometry2D::IndexToWorld(\n const mitk::Point2D &/*pt_units*/, mitk::Point2D &/*pt_mm*/) const\n{\n itkExceptionMacro(<< \"No general transform possible (only affine) ==> no general\" \\\n \" IndexToWorld(const mitk::Point2D &pt_mm, mitk::Point2D &pt_units)\" \\\n \" possible. Has to be implemented in sub-class.\");\n}\n\n\nvoid\nmitk::Geometry2D::WorldToIndex(\n const mitk::Point2D &/*pt_mm*/, mitk::Point2D &/*pt_units*/) const\n{\n itkExceptionMacro(<< \"No general back transform possible (only affine) ==> no general\" \\\n \" WorldToIndex(const mitk::Point2D &pt_mm, mitk::Point2D &pt_units)\" \\\n \" possible. Has to be implemented in sub-class.\");\n}\n\n\nvoid\nmitk::Geometry2D::IndexToWorld(const mitk::Point2D &/*atPt2d_units*/,\n const mitk::Vector2D &/*vec_units*/, mitk::Vector2D &/*vec_mm*/) const\n{\n itkExceptionMacro(<< \"No general transform possible (only affine) ==> no general\" \\\n \" IndexToWorld(const mitk::Vector2D &vec_mm, mitk::Vector2D &vec_units)\" \\\n \" possible. Has to be implemented in sub-class.\");\n}\n\n\nvoid\nmitk::Geometry2D::WorldToIndex(const mitk::Point2D &/*atPt2d_mm*/,\n const mitk::Vector2D &/*vec_mm*/, mitk::Vector2D &/*vec_units*/) const\n{\n itkExceptionMacro(<< \"No general back transform possible (only affine) ==> no general\" \\\n \" WorldToIndex(const mitk::Vector2D &vec_mm, mitk::Vector2D &vec_units)\" \\\n \" possible. Has to be implemented in sub-class.\");\n}\n\nvoid\nmitk::Geometry2D::SetSizeInUnits(mitk::ScalarType width, mitk::ScalarType height)\n{\n ScalarType bounds[6]={0, width, 0, height, 0, 1};\n ScalarType extent, newextentInMM;\n if(GetExtent(0)>0)\n {\n extent = GetExtent(0);\n if(width>extent)\n newextentInMM = GetExtentInMM(0)/width*extent;\n else\n newextentInMM = GetExtentInMM(0)*extent/width;\n SetExtentInMM(0, newextentInMM);\n }\n if(GetExtent(1)>0)\n {\n extent = GetExtent(1);\n if(width>extent)\n newextentInMM = GetExtentInMM(1)/height*extent;\n else\n newextentInMM = GetExtentInMM(1)*extent/height;\n SetExtentInMM(1, newextentInMM);\n }\n SetBounds(bounds);\n}\n\n\nbool\nmitk::Geometry2D::Project(\n const mitk::Point3D &pt3d_mm, mitk::Point3D &projectedPt3d_mm) const\n{\n assert(m_BoundingBox.IsNotNull());\n\n Point3D pt3d_units;\n BackTransform(pt3d_mm, pt3d_units);\n pt3d_units[2] = 0;\n projectedPt3d_mm = GetParametricTransform()->TransformPoint(pt3d_units);\n return const_cast(m_BoundingBox.GetPointer())->IsInside(pt3d_units);\n}\n\nbool\nmitk::Geometry2D::Project(const mitk::Vector3D &vec3d_mm, mitk::Vector3D &projectedVec3d_mm) const\n{\n assert(m_BoundingBox.IsNotNull());\n\n Vector3D vec3d_units;\n BackTransform(vec3d_mm, vec3d_units);\n vec3d_units[2] = 0;\n projectedVec3d_mm = GetParametricTransform()->TransformVector(vec3d_units);\n return true;\n}\n\nbool\nmitk::Geometry2D::Project(const mitk::Point3D & atPt3d_mm,\n const mitk::Vector3D &vec3d_mm, mitk::Vector3D &projectedVec3d_mm) const\n{\n MITK_WARN << \"Deprecated function! Call Project(vec3D,vec3D) instead.\";\n assert(m_BoundingBox.IsNotNull());\n\n Vector3D vec3d_units;\n BackTransform(atPt3d_mm, vec3d_mm, vec3d_units);\n vec3d_units[2] = 0;\n projectedVec3d_mm = GetParametricTransform()->TransformVector(vec3d_units);\n\n Point3D pt3d_units;\n BackTransform(atPt3d_mm, pt3d_units);\n return const_cast(m_BoundingBox.GetPointer())->IsInside(pt3d_units);\n}\n\n\nbool\nmitk::Geometry2D::Map(const mitk::Point3D & atPt3d_mm,\n const mitk::Vector3D &vec3d_mm, mitk::Vector2D &vec2d_mm) const\n{\n Point2D pt2d_mm_start, pt2d_mm_end;\n Point3D pt3d_mm_end;\n bool inside=Map(atPt3d_mm, pt2d_mm_start);\n pt3d_mm_end = atPt3d_mm+vec3d_mm;\n inside&=Map(pt3d_mm_end, pt2d_mm_end);\n vec2d_mm=pt2d_mm_end-pt2d_mm_start;\n return inside;\n}\n\n\nvoid\nmitk::Geometry2D::Map(const mitk::Point2D &/*atPt2d_mm*/,\n const mitk::Vector2D &/*vec2d_mm*/, mitk::Vector3D &/*vec3d_mm*/) const\n{\n //@todo implement parallel to the other Map method!\n assert(false);\n}\n\n\nmitk::ScalarType\nmitk::Geometry2D::SignedDistance(const mitk::Point3D& pt3d_mm) const\n{\n Point3D projectedPoint;\n Project(pt3d_mm, projectedPoint);\n Vector3D direction = pt3d_mm-projectedPoint;\n ScalarType distance = direction.GetNorm();\n\n if(IsAbove(pt3d_mm) == false)\n distance*=-1.0;\n\n return distance;\n}\n\nbool\nmitk::Geometry2D::IsAbove(const mitk::Point3D& pt3d_mm) const\n{\n Point3D pt3d_units;\n Geometry3D::WorldToIndex(pt3d_mm, pt3d_units);\n return (pt3d_units[2] > m_BoundingBox->GetBounds()[4]);\n}\n\nitk::LightObject::Pointer\nmitk::Geometry2D::InternalClone() const\n{\n Self::Pointer newGeometry = new Geometry2D(*this);\n newGeometry->UnRegister();\n return newGeometry.GetPointer();\n}\n\nvoid\nmitk::Geometry2D::PrintSelf(std::ostream& os, itk::Indent indent) const\n{\n Superclass::PrintSelf(os,indent);\n os << indent << \" ScaleFactorMMPerUnitX: \"\n << m_ScaleFactorMMPerUnitX << std::endl;\n os << indent << \" ScaleFactorMMPerUnitY: \"\n << m_ScaleFactorMMPerUnitY << std::endl;\n}\n\nvoid\nmitk::Geometry2D::SetReferenceGeometry( mitk::Geometry3D *geometry )\n{\n m_ReferenceGeometry = geometry;\n}\n\nmitk::Geometry3D *\nmitk::Geometry2D::GetReferenceGeometry() const\n{\n return m_ReferenceGeometry;\n}\n\nbool\nmitk::Geometry2D::HasReferenceGeometry() const\n{\n return ( m_ReferenceGeometry != NULL );\n}\n", "meta": {"content_hash": "d76ad4d788fa7a514bf6dab0c34c7577", "timestamp": "", "source": "github", "line_count": 270, "max_line_length": 98, "avg_line_length": 27.02962962962963, "alnum_prop": 0.7158125513839408, "repo_name": "nocnokneo/MITK", "id": "6f23c9171007a8f9826011462cd9b16b7117cf21", "size": "7796", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Core/Code/DataManagement/mitkGeometry2D.cpp", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "C", "bytes": "5991982"}, {"name": "C++", "bytes": "29934042"}, {"name": "CSS", "bytes": "52056"}, {"name": "IDL", "bytes": "5583"}, {"name": "Java", "bytes": "350330"}, {"name": "JavaScript", "bytes": "287054"}, {"name": "Objective-C", "bytes": "606620"}, {"name": "Perl", "bytes": "982"}, {"name": "Python", "bytes": "7545"}, {"name": "Shell", "bytes": "5438"}, {"name": "TeX", "bytes": "1204"}, {"name": "XSLT", "bytes": "30684"}]}}
{"text": " '',\n );\n \n /**\n * creates a new importer from an importexport definition\n * \n * @param Tinebase_Model_ImportExportDefinition $_definition\n * @param array $_options\n * @return Calendar_Import_Ical\n * \n * @todo move this to abstract when we no longer need to be php 5.2 compatible\n */\n public static function createFromDefinition(Tinebase_Model_ImportExportDefinition $_definition, array $_options = array())\n {\n return new Addressbook_Import_Csv(self::getOptionsArrayFromDefinition($_definition, $_options));\n }\n\n /**\n * constructs a new importer from given config\n * \n * @param array $_options\n */\n public function __construct(array $_options = array())\n {\n parent::__construct($_options);\n \n // don't set geodata for imported contacts as this is too much traffic for the nominatim server\n $this->_controller->setGeoDataForContacts(FALSE);\n \n // get container id from default container if not set\n if (empty($this->_options['container_id'])) {\n $defaultContainer = $this->_controller->getDefaultAddressbook();\n $this->_options['container_id'] = $defaultContainer->getId();\n if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' Setting default container id: ' . $this->_options['container_id']);\n }\n }\n \n /**\n * add some more values (container id)\n *\n * @return array\n */\n protected function _addData()\n {\n $result['container_id'] = $this->_options['container_id'];\n return $result;\n }\n \n /**\n * do conversions\n * -> sanitize account_id\n *\n * @param array $_data\n * @return array\n */\n protected function _doConversions($_data)\n {\n $result = parent::_doConversions($_data);\n \n // unset account id\n if (isset($result['account_id']) && empty($result['account_id'])) {\n unset($result['account_id']);\n }\n \n if (empty($result['n_family']) && empty($result['org_name'])) {\n if (isset($result['n_fn'])) {\n $result['n_family'] = $result['n_fn'];\n } else {\n $result['n_family'] = 'imported';\n }\n } \n \n return $result;\n }\n}\n", "meta": {"content_hash": "4692399acf338869828c25c6dbb75132", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 194, "avg_line_length": 29.76086956521739, "alnum_prop": 0.5525931336742148, "repo_name": "jodier/tmpdddf", "id": "b468cdaf95d593eab1dca2ab0396388e72686c02", "size": "3028", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "web/private/tine20/Addressbook/Import/Csv.php", "mode": "33188", "license": "mit", "language": [{"name": "PHP", "bytes": "44010"}, {"name": "Perl", "bytes": "794"}, {"name": "Shell", "bytes": "286"}]}}
{"text": "\npackage org.wildfly.swarm.cdi.jaxrsapi;\n\nimport org.wildfly.swarm.spi.api.Fraction;\nimport org.wildfly.swarm.spi.api.annotations.DeploymentModule;\n\n/**\n * @author Ken Finnigan\n */\n@DeploymentModule(name = \"org.wildfly.swarm.cdi.jaxrsapi\", slot = \"deployment\", export = true)\npublic class CDIJAXRSFraction implements Fraction {\n}\n", "meta": {"content_hash": "7a285bf3ec4fc8c88860717e8f563c37", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 94, "avg_line_length": 29.0, "alnum_prop": 0.7758620689655172, "repo_name": "kenfinnigan/wildfly-swarm", "id": "c5af1c743f752005e3e18535b7ffaf281e618ee6", "size": "975", "binary": false, "copies": "14", "ref": "refs/heads/master", "path": "fractions/cdi-extensions/cdi-jaxrsapi/src/main/java/org/wildfly/swarm/cdi/jaxrsapi/CDIJAXRSFraction.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Batchfile", "bytes": "5821"}, {"name": "HTML", "bytes": "7818"}, {"name": "Java", "bytes": "3295457"}, {"name": "JavaScript", "bytes": "13301"}, {"name": "Ruby", "bytes": "5349"}, {"name": "Shell", "bytes": "8275"}, {"name": "XSLT", "bytes": "20396"}]}}
{"text": "// REFACTOR IF POSSIBLE\n/**\n * Within Viewport\n *\n * @description Determines whether an element is completely\n * within the browser viewport\n * @author Craig Patik, http://patik.com/\n * @version 0.0.4\n * @date 2014-07-05\n */\n;(function() {\n /**\n * Determines whether an element is within the viewport\n * @param {Object} elem DOM Element (required)\n * @param {Object} options Optional settings\n * @return {Boolean} Whether the element was completely within the viewport\n */\n var withinViewport = function _withinViewport(elem, options) {\n var result = false,\n metadata = {},\n config = {},\n settings, useHtmlElem, isWithin, scrollOffset, elemOffset, arr, i, side;\n\n if (typeof jQuery !== 'undefined' && elem instanceof jQuery) {\n elem = elem.get(0);\n }\n\n if (typeof elem !== 'object' || elem.nodeType !== 1) {\n throw new Error('First argument must be an element');\n }\n\n if (elem.getAttribute('data-withinviewport-settings') && window.JSON) {\n metadata = JSON.parse(elem.getAttribute('data-withinviewport-settings'));\n }\n\n // Settings argument may be a simple string (`top`, `right`, etc)\n if (typeof options === 'string') {\n settings = {sides: options};\n }\n else {\n settings = options || {};\n }\n\n // Build configuration from defaults and given settings\n config.container = settings.container || metadata.container || withinViewport.defaults.container || document.body;\n config.sides = settings.sides || metadata.sides || withinViewport.defaults.sides || 'all';\n config.top = settings.top || metadata.top || withinViewport.defaults.top || 0;\n config.right = settings.right || metadata.right || withinViewport.defaults.right || 0;\n config.bottom = settings.bottom || metadata.bottom || withinViewport.defaults.bottom || 0;\n config.left = settings.left || metadata.left || withinViewport.defaults.left || 0;\n\n // Whether we can use the ` element for `scrollTop`\n // Unfortunately at the moment I can't find a way to do this without UA-sniffing\n useHtmlElem = !/Chrome/.test(navigator.userAgent);\n\n // Element testing methods\n isWithin = {\n // Element is below the top edge of the viewport\n top: function _isWithin_top() {\n return elemOffset[1] >= scrollOffset[1] + config.top;\n },\n\n // Element is to the left of the right edge of the viewport\n right: function _isWithin_right() {\n var container = (config.container === document.body) ? window : config.container;\n\n return elemOffset[0] + elem.offsetWidth <= container.innerWidth + scrollOffset[0] - config.right;\n },\n\n // Element is above the bottom edge of the viewport\n bottom: function _isWithin_bottom() {\n var container = (config.container === document.body) ? window : config.container;\n\n return elemOffset[1] + elem.offsetHeight <= scrollOffset[1] + container.innerHeight - config.bottom;\n },\n\n // Element is to the right of the left edge of the viewport\n left: function _isWithin_left() {\n return elemOffset[0] >= scrollOffset[0] + config.left;\n },\n\n all: function _isWithin_all() {\n return (isWithin.top() && isWithin.right() && isWithin.bottom() && isWithin.left());\n }\n };\n\n // Current offset values\n scrollOffset = (function _scrollOffset() {\n var x = config.container.scrollLeft,\n y = config.container.scrollTop;\n\n if (y === 0) {\n if (config.container.pageYOffset) {\n y = config.container.pageYOffset;\n }\n else if (window.pageYOffset) {\n y = window.pageYOffset;\n }\n else {\n if (config.container === document.body) {\n if (useHtmlElem) {\n y = (config.container.parentElement) ? config.container.parentElement.scrollTop : 0;\n }\n else {\n y = (config.container.parentElement) ? config.container.parentElement.scrollTop : 0;\n }\n }\n else {\n y = (config.container.parentElement) ? config.container.parentElement.scrollTop : 0;\n }\n }\n }\n\n if (x === 0) {\n if (config.container.pageXOffset) {\n x = config.container.pageXOffset;\n }\n else if (window.pageXOffset) {\n x = window.pageXOffset;\n }\n else {\n if (config.container === document.body) {\n x = (config.container.parentElement) ? config.container.parentElement.scrollLeft : 0;\n }\n else {\n x = (config.container.parentElement) ? config.container.parentElement.scrollLeft : 0;\n }\n }\n }\n\n return [x, y];\n }());\n\n elemOffset = (function _elemOffset() {\n var el = elem,\n x = 0,\n y = 0;\n\n if (el.parentNode) {\n x = el.offsetLeft;\n y = el.offsetTop;\n\n el = el.parentNode;\n while (el) {\n if (el == config.container) {\n break;\n }\n\n x += el.offsetLeft;\n y += el.offsetTop;\n\n el = el.parentNode;\n }\n }\n\n return [x, y];\n })();\n\n // Test the element against each side of the viewport that was requested\n arr = config.sides.split(' ');\n i = arr.length;\n while (i--) {\n side = arr[i].toLowerCase();\n if (/top|right|bottom|left|all/.test(side)) {\n if (isWithin[side]()) {\n result = true;\n }\n else {\n result = false;\n // Quit as soon as the first failure is found\n break;\n }\n }\n }\n\n return result;\n }; // end of `withinViewport()`\n\n // Default settings\n withinViewport.prototype.defaults = {\n container: document.body,\n sides: 'all',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n\n withinViewport.defaults = withinViewport.prototype.defaults;\n\n // Make function available globally\n window.withinViewport = withinViewport;\n\n /**\n * Optional enhancements and shortcuts\n *\n * @description Uncomment or comment these pieces as they apply to your project and coding preferences\n */\n\n // Shortcut methods for each side of the viewport\n // Ex: withinViewport.top(elem) is the same as withinViewport(elem, 'top')\n withinViewport.prototype.top = function _withinViewport_top(element) {\n return withinViewport(element, 'top');\n };\n\n withinViewport.prototype.right = function _withinViewport_right(element) {\n return withinViewport(element, 'right');\n };\n\n withinViewport.prototype.bottom = function _withinViewport_bottom(element) {\n return withinViewport(element, 'bottom');\n };\n\n withinViewport.prototype.left = function _withinViewport_left(element) {\n return withinViewport(element, 'left');\n };\n}());", "meta": {"content_hash": "ebdf763bbe85efd426f5ce70a7d12c49", "timestamp": "", "source": "github", "line_count": 217, "max_line_length": 118, "avg_line_length": 31.387096774193548, "alnum_prop": 0.601673763030392, "repo_name": "clarat-org/clarat", "id": "bd811615e8745b7b69dd1e85a63e09b3efa74330", "size": "6811", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "app/assets/javascripts/vendor/inviewport.js", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "152114"}, {"name": "CoffeeScript", "bytes": "84489"}, {"name": "HTML", "bytes": "835592"}, {"name": "JavaScript", "bytes": "33443"}, {"name": "Ruby", "bytes": "216461"}, {"name": "Shell", "bytes": "373"}]}}
{"text": "\n\npackage com.microsoft.azure.management.network.v2019_08_01;\n\nimport java.util.List;\nimport com.microsoft.azure.management.network.v2019_08_01.implementation.SecurityRuleInner;\nimport com.fasterxml.jackson.annotation.JsonProperty;\n\n/**\n * Subnet and it's custom security rules.\n */\npublic class SubnetAssociation {\n /**\n * Subnet ID.\n */\n @JsonProperty(value = \"id\", access = JsonProperty.Access.WRITE_ONLY)\n private String id;\n\n /**\n * Collection of custom security rules.\n */\n @JsonProperty(value = \"securityRules\")\n private List securityRules;\n\n /**\n * Get subnet ID.\n *\n * @return the id value\n */\n public String id() {\n return this.id;\n }\n\n /**\n * Get collection of custom security rules.\n *\n * @return the securityRules value\n */\n public List securityRules() {\n return this.securityRules;\n }\n\n /**\n * Set collection of custom security rules.\n *\n * @param securityRules the securityRules value to set\n * @return the SubnetAssociation object itself.\n */\n public SubnetAssociation withSecurityRules(List securityRules) {\n this.securityRules = securityRules;\n return this;\n }\n\n}\n", "meta": {"content_hash": "6e2519276d259d6f4c460690ffc2b435", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 91, "avg_line_length": 23.703703703703702, "alnum_prop": 0.6546875, "repo_name": "navalev/azure-sdk-for-java", "id": "17de1a8a17b3a29564b43b54bddcf28ccd71fc84", "size": "1510", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "sdk/network/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/network/v2019_08_01/SubnetAssociation.java", "mode": "33188", "license": "mit", "language": [{"name": "Batchfile", "bytes": "7230"}, {"name": "CSS", "bytes": "5411"}, {"name": "Groovy", "bytes": "1570436"}, {"name": "HTML", "bytes": "29221"}, {"name": "Java", "bytes": "250218562"}, {"name": "JavaScript", "bytes": "15605"}, {"name": "PowerShell", "bytes": "30924"}, {"name": "Python", "bytes": "42119"}, {"name": "Shell", "bytes": "1408"}]}}
{"text": "require 'active_record'\n\n# establish connection\nActiveRecord::Base.configurations = App.config.database_yml\nActiveRecord::Base.establish_connection App.config.database_settings\n\nif ActiveRecord::VERSION::MAJOR == 2\n\n class RubyAppDumpLogger\n def method_missing(method, *args)\n end\n end\n\n ActiveRecord::Base.logger = RubyAppDumpLogger.new\nend\n", "meta": {"content_hash": "a4201f433fc4e8a8bc513fb025509435", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 68, "avg_line_length": 23.4, "alnum_prop": 0.7806267806267806, "repo_name": "kostya/ruby-app-ar", "id": "c09bd03a50abd449f66f05c1ebd805ba095acc56", "size": "379", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/init-activerecord.rb", "mode": "33188", "license": "mit", "language": [{"name": "Ruby", "bytes": "21278"}]}}
{"text": "\r\n\r\n/**\r\n* Create a new `Particle` object. Particles are extended Sprites that are emitted by a particle emitter such as Phaser.Particles.Arcade.Emitter.\r\n* \r\n* @class Phaser.Particle\r\n* @constructor\r\n* @extends Phaser.Sprite\r\n* @param {Phaser.Game} game - A reference to the currently running game.\r\n* @param {number} x - The x coordinate (in world space) to position the Particle at.\r\n* @param {number} y - The y coordinate (in world space) to position the Particle at.\r\n* @param {string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture} key - This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.\r\n* @param {string|number} frame - If this Particle is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.\r\n*/\r\nPhaser.Particle = function (game, x, y, key, frame) {\r\n\r\n Phaser.Sprite.call(this, game, x, y, key, frame);\r\n\r\n /**\r\n * @property {boolean} autoScale - If this Particle automatically scales this is set to true by Particle.setScaleData.\r\n * @protected\r\n */\r\n this.autoScale = false;\r\n\r\n /**\r\n * @property {array} scaleData - A reference to the scaleData array owned by the Emitter that emitted this Particle.\r\n * @protected\r\n */\r\n this.scaleData = null;\r\n\r\n /**\r\n * @property {number} _s - Internal cache var for tracking auto scale.\r\n * @private\r\n */\r\n this._s = 0;\r\n\r\n /**\r\n * @property {boolean} autoAlpha - If this Particle automatically changes alpha this is set to true by Particle.setAlphaData.\r\n * @protected\r\n */\r\n this.autoAlpha = false;\r\n\r\n /**\r\n * @property {array} alphaData - A reference to the alphaData array owned by the Emitter that emitted this Particle.\r\n * @protected\r\n */\r\n this.alphaData = null;\r\n\r\n /**\r\n * @property {number} _a - Internal cache var for tracking auto alpha.\r\n * @private\r\n */\r\n this._a = 0;\r\n\r\n};\r\n\r\nPhaser.Particle.prototype = Object.create(Phaser.Sprite.prototype);\r\nPhaser.Particle.prototype.constructor = Phaser.Particle;\r\n\r\n/**\r\n* Updates the Particle scale or alpha if autoScale and autoAlpha are set.\r\n*\r\n* @method Phaser.Particle#update\r\n* @memberof Phaser.Particle\r\n*/\r\nPhaser.Particle.prototype.update = function() {\r\n\r\n if (this.autoScale)\r\n {\r\n this._s--;\r\n\r\n if (this._s)\r\n {\r\n this.scale.set(this.scaleData[this._s].x, this.scaleData[this._s].y);\r\n }\r\n else\r\n {\r\n this.autoScale = false;\r\n }\r\n }\r\n\r\n if (this.autoAlpha)\r\n {\r\n this._a--;\r\n\r\n if (this._a)\r\n {\r\n this.alpha = this.alphaData[this._a].v;\r\n }\r\n else\r\n {\r\n this.autoAlpha = false;\r\n }\r\n }\r\n\r\n};\r\n\r\n/**\r\n* Called by the Emitter when this particle is emitted. Left empty for you to over-ride as required.\r\n*\r\n* @method Phaser.Particle#onEmit\r\n* @memberof Phaser.Particle\r\n*/\r\nPhaser.Particle.prototype.onEmit = function() {\r\n};\r\n\r\n/**\r\n* Called by the Emitter if autoAlpha has been enabled. Passes over the alpha ease data and resets the alpha counter.\r\n*\r\n* @method Phaser.Particle#setAlphaData\r\n* @memberof Phaser.Particle\r\n*/\r\nPhaser.Particle.prototype.setAlphaData = function(data) {\r\n\r\n this.alphaData = data;\r\n this._a = data.length - 1;\r\n this.alpha = this.alphaData[this._a].v;\r\n this.autoAlpha = true;\r\n\r\n};\r\n\r\n/**\r\n* Called by the Emitter if autoScale has been enabled. Passes over the scale ease data and resets the scale counter.\r\n*\r\n* @method Phaser.Particle#setScaleData\r\n* @memberof Phaser.Particle\r\n*/\r\nPhaser.Particle.prototype.setScaleData = function(data) {\r\n\r\n this.scaleData = data;\r\n this._s = data.length - 1;\r\n this.scale.set(this.scaleData[this._s].x, this.scaleData[this._s].y);\r\n this.autoScale = true;\r\n\r\n};\r\n\r\n/**\r\n* Resets the Particle. This places the Particle at the given x/y world coordinates and then\r\n* sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.\r\n* If the Particle has a physics body that too is reset.\r\n*\r\n* @method Phaser.Particle#reset\r\n* @memberof Phaser.Particle\r\n* @param {number} x - The x coordinate (in world space) to position the Particle at.\r\n* @param {number} y - The y coordinate (in world space) to position the Particle at.\r\n* @param {number} [health=1] - The health to give the Particle.\r\n* @return {Phaser.Particle} This instance.\r\n*/\r\nPhaser.Particle.prototype.reset = function(x, y, health) {\r\n\r\n Phaser.Component.Reset.prototype.reset.call(this, x, y, health);\r\n\r\n this.alpha = 1;\r\n this.scale.set(1);\r\n\r\n this.autoScale = false;\r\n this.autoAlpha = false;\r\n\r\n return this;\r\n\r\n};\r\n", "meta": {"content_hash": "24edaa06ce46fb9dbca9b7593e4e267c", "timestamp": "", "source": "github", "line_count": 161, "max_line_length": 254, "avg_line_length": 29.93167701863354, "alnum_prop": 0.6480597634363976, "repo_name": "Jufebrown/mech-combat", "id": "1e141255b39b7afd2cdf54a3fdf62c0d83149b56", "size": "5019", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "node_modules/phaser-ce/src/gameobjects/Particle.js", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "77"}, {"name": "HTML", "bytes": "1479"}, {"name": "JavaScript", "bytes": "34303"}]}}
{"text": "/**\n * Array reduceRight\n */\nfunction reduceRight(arr, fn, initVal) {\n // check for args.length since initVal might be \"undefined\" see #gh-57\n var hasInit = arguments.length > 2;\n\n if (arr == null || !arr.length) {\n if (hasInit) {\n return initVal;\n } else {\n throw new Error('reduce of empty array with no initial value');\n }\n }\n\n var i = arr.length, result = initVal, value;\n while (--i >= 0) {\n // we iterate over sparse items since there is no way to make it\n // work properly on IE 7-8. see #64\n value = arr[i];\n if (!hasInit) {\n result = value;\n hasInit = true;\n } else {\n result = fn(result, value, i, arr);\n }\n }\n return result;\n}\n\nmodule.exports = reduceRight;\n\n", "meta": {"content_hash": "8593925d98048fd6aa86361d02759e51", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 75, "avg_line_length": 25.375, "alnum_prop": 0.5320197044334976, "repo_name": "ionutbarau/petstore", "id": "7bd3e6b7829862d599317c23473b5b8f37856980", "size": "812", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "petstore-app/src/main/resources/static/node_modules/bower/lib/node_modules/bower-config/node_modules/mout/array/reduceRight.js", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Batchfile", "bytes": "5006"}, {"name": "CSS", "bytes": "344"}, {"name": "HTML", "bytes": "10564"}, {"name": "Java", "bytes": "40634"}, {"name": "JavaScript", "bytes": "11738"}, {"name": "Roff", "bytes": "52499364"}, {"name": "Shell", "bytes": "7058"}]}}
{"text": "require_relative 'spec_helper'\n\nmodule LetsCert\n\n describe IOPlugin do\n\n it '.empty_data always returns the same hash' do\n hsh = IOPlugin.empty_data\n\n expect(hsh.keys.size).to eq(4)\n [:account_key, :key, :cert, :chain].each do |key|\n expect(hsh.keys).to include(key)\n expect(hsh[key]).to be_nil\n end\n end\n\n it '.register registers known subclasses' do\n names = %w(account_key.json key.pem key.der chain.pem fullchain.pem)\n names += %w(cert.pem cert.der)\n\n names.each do |name|\n expect(IOPlugin.registered.keys).to include(name)\n end\n end\n\n it '.register may register new classes' do\n class NewIO < IOPlugin;end\n IOPlugin.register(NewIO, 'newio')\n\n expect(IOPlugin.registered.keys).to include('newio')\n expect(IOPlugin.registered['newio']).to be_a(NewIO)\n end\n\n it '.register raises when plugin name contains a path' do\n class NewIO2 < IOPlugin; end\n expect { IOPlugin.register(NewIO2, 'new/io') }.to raise_error(LetsCert::Error)\n end\n\n it '#load raises NotImplementedError' do\n expect { IOPlugin.new('a').load }.to raise_error(NotImplementedError)\n end\n\n it '#save raises NotImplementedError' do\n expect { IOPlugin.new('a').save }.to raise_error(NotImplementedError)\n end\n\n end\n\nend\n", "meta": {"content_hash": "d115b0fbd557578dc93ce84fe7ad578b", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 84, "avg_line_length": 26.979591836734695, "alnum_prop": 0.6527987897125568, "repo_name": "sdaubert/letscert", "id": "0eb2f856b0e2f8ef602c3dfa0b92fc5a862992b8", "size": "1322", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/io_plugin_spec.rb", "mode": "33188", "license": "mit", "language": [{"name": "Ruby", "bytes": "103056"}]}}
{"text": "extern \"Java\"\n{\n namespace gnu\n {\n namespace java\n {\n namespace net\n {\n namespace protocol\n {\n namespace jar\n {\n class Handler;\n }\n }\n }\n }\n }\n namespace java\n {\n namespace net\n {\n class URL;\n class URLConnection;\n }\n }\n}\n\nclass gnu::java::net::protocol::jar::Handler : public ::java::net::URLStreamHandler\n{\n\npublic:\n Handler();\npublic: // actually protected\n virtual ::java::net::URLConnection * openConnection(::java::net::URL *);\n virtual void parseURL(::java::net::URL *, ::java::lang::String *, jint, jint);\nprivate:\n static ::java::lang::String * flat(::java::lang::String *);\npublic: // actually protected\n virtual ::java::lang::String * toExternalForm(::java::net::URL *);\npublic:\n static ::java::lang::Class class$;\n};\n\n#endif // __gnu_java_net_protocol_jar_Handler__\n", "meta": {"content_hash": "9fa4241a43d907d9ac8bc6d70a93f4f6", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 83, "avg_line_length": 19.955555555555556, "alnum_prop": 0.5734966592427617, "repo_name": "the-linix-project/linix-kernel-source", "id": "b5fb6b66e640689c067a515654c8dea5f97f2b13", "size": "1114", "binary": false, "copies": "160", "ref": "refs/heads/master", "path": "gccsrc/gcc-4.7.2/libjava/gnu/java/net/protocol/jar/Handler.h", "mode": "33188", "license": "bsd-2-clause", "language": [{"name": "Ada", "bytes": "38139979"}, {"name": "Assembly", "bytes": "3723477"}, {"name": "Awk", "bytes": "83739"}, {"name": "C", "bytes": "103607293"}, {"name": "C#", "bytes": "55726"}, {"name": "C++", "bytes": "38577421"}, {"name": "CLIPS", "bytes": "6933"}, {"name": "CSS", "bytes": "32588"}, {"name": "Emacs Lisp", "bytes": "13451"}, {"name": "FORTRAN", "bytes": "4294984"}, {"name": "GAP", "bytes": "13089"}, {"name": "Go", "bytes": "11277335"}, {"name": "Haskell", "bytes": "2415"}, {"name": "Java", "bytes": "45298678"}, {"name": "JavaScript", "bytes": "6265"}, {"name": "Matlab", "bytes": "56"}, {"name": "OCaml", "bytes": "148372"}, {"name": "Objective-C", "bytes": "995127"}, {"name": "Objective-C++", "bytes": "436045"}, {"name": "PHP", "bytes": "12361"}, {"name": "Pascal", "bytes": "40318"}, {"name": "Perl", "bytes": "358808"}, {"name": "Python", "bytes": "60178"}, {"name": "SAS", "bytes": "1711"}, {"name": "Scilab", "bytes": "258457"}, {"name": "Shell", "bytes": "2610907"}, {"name": "Tcl", "bytes": "17983"}, {"name": "TeX", "bytes": "1455571"}, {"name": "XSLT", "bytes": "156419"}]}}
{"text": "namespace content_settings {\n\nclass WebsiteSettingsRegistryTest : public testing::Test {\n protected:\n WebsiteSettingsRegistry* registry() { return ®istry_; }\n\n private:\n WebsiteSettingsRegistry registry_;\n};\n\nTEST_F(WebsiteSettingsRegistryTest, Get) {\n // CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE should be registered.\n const WebsiteSettingsInfo* info =\n registry()->Get(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE);\n ASSERT_TRUE(info);\n EXPECT_EQ(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, info->type());\n EXPECT_EQ(\"auto-select-certificate\", info->name());\n}\n\nTEST_F(WebsiteSettingsRegistryTest, GetByName) {\n // Random string shouldn't be registered.\n EXPECT_FALSE(registry()->GetByName(\"abc\"));\n\n // \"auto-select-certificate\" should be registered.\n const WebsiteSettingsInfo* info =\n registry()->GetByName(\"auto-select-certificate\");\n ASSERT_TRUE(info);\n EXPECT_EQ(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, info->type());\n EXPECT_EQ(\"auto-select-certificate\", info->name());\n EXPECT_EQ(registry()->Get(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE),\n info);\n\n // Register a new setting.\n registry()->Register(static_cast(10), \"test\", nullptr,\n WebsiteSettingsInfo::UNSYNCABLE,\n WebsiteSettingsInfo::LOSSY,\n WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE,\n WebsiteSettingsRegistry::ALL_PLATFORMS,\n WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);\n info = registry()->GetByName(\"test\");\n ASSERT_TRUE(info);\n EXPECT_EQ(10, info->type());\n EXPECT_EQ(\"test\", info->name());\n EXPECT_EQ(registry()->Get(static_cast(10)), info);\n}\n\nTEST_F(WebsiteSettingsRegistryTest, GetPlatformDependent) {\n#if defined(OS_IOS)\n // App banner shouldn't be registered on iOS.\n EXPECT_FALSE(registry()->Get(CONTENT_SETTINGS_TYPE_APP_BANNER));\n#else\n // App banner should be registered on other platforms.\n EXPECT_TRUE(registry()->Get(CONTENT_SETTINGS_TYPE_APP_BANNER));\n#endif\n\n // Auto select certificate is registered on all platforms.\n EXPECT_TRUE(registry()->Get(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE));\n}\n\nTEST_F(WebsiteSettingsRegistryTest, Properties) {\n // \"auto-select-certificate\" should be registered.\n const WebsiteSettingsInfo* info =\n registry()->Get(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE);\n ASSERT_TRUE(info);\n EXPECT_EQ(\"profile.content_settings.exceptions.auto_select_certificate\",\n info->pref_name());\n EXPECT_EQ(\"profile.default_content_setting_values.auto_select_certificate\",\n info->default_value_pref_name());\n ASSERT_FALSE(info->initial_default_value());\n EXPECT_EQ(PrefRegistry::NO_REGISTRATION_FLAGS,\n info->GetPrefRegistrationFlags());\n\n // Register a new setting.\n registry()->Register(static_cast(10), \"test\",\n base::WrapUnique(new base::FundamentalValue(999)),\n WebsiteSettingsInfo::SYNCABLE,\n WebsiteSettingsInfo::LOSSY,\n WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE,\n WebsiteSettingsRegistry::ALL_PLATFORMS,\n WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);\n info = registry()->Get(static_cast(10));\n ASSERT_TRUE(info);\n EXPECT_EQ(\"profile.content_settings.exceptions.test\", info->pref_name());\n EXPECT_EQ(\"profile.default_content_setting_values.test\",\n info->default_value_pref_name());\n int setting;\n ASSERT_TRUE(info->initial_default_value()->GetAsInteger(&setting));\n EXPECT_EQ(999, setting);\n#if defined(OS_IOS)\n EXPECT_EQ(PrefRegistry::LOSSY_PREF, info->GetPrefRegistrationFlags());\n#else\n EXPECT_EQ(PrefRegistry::LOSSY_PREF |\n user_prefs::PrefRegistrySyncable::SYNCABLE_PREF,\n info->GetPrefRegistrationFlags());\n#endif\n EXPECT_EQ(WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE,\n info->scoping_type());\n EXPECT_EQ(WebsiteSettingsInfo::INHERIT_IN_INCOGNITO,\n info->incognito_behavior());\n}\n\nTEST_F(WebsiteSettingsRegistryTest, Iteration) {\n registry()->Register(static_cast(10), \"test\",\n base::WrapUnique(new base::FundamentalValue(999)),\n WebsiteSettingsInfo::SYNCABLE,\n WebsiteSettingsInfo::LOSSY,\n WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE,\n WebsiteSettingsRegistry::ALL_PLATFORMS,\n WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);\n\n bool found = false;\n for (const WebsiteSettingsInfo* info : *registry()) {\n EXPECT_EQ(registry()->Get(info->type()), info);\n if (info->type() == 10) {\n EXPECT_FALSE(found);\n found = true;\n }\n }\n\n EXPECT_TRUE(found);\n}\n\n} // namespace content_settings\n", "meta": {"content_hash": "79a080a21e9aacd0ed464a6b6425897c", "timestamp": "", "source": "github", "line_count": 123, "max_line_length": 78, "avg_line_length": 39.89430894308943, "alnum_prop": 0.6723048705930303, "repo_name": "danakj/chromium", "id": "5e3630c0a84f4fdb7104f1a6dedfd1e6ffe9d708", "size": "5614", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "components/content_settings/core/browser/website_settings_registry_unittest.cc", "mode": "33188", "license": "bsd-3-clause", "language": []}}
{"text": "import * as React from \"react\";\nimport ReactModal from \"react-modal\";\n\nimport { Config } from \"../../../data/Config\";\n\nimport { OnMobile, OnMobileTablet, OnDesktop, OnTablet } from \"../../../helpers/Breakpoints\";\nimport { smoothScrollTo } from \"../../../helpers/smoothScrollTo\";\nimport { formatNumber } from \"../../../helpers/formatNumber\";\nimport { translate } from \"../../../helpers/translate\";\n\nimport { TransformAnimation } from \"../../Animations/Interactive/TransformAnimation\";\nimport { getCorners, getLabel, CloseButton, SubmitButton } from \"../../Buttons\";\nimport { SocialLinks } from \"../../Layout/Partials\";\nimport { PartnershipPageState } from \"./PartnershipPageState\";\nimport { MapIcon } from \"../../Icons/MapIcon\";\nimport { ContactForm } from \"./ContactForm\";\nimport { BasePage } from \"../BasePage\";\n\nexport class PartnershipPage extends BasePage<{}, PartnershipPageState> {\n public state: PartnershipPageState = {\n isModalOpen: false,\n };\n\n public shouldComponentUpdate(nextProps: undefined, nextState: PartnershipPageState, nextContext: any): boolean {\n return super.shouldComponentUpdate(nextProps, nextState, nextContext)\n || this.state.isModalOpen !== nextState.isModalOpen;\n }\n\n public render(): JSX.Element {\n const modalProps = {\n className: {\n base: \"modal\",\n afterOpen: \"\",\n beforeClose: \"\",\n },\n overlayClassName: {\n base: \"modal-overlay\",\n afterOpen: \"modal-opened\",\n beforeClose: \"modal-close\",\n },\n closeTimeoutMS: 500\n };\n\n const transformAnimationProps = {\n transformedComponent: ,\n staticComponent: getCorners(),\n initialComponent: getLabel(),\n className: \"btn btn_transform\",\n onEvent() {\n const { className, duration } = this as any;\n smoothScrollTo(\n document.getElementsByClassName(className)[ 0 ] as HTMLElement,\n -105,\n \"top\",\n duration,\n 0\n );\n },\n duration: 1000,\n event: \"onClick\"\n };\n\n return (\n \n \n
{translate(\"contactPage.title\")}
\n
\n \n \n \n
\n
\n
\n
\n \n {formatNumber(Config.phone, \"+xxx xx xxx-xx-xx\")}\n \n {Config.mail}\n \n {translate(\"contactPage.support.title\")}\n {translate(\"contactPage.support.subTitle\")}\n 24\n /7\n \n
\n \n {translate(\"contactPage.location.title\")}\n {translate(Config.location.country)} \n /\n {translate(Config.location.city)}\n
\n \n
\n \n {translate(\"contactPage.support.title\")}\n {translate(\"contactPage.support.subTitle\")}\n 24/7\n
\n \n \n \n {translate(\"contactPage.location.title\")}\n {translate(Config.location.country)} / {translate(Config.location.city)}\n
\n \n
\n \n {translate(\"contactPage.support.title\")}\n {translate(\"contactPage.support.subTitle\")}\n 24/7\n
\n \n {translate(\"contactPage.location.title\")}\n {translate(Config.location.country)} / {translate(Config.location.city)}\n
\n \n \n \n \n
\n
\n
\n \n \n
\n \n \n
\n {translate(\"contactPage.form.title\")}
\n \n \n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n \n {Config.location.country} / {Config.location.city}\n \n \n {Config.location.coordinates.lat}° \n {Config.location.coordinates.lng}°\n \n
\n
\n
\n
\n \n );\n }\n\n protected handleCloseModal = () => {\n this.setState({ isModalOpen: false });\n };\n\n protected handleOpenModal = () => {\n this.setState({ isModalOpen: true });\n };\n}\n", "meta": {"content_hash": "c80d081dd615ce08644f050956bfc6e3", "timestamp": "", "source": "github", "line_count": 184, "max_line_length": 118, "avg_line_length": 51.56521739130435, "alnum_prop": 0.4267495784148398, "repo_name": "wearesho-team/wearesho-site", "id": "fd2e5a37cc3f947a11a44e2e702332375fc1dbcf", "size": "9488", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/components/Pages/PartnershipPage/PartnershipPage.tsx", "mode": "33188", "license": "mit", "language": [{"name": "Dockerfile", "bytes": "354"}, {"name": "Groovy", "bytes": "778"}, {"name": "HTML", "bytes": "3074"}, {"name": "JavaScript", "bytes": "10809"}, {"name": "SCSS", "bytes": "128541"}, {"name": "TypeScript", "bytes": "331858"}]}}
{"text": "'use strict';\n\n/**\n * @ngdoc directive\n * @name izzyposWebApp.directive:adminPosHeader\n * @description\n * # adminPosHeader\n */\nangular.module('sbAdminApp')\n\t.directive('siteheader',function(){\n\t\treturn {\n templateUrl:'scripts/directives/header/siteheader.html',\n restrict: 'E',\n replace: true\n \t}\n\t}).directive('dashboardheader',function(){\n\t\treturn {\n templateUrl:'scripts/directives/header/dashboard_header.html',\n restrict: 'E',\n replace: true\n \t}\n\t}).directive('cpdashboardheader',function(){\n return {\n templateUrl:'scripts/directives/header/cp_dashboard_header.html',\n restrict: 'E',\n replace: true\n }\n }).directive('vendordashboardheader',function(){\n return {\n templateUrl:'scripts/directives/header/vendor_dashboard_header.html',\n restrict: 'E',\n replace: true\n }\n }).directive('admindashboardheader',function(){\n return {\n templateUrl:'scripts/directives/header/admin_dashboard_header.html',\n restrict: 'E',\n replace: true\n }\n });\n\n\n\n\n\n", "meta": {"content_hash": "2dc593900bc99f05643f2e599332ceae", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 81, "avg_line_length": 25.42222222222222, "alnum_prop": 0.5961538461538461, "repo_name": "kodebees/testing-sandbox", "id": "922b7a66ec6d6c65857d24e550d04489b4c7e45d", "size": "1144", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/scripts/directives/header/header.js", "mode": "33188", "license": "apache-2.0", "language": [{"name": "ApacheConf", "bytes": "24139"}, {"name": "CSS", "bytes": "16010"}, {"name": "HTML", "bytes": "275958"}, {"name": "JavaScript", "bytes": "62897"}]}}
{"text": "const express = require('express');\nconst router = express.Router();\n\n// const Note = require('../models/note.model'); // need this for below router.params\nconst note = require('../controllers/note.ctrl');\n\n// router.params('id', (req, res, next, id) => { // if an id parameter is present, this grabs it so we dont need\n// Note.findById(id, (err, note) => { // multiple \".findById()\" methods in the controller\n// if(err) throw err;\n// req.note = note;\n// next();\n// });\n// });\n\nrouter.get('/notes', note.index);\nrouter.get('/notes/new', note.newNote);\nrouter.get('/notes/:id', note.show);\nrouter.get('/notes/:id/edit', note.edit);\nrouter.put('/notes/:id', note.update);\nrouter.delete('/notes/:id', note.destroy);\nrouter.post('/notes', note.create);\n\nmodule.exports = router;\n", "meta": {"content_hash": "8c26a0a30648e8179e27b55b7bcd7451", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 112, "avg_line_length": 34.78260869565217, "alnum_prop": 0.63375, "repo_name": "ldougher06/c11_evernode", "id": "56216058d1e93026de87b3dd5e466ccfb5da8af7", "size": "800", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "routes/note.route.js", "mode": "33188", "license": "mit", "language": [{"name": "HTML", "bytes": "989"}, {"name": "JavaScript", "bytes": "4648"}]}}
{"text": "\n\npackage org.springframework.boot.actuate.autoconfigure.metrics.test;\n\nimport java.util.Collections;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.concurrent.CyclicBarrier;\n\nimport javax.servlet.DispatcherType;\n\nimport io.micrometer.core.instrument.MeterRegistry;\nimport io.micrometer.core.instrument.MockClock;\nimport io.micrometer.core.instrument.binder.MeterBinder;\nimport io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;\nimport io.micrometer.core.instrument.binder.logging.LogbackMetrics;\nimport io.micrometer.core.instrument.simple.SimpleConfig;\nimport io.micrometer.core.instrument.simple.SimpleMeterRegistry;\nimport org.junit.jupiter.api.Test;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.actuate.autoconfigure.metrics.JvmMetricsAutoConfiguration;\nimport org.springframework.boot.actuate.autoconfigure.metrics.LogbackMetricsAutoConfiguration;\nimport org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;\nimport org.springframework.boot.actuate.autoconfigure.metrics.SystemMetricsAutoConfiguration;\nimport org.springframework.boot.actuate.autoconfigure.metrics.amqp.RabbitMetricsAutoConfiguration;\nimport org.springframework.boot.actuate.autoconfigure.metrics.cache.CacheMetricsAutoConfiguration;\nimport org.springframework.boot.actuate.autoconfigure.metrics.jdbc.DataSourcePoolMetricsAutoConfiguration;\nimport org.springframework.boot.actuate.autoconfigure.metrics.orm.jpa.HibernateMetricsAutoConfiguration;\nimport org.springframework.boot.actuate.autoconfigure.metrics.web.client.HttpClientMetricsAutoConfiguration;\nimport org.springframework.boot.actuate.autoconfigure.metrics.web.reactive.WebFluxMetricsAutoConfiguration;\nimport org.springframework.boot.actuate.autoconfigure.metrics.web.servlet.WebMvcMetricsAutoConfiguration;\nimport org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter;\nimport org.springframework.boot.autoconfigure.ImportAutoConfiguration;\nimport org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;\nimport org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;\nimport org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration;\nimport org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;\nimport org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration;\nimport org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;\nimport org.springframework.boot.test.context.SpringBootTest;\nimport org.springframework.boot.test.context.SpringBootTest.WebEnvironment;\nimport org.springframework.boot.test.web.client.TestRestTemplate;\nimport org.springframework.boot.web.client.RestTemplateBuilder;\nimport org.springframework.boot.web.servlet.FilterRegistrationBean;\nimport org.springframework.context.ApplicationContext;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\nimport org.springframework.context.annotation.Import;\nimport org.springframework.context.annotation.Primary;\nimport org.springframework.http.HttpMethod;\nimport org.springframework.http.MediaType;\nimport org.springframework.test.util.ReflectionTestUtils;\nimport org.springframework.test.web.client.MockRestServiceServer;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.client.RestTemplate;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static org.springframework.test.web.client.ExpectedCount.once;\nimport static org.springframework.test.web.client.match.MockRestRequestMatchers.method;\nimport static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;\nimport static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;\n\n/**\n * Integration tests for Metrics.\n *\n * @author Jon Schneider\n */\n@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,\n\t\tclasses = MetricsIntegrationTests.MetricsApp.class,\n\t\tproperties = \"management.metrics.use-global-registry=false\")\npublic class MetricsIntegrationTests {\n\n\t@Autowired\n\tprivate ApplicationContext context;\n\n\t@Autowired\n\tprivate RestTemplate external;\n\n\t@Autowired\n\tprivate TestRestTemplate loopback;\n\n\t@Autowired\n\tprivate MeterRegistry registry;\n\n\t@SuppressWarnings(\"unchecked\")\n\t@Test\n\tpublic void restTemplateIsInstrumented() {\n\t\tMockRestServiceServer server = MockRestServiceServer.bindTo(this.external)\n\t\t\t\t.build();\n\t\tserver.expect(once(), requestTo(\"/api/external\"))\n\t\t\t\t.andExpect(method(HttpMethod.GET)).andRespond(withSuccess(\n\t\t\t\t\t\t\"{\\\"message\\\": \\\"hello\\\"}\", MediaType.APPLICATION_JSON));\n\t\tassertThat(this.external.getForObject(\"/api/external\", Map.class))\n\t\t\t\t.containsKey(\"message\");\n\t\tassertThat(this.registry.get(\"http.client.requests\").timer().count())\n\t\t\t\t.isEqualTo(1);\n\t}\n\n\t@Test\n\tpublic void requestMappingIsInstrumented() {\n\t\tthis.loopback.getForObject(\"/api/people\", Set.class);\n\t\tassertThat(this.registry.get(\"http.server.requests\").timer().count())\n\t\t\t\t.isEqualTo(1);\n\t}\n\n\t@Test\n\tpublic void automaticallyRegisteredBinders() {\n\t\tassertThat(this.context.getBeansOfType(MeterBinder.class).values())\n\t\t\t\t.hasAtLeastOneElementOfType(LogbackMetrics.class)\n\t\t\t\t.hasAtLeastOneElementOfType(JvmMemoryMetrics.class);\n\t}\n\n\t@Test\n\t@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tpublic void metricsFilterRegisteredForAsyncDispatches() {\n\t\tMap
filterRegistrations = this.context\n\t\t\t\t.getBeansOfType(FilterRegistrationBean.class);\n\t\tassertThat(filterRegistrations).containsKey(\"webMvcMetricsFilter\");\n\t\tFilterRegistrationBean registration = filterRegistrations\n\t\t\t\t.get(\"webMvcMetricsFilter\");\n\t\tassertThat(registration.getFilter()).isInstanceOf(WebMvcMetricsFilter.class);\n\t\tassertThat((Set) ReflectionTestUtils.getField(registration,\n\t\t\t\t\"dispatcherTypes\")).containsExactlyInAnyOrder(DispatcherType.REQUEST,\n\t\t\t\t\t\tDispatcherType.ASYNC);\n\t}\n\n\t@Configuration(proxyBeanMethods = false)\n\t@ImportAutoConfiguration({ MetricsAutoConfiguration.class,\n\t\t\tJvmMetricsAutoConfiguration.class, LogbackMetricsAutoConfiguration.class,\n\t\t\tSystemMetricsAutoConfiguration.class, RabbitMetricsAutoConfiguration.class,\n\t\t\tCacheMetricsAutoConfiguration.class,\n\t\t\tDataSourcePoolMetricsAutoConfiguration.class,\n\t\t\tHibernateMetricsAutoConfiguration.class,\n\t\t\tHttpClientMetricsAutoConfiguration.class,\n\t\t\tWebFluxMetricsAutoConfiguration.class, WebMvcMetricsAutoConfiguration.class,\n\t\t\tJacksonAutoConfiguration.class, HttpMessageConvertersAutoConfiguration.class,\n\t\t\tRestTemplateAutoConfiguration.class, WebMvcAutoConfiguration.class,\n\t\t\tDispatcherServletAutoConfiguration.class,\n\t\t\tServletWebServerFactoryAutoConfiguration.class })\n\t@Import(PersonController.class)\n\tstatic class MetricsApp {\n\n\t\t@Primary\n\t\t@Bean\n\t\tpublic MeterRegistry registry() {\n\t\t\treturn new SimpleMeterRegistry(SimpleConfig.DEFAULT, new MockClock());\n\t\t}\n\n\t\t@Bean\n\t\tpublic RestTemplate restTemplate(RestTemplateBuilder restTemplateBuilder) {\n\t\t\treturn restTemplateBuilder.build();\n\t\t}\n\n\t\t@Bean\n\t\tpublic CyclicBarrier cyclicBarrier() {\n\t\t\treturn new CyclicBarrier(2);\n\t\t}\n\n\t}\n\n\t@RestController\n\tstatic class PersonController {\n\n\t\t@GetMapping(\"/api/people\")\n\t\tSet personName() {\n\t\t\treturn Collections.singleton(\"Jon\");\n\t\t}\n\n\t}\n\n}\n", "meta": {"content_hash": "71bc690cf69ccb97014ef702ae5dae8a", "timestamp": "", "source": "github", "line_count": 173, "max_line_length": 108, "avg_line_length": 42.820809248554916, "alnum_prop": 0.8353131749460043, "repo_name": "lburgazzoli/spring-boot", "id": "e98552b7ebf86f23ce82fed374d90e3b26640e1a", "size": "8029", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/test/MetricsIntegrationTests.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Batchfile", "bytes": "6954"}, {"name": "CSS", "bytes": "5769"}, {"name": "FreeMarker", "bytes": "2134"}, {"name": "Groovy", "bytes": "49512"}, {"name": "HTML", "bytes": "69689"}, {"name": "Java", "bytes": "11602150"}, {"name": "JavaScript", "bytes": "37789"}, {"name": "Ruby", "bytes": "1307"}, {"name": "Shell", "bytes": "27916"}, {"name": "Smarty", "bytes": "3276"}, {"name": "XSLT", "bytes": "34105"}]}}
{"text": "data['pagetitle'] = 'Ordered TODO List';\n $tasks = $this->tasks->all(); // get all the tasks\n $this->data['content'] = 'Ok'; // so we don't need pagebody\n $this->data['leftside'] = $this->makePrioritizedPanel($tasks);\n $this->data['rightside'] = $this->makeCategorizedPanel($tasks);\n $this->render('template_secondary'); \n }\n \n function makePrioritizedPanel($tasks) \n {\n foreach ($tasks as $task)\n {\n if ($task->status != 2)\n $undone[] = $task;\n }\n usort($undone, \"orderByPriority\");\n foreach ($undone as $task)\n $task->priority = $this->priorities->get($task->priority)->name;\n \n foreach ($undone as $task)\n $converted[] = (array) $task;\n \n $parms = ['display_tasks' => $converted];\n \n $role = $this->session->userdata('userrole');\n $parms['completer'] = ($role == ROLE_OWNER) ? '/views/complete' : '#';\n return $this->parser->parse('by_priority', $parms, true);\n }\n \n function makeCategorizedPanel($tasks) \n {\n $parms = ['display_tasks' => $this->tasks->getCategorizedTasks()];\n \n $role = $this->session->userdata('userrole');\n $parms['completer'] = ($role == ROLE_OWNER) ? '/views/complete' : '#';\n \n return $this->parser->parse('by_category',$parms,true);\n }\n \n function complete(){\n $role = $this->session->userdata('userrole');\n if ($role != ROLE_OWNER) redirect('/work');\n \n foreach($this->input->post() as $key=>$value){\n if(substr($key,0,4) == 'task'){\n $taskid = substr($key,4);\n $task = $this->tasks->get($taskid);\n $task->status = 2; \n $this->tasks->update($task);\n }\n }\n $this->index();\n }\n}\n\nfunction orderByPriority($a, $b)\n{\n if ($a->priority > $b->priority)\n return -1;\n elseif ($a->priority < $b->priority)\n return 1;\n else\n return 0;\n} ", "meta": {"content_hash": "cace378dfe7f31a84e026385520da689", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 78, "avg_line_length": 31.140845070422536, "alnum_prop": 0.5133423790140208, "repo_name": "Comp4711Lab5-Carmen-Hanuk/lab5", "id": "47267265ba278d4d389c32546da0ab59f900a73c", "size": "2211", "binary": false, "copies": "2", "ref": "refs/heads/develop", "path": "application/controllers/Views.php", "mode": "33188", "license": "mit", "language": [{"name": "ApacheConf", "bytes": "602"}, {"name": "CSS", "bytes": "1235"}, {"name": "HTML", "bytes": "5633"}, {"name": "PHP", "bytes": "1815269"}]}}
{"text": "package edu.cs4730.mywatchface;\n\n\nimport android.annotation.SuppressLint;\nimport android.content.res.Resources;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.graphics.Rect;\nimport android.graphics.Typeface;\nimport android.content.Context;\nimport android.view.SurfaceHolder;\n\nimport java.time.ZonedDateTime;\nimport java.util.Calendar;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\nimport androidx.core.content.ContextCompat;\nimport androidx.wear.watchface.CanvasType;\nimport androidx.wear.watchface.ComplicationSlotsManager;\nimport androidx.wear.watchface.DrawMode;\nimport androidx.wear.watchface.RenderParameters;\nimport androidx.wear.watchface.Renderer;\nimport androidx.wear.watchface.WatchFace;\nimport androidx.wear.watchface.WatchFaceService;\nimport androidx.wear.watchface.WatchFaceType;\nimport androidx.wear.watchface.WatchState;\nimport androidx.wear.watchface.style.CurrentUserStyleRepository;\nimport kotlin.coroutines.Continuation;\n\nimport static android.graphics.Color.*;\n\n/**\n * this code is based off google's original example, but updated to point, it is likely\n * no longer recognizable.\n */\n\npublic class myWatchFaceService extends WatchFaceService {\n\n private static final String TAG = \"myWatchFaceService\";\n\n private static final Typeface BOLD_TYPEFACE =\n Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD);\n private static final Typeface NORMAL_TYPEFACE =\n Typeface.create(Typeface.SANS_SERIF, Typeface.NORMAL);\n\n @Nullable\n @Override\n protected WatchFace createWatchFace(@NonNull SurfaceHolder surfaceHolder,\n @NonNull WatchState watchState,\n @NonNull ComplicationSlotsManager complicationSlotsManager,\n @NonNull CurrentUserStyleRepository currentUserStyleRepository,\n @NonNull Continuation super WatchFace> continuation) {\n\n\n return new WatchFace(\n WatchFaceType.DIGITAL,\n new myWatchFaceService.myCanvasRender(getApplicationContext(), surfaceHolder, watchState, complicationSlotsManager, currentUserStyleRepository, CanvasType.HARDWARE)\n );\n\n }\n\n class myCanvasRender extends Renderer.CanvasRenderer2 {\n static private final long FRAME_PERIOD_MS_DEFAULT = 16L;\n final boolean clearWithBackgroundTintBeforeRenderingHighlightLayer = false;\n\n Context context;\n SurfaceHolder surfaceHolder;\n WatchState watchState;\n ComplicationSlotsManager complicationSlotsManager;\n CurrentUserStyleRepository currentUserStyleRepository;\n int canvasType;\n\n Paint mBackgroundPaint;\n Paint mHourPaint;\n Paint mMinutePaint;\n Paint mSecondPaint;\n Paint mAmPmPaint;\n Paint mColonPaint;\n float mColonWidth;\n\n Calendar mTime;\n boolean mShouldDrawColons;\n float mXOffset;\n float mYOffset;\n String mAmString;\n String mPmString;\n int mInteractiveBackgroundColor = Color.BLACK;//parseColor(\"black\");\n int mInteractiveHourDigitsColor = parseColor(\"white\");\n int mInteractiveMinuteDigitsColor = parseColor(\"white\");\n int mInteractiveSecondDigitsColor = parseColor(\"gray\");\n boolean mAmbient;\n\n static final String COLON_STRING = \":\";\n\n @Override\n public void render(@NonNull Canvas canvas, @NonNull Rect bounds, @NonNull ZonedDateTime zonedDateTime, @NonNull myWatchFaceService.myCanvasRender.myShareAssets myShareAssets) {\n\n RenderParameters renderParameters = getRenderParameters();\n mAmbient = renderParameters.getDrawMode() == DrawMode.AMBIENT;\n // Calendar cal = new Calendar(getSystemTimeProvider().getSystemTimeMillis());\n mTime = Calendar.getInstance();\n\n /* draw your watch face */\n\n // Show colons for the first half of each second so the colons blink on when the time\n // updates.\n mShouldDrawColons = (System.currentTimeMillis() % 1000) < 500;\n\n // Draw the background.\n canvas.drawRect(0, 0, bounds.width(), bounds.height(), mBackgroundPaint);\n\n // Draw the hours.\n float x = mXOffset;\n String hourString = String.valueOf(convertTo12Hour(mTime.get(Calendar.HOUR)));\n canvas.drawText(hourString, x, mYOffset, mHourPaint);\n x += mHourPaint.measureText(hourString);\n\n\n // In ambient and mute modes, always draw the first colon. Otherwise, draw the\n // first colon for the first half of each second.\n if (mAmbient || mShouldDrawColons) {\n canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint);\n }\n x += mColonWidth;\n\n // Draw the minutes.\n String minuteString = formatTwoDigitNumber(mTime.get(Calendar.MINUTE));\n canvas.drawText(minuteString, x, mYOffset, mMinutePaint);\n x += mMinutePaint.measureText(minuteString);\n\n // In ambient and mute modes, draw AM/PM. Otherwise, draw a second blinking\n // colon followed by the seconds.\n if (mAmbient) {\n x += mColonWidth;\n canvas.drawText(getAmPmString(mTime.get(Calendar.HOUR)), x, mYOffset, mAmPmPaint);\n } else {\n if (mShouldDrawColons) {\n canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint);\n }\n x += mColonWidth;\n canvas.drawText(formatTwoDigitNumber(mTime.get(Calendar.SECOND)), x, mYOffset,\n mSecondPaint);\n\n }\n }\n\n\n @Override\n public void renderHighlightLayer(@NonNull Canvas canvas, @NonNull Rect rect, @NonNull ZonedDateTime zonedDateTime, @NonNull myShareAssets myShareAssets) {\n ///what does this do?? no documentation as to it use.\n\n }\n\n class myShareAssets implements SharedAssets {\n @Override\n public void onDestroy() {\n\n }\n\n }\n\n @Nullable\n @Override\n public myWatchFaceService.myCanvasRender.myShareAssets createSharedAssets(@NonNull Continuation completion) {\n return new myWatchFaceService.myCanvasRender.myShareAssets();\n }\n\n private Paint createTextPaint(int defaultInteractiveColor) {\n return createTextPaint(defaultInteractiveColor, NORMAL_TYPEFACE);\n }\n\n private Paint createTextPaint(int defaultInteractiveColor, Typeface typeface) {\n Paint paint = new Paint();\n paint.setColor(defaultInteractiveColor);\n paint.setTypeface(typeface);\n paint.setAntiAlias(true);\n return paint;\n }\n\n @SuppressLint(\"DefaultLocale\")\n private String formatTwoDigitNumber(int hour) {\n return String.format(\"%02d\", hour);\n }\n\n private int convertTo12Hour(int hour) {\n int result = hour % 12;\n return (result == 0) ? 12 : result;\n }\n\n private String getAmPmString(int hour) {\n return (hour < 12) ? mAmString : mPmString;\n }\n\n public myCanvasRender(@NonNull Context mcontext, @NonNull SurfaceHolder msurfaceHolder, @NonNull WatchState mwatchState, @NonNull ComplicationSlotsManager mcomplicationSlotsManager, @NonNull final CurrentUserStyleRepository mcurrentUserStyleRepository, int mcanvasType) {\n super(msurfaceHolder, mcurrentUserStyleRepository, mwatchState, mcanvasType, FRAME_PERIOD_MS_DEFAULT, false);\n\n context = mcontext;\n surfaceHolder = msurfaceHolder;\n watchState = mwatchState;\n complicationSlotsManager = mcomplicationSlotsManager;\n currentUserStyleRepository = mcurrentUserStyleRepository;\n canvasType = mcanvasType;\n\n //setup initial Paint colors.\n mBackgroundPaint = new Paint();\n mBackgroundPaint.setColor(Color.BLACK);\n mBackgroundPaint.setAntiAlias(true);\n\n Resources resources = myWatchFaceService.this.getResources();\n //setup variables.\n mYOffset = resources.getDimension(R.dimen.digital_y_offset);\n mAmString = resources.getString(R.string.digital_am);\n mPmString = resources.getString(R.string.digital_pm);\n\n mBackgroundPaint = new Paint();\n mBackgroundPaint.setColor(mInteractiveBackgroundColor);\n mHourPaint = createTextPaint(mInteractiveHourDigitsColor, BOLD_TYPEFACE);\n mMinutePaint = createTextPaint(mInteractiveMinuteDigitsColor);\n mSecondPaint = createTextPaint(mInteractiveSecondDigitsColor);\n mAmPmPaint = createTextPaint(ContextCompat.getColor(getApplicationContext(), R.color.digital_am_pm));\n mColonPaint = createTextPaint(ContextCompat.getColor(getApplicationContext(), R.color.digital_colons));\n\n\n surfaceHolder.getSurfaceFrame();\n\n boolean isRound = true; //how determine it's round or not?\n mXOffset = resources.getDimension(isRound ? R.dimen.digital_x_offset_round : R.dimen.digital_x_offset);\n float textSize = resources.getDimension(isRound ? R.dimen.digital_text_size_round : R.dimen.digital_text_size);\n float amPmSize = resources.getDimension(isRound ? R.dimen.digital_am_pm_size_round : R.dimen.digital_am_pm_size);\n\n mHourPaint.setTextSize(textSize);\n mMinutePaint.setTextSize(textSize);\n mSecondPaint.setTextSize(textSize);\n mAmPmPaint.setTextSize(amPmSize);\n mColonPaint.setTextSize(textSize);\n\n mColonWidth = mColonPaint.measureText(COLON_STRING);\n\n }\n }\n\n\n}\n", "meta": {"content_hash": "662289d194fa0dc24681026778ef4ff9", "timestamp": "", "source": "github", "line_count": 245, "max_line_length": 279, "avg_line_length": 40.4, "alnum_prop": 0.669529197817741, "repo_name": "JimSeker/wearable", "id": "abfa747f133f1cd01d61ecddfafdfe7a860b8f13", "size": "9898", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "wear3/myWatchFace/wear/src/main/java/edu/cs4730/mywatchface/myWatchFaceService.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Java", "bytes": "206738"}]}}
{"text": "\n\npackage android.net;\n\n/**\n * Thrown when parsing a URL fails.\n */\n// See non-public class {@link WebAddress}.\npublic class ParseException extends RuntimeException {\n public String response;\n\n ParseException(String response) {\n this.response = response;\n }\n}\n", "meta": {"content_hash": "ae4c16d0b0593890cfc31e9b836bc7dd", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 54, "avg_line_length": 18.4, "alnum_prop": 0.6884057971014492, "repo_name": "haikuowuya/android_system_code", "id": "68b209b6d81ba3aaa6c7d1047002a99a36863e93", "size": "895", "binary": false, "copies": "16", "ref": "refs/heads/master", "path": "src/android/net/ParseException.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "C", "bytes": "182432"}, {"name": "Java", "bytes": "124952631"}]}}
{"text": "\ufeff// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.\n// See the LICENCE file in the repository root for full licence text.\n\nusing System;\n\nnamespace osu.Game.Database\n{\n /// \n /// Represents a model manager that publishes events when s are added or removed.\n /// \n /// The model type.\n public interface IModelManager\n where TModel : class\n {\n event Action ItemAdded;\n\n event Action ItemRemoved;\n }\n}\n", "meta": {"content_hash": "87745d719286916d2f08eb1280091505", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 114, "avg_line_length": 30.63157894736842, "alnum_prop": 0.6752577319587629, "repo_name": "EVAST9919/osu", "id": "1bdbbb48e6fd1e0ad490e51500a5b4b4f818bca8", "size": "584", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "osu.Game/Database/IModelManager.cs", "mode": "33188", "license": "mit", "language": [{"name": "C#", "bytes": "6595208"}, {"name": "PowerShell", "bytes": "936"}, {"name": "Ruby", "bytes": "7983"}]}}
{"text": "package streaming_mysql_backup_tool \n/*\n* File Generated by enaml generator\n* !!! Please do not edit this file !!!\n*/\ntype BackupServer struct {\n\n\t/*Port - Descr: Port number used for listening for backup requests Default: 8081\n*/\n\tPort interface{} `yaml:\"port,omitempty\"`\n\n}", "meta": {"content_hash": "b02fed02f45e12ec0b36e42ef9c22b02", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 81, "avg_line_length": 22.916666666666668, "alnum_prop": 0.72, "repo_name": "enaml-ops/ert-plugin", "id": "719c1e482e14dbdb6461ccc5f649da60a8bf2e08", "size": "275", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "enaml-gen/streaming-mysql-backup-tool/backupserver.go", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Go", "bytes": "862257"}, {"name": "Shell", "bytes": "521"}]}}
{"text": "\n\n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n statsmodels.discrete.conditional_models.ConditionalLogit.information — statsmodels\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n Skip to content \n \n\n \n \n \n \n \n
\n
\n \n \n
\n \n \n \n \n", "meta": {"content_hash": "65f322fdc20f8e09ace6d084bb6570eb", "timestamp": "", "source": "github", "line_count": 515, "max_line_length": 999, "avg_line_length": 39.15339805825243, "alnum_prop": 0.6077167228724459, "repo_name": "statsmodels/statsmodels.github.io", "id": "cce2ec1c243b5a1471de2a0740b55c02c09838c2", "size": "20168", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "stable/generated/statsmodels.discrete.conditional_models.ConditionalLogit.information.html", "mode": "33188", "license": "bsd-3-clause", "language": []}}
{"text": "'use strict';\n\nconst async = require(`async`);\nconst Router = require(`express`).Router;\nconst router = new Router();\nconst jwtAuth = require(`./authentication`);\nconst sqlite3 = require(`../lib/sqlite3`).getInstance();\nconst bcrypt = require(`bcrypt`);\n\nconst nmcli = require(`../lib/nmcli`);\n\nrouter.get(`/access_points`, jwtAuth.authorizeRequest, (req, res, next) => {\n nmcli.listAp((err, result) => {\n if (err) {\n return next(err);\n }\n\n return res.json({ error: false, result });\n });\n});\n\nrouter.get(`/wireless_devices`, (req, res) =>\n res.json(nmcli.listWirelessDevice())\n);\n\nrouter.get(`/wifi_active_connections`, jwtAuth.authorizeRequest, (req, res, next) => {\n const devices = nmcli.listWirelessDevice()\n .filter(dev => dev.state === `connected`)\n .map(dev => dev.device);\n\n async.map(devices, (device, done) => {\n nmcli.activeConnectionOnIface(device, (err, connection) => {\n if (err) return done(err);\n return done(null, connection);\n });\n },\n\n (err, result) => {\n if (err) {\n return next(err);\n }\n\n return res.json({ active_connections: result });\n });\n});\n\nrouter.post(`/connect`, jwtAuth.authorizeRequest, (req, res, next) => {\n nmcli.connect(req.body.ssid, req.body.password, req.body.force, (err) => {\n if (err) {\n return next(new Error(`Failed to connect to AP. Try force connect & change the password`));\n }\n\n return res.json({ error: false, connected: true });\n });\n});\n\nrouter.post(`/disconnect`, jwtAuth.authorizeRequest, (req, res, next) => {\n nmcli.disconnect(req.body.iface, (err) => {\n if (err) {\n return next(new Error(`Failed to disconnect interface ${req.body.iface}`));\n }\n\n return res.json({ error: false, disconnected: true });\n });\n});\n\nrouter.post(`/login`, jwtAuth.authenticate);\n\nrouter.post(`/change_pass`, jwtAuth.authorizeRequest, (req, res, next) => {\n sqlite3.serialize(() => {\n const payload = {\n oldPassword: req.body.oldPassword,\n newPassword: req.body.newPassword,\n confirmNewPassword: req.body.confirmNewPassword,\n };\n\n const username = req.jwt_token.username;\n\n if (payload.newPassword !== payload.confirmNewPassword) {\n const error = new Error(`Password & confirm password do not match`);\n error.status = 401;\n\n return next(error);\n }\n\n return sqlite3.get(`SELECT * FROM account WHERE username = \"${username}\"`, (getErr, user) => {\n if (getErr) {\n return next(new Error(`Failed to verify old password`));\n }\n\n if (!user) {\n return next(new Error(`User is not found`));\n }\n\n if (!bcrypt.compareSync(payload.oldPassword, user.password)) {\n return next(new Error(`Old password mismatch`));\n }\n\n const hashed = bcrypt.hashSync(payload.newPassword, 8);\n\n return sqlite3.run(`UPDATE account SET password = \"${hashed}\" WHERE username = \"${username}\"`, (updateErr) => {\n if (updateErr) {\n return next(new Error(`Failed to update password`));\n }\n\n return res.json({ error: false, updated: true });\n });\n });\n });\n});\n\nmodule.exports = router;\n", "meta": {"content_hash": "9d681df44e78a1ab31ca293242bfe497", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 117, "avg_line_length": 27.857142857142858, "alnum_prop": 0.6198717948717949, "repo_name": "alwint3r/wlanturn", "id": "f77c6510c0270c95e3b25bab1b88678466f0b439", "size": "3120", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "middlewares/api.js", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "473"}, {"name": "HTML", "bytes": "1135"}, {"name": "JavaScript", "bytes": "45407"}]}}
{"text": "get('page', 1);\n $pageSize = $this->container->getParameter('page_size');\n\n $user = $this->getAuthenticatedUser();\n\n $interactor = $this->getInteractor(SecurityInteractorRegister::FIND_COMPANIES);\n\n $request = new FindCompaniesRequest($user ? $user->getId() : null, $page - 1, $pageSize);\n $presenter = new CompaniesPresenter();\n\n $interactor->process($request, $presenter);\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $presenter,\n $page,\n $pageSize\n );\n\n return array(\n 'pagination' => $pagination\n );\n }\n\n /**\n * @Route(\"/new\", name=\"company_new\")\n * @Template\n */\n public function newAction(Request $request)\n {\n return $this->processForm($request);\n }\n\n /**\n * @Route(\"/{id}/edit\", name=\"company_edit\")\n * @Template\n */\n public function editAction(Request $request, $id)\n {\n return $this->processForm($request, $id);\n }\n\n /**\n * @Route(\"/{id}/delete\", name=\"company_delete\")\n * @Template\n */\n public function deleteAction($id)\n {\n $user = $this->getAuthenticatedUser();\n\n $interactor = $this->getInteractor(SecurityInteractorRegister::DELETE_COMPANY);\n\n $request = new DeleteCompanyRequest($user ? $user->getId() : null, $id);\n $presenter = new CompanyPresenter();\n\n $interactor->process($request, $presenter);\n\n $this->addFlash('success', 'flash.company.deleted', array('%company%' => $presenter->getCompany()));\n\n return $this->redirect($this->generateUrl('companies'));\n }\n\n private function processForm(Request $request, $id = null)\n {\n /** @var CompanyFormProcessor $processor */\n $processor = $this->get('company_form_processor');\n\n $processor->process($request, $id);\n\n if ($processor->isValid()) {\n $this->addFlash('success', $id ? 'flash.company.updated' : 'flash.company.created', array('%company%' => $processor->getCompany()));\n\n if ($processor->isRedirectingTo(CompanyFormProcessor::REDIRECT_TO_LIST))\n return $this->redirect($this->generateUrl('companies'));\n\n return $this->redirect($this->generateUrl('company_edit', array(\n 'id' => $processor->getCompany()->getId())\n ));\n }\n\n $form = $processor->getForm();\n\n return array(\n 'errors' => $processor->getErrors(),\n 'form' => $form->createView()\n );\n }\n\n}\n\n", "meta": {"content_hash": "c73eb0d1cfd83ea266131a48e8cdf63f", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 144, "avg_line_length": 29.915254237288135, "alnum_prop": 0.6235127478753542, "repo_name": "disider/SecurityBundle", "id": "451c1df457eb7ff27577bc6e320f240d860c52aa", "size": "3530", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Controller/CompanyController.php", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "18720"}, {"name": "JavaScript", "bytes": "9957"}, {"name": "PHP", "bytes": "216649"}]}}
{"text": "ACCEPTED\n\n#### According to\nInternational Plant Names Index\n\n#### Published in\nnull\n\n#### Original name\nnull\n\n### Remarks\nnull", "meta": {"content_hash": "f5a3c452b05a7614736653083fefe29c", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 31, "avg_line_length": 9.692307692307692, "alnum_prop": 0.7063492063492064, "repo_name": "mdoering/backbone", "id": "b490a36887c9a685310c1056bd603f62162dbe9c", "size": "183", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Pteridophyta/Polypodiopsida/Polypodiales/Dryopteridaceae/Elaphoglossum/Elaphoglossum heterochroum/README.md", "mode": "33188", "license": "apache-2.0", "language": []}}
{"text": "local require = require\nlocal rawget = rawget\nlocal pairs = pairs\n\nlocal table = require \"loop.table\"\n\nmodule \"loop.simple\"\n--------------------------------------------------------------------------------\nlocal ObjectCache = require \"loop.collection.ObjectCache\"\nlocal base = require \"loop.base\"\n--------------------------------------------------------------------------------\ntable.copy(base, _M)\n--------------------------------------------------------------------------------\nlocal DerivedClass = ObjectCache {\n\tretrieve = function(self, super)\n\t\treturn base.class { __index = super, __call = new }\n\tend,\n}\nfunction class(class, super)\n\tif super\n\t\tthen return DerivedClass[super](initclass(class))\n\t\telse return base.class(class)\n\tend\nend\n--------------------------------------------------------------------------------\nfunction isclass(class)\n\tlocal metaclass = classof(class)\n\tif metaclass then\n\t\treturn metaclass == rawget(DerivedClass, metaclass.__index) or\n\t\t base.isclass(class)\n\tend\nend\n--------------------------------------------------------------------------------\nfunction superclass(class)\n\tlocal metaclass = classof(class)\n\tif metaclass then return metaclass.__index end\nend\n--------------------------------------------------------------------------------\nfunction subclassof(class, super)\n\twhile class do\n\t\tif class == super then return true end\n\t\tclass = superclass(class)\n\tend\n\treturn false\nend\n--------------------------------------------------------------------------------\nfunction instanceof(object, class)\n\treturn subclassof(classof(object), class)\nend\n", "meta": {"content_hash": "92c9464c88325b9093a2d18d6d8a1997", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 80, "avg_line_length": 32.51020408163265, "alnum_prop": 0.4783427495291902, "repo_name": "ld-test/oil", "id": "860cc17ce076c7b8731a1509b1b938499d445657", "size": "3619", "binary": false, "copies": "13", "ref": "refs/heads/master", "path": "lua/loop/simple.lua", "mode": "33188", "license": "mit", "language": [{"name": "C", "bytes": "159816"}, {"name": "Lua", "bytes": "1003003"}, {"name": "Makefile", "bytes": "13314"}, {"name": "Shell", "bytes": "6060"}]}}
{"text": "\nnamespace tpp {\n\n/*! \\file assert.hpp\n \\brief Implements a better 'Assert'\n */\n\n#ifndef REVIVER_ASSERT_HPP\n#define REVIVER_ASSERT_HPP\n\n\n/*! \\def MyAssertFunction\n \\brief Function used by 'Assert' function in _DEBUG mode.\n \n Details.\n*/\n//Fix for Visual Studio C++ needing full definition of MyAssertFunction\n#if defined _MSC_VER\n\textern bool MyAssertFunction( bool b, char* desc, int line, char* file) {return 1;};\n#else\n\textern bool MyAssertFunction( bool b, char* desc, int line, char* file);\n#endif\n\n#if defined( _DEBUG )\n#define Assert( exp, description ) tpp::MyAssertFunction( (int)(exp), description, __LINE__, __FILE__ )\n#else\n#define Assert( exp, description )\n#endif\n\n\n#endif\n\n}\n", "meta": {"content_hash": "eceac01f903f7e9daf6addf84a373a83", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 103, "avg_line_length": 21.363636363636363, "alnum_prop": 0.6921985815602837, "repo_name": "HellicarAndLewis/Stripes", "id": "45bb0a006ca4f7a7ca641634f5cd59a865485f42", "size": "705", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "addons/ofxContourAnalysis/triangle/assert.hpp", "mode": "33261", "license": "mit", "language": [{"name": "C", "bytes": "52546"}, {"name": "C++", "bytes": "809884"}]}}
{"text": "struct TripAlight {\n edgepayload_t type;\n long external_id;\n State* (*walk)(struct EdgePayload*, struct State*, struct WalkOptions*);\n State* (*walkBack)(struct EdgePayload*, struct State*, struct WalkOptions*);\n \n int n;\n int* arrivals;\n char** trip_ids;\n int* stop_sequences;\n \n ServiceCalendar* calendar;\n Timezone* timezone;\n int agency;\n ServiceId service_id;\n \n int overage; //number of seconds schedules past midnight of the last departure. If it's at 12:00:00, the overage is 0.\n} ;\n\nTripAlight*\nalNew( ServiceId service_id, ServiceCalendar* calendar, Timezone* timezone, int agency );\n\nvoid\nalDestroy(TripAlight* this);\n\nServiceCalendar*\nalGetCalendar( TripAlight* this );\n\nTimezone*\nalGetTimezone( TripAlight* this );\n\nint\nalGetAgency( TripAlight* this );\n\nServiceId\nalGetServiceId( TripAlight* this );\n\nint\nalGetNumAlightings(TripAlight* this);\n\nvoid\nalAddAlighting(TripAlight* this, char* trip_id, int arrival, int stop_sequence);\n\nchar*\nalGetAlightingTripId(TripAlight* this, int i);\n\nint\nalGetAlightingArrival(TripAlight* this, int i);\n\nint\nalGetAlightingStopSequence(TripAlight* this, int i);\n\nint\nalSearchAlightingsList(TripAlight* this, int time);\n\nint\nalGetLastAlightingIndex(TripAlight* this, int time);\n\nint\nalGetOverage(TripAlight* this);\n\nint\nalGetAlightingIndexByTripId(TripAlight* this, char* trip_id);\n\ninline State*\nalWalk(EdgePayload* this, State* state, WalkOptions* options);\n\ninline State*\nalWalkBack(EdgePayload* this, State* state, WalkOptions* options);\n\n#endif\n", "meta": {"content_hash": "bbbd05b15f5d4e44d24a877f66fe0ae6", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 122, "avg_line_length": 21.732394366197184, "alnum_prop": 0.7414128321451717, "repo_name": "bmander/graphserver", "id": "524859f6a63259fe3437164cb8b3ac3074a2bc9a", "size": "1675", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "core/edgetypes/tripalight.h", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "C", "bytes": "200078"}, {"name": "Python", "bytes": "428337"}]}}
{"text": "\nUTF-8\n\n AboutDialog\n \n \n \n Tietoa Bitcoinista\n \n \n \n \n <b>Bitcoin</b> versio\n \n \n \n \n Copyright \u00a9 2009-2012 Bitcoin Developers\n\nThis is experimental software.\n\nDistributed under the MIT/X11 software license, see the accompanying file license.txt or http://www.opensource.org/licenses/mit-license.php.\n\nThis product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.\n \n\n\n AddressBookPage\n \n \n \n Osoitekirja\n \n \n \n \n N\u00e4m\u00e4 ovat sinun Bitcoin-osoitteesi suoritusten vastaanottamiseen. Voit halutessasi antaa kullekin l\u00e4hett\u00e4j\u00e4lle eri osoitteen, jotta voit seurata kuka sinulle maksaa.\n \n \n \n \n Kaksoisnapauta muokataksesi osoitetta tai nime\u00e4\n \n \n \n \n Luo uusi osoite\n \n \n \n \n Kopioi valittu osoite leikep\u00f6yd\u00e4lle\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n N\u00e4yt\u00e4 &QR-koodi\n \n \n \n \n Allekirjoita viesti mill\u00e4 todistat omistavasi t\u00e4m\u00e4n osoitteen\n \n \n \n \n &Allekirjoita viesti\n \n \n \n \n Poista valittuna oleva osoite listasta. Vain l\u00e4hett\u00e4miseen k\u00e4ytett\u00e4vi\u00e4 osoitteita voi poistaa.\n \n \n \n \n &Poista\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Vie osoitekirja\n \n \n \n \n Comma separated file (*.csv)\n \n \n \n \n Virhe viedess\u00e4 osoitekirjaa\n \n \n \n \n Ei voida kirjoittaa tiedostoon %1.\n \n\n\n AddressTableModel\n \n \n \n Nimi\n \n \n \n \n Osoite\n \n \n \n \n (ei nime\u00e4)\n \n\n\n AskPassphraseDialog\n \n \n \n \n \n \n \n \n Anna tunnuslause\n \n \n \n \n Uusi tunnuslause\n \n \n \n \n Toista uusi tunnuslause\n \n \n \n \n Anna lompakolle uusi tunnuslause.<br/>K\u00e4yt\u00e4 tunnuslausetta, jossa on ainakin <b>10 satunnaista mekki\u00e4</b> tai <b>kahdeksan sanaa</b>.\n \n \n \n \n Salaa lompakko\n \n \n \n \n T\u00e4t\u00e4 toimintoa varten sinun t\u00e4ytyy antaa lompakon tunnuslause sen avaamiseksi.\n \n \n \n \n Avaa lompakko\n \n \n \n \n T\u00e4t\u00e4 toimintoa varten sinun t\u00e4ytyy antaa lompakon tunnuslause salauksen purkuun.\n \n \n \n \n Pura lompakon salaus\n \n \n \n \n Vaihda tunnuslause\n \n \n \n \n Anna vanha ja uusi tunnuslause.\n \n \n \n \n Hyv\u00e4ksy lompakon salaus\n \n \n \n \n VAROITUS: Mik\u00e4li salaat lompakkosi ja unohdat tunnuslauseen, <b>MENET\u00c4T LOMPAKON KOKO SIS\u00c4LL\u00d6N</b>!\nTahdotko varmasti salata lompakon?\n \n \n \n \n \n Lompakko salattu\n \n \n \n \n Bitcoin sulkeutuu lopettaakseen salausprosessin. Muista, ett\u00e4 salattu lompakko ei t\u00e4ysin suojaa sit\u00e4 haittaohjelmien aiheuttamilta varkauksilta.\n \n \n \n \n \n Varoitus: Caps Lock on p\u00e4\u00e4ll\u00e4.\n \n \n \n \n \n \n \n Lompakon salaus ep\u00e4onnistui\n \n \n \n \n Lompakon salaaminen ep\u00e4onnistui sis\u00e4isen virheen vuoksi. Lompakkoa ei salattu.\n \n \n \n \n \n Annetut tunnuslauseet eiv\u00e4t t\u00e4sm\u00e4\u00e4.\n \n \n \n \n Lompakon avaaminen ep\u00e4onnistui.\n \n \n \n \n \n \n Annettu tunnuslause oli v\u00e4\u00e4r\u00e4.\n \n \n \n \n Lompakon salauksen purku ep\u00e4onnistui.\n \n \n \n \n Lompakon tunnuslause on vaihdettu.\n \n\n\n BitcoinGUI\n \n \n \n Bitcoin-lompakko\n \n \n \n \n \n \n \n \n \n N\u00e4yt\u00e4/K\u00e4tke &Bitcoin\n \n \n \n \n Synkronoidaan verkon kanssa...\n \n \n \n \n &Yleisn\u00e4kym\u00e4\n \n \n \n \n N\u00e4ytt\u00e4\u00e4 kokonaiskatsauksen lompakon tilanteesta\n \n \n \n \n &Rahansiirrot\n \n \n \n \n Selaa rahansiirtohistoriaa\n \n \n \n \n &Osoitekirja\n \n \n \n \n Muokkaa tallennettujen nimien ja osoitteiden listaa\n \n \n \n \n &Vastaanota Bitcoineja\n \n \n \n \n N\u00e4yt\u00e4 Bitcoinien vastaanottamiseen k\u00e4ytetyt osoitteet\n \n \n \n \n &L\u00e4het\u00e4 Bitcoineja\n \n \n \n \n Todista ett\u00e4 hallitset osoitetta\n \n \n \n \n L&opeta\n \n \n \n \n Lopeta ohjelma\n \n \n \n \n &Tietoja %1\n \n \n \n \n N\u00e4yt\u00e4 tietoa Bitcoin-projektista\n \n \n \n \n Tietoja &Qt\n \n \n \n \n N\u00e4yt\u00e4 tietoja QT:ta\n \n \n \n \n &Asetukset...\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ~%n lohko j\u00e4ljell\u00e4~%n lohkoja j\u00e4ljell\u00e4\n \n \n \n \n Ladattu %1 / %2 lohkoista rahansiirtohistoriasta (%3% suoritettu).\n \n \n \n \n &Vie...\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n N\u00e4yt\u00e4 tai piillota Bitcoin-ikkuna\n \n \n \n \n Vie auki olevan v\u00e4lilehden tiedot tiedostoon\n \n \n \n \n Salaa tai poista salaus lompakosta\n \n \n \n \n Varmuuskopioi lompakko toiseen sijaintiin\n \n \n \n \n Vaihda lompakon salaukseen k\u00e4ytett\u00e4v\u00e4 tunnuslause\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n &Tiedosto\n \n \n \n \n &Asetukset\n \n \n \n \n &Apua\n \n \n \n \n V\u00e4lilehtipalkki\n \n \n \n \n Toimintopalkki\n \n \n \n \n \n [testnet]\n \n \n \n \n \n Bitcoin-asiakas\n \n \n \n \n %n aktiivinen yhteys Bitcoin-verkkoon%n aktiivista yhteytt\u00e4 Bitcoin-verkkoon\n \n \n \n \n Ladattu %1 lohkoa rahansiirron historiasta.\n \n \n \n \n %n sekunti sitten%n sekuntia sitten\n \n \n \n \n %n minuutti sitten%n minuuttia sitten\n \n \n \n \n %n tunti sitten%n tuntia sitten\n \n \n \n \n %n p\u00e4iv\u00e4 sitten%n p\u00e4iv\u00e4\u00e4 sitten\n \n \n \n \n Rahansiirtohistoria on ajan tasalla\n \n \n \n \n Kurotaan kiinni...\n \n \n \n \n Viimeisin vastaanotettu lohko tuotettu %1.\n \n \n \n \n T\u00e4m\u00e4 rahansiirto ylitt\u00e4\u00e4 kokorajoituksen. Voit siit\u00e4 huolimatta l\u00e4hett\u00e4\u00e4 sen %1 siirtopalkkion mik\u00e4 menee solmuille jotka k\u00e4sittelev\u00e4t rahansiirtosi t\u00e4m\u00e4 auttaa my\u00f6s verkostoa. Haluatko maksaa siirtopalkkion? \n \n \n \n \n \n \n \n \n \n L\u00e4hetetyt rahansiirrot\n \n \n \n \n Saapuva rahansiirto\n \n \n \n \n P\u00e4iv\u00e4: %1\nM\u00e4\u00e4r\u00e4: %2\nTyyppi: %3\nOsoite: %4\n \n \n \n \n Lompakko on <b>salattu</b> ja t\u00e4ll\u00e4 hetkell\u00e4 <b>avoinna</b>\n \n \n \n \n Lompakko on <b>salattu</b> ja t\u00e4ll\u00e4 hetkell\u00e4 <b>lukittuna</b>\n \n \n \n \n Varmuuskopioi lompakko\n \n \n \n \n Lompakkodata (*.dat)\n \n \n \n \n Varmuuskopio ep\u00e4onnistui\n \n \n \n \n Virhe tallennettaessa lompakkodataa uuteen sijaintiin.\n \n \n \n \n \n \n\n\n ClientModel\n \n \n \n \n \n\n\n DisplayOptionsPage\n \n \n \n N\u00e4ytt\u00f6\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Valitse oletus lis\u00e4m\u00e4\u00e4re mik\u00e4 n\u00e4kyy k\u00e4ytt\u00f6liittym\u00e4ss\u00e4 ja kun l\u00e4het\u00e4t kolikoita\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n EditAddressDialog\n \n \n \n Muokkaa osoitetta\n \n \n \n \n &Nimi\n \n \n \n \n T\u00e4h\u00e4n osoitteeseen liitetty nimi\n \n \n \n \n &Osoite\n \n \n \n \n Osoite, joka liittyy t\u00e4m\u00e4n osoitekirjan merkint\u00e4\u00e4n. T\u00e4t\u00e4 voidaan muuttaa vain l\u00e4hteviss\u00e4 osoitteissa.\n \n \n \n \n Uusi vastaanottava osoite\n \n \n \n \n Uusi l\u00e4hett\u00e4v\u00e4 osoite\n \n \n \n \n Muokkaa vastaanottajan osoitetta\n \n \n \n \n Muokkaa l\u00e4htev\u00e4\u00e4 osoitetta\n \n \n \n \n Osoite "%1" on jo osoitekirjassa.\n \n \n \n \n \n \n \n \n \n Lompakkoa ei voitu avata.\n \n \n \n \n Uuden avaimen luonti ep\u00e4onnistui.\n \n\n\n HelpMessageBox\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n K\u00e4ytt\u00f6:\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Set language, for example "de_DE" (default: system locale)\n \n \n \n \n K\u00e4ynnist\u00e4 pienennettyn\u00e4\n \n \n \n \n N\u00e4yt\u00e4 aloitusruutu k\u00e4ynnistett\u00e4ess\u00e4 (oletus: 1)\n \n\n\n MainOptionsPage\n \n \n \n \n \n \n \n \n Maksa rahansiirtopalkkio\n \n \n \n \n Yleiset\n \n \n \n \n Vapaaehtoinen rahansiirtopalkkio per kB auttaa nopeuttamaan siirtoja. Useimmat rahansiirrot ovat 1 kB. 0.01 palkkio on suositeltava.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n MessagePage\n \n \n \n \n \n \n \n \n Voit allekirjoittaa viestit omalla osoitteellasi todistaaksesi ett\u00e4 omistat ne. Ole huolellinen, ett\u00e4 et allekirjoita mit\u00e4\u00e4n ep\u00e4m\u00e4\u00e4r\u00e4ist\u00e4, phishing-hy\u00f6kk\u00e4\u00e4j\u00e4t voivat huijata sinua allekirjoittamaan luovuttamalla henkil\u00f6llisyytesi. Allekirjoita selvitys t\u00e4ysin yksityiskohtaisesti mihin olet sitoutunut.\n \n \n \n \n Osoite mill\u00e4 viesti allekirjoitetaan (esim. \n1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)\n \n \n \n \n Valitse osoite osoitekirjasta\n \n \n \n \n Alt+A\n \n \n \n \n Liit\u00e4 osoite leikep\u00f6yd\u00e4lt\u00e4\n \n \n \n \n Alt+P\n \n \n \n \n Kirjoita t\u00e4h\u00e4n viesti mink\u00e4 haluat allekirjoittaa\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Klikkaa "Allekirjoita viesti" saadaksesi allekirjoituksen\n \n \n \n \n Allekirjoita viesti mill\u00e4 todistat omistavasi t\u00e4m\u00e4n osoitteen\n \n \n \n \n &Allekirjoita viesti\n \n \n \n \n Anna Bitcoin-osoite (esim. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)\n \n \n \n \n \n \n \n Virhe allekirjoitettaessa\n \n \n \n \n %1 ei ole kelvollinen osoite.\n \n \n \n \n \n \n \n \n \n Yksityisavain %1 :lle ei ole saatavilla.\n \n \n \n \n Allekirjoittaminen ep\u00e4onnistui\n \n\n\n NetworkOptionsPage\n \n \n \n \n \n \n \n \n Portin uudelleenohjaus &UPnP:ll\u00e4\n \n \n \n \n Avaa Bitcoin-asiakasohjelman portti reitittimell\u00e4 automaattisesti. T\u00e4m\u00e4 toimii vain, jos reitittimesi tukee UPnP:t\u00e4 ja se on k\u00e4yt\u00f6ss\u00e4.\n \n \n \n \n &Yhdist\u00e4 SOCKS4-v\u00e4lityspalvelimen kautta:\n \n \n \n \n Yhdist\u00e4 Bitcoin-verkkoon SOCKS4-v\u00e4lityspalvelimen kautta (esimerkiksi k\u00e4ytt\u00e4ess\u00e4 Tor:ia)\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n V\u00e4lityspalvelimen IP-osoite (esim. 127.0.0.1)\n \n \n \n \n Portti, johon Bitcoin-asiakasohjelma yhdist\u00e4\u00e4 (esim. 1234)\n \n\n\n OptionsDialog\n \n \n \n Asetukset\n \n\n\n OverviewPage\n \n \n \n Lomake\n \n \n \n \n \n \n \n \n \n \n Saldo:\n \n \n \n \n Rahansiirtojen lukum\u00e4\u00e4r\u00e4:\n \n \n \n \n Vahvistamatta:\n \n \n \n \n Lompakko\n \n \n \n \n <b>Viimeisimm\u00e4t rahansiirrot</b>\n \n \n \n \n Tilill\u00e4si t\u00e4ll\u00e4 hetkell\u00e4 olevien Bitcoinien m\u00e4\u00e4r\u00e4\n \n \n \n \n Niiden saapuvien rahansiirtojen m\u00e4\u00e4r\u00e4, joita Bitcoin-verkko ei viel\u00e4 ole ehtinyt vahvistaa ja siten eiv\u00e4t viel\u00e4 n\u00e4y saldossa.\n \n \n \n \n Lompakolla tehtyjen rahansiirtojen yhteism\u00e4\u00e4r\u00e4\n \n \n \n \n \n \n \n\n\n QRCodeDialog\n \n \n \n \n \n \n \n \n QR-koodi\n \n \n \n \n Vastaanota maksu\n \n \n \n \n M\u00e4\u00e4r\u00e4:\n \n \n \n \n BTC\n \n \n \n \n Tunniste:\n \n \n \n \n Viesti:\n \n \n \n \n &Tallenna nimell\u00e4...\n \n \n \n \n \n \n \n \n \n Tuloksen URI liian pitk\u00e4, yrit\u00e4 lyhent\u00e4\u00e4 otsikon teksti\u00e4 / viesti\u00e4.\n \n \n \n \n \n \n \n \n \n PNG kuvat (*png)\n \n\n\n RPCConsole\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n SendCoinsDialog\n \n \n \n \n \n \n \n \n \n \n L\u00e4het\u00e4 Bitcoineja\n \n \n \n \n L\u00e4het\u00e4 monelle vastaanottajalle\n \n \n \n \n \n \n \n \n \n Poista kaikki rahansiirtokent\u00e4t\n \n \n \n \n \n \n \n \n \n Saldo:\n \n \n \n \n 123,456 BTC\n \n \n \n \n Vahvista l\u00e4hetys\n \n \n \n \n &L\u00e4het\u00e4\n \n \n \n \n <b>%1</b> to %2 (%3)\n \n \n \n \n Hyv\u00e4ksy Bitcoinien l\u00e4hett\u00e4minen\n \n \n \n \n Haluatko varmasti l\u00e4hett\u00e4\u00e4 %1?\n \n \n \n \n ja \n \n \n \n \n Vastaanottajan osoite ei kelpaa, ole hyv\u00e4 ja tarkista\n \n \n \n \n Maksettavan summan tulee olla suurempi kuin 0 Bitcoinia.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n SendCoinsEntry\n \n \n \n Lomake\n \n \n \n \n M&\u00e4\u00e4r\u00e4:\n \n \n \n \n Maksun saaja:\n \n \n \n \n \n Anna nimi t\u00e4lle osoitteelle, jos haluat lis\u00e4t\u00e4 sen osoitekirjaan\n \n \n \n \n &Nimi:\n \n \n \n \n Osoite, johon Bitcoinit l\u00e4hetet\u00e4\u00e4n (esim. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)\n \n \n \n \n Valitse osoite osoitekirjasta\n \n \n \n \n Alt+A\n \n \n \n \n Liit\u00e4 osoite leikep\u00f6yd\u00e4lt\u00e4\n \n \n \n \n Alt+P\n \n \n \n \n Poista \n \n \n \n \n Anna Bitcoin-osoite (esim. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)\n \n\n\n TransactionDesc\n \n \n \n Avoinna %1 lohkolle\n \n \n \n \n Avoinna %1 asti\n \n \n \n \n %1/ei linjalla?\n \n \n \n \n %1/vahvistamaton\n \n \n \n \n %1 vahvistusta\n \n \n \n \n <b>Tila:</b> \n \n \n \n \n , ei ole viel\u00e4 onnistuneesti l\u00e4hetetty\n \n \n \n \n , l\u00e4hetet\u00e4\u00e4n %1 solmun kautta\n \n \n \n \n , l\u00e4hetet\u00e4\u00e4n %1 solmun kautta\n \n \n \n \n <b>P\u00e4iv\u00e4:</b> \n \n \n \n \n <b>L\u00e4hde:</b> Generoitu<br>\n \n \n \n \n \n <b>L\u00e4hett\u00e4j\u00e4:</b> \n \n \n \n \n tuntematon\n \n \n \n \n \n \n <b>Vast. ott.:</b>\n \n \n \n \n (sinun, tunniste: \n \n \n \n \n (sinun)\n \n \n \n \n \n \n \n <b>Krediitti:</b> \n \n \n \n \n (%1 er\u00e4\u00e4ntyy %2 useammassa lohkossa)\n \n \n \n \n (ei hyv\u00e4ksytty)\n \n \n \n \n \n \n <b>Debit:</b> \n \n \n \n \n <b>Rahansiirtomaksu:</b> \n \n \n \n \n <b>Nettom\u00e4\u00e4r\u00e4:</b> \n \n \n \n \n Viesti:\n \n \n \n \n Kommentti:\n \n \n \n \n Rahansiirron ID:\n \n \n \n \n Luotujen kolikoiden on odotettava 120 lohkoa ennen kuin ne voidaan k\u00e4ytt\u00e4\u00e4. Kun loit t\u00e4m\u00e4n lohkon, se l\u00e4hetettiin verkkoon lis\u00e4tt\u00e4v\u00e4ksi lohkoketjuun. Jos se ep\u00e4onnistuu ketjuun liittymisess\u00e4, sen tila muuttuu "ei hyv\u00e4ksytty" eik\u00e4 sit\u00e4 voi k\u00e4ytt\u00e4\u00e4. T\u00e4t\u00e4 voi silloin t\u00e4ll\u00f6in esiinty\u00e4 jos toinen solmu luo lohkon muutamia sekunteja omastasi.\n \n\n\n TransactionDescDialog\n \n \n \n Rahansiirron yksityiskohdat\n \n \n \n \n T\u00e4m\u00e4 ruutu n\u00e4ytt\u00e4\u00e4 yksityiskohtaisen tiedon rahansiirrosta\n \n\n\n TransactionTableModel\n \n \n \n P\u00e4iv\u00e4m\u00e4\u00e4r\u00e4\n \n \n \n \n Laatu\n \n \n \n \n Osoite\n \n \n \n \n M\u00e4\u00e4r\u00e4\n \n \n \n \n Auki %n lohkolleAuki %n lohkoille\n \n \n \n \n Avoinna %1 asti\n \n \n \n \n Ei yhteytt\u00e4 verkkoon (%1 vahvistusta)\n \n \n \n \n Vahvistamatta (%1/%2 vahvistusta)\n \n \n \n \n Vahvistettu (%1 vahvistusta)\n \n \n \n \n Louhittu saldo tulee saataville %n lohkossaLouhittu saldo tulee saataville %n lohkossa\n \n \n \n \n T\u00e4t\u00e4 lohkoa ei vastaanotettu mist\u00e4\u00e4n muusta solmusta ja sit\u00e4 ei mahdollisesti hyv\u00e4ksyt\u00e4!\n \n \n \n \n Generoitu mutta ei hyv\u00e4ksytty\n \n \n \n \n Vastaanotettu osoitteella\n \n \n \n \n Vastaanotettu\n \n \n \n \n Saaja\n \n \n \n \n Maksu itsellesi\n \n \n \n \n Louhittu\n \n \n \n \n (ei saatavilla)\n \n \n \n \n Rahansiirron tila. Siirr\u00e4 osoitin kent\u00e4n p\u00e4\u00e4lle n\u00e4hd\u00e4ksesi vahvistusten lukum\u00e4\u00e4r\u00e4.\n \n \n \n \n Rahansiirron vastaanottamisen p\u00e4iv\u00e4m\u00e4\u00e4r\u00e4 ja aika.\n \n \n \n \n Rahansiirron laatu.\n \n \n \n \n Rahansiirron kohteen Bitcoin-osoite\n \n \n \n \n Saldoon lis\u00e4tty tai siit\u00e4 v\u00e4hennetty m\u00e4\u00e4r\u00e4.\n \n\n\n TransactionView\n \n \n \n \n Kaikki\n \n \n \n \n T\u00e4n\u00e4\u00e4n\n \n \n \n \n T\u00e4ll\u00e4 viikolla\n \n \n \n \n T\u00e4ss\u00e4 kuussa\n \n \n \n \n Viime kuussa\n \n \n \n \n T\u00e4n\u00e4 vuonna\n \n \n \n \n Alue...\n \n \n \n \n Vastaanotettu osoitteella\n \n \n \n \n Saaja\n \n \n \n \n Itsellesi\n \n \n \n \n Louhittu\n \n \n \n \n Muu\n \n \n \n \n Anna etsitt\u00e4v\u00e4 osoite tai tunniste\n \n \n \n \n Minimim\u00e4\u00e4r\u00e4\n \n \n \n \n Kopioi osoite\n \n \n \n \n Kopioi nimi\n \n \n \n \n Kopioi m\u00e4\u00e4r\u00e4\n \n \n \n \n Muokkaa nime\u00e4\n \n \n \n \n \n \n \n \n \n Vie rahansiirron tiedot\n \n \n \n \n Comma separated file (*.csv)\n \n \n \n \n Vahvistettu\n \n \n \n \n Aika\n \n \n \n \n Laatu\n \n \n \n \n Nimi\n \n \n \n \n Osoite\n \n \n \n \n M\u00e4\u00e4r\u00e4\n \n \n \n \n ID\n \n \n \n \n Virhe tietojen vienniss\u00e4\n \n \n \n \n Ei voida kirjoittaa tiedostoon %1.\n \n \n \n \n Alue:\n \n \n \n \n kenelle\n \n\n\n VerifyMessageDialog\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Kopioi valittu osoite leikep\u00f6yd\u00e4lle\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n WalletModel\n \n \n \n L\u00e4hetet\u00e4\u00e4n...\n \n\n\n WindowOptionsPage\n \n \n \n \n \n \n \n \n &Pienenn\u00e4 ilmaisinalueelle ty\u00f6kalurivin sijasta\n \n \n \n \n N\u00e4yt\u00e4 ainoastaan pikkukuvake ikkunan pienent\u00e4misen j\u00e4lkeen\n \n \n \n \n \n \n \n \n \n Ikkunaa suljettaessa vain pienent\u00e4\u00e4 Bitcoin-ohjelman ikkunan lopettamatta itse ohjelmaa. Kun t\u00e4m\u00e4 asetus on valittuna, ohjelman voi sulkea vain valitsemalla Lopeta ohjelman valikosta.\n \n\n\n bitcoin-core\n \n \n \n Bitcoinin versio\n \n \n \n \n K\u00e4ytt\u00f6:\n \n \n \n \n L\u00e4het\u00e4 k\u00e4sky palvelimelle tai bitcoind:lle\n \n \n \n \n Lista komennoista\n \n \n \n \n Hanki apua k\u00e4skyyn\n \n \n \n \n Asetukset:\n \n \n \n \n M\u00e4\u00e4rit\u00e4 asetustiedosto (oletus: bitcoin.conf)\n \n \n \n \n M\u00e4\u00e4rit\u00e4 pid-tiedosto (oletus: bitcoin.pid)\n \n \n \n \n Generoi kolikoita\n \n \n \n \n \u00c4l\u00e4 generoi kolikoita\n \n \n \n \n M\u00e4\u00e4rit\u00e4 data-hakemisto\n \n \n \n \n Aseta tietokannan v\u00e4limuistin koko megatavuina (oletus: 25)\n \n \n \n \n Aseta tietokannan lokitiedoston koko megatavuina (oletus: 100)\n \n \n \n \n M\u00e4\u00e4rit\u00e4 yhteyden aikakatkaisu (millisekunneissa)\n \n \n \n \n Kuuntele yhteyksi\u00e4 portista <port> (oletus: 8333 tai testnet: 18333)\n \n \n \n \n Pid\u00e4 enint\u00e4\u00e4n <n> yhteytt\u00e4 verkkoihin (oletus: 125)\n \n \n \n \n Muodosta yhteys vain tiettyyn solmuun\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Kynnysarvo aikakatkaisulle heikosti toimiville verkoille (oletus: 100)\n \n \n \n \n Sekuntien m\u00e4\u00e4r\u00e4, kuinka kauan uudelleenkytkeydyt\u00e4\u00e4n verkkoihin (oletus: 86400)\n \n \n \n \n Maksimi verkkoyhteyden vastaanottopuskuri, <n>*1000 tavua (oletus: 10000)\n \n \n \n \n Maksimi verkkoyhteyden l\u00e4hetyspuskuri, <n>*1000 tavua (oletus: 10000)\n \n \n \n \n \n \n \n \n \n Hyv\u00e4ksy merkkipohjaiset- ja JSON-RPC-k\u00e4skyt\n \n \n \n \n Aja taustalla daemonina ja hyv\u00e4ksy komennot\n \n \n \n \n K\u00e4yt\u00e4 test -verkkoa\n \n \n \n \n Tulosta ylim\u00e4\u00e4r\u00e4ist\u00e4 debuggaustietoa\n \n \n \n \n Lis\u00e4\u00e4 debuggaustiedon tulostukseen aikaleima\n \n \n \n \n L\u00e4het\u00e4 j\u00e4ljitys/debug-tieto konsoliin, debug.log-tiedoston sijaan\n \n \n \n \n L\u00e4het\u00e4 j\u00e4ljitys/debug-tieto debuggeriin\n \n \n \n \n K\u00e4ytt\u00e4j\u00e4tunnus JSON-RPC-yhteyksille\n \n \n \n \n Salasana JSON-RPC-yhteyksille\n \n \n \n \n Kuuntele JSON-RPC -yhteyksi\u00e4 portista <port> (oletus: 8332)\n \n \n \n \n Salli JSON-RPC yhteydet tietyst\u00e4 ip-osoitteesta\n \n \n \n \n L\u00e4het\u00e4 k\u00e4skyj\u00e4 solmuun osoitteessa <ip> (oletus: 127.0.0.1)\n \n \n \n \n Suorita k\u00e4sky kun paras lohko muuttuu (%s cmd on vaihdettu block hashin kanssa)\n \n \n \n \n P\u00e4ivit\u00e4 lompakko uusimpaan formaattiin\n \n \n \n \n Aseta avainpoolin koko arvoon <n> (oletus: 100)\n \n \n \n \n Skannaa uudelleen lohkoketju lompakon puuttuvien rahasiirtojen vuoksi\n \n \n \n \n Kuinka monta lohkoa tarkistetaan k\u00e4ynnistett\u00e4ess\u00e4 (oletus: 2500, 0 = kaikki)\n \n \n \n \n Kuinka tiukka lohkovarmistus on (0-6, oletus: 1)\n \n \n \n \n \n \n \n \n \n SSL-asetukset: (lis\u00e4tietoja Bitcoin-Wikist\u00e4)\n \n \n \n \n K\u00e4yt\u00e4 OpenSSL:\u00e4\u00e4 (https) JSON-RPC-yhteyksille\n \n \n \n \n Palvelimen sertifikaatti-tiedosto (oletus: server.cert)\n \n \n \n \n Palvelimen yksityisavain (oletus: server.pem)\n \n \n \n \n Hyv\u00e4ksytt\u00e4v\u00e4 salaus (oletus:\nTLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)\n \n \n \n \n \n \n \n \n \n T\u00e4m\u00e4 ohjeviesti\n \n \n \n \n En p\u00e4\u00e4se k\u00e4siksi data-hakemiston lukitukseen %s. Bitcoin on todenn\u00e4k\u00f6isesti jo k\u00e4ynnistetty.\n \n \n \n \n Bitcoin\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Ladataan osoitteita...\n \n \n \n \n Virhe ladattaessa blkindex.dat-tiedostoa\n \n \n \n \n Virhe ladattaessa wallet.dat-tiedostoa: Lompakko vioittunut\n \n \n \n \n Virhe ladattaessa wallet.dat-tiedostoa: Tarvitset uudemman version Bitcoinista\n \n \n \n \n Lompakko tarvitsee uudelleenkirjoittaa: k\u00e4ynnist\u00e4 Bitcoin uudelleen\n \n \n \n \n Virhe ladattaessa wallet.dat-tiedostoa\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Virhe: Lompakko on lukittu, rahansiirtoa ei voida luoda\n \n \n \n \n Virhe: T\u00e4m\u00e4 rahansiirto vaatii rahansiirtopalkkion v\u00e4hint\u00e4\u00e4n %s johtuen sen m\u00e4\u00e4r\u00e4st\u00e4, monimutkaisuudesta tai hiljattain vastaanotettujen summien k\u00e4yt\u00f6st\u00e4\n \n \n \n \n Virhe: Rahansiirron luonti ep\u00e4onnistui\n \n \n \n \n L\u00e4hetet\u00e4\u00e4n...\n \n \n \n \n Virhe: Rahansiirto hyl\u00e4ttiin. T\u00e4m\u00e4 voi tapahtua jos jotkin bitcoineistasi on jo k\u00e4ytetty, esimerkiksi jos olet k\u00e4ytt\u00e4nyt kopiota wallet.dat-lompakkotiedostosta ja bitcoinit on merkitty k\u00e4ytetyksi vain kopiossa.\n \n \n \n \n Virheellinen m\u00e4\u00e4r\u00e4\n \n \n \n \n Lompakon saldo ei riit\u00e4\n \n \n \n \n Ladataan lohkoindeksi\u00e4...\n \n \n \n \n Lin\u00e4\u00e4 solmu mihin liitty\u00e4 pit\u00e4\u00e4ksesi yhteyden auki\n \n \n \n \n \n \n \n \n \n Etsi solmuja k\u00e4ytt\u00e4en internet relay chatia (oletus: 0)\n \n \n \n \n Hyv\u00e4ksyt\u00e4\u00e4n ulkopuoliset yhteydet (oletus: 1)\n \n \n \n \n Etsi solmuja k\u00e4ytt\u00e4m\u00e4ll\u00e4 DNS hakua (oletus: 1)\n \n \n \n \n K\u00e4yt\u00e4 Plug and Play kartoitusta kuunnellaksesi porttia (oletus: 1)\n \n \n \n \n K\u00e4yt\u00e4 Plug and Play kartoitusta kuunnellaksesi porttia (oletus: 0)\n \n \n \n \n Rahansiirtopalkkio per KB lis\u00e4t\u00e4\u00e4n l\u00e4hett\u00e4m\u00e4\u00e4si rahansiirtoon\n \n \n \n \n \n \n \n \n \n Ladataan lompakkoa...\n \n \n \n \n Et voi p\u00e4ivitt\u00e4\u00e4 lompakkoasi vanhempaan versioon\n \n \n \n \n Avainvarastoa ei voi alustaa\n \n \n \n \n Oletusosoitetta ei voi kirjoittaa\n \n \n \n \n Skannataan uudelleen...\n \n \n \n \n Lataus on valmis\n \n \n \n \n K\u00e4yt\u00e4 %s optiota\n \n \n \n \n %s, sinun t\u00e4ytyy asettaa rpcpassword asetustiedostoon:\n%s\nOn suositeltavaa k\u00e4ytt\u00e4\u00e4 seuraavaan satunnaista salasanaa:\nrpcuser=bitcoinrpc\nrpcpassword=%s\n(sinun ei tarvitse muistaa t\u00e4t\u00e4 salasanaa)\nJos tiedostoa ei ole, niin luo se ainoastaan omistajan kirjoitusoikeuksin.\n\n \n \n \n \n Virhe\n \n \n \n \n Virhe asetettaessa RCP-porttia %i kuunteluun: %s\n \n \n \n \n Sinun t\u00e4ytyy asettaa rpcpassword=<password> asetustiedostoon:\n%s\nJos tiedostoa ei ole, niin luo se ainoastaan omistajan kirjoitusoikeuksin.\n \n \n \n \n Varoitus: Tarkista, ovatko tietokoneesi p\u00e4iv\u00e4m\u00e4\u00e4r\u00e4 ja aika oikein. Mik\u00e4li aika on v\u00e4\u00e4rin, Bitcoin-ohjelma ei toimi oikein.\n \n\n", "meta": {"content_hash": "9d19f82a369d9fc9870815d3fb970aa3", "timestamp": "", "source": "github", "line_count": 2520, "max_line_length": 383, "avg_line_length": 43.58015873015873, "alnum_prop": 0.6466737083644443, "repo_name": "IeuanG/BHC", "id": "9008c1e3b5004ce446d6ca674ab85e7de1315c92", "size": "110359", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/qt/locale/bitcoin_fi.ts", "mode": "33261", "license": "mit", "language": [{"name": "C", "bytes": "14758"}, {"name": "C++", "bytes": "1432339"}, {"name": "Erlang", "bytes": "6839"}, {"name": "JavaScript", "bytes": "12"}, {"name": "Makefile", "bytes": "79169"}, {"name": "Objective-C++", "bytes": "2463"}, {"name": "PHP", "bytes": "1948"}, {"name": "Perl", "bytes": "16929"}, {"name": "Python", "bytes": "47538"}, {"name": "Shell", "bytes": "2615"}]}}
{"text": "\n\n\n\n\t\n\t\torg.oep.dossiermgt.model.PaymentFile\n\t\t\n\t\t\toep-core-dossiermgt\n\t\t\n\t\t2\n\t\t\n\t\t\t\n\t\t\t\tCREATE_PAYMENTFILE\n\t\t\t\tPERMISSIONS\n\t\t\t\tUPDATE_PAYMENTFILE\n\t\t\t\n\t\t\t\n\t\t\t\tCREATE_PAYMENTFILE\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\tPERMISSIONS\n\t\t\t\tUPDATE_PAYMENTFILE\n\t\t\t\n\t\t\n\t\n", "meta": {"content_hash": "02252013d43c2c9c5b20a71b33db9d63", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 164, "avg_line_length": 33.51851851851852, "alnum_prop": 0.7104972375690608, "repo_name": "openegovplatform/OEPv2", "id": "716a8f0e5568373e411e3cfd99858f2a9edf919e", "size": "905", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "oep-dossier-portlet/docroot/WEB-INF/src/resource-actions/paymentfile.xml", "mode": "33188", "license": "apache-2.0", "language": [{"name": "CSS", "bytes": "5166"}, {"name": "Java", "bytes": "45541534"}]}}
{"text": "package com.tutorialspoint.abstraction;\r\n\r\npublic class AbstractDemo {\r\n public static void main(String[] args) {\r\n /* Following is not allowed and would raise error */\r\n // Employee e = new Employee(\"George W.\", \"Houston, TX\", 43); // Compile time error\r\n Salary s = new Salary(\"Mohd Mohtashim\", \"Ambehta, UP\", 3, 3600.00);\r\n Employee e = new Salary(\"John Adams\", \"Boston, MA\", 2, 2400.00);\r\n\r\n System.out.println(\"Call mailCheck using Salary reference --\");\r\n s.mailCheck();\r\n\r\n System.out.println(\"\\nCall mailCheck using Employee reference--\");\r\n e.mailCheck();\r\n }\r\n}\r\n", "meta": {"content_hash": "80d5c9815131d8a2c7aa85e80bd0ed61", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 87, "avg_line_length": 37.4375, "alnum_prop": 0.6494156928213689, "repo_name": "antalpeti/Java-Tutorial", "id": "cb1a626739250ab543710691a5f0585ff9890a70", "size": "599", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/com/tutorialspoint/abstraction/AbstractDemo.java", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "549"}, {"name": "HTML", "bytes": "1147"}, {"name": "Java", "bytes": "409438"}]}}
{"text": "\ufeffusing System;\nusing System.Net;\nusing System.Net.Fakes;\nusing System.Net.Http;\nusing System.Net.Http.Fakes;\nusing System.Threading.Tasks;\nusing Microsoft.QualityTools.Testing.Fakes;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\nusing Newtonsoft.Json;\nusing Xciles.Uncommon.Net;\n\nnamespace Xciles.Uncommon.Tests.Net\n{\n [TestClass]\n public class UncommonRequestHelperExceptionTests\n {\n private readonly Person _person = new Person\n {\n DateOfBirth = DateTime.Now.Subtract(new TimeSpan(800, 1, 1, 1)),\n Firstname = \"First\",\n Lastname = \"Person\",\n PhoneNumber = \"0123456789\",\n SomeString = \"This is just a string\"\n };\n\n [TestMethod]\n public void ProcessGetRequestWebExceptionTest()\n {\n ProcessGetRequestWebExceptionTestAsync().Wait();\n }\n\n private async Task ProcessGetRequestWebExceptionTestAsync()\n {\n var exceptionObject = new ExceptionObject()\n {\n Description = \"This is a test Exception Description\",\n Message = \"This is a test Exception Message\",\n Type = EType.WrongHeaders\n };\n\n using (ShimsContext.Create())\n {\n\n ShimHttpClient.AllInstances.SendAsyncHttpRequestMessageCancellationToken = (client, message, arg3) =>\n {\n return Task.FromResult(new HttpResponseMessage()\n {\n Content = new StringContent(JsonConvert.SerializeObject(exceptionObject)),\n StatusCode = HttpStatusCode.BadRequest\n });\n };\n\n try\n {\n var result = await UncommonRequestHelper.ProcessGetRequestAsync(\"http://www.xciles.com/\");\n Assert.Fail(\"Should not be able to be here...\");\n }\n catch (UncommonRequestException ex)\n {\n Assert.IsTrue(ex.RequestExceptionStatus == EUncommonRequestExceptionStatus.ServiceError);\n Assert.IsTrue(ex.StatusCode == HttpStatusCode.BadRequest);\n\n var responseResult = ex.ConvertExceptionResponseToObject();\n Assert.IsTrue(responseResult != null);\n Assert.IsTrue(responseResult.Description == exceptionObject.Description);\n Assert.IsTrue(responseResult.Message == exceptionObject.Message);\n Assert.IsTrue(responseResult.Type == exceptionObject.Type);\n }\n }\n }\n\n\n\n [TestMethod]\n public void ProcessGetRequestHttpRequestExceptionTest()\n {\n ProcessGetRequestHttpRequestExceptionTestAsync().Wait();\n }\n\n private async Task ProcessGetRequestHttpRequestExceptionTestAsync()\n {\n var exceptionObject = new ExceptionObject()\n {\n Description = \"This is a test Exception Description\",\n Message = \"This is a test Exception Message\",\n Type = EType.WrongHeaders\n };\n\n using (ShimsContext.Create())\n {\n\n ShimHttpClient.AllInstances.SendAsyncHttpRequestMessageCancellationToken = (client, message, arg3) =>\n {\n //var webEx = new WebException(\"\", WebExceptionStatus.UnknownError, )\n throw new HttpRequestException();\n };\n\n ShimHttpWebResponse.AllInstances.ResponseStreamGet = (response) =>\n {\n return ShimsContext.ExecuteWithoutShims(() => response.GetResponseStream());\n };\n\n try\n {\n var result = await UncommonRequestHelper.ProcessGetRequestAsync(\"http://www.xciles.com/\");\n Assert.Fail(\"Should not be able to be here...\");\n }\n catch (UncommonRequestException ex)\n {\n Assert.IsTrue(ex.RequestExceptionStatus == EUncommonRequestExceptionStatus.ServiceError);\n Assert.IsTrue(ex.StatusCode == HttpStatusCode.BadRequest);\n\n //var responseResult = ex.ConvertExceptionResponseToObject();\n //Assert.IsTrue(responseResult != null);\n //Assert.IsTrue(responseResult.Description == exceptionObject.Description);\n //Assert.IsTrue(responseResult.Message == exceptionObject.Message);\n //Assert.IsTrue(responseResult.Type == exceptionObject.Type);\n }\n }\n }\n }\n}\n", "meta": {"content_hash": "e0f5a5e28a0b96215ea75c8f58fcba13", "timestamp": "", "source": "github", "line_count": 122, "max_line_length": 118, "avg_line_length": 38.80327868852459, "alnum_prop": 0.5701309674693705, "repo_name": "Xciles/Uncommon", "id": "599c1d78c23361960cd716ebf69cb66d00433506", "size": "4736", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Uncommon.Tests/Net/UncommonRequestHelperExceptionTests.cs", "mode": "33188", "license": "mit", "language": [{"name": "ASP", "bytes": "109"}, {"name": "C#", "bytes": "146892"}, {"name": "CSS", "bytes": "315"}, {"name": "HTML", "bytes": "5125"}, {"name": "JavaScript", "bytes": "19032"}, {"name": "Pascal", "bytes": "525"}]}}
{"text": "\n \n\n \n\n \n\n\n", "meta": {"content_hash": "a5e928b2b29f2548ce086e3527b3f0bb", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 72, "avg_line_length": 31.384615384615383, "alnum_prop": 0.6519607843137255, "repo_name": "p2plab/Nxt-Client-For-Android", "id": "9718894353d3d5ce987d2d2ff7677a5897fbd02c", "size": "816", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "res/layout/alias_input.xml", "mode": "33188", "license": "mit", "language": [{"name": "Java", "bytes": "531831"}]}}
{"text": "\n\n\n\t\n\tjQuery UI Datepicker Demos\n\t\n\n\n\n\n\n\n\n", "meta": {"content_hash": "011e5fa1504454cdbee214ef0cdcefd2", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 82, "avg_line_length": 36.54838709677419, "alnum_prop": 0.6487202118270079, "repo_name": "PhillyPUG/phillypug", "id": "37c8ef7148c7d46d3a6b916355ee6d0566bbf534", "size": "1133", "binary": false, "copies": "34", "ref": "refs/heads/master", "path": "media/development-bundle/demos/datepicker/index.html", "mode": "33188", "license": "bsd-3-clause", "language": []}}
{"text": "package dilawar\n\ntype Type string\n\nconst (\n\tTypeCredit Type = \"credit\"\n\tTypeDebit Type = \"debit\"\n)\n\ntype Storable interface {\n\tCreate(*Transaction) error\n\tRead(int) *Transaction\n\tList() []Transaction\n}\n", "meta": {"content_hash": "8bf48ee2048fbe4af9d0dfa38a110c95", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 27, "avg_line_length": 14.5, "alnum_prop": 0.7241379310344828, "repo_name": "umayr/dilawar", "id": "31ea7e27bc18ed5652752d47e84a35bcf92ff53c", "size": "203", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "dilawar.go", "mode": "33188", "license": "mit", "language": [{"name": "Go", "bytes": "6636"}, {"name": "Makefile", "bytes": "1874"}]}}
{"text": "extern \"C\" {\n#include \"third_party/py/scipy/optimize/Zeros/zeros.h\"\n}\n\nnamespace logistic_hd {\n\n// Integrands for the equations defined in Eq. 5 from Sur and Cand\u00e8s\n// (PNAS, 2019). These are called by the bivariate integration over Z1 and Z2\n// in `asymp_system_solve.py`.\ndouble integrand(double Z1, double Z2, double kappa, double gamma, double b0,\n double alpha, double lambda, double sigma, double beta0,\n int eq_num);\n\n// Computes the derivative of the objective that defines the proximal operator.\n// The prox operator is the value of z that makes this zero.\ndouble prox_deriv(double z, void *args);\n\ndouble sigmoid(double z);\n\n// Computes the derivative of the prox operator for the logistic regression\n// log likelihood.\ndouble prox_impl(double lambda, double x, double xtol = 1e-8,\n double rtol = 1e-8, int maxiters = 1000);\n\n// Computes the pdf of the bivariate normal without any input validation\n// because this is called many times during optimization.\ndouble pdf(double x1, double x2);\n\n// Helper function to pass values between our code and the scipy.optimize API.\ndouble scipy_zeros_functions_func(double x, void *params);\n\ntypedef struct prox_params {\n double lambda;\n double x;\n} prox_params;\n\n} // namespace logistic_hd\n\n#endif // MLE_PARAM_INTEGRANDS_H_\n", "meta": {"content_hash": "591be7b34b1395ac2119351a1f2e218f", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 79, "avg_line_length": 34.02564102564103, "alnum_prop": 0.720422004521477, "repo_name": "google-research/sloe-logistic", "id": "f3d13ad1d3b57092c932b7a4ba6143cec5890cae", "size": "2016", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "mle_param_integrands.h", "mode": "33188", "license": "apache-2.0", "language": []}}
{"text": "\r\n// Protocol Buffers - Google's data interchange format\r\n// Copyright 2008 Google Inc. All rights reserved.\r\n// http://github.com/jskeet/dotnet-protobufs/\r\n// Original C++/Java/Python code:\r\n// http://code.google.com/p/protobuf/\r\n//\r\n// Redistribution and use in source and binary forms, with or without\r\n// modification, are permitted provided that the following conditions are\r\n// met:\r\n//\r\n// * Redistributions of source code must retain the above copyright\r\n// notice, this list of conditions and the following disclaimer.\r\n// * Redistributions in binary form must reproduce the above\r\n// copyright notice, this list of conditions and the following disclaimer\r\n// in the documentation and/or other materials provided with the\r\n// distribution.\r\n// * Neither the name of Google Inc. nor the names of its\r\n// contributors may be used to endorse or promote products derived from\r\n// this software without specific prior written permission.\r\n//\r\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n\r\n#endregion\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing Google.ProtocolBuffers.Descriptors;\r\n\r\n//Disable warning CS3010: CLS-compliant interfaces must have only CLS-compliant members\r\n#pragma warning disable 3010\r\n\r\nnamespace Google.ProtocolBuffers\r\n{\r\n /// \r\n /// Provides an interface that is used write a message. Most often proto buffers are written\r\n /// in their binary form by creating a instance via the CodedOutputStream.CreateInstance\r\n /// static factory.\r\n /// \r\n public interface ICodedOutputStream\r\n {\r\n /// \r\n /// Writes any message initialization data needed to the output stream\r\n /// \r\n /// \r\n /// This is primarily used by text formats and unnecessary for protobuffers' own\r\n /// binary format. The API for MessageStart/End was added for consistent handling\r\n /// of output streams regardless of the actual writer implementation.\r\n /// \r\n void WriteMessageStart();\r\n /// \r\n /// Writes any message finalization data needed to the output stream\r\n /// \r\n /// \r\n /// This is primarily used by text formats and unnecessary for protobuffers' own\r\n /// binary format. The API for MessageStart/End was added for consistent handling\r\n /// of output streams regardless of the actual writer implementation.\r\n /// \r\n void WriteMessageEnd();\r\n /// \r\n /// Indicates that all temporary buffers be written to the final output.\r\n /// \r\n void Flush();\r\n /// \r\n /// Writes an unknown message as a group\r\n /// \r\n [Obsolete]\r\n void WriteUnknownGroup(int fieldNumber, IMessageLite value);\r\n /// \r\n /// Writes an unknown field value of bytes\r\n /// \r\n void WriteUnknownBytes(int fieldNumber, ByteString value);\r\n /// \r\n /// Writes an unknown field of a primitive type\r\n /// \r\n [CLSCompliant(false)]\r\n void WriteUnknownField(int fieldNumber, WireFormat.WireType wireType, ulong value);\r\n /// \r\n /// Writes an extension as a message-set group\r\n /// \r\n void WriteMessageSetExtension(int fieldNumber, string fieldName, IMessageLite value);\r\n /// \r\n /// Writes an unknown extension as a message-set group\r\n /// \r\n void WriteMessageSetExtension(int fieldNumber, string fieldName, ByteString value);\r\n\r\n /// \r\n /// Writes a field value, including tag, to the stream.\r\n /// \r\n void WriteField(FieldType fieldType, int fieldNumber, string fieldName, object value);\r\n\r\n /// \r\n /// Writes a double field value, including tag, to the stream.\r\n /// \r\n void WriteDouble(int fieldNumber, string fieldName, double value);\r\n\r\n /// \r\n /// Writes a float field value, including tag, to the stream.\r\n /// \r\n void WriteFloat(int fieldNumber, string fieldName, float value);\r\n\r\n /// \r\n /// Writes a uint64 field value, including tag, to the stream.\r\n /// \r\n [CLSCompliant(false)]\r\n void WriteUInt64(int fieldNumber, string fieldName, ulong value);\r\n\r\n /// \r\n /// Writes an int64 field value, including tag, to the stream.\r\n /// \r\n void WriteInt64(int fieldNumber, string fieldName, long value);\r\n\r\n /// \r\n /// Writes an int32 field value, including tag, to the stream.\r\n /// \r\n void WriteInt32(int fieldNumber, string fieldName, int value);\r\n\r\n /// \r\n /// Writes a fixed64 field value, including tag, to the stream.\r\n /// \r\n [CLSCompliant(false)]\r\n void WriteFixed64(int fieldNumber, string fieldName, ulong value);\r\n\r\n /// \r\n /// Writes a fixed32 field value, including tag, to the stream.\r\n /// \r\n [CLSCompliant(false)]\r\n void WriteFixed32(int fieldNumber, string fieldName, uint value);\r\n\r\n /// \r\n /// Writes a bool field value, including tag, to the stream.\r\n /// \r\n void WriteBool(int fieldNumber, string fieldName, bool value);\r\n\r\n /// \r\n /// Writes a string field value, including tag, to the stream.\r\n /// \r\n void WriteString(int fieldNumber, string fieldName, string value);\r\n\r\n /// \r\n /// Writes a group field value, including tag, to the stream.\r\n /// \r\n void WriteGroup(int fieldNumber, string fieldName, IMessageLite value);\r\n\r\n /// \r\n /// Writes a message field value, including tag, to the stream.\r\n /// \r\n void WriteMessage(int fieldNumber, string fieldName, IMessageLite value);\r\n\r\n /// \r\n /// Writes a byte array field value, including tag, to the stream.\r\n /// \r\n void WriteBytes(int fieldNumber, string fieldName, ByteString value);\r\n\r\n /// \r\n /// Writes a UInt32 field value, including tag, to the stream.\r\n /// \r\n [CLSCompliant(false)]\r\n void WriteUInt32(int fieldNumber, string fieldName, uint value);\r\n\r\n /// \r\n /// Writes an enum field value, including tag, to the stream.\r\n /// \r\n void WriteEnum(int fieldNumber, string fieldName, int value, object rawValue);\r\n\r\n /// \r\n /// Writes a fixed 32-bit field value, including tag, to the stream.\r\n /// \r\n void WriteSFixed32(int fieldNumber, string fieldName, int value);\r\n\r\n /// \r\n /// Writes a signed fixed 64-bit field value, including tag, to the stream.\r\n /// \r\n void WriteSFixed64(int fieldNumber, string fieldName, long value);\r\n\r\n /// \r\n /// Writes a signed 32-bit field value, including tag, to the stream.\r\n /// \r\n void WriteSInt32(int fieldNumber, string fieldName, int value);\r\n\r\n /// \r\n /// Writes a signed 64-bit field value, including tag, to the stream.\r\n /// \r\n void WriteSInt64(int fieldNumber, string fieldName, long value);\r\n\r\n /// \r\n /// Writes a repeated field value, including tag(s), to the stream.\r\n /// \r\n void WriteArray(FieldType fieldType, int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated group value, including tag(s), to the stream.\r\n /// \r\n void WriteGroupArray(int fieldNumber, string fieldName, IEnumerable list)\r\n where T : IMessageLite;\r\n\r\n /// \r\n /// Writes a repeated message value, including tag(s), to the stream.\r\n /// \r\n void WriteMessageArray(int fieldNumber, string fieldName, IEnumerable list)\r\n where T : IMessageLite;\r\n\r\n /// \r\n /// Writes a repeated string value, including tag(s), to the stream.\r\n /// \r\n void WriteStringArray(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated ByteString value, including tag(s), to the stream.\r\n /// \r\n void WriteBytesArray(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated boolean value, including tag(s), to the stream.\r\n /// \r\n void WriteBoolArray(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated Int32 value, including tag(s), to the stream.\r\n /// \r\n void WriteInt32Array(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated SInt32 value, including tag(s), to the stream.\r\n /// \r\n void WriteSInt32Array(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated UInt32 value, including tag(s), to the stream.\r\n /// \r\n void WriteUInt32Array(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated Fixed32 value, including tag(s), to the stream.\r\n /// \r\n void WriteFixed32Array(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated SFixed32 value, including tag(s), to the stream.\r\n /// \r\n void WriteSFixed32Array(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated Int64 value, including tag(s), to the stream.\r\n /// \r\n void WriteInt64Array(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated SInt64 value, including tag(s), to the stream.\r\n /// \r\n void WriteSInt64Array(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated UInt64 value, including tag(s), to the stream.\r\n /// \r\n void WriteUInt64Array(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated Fixed64 value, including tag(s), to the stream.\r\n /// \r\n void WriteFixed64Array(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated SFixed64 value, including tag(s), to the stream.\r\n /// \r\n void WriteSFixed64Array(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated Double value, including tag(s), to the stream.\r\n /// \r\n void WriteDoubleArray(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated Float value, including tag(s), to the stream.\r\n /// \r\n void WriteFloatArray(int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a repeated enumeration value of type T, including tag(s), to the stream.\r\n /// \r\n [CLSCompliant(false)]\r\n void WriteEnumArray(int fieldNumber, string fieldName, IEnumerable list)\r\n where T : struct, IComparable, IFormattable;\r\n\r\n /// \r\n /// Writes a packed repeated primitive, including tag and length, to the stream.\r\n /// \r\n void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated boolean, including tag and length, to the stream.\r\n /// \r\n void WritePackedBoolArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated Int32, including tag and length, to the stream.\r\n /// \r\n void WritePackedInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated SInt32, including tag and length, to the stream.\r\n /// \r\n void WritePackedSInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated UInt32, including tag and length, to the stream.\r\n /// \r\n void WritePackedUInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated Fixed32, including tag and length, to the stream.\r\n /// \r\n void WritePackedFixed32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated SFixed32, including tag and length, to the stream.\r\n /// \r\n void WritePackedSFixed32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated Int64, including tag and length, to the stream.\r\n /// \r\n void WritePackedInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated SInt64, including tag and length, to the stream.\r\n /// \r\n void WritePackedSInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated UInt64, including tag and length, to the stream.\r\n /// \r\n void WritePackedUInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated Fixed64, including tag and length, to the stream.\r\n /// \r\n void WritePackedFixed64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated SFixed64, including tag and length, to the stream.\r\n /// \r\n void WritePackedSFixed64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated Double, including tag and length, to the stream.\r\n /// \r\n void WritePackedDoubleArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated Float, including tag and length, to the stream.\r\n /// \r\n void WritePackedFloatArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list);\r\n\r\n /// \r\n /// Writes a packed repeated enumeration of type T, including tag and length, to the stream.\r\n /// \r\n [CLSCompliant(false)]\r\n void WritePackedEnumArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable list)\r\n where T : struct, IComparable, IFormattable;\r\n }\r\n}", "meta": {"content_hash": "28a175106a29d8ad5a090d313dcec3d0", "timestamp": "", "source": "github", "line_count": 373, "max_line_length": 117, "avg_line_length": 44.49061662198391, "alnum_prop": 0.6294667068394094, "repo_name": "plutoo/protobuf-csharp-port", "id": "64c8065321ff09d8602f07ced65b1c176b33458e", "size": "16633", "binary": false, "copies": "7", "ref": "refs/heads/master", "path": "src/ProtocolBuffers/ICodedOutputStream.cs", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "ApacheConf", "bytes": "1911"}, {"name": "C#", "bytes": "7562639"}, {"name": "HTML", "bytes": "6297"}, {"name": "Protocol Buffer", "bytes": "395806"}, {"name": "Python", "bytes": "8912"}, {"name": "Shell", "bytes": "4628"}]}}
{"text": "\n\n#include \n#include \n#include \n#include \n\n#include \"firmware.h\"\n#include \"chip.h\"\n\nMODULE_FIRMWARE(\"6fire/dmx6firel2.ihx\");\nMODULE_FIRMWARE(\"6fire/dmx6fireap.ihx\");\nMODULE_FIRMWARE(\"6fire/dmx6firecf.bin\");\n\nenum {\n\tFPGA_BUFSIZE = 512, FPGA_EP = 2\n};\n\n/*\n * wMaxPacketSize of pcm endpoints.\n * keep synced with rates_in_packet_size and rates_out_packet_size in pcm.c\n * fpp: frames per isopacket\n *\n * CAUTION: keep sizeof <= buffer[] in usb6fire_fw_init\n */\nstatic const u8 ep_w_max_packet_size[] = {\n\t0xe4, 0x00, 0xe4, 0x00, /* alt 1: 228 EP2 and EP6 (7 fpp) */\n\t0xa4, 0x01, 0xa4, 0x01, /* alt 2: 420 EP2 and EP6 (13 fpp)*/\n\t0x94, 0x01, 0x5c, 0x02 /* alt 3: 404 EP2 and 604 EP6 (25 fpp) */\n};\n\nstatic const u8 known_fw_versions[][2] = {\n\t{ 0x03, 0x01 }\n};\n\nstruct ihex_record {\n\tu16 address;\n\tu8 len;\n\tu8 data[256];\n\tchar error; /* true if an error occurred parsing this record */\n\n\tu8 max_len; /* maximum record length in whole ihex */\n\n\t/* private */\n\tconst char *txt_data;\n\tunsigned int txt_length;\n\tunsigned int txt_offset; /* current position in txt_data */\n};\n\nstatic u8 usb6fire_fw_ihex_hex(const u8 *data, u8 *crc)\n{\n\tu8 val = 0;\n\tint hval;\n\n\thval = hex_to_bin(data[0]);\n\tif (hval >= 0)\n\t\tval |= (hval << 4);\n\n\thval = hex_to_bin(data[1]);\n\tif (hval >= 0)\n\t\tval |= hval;\n\n\t*crc += val;\n\treturn val;\n}\n\n/*\n * returns true if record is available, false otherwise.\n * iff an error occurred, false will be returned and record->error will be true.\n */\nstatic bool usb6fire_fw_ihex_next_record(struct ihex_record *record)\n{\n\tu8 crc = 0;\n\tu8 type;\n\tint i;\n\n\trecord->error = false;\n\n\t/* find begin of record (marked by a colon) */\n\twhile (record->txt_offset < record->txt_length\n\t\t\t&& record->txt_data[record->txt_offset] != ':')\n\t\trecord->txt_offset++;\n\tif (record->txt_offset == record->txt_length)\n\t\treturn false;\n\n\t/* number of characters needed for len, addr and type entries */\n\trecord->txt_offset++;\n\tif (record->txt_offset + 8 > record->txt_length) {\n\t\trecord->error = true;\n\t\treturn false;\n\t}\n\n\trecord->len = usb6fire_fw_ihex_hex(record->txt_data +\n\t\t\trecord->txt_offset, &crc);\n\trecord->txt_offset += 2;\n\trecord->address = usb6fire_fw_ihex_hex(record->txt_data +\n\t\t\trecord->txt_offset, &crc) << 8;\n\trecord->txt_offset += 2;\n\trecord->address |= usb6fire_fw_ihex_hex(record->txt_data +\n\t\t\trecord->txt_offset, &crc);\n\trecord->txt_offset += 2;\n\ttype = usb6fire_fw_ihex_hex(record->txt_data +\n\t\t\trecord->txt_offset, &crc);\n\trecord->txt_offset += 2;\n\n\t/* number of characters needed for data and crc entries */\n\tif (record->txt_offset + 2 * (record->len + 1) > record->txt_length) {\n\t\trecord->error = true;\n\t\treturn false;\n\t}\n\tfor (i = 0; i < record->len; i++) {\n\t\trecord->data[i] = usb6fire_fw_ihex_hex(record->txt_data\n\t\t\t\t+ record->txt_offset, &crc);\n\t\trecord->txt_offset += 2;\n\t}\n\tusb6fire_fw_ihex_hex(record->txt_data + record->txt_offset, &crc);\n\tif (crc) {\n\t\trecord->error = true;\n\t\treturn false;\n\t}\n\n\tif (type == 1 || !record->len) /* eof */\n\t\treturn false;\n\telse if (type == 0)\n\t\treturn true;\n\telse {\n\t\trecord->error = true;\n\t\treturn false;\n\t}\n}\n\nstatic int usb6fire_fw_ihex_init(const struct firmware *fw,\n\t\tstruct ihex_record *record)\n{\n\trecord->txt_data = fw->data;\n\trecord->txt_length = fw->size;\n\trecord->txt_offset = 0;\n\trecord->max_len = 0;\n\t/* read all records, if loop ends, record->error indicates,\n\t * whether ihex is valid. */\n\twhile (usb6fire_fw_ihex_next_record(record))\n\t\trecord->max_len = max(record->len, record->max_len);\n\tif (record->error)\n\t\treturn -EINVAL;\n\trecord->txt_offset = 0;\n\treturn 0;\n}\n\nstatic int usb6fire_fw_ezusb_write(struct usb_device *device,\n\t\tint type, int value, char *data, int len)\n{\n\tint ret;\n\n\tret = usb_control_msg(device, usb_sndctrlpipe(device, 0), type,\n\t\t\tUSB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,\n\t\t\tvalue, 0, data, len, HZ);\n\tif (ret < 0)\n\t\treturn ret;\n\telse if (ret != len)\n\t\treturn -EIO;\n\treturn 0;\n}\n\nstatic int usb6fire_fw_ezusb_read(struct usb_device *device,\n\t\tint type, int value, char *data, int len)\n{\n\tint ret = usb_control_msg(device, usb_rcvctrlpipe(device, 0), type,\n\t\t\tUSB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, value,\n\t\t\t0, data, len, HZ);\n\tif (ret < 0)\n\t\treturn ret;\n\telse if (ret != len)\n\t\treturn -EIO;\n\treturn 0;\n}\n\nstatic int usb6fire_fw_fpga_write(struct usb_device *device,\n\t\tchar *data, int len)\n{\n\tint actual_len;\n\tint ret;\n\n\tret = usb_bulk_msg(device, usb_sndbulkpipe(device, FPGA_EP), data, len,\n\t\t\t&actual_len, HZ);\n\tif (ret < 0)\n\t\treturn ret;\n\telse if (actual_len != len)\n\t\treturn -EIO;\n\treturn 0;\n}\n\nstatic int usb6fire_fw_ezusb_upload(\n\t\tstruct usb_interface *intf, const char *fwname,\n\t\tunsigned int postaddr, u8 *postdata, unsigned int postlen)\n{\n\tint ret;\n\tu8 data;\n\tstruct usb_device *device = interface_to_usbdev(intf);\n\tconst struct firmware *fw = NULL;\n\tstruct ihex_record *rec = kmalloc(sizeof(struct ihex_record),\n\t\t\tGFP_KERNEL);\n\n\tif (!rec)\n\t\treturn -ENOMEM;\n\n\tret = request_firmware(&fw, fwname, &device->dev);\n\tif (ret < 0) {\n\t\tkfree(rec);\n\t\tsnd_printk(KERN_ERR PREFIX \"error requesting ezusb \"\n\t\t\t\t\"firmware %s.\\n\", fwname);\n\t\treturn ret;\n\t}\n\tret = usb6fire_fw_ihex_init(fw, rec);\n\tif (ret < 0) {\n\t\tkfree(rec);\n\t\trelease_firmware(fw);\n\t\tsnd_printk(KERN_ERR PREFIX \"error validating ezusb \"\n\t\t\t\t\"firmware %s.\\n\", fwname);\n\t\treturn ret;\n\t}\n\t/* upload firmware image */\n\tdata = 0x01; /* stop ezusb cpu */\n\tret = usb6fire_fw_ezusb_write(device, 0xa0, 0xe600, &data, 1);\n\tif (ret < 0) {\n\t\tkfree(rec);\n\t\trelease_firmware(fw);\n\t\tsnd_printk(KERN_ERR PREFIX \"unable to upload ezusb \"\n\t\t\t\t\"firmware %s: begin message.\\n\", fwname);\n\t\treturn ret;\n\t}\n\n\twhile (usb6fire_fw_ihex_next_record(rec)) { /* write firmware */\n\t\tret = usb6fire_fw_ezusb_write(device, 0xa0, rec->address,\n\t\t\t\trec->data, rec->len);\n\t\tif (ret < 0) {\n\t\t\tkfree(rec);\n\t\t\trelease_firmware(fw);\n\t\t\tsnd_printk(KERN_ERR PREFIX \"unable to upload ezusb \"\n\t\t\t\t\t\"firmware %s: data urb.\\n\", fwname);\n\t\t\treturn ret;\n\t\t}\n\t}\n\n\trelease_firmware(fw);\n\tkfree(rec);\n\tif (postdata) { /* write data after firmware has been uploaded */\n\t\tret = usb6fire_fw_ezusb_write(device, 0xa0, postaddr,\n\t\t\t\tpostdata, postlen);\n\t\tif (ret < 0) {\n\t\t\tsnd_printk(KERN_ERR PREFIX \"unable to upload ezusb \"\n\t\t\t\t\t\"firmware %s: post urb.\\n\", fwname);\n\t\t\treturn ret;\n\t\t}\n\t}\n\n\tdata = 0x00; /* resume ezusb cpu */\n\tret = usb6fire_fw_ezusb_write(device, 0xa0, 0xe600, &data, 1);\n\tif (ret < 0) {\n\t\tsnd_printk(KERN_ERR PREFIX \"unable to upload ezusb \"\n\t\t\t\t\"firmware %s: end message.\\n\", fwname);\n\t\treturn ret;\n\t}\n\treturn 0;\n}\n\nstatic int usb6fire_fw_fpga_upload(\n\t\tstruct usb_interface *intf, const char *fwname)\n{\n\tint ret;\n\tint i;\n\tstruct usb_device *device = interface_to_usbdev(intf);\n\tu8 *buffer = kmalloc(FPGA_BUFSIZE, GFP_KERNEL);\n\tconst char *c;\n\tconst char *end;\n\tconst struct firmware *fw;\n\n\tif (!buffer)\n\t\treturn -ENOMEM;\n\n\tret = request_firmware(&fw, fwname, &device->dev);\n\tif (ret < 0) {\n\t\tsnd_printk(KERN_ERR PREFIX \"unable to get fpga firmware %s.\\n\",\n\t\t\t\tfwname);\n\t\tkfree(buffer);\n\t\treturn -EIO;\n\t}\n\n\tc = fw->data;\n\tend = fw->data + fw->size;\n\n\tret = usb6fire_fw_ezusb_write(device, 8, 0, NULL, 0);\n\tif (ret < 0) {\n\t\tkfree(buffer);\n\t\trelease_firmware(fw);\n\t\tsnd_printk(KERN_ERR PREFIX \"unable to upload fpga firmware: \"\n\t\t\t\t\"begin urb.\\n\");\n\t\treturn ret;\n\t}\n\n\twhile (c != end) {\n\t\tfor (i = 0; c != end && i < FPGA_BUFSIZE; i++, c++)\n\t\t\tbuffer[i] = byte_rev_table[(u8) *c];\n\n\t\tret = usb6fire_fw_fpga_write(device, buffer, i);\n\t\tif (ret < 0) {\n\t\t\trelease_firmware(fw);\n\t\t\tkfree(buffer);\n\t\t\tsnd_printk(KERN_ERR PREFIX \"unable to upload fpga \"\n\t\t\t\t\t\"firmware: fw urb.\\n\");\n\t\t\treturn ret;\n\t\t}\n\t}\n\trelease_firmware(fw);\n\tkfree(buffer);\n\n\tret = usb6fire_fw_ezusb_write(device, 9, 0, NULL, 0);\n\tif (ret < 0) {\n\t\tsnd_printk(KERN_ERR PREFIX \"unable to upload fpga firmware: \"\n\t\t\t\t\"end urb.\\n\");\n\t\treturn ret;\n\t}\n\treturn 0;\n}\n\n/* check, if the firmware version the devices has currently loaded\n * is known by this driver. 'version' needs to have 4 bytes version\n * info data. */\nstatic int usb6fire_fw_check(u8 *version)\n{\n\tint i;\n\n\tfor (i = 0; i < ARRAY_SIZE(known_fw_versions); i++)\n\t\tif (!memcmp(version, known_fw_versions + i, 2))\n\t\t\treturn 0;\n\n\tsnd_printk(KERN_ERR PREFIX \"invalid fimware version in device: %*ph. \"\n\t\t\t\"please reconnect to power. if this failure \"\n\t\t\t\"still happens, check your firmware installation.\",\n\t\t\t4, version);\n\treturn -EINVAL;\n}\n\nint usb6fire_fw_init(struct usb_interface *intf)\n{\n\tint i;\n\tint ret;\n\tstruct usb_device *device = interface_to_usbdev(intf);\n\t/* buffer: 8 receiving bytes from device and\n\t * sizeof(EP_W_MAX_PACKET_SIZE) bytes for non-const copy */\n\tu8 buffer[12];\n\n\tret = usb6fire_fw_ezusb_read(device, 1, 0, buffer, 8);\n\tif (ret < 0) {\n\t\tsnd_printk(KERN_ERR PREFIX \"unable to receive device \"\n\t\t\t\t\"firmware state.\\n\");\n\t\treturn ret;\n\t}\n\tif (buffer[0] != 0xeb || buffer[1] != 0xaa || buffer[2] != 0x55) {\n\t\tsnd_printk(KERN_ERR PREFIX \"unknown device firmware state \"\n\t\t\t\t\"received from device: \");\n\t\tfor (i = 0; i < 8; i++)\n\t\t\tsnd_printk(\"%02x \", buffer[i]);\n\t\tsnd_printk(\"\\n\");\n\t\treturn -EIO;\n\t}\n\t/* do we need fpga loader ezusb firmware? */\n\tif (buffer[3] == 0x01) {\n\t\tret = usb6fire_fw_ezusb_upload(intf,\n\t\t\t\t\"6fire/dmx6firel2.ihx\", 0, NULL, 0);\n\t\tif (ret < 0)\n\t\t\treturn ret;\n\t\treturn FW_NOT_READY;\n\t}\n\t/* do we need fpga firmware and application ezusb firmware? */\n\telse if (buffer[3] == 0x02) {\n\t\tret = usb6fire_fw_check(buffer + 4);\n\t\tif (ret < 0)\n\t\t\treturn ret;\n\t\tret = usb6fire_fw_fpga_upload(intf, \"6fire/dmx6firecf.bin\");\n\t\tif (ret < 0)\n\t\t\treturn ret;\n\t\tmemcpy(buffer, ep_w_max_packet_size,\n\t\t\t\tsizeof(ep_w_max_packet_size));\n\t\tret = usb6fire_fw_ezusb_upload(intf, \"6fire/dmx6fireap.ihx\",\n\t\t\t\t0x0003,\tbuffer, sizeof(ep_w_max_packet_size));\n\t\tif (ret < 0)\n\t\t\treturn ret;\n\t\treturn FW_NOT_READY;\n\t}\n\t/* all fw loaded? */\n\telse if (buffer[3] == 0x03)\n\t\treturn usb6fire_fw_check(buffer + 4);\n\t/* unknown data? */\n\telse {\n\t\tsnd_printk(KERN_ERR PREFIX \"unknown device firmware state \"\n\t\t\t\t\"received from device: \");\n\t\tfor (i = 0; i < 8; i++)\n\t\t\tsnd_printk(\"%02x \", buffer[i]);\n\t\tsnd_printk(\"\\n\");\n\t\treturn -EIO;\n\t}\n\treturn 0;\n}\n\n", "meta": {"content_hash": "15d745cdbedbb969c8d9c35a1595961a", "timestamp": "", "source": "github", "line_count": 404, "max_line_length": 80, "avg_line_length": 24.95049504950495, "alnum_prop": 0.645436507936508, "repo_name": "Ant-OS/android_kernel_moto_shamu", "id": "b9defcdeb7ef805af05a6453ce309a2eb64bdb18", "size": "10519", "binary": false, "copies": "2121", "ref": "refs/heads/master", "path": "sound/usb/6fire/firmware.c", "mode": "33188", "license": "apache-2.0", "language": [{"name": "ASP", "bytes": "4528"}, {"name": "Assembly", "bytes": "9738337"}, {"name": "Awk", "bytes": "18681"}, {"name": "C", "bytes": "467488098"}, {"name": "C++", "bytes": "3473858"}, {"name": "Clojure", "bytes": "547"}, {"name": "Groff", "bytes": "22012"}, {"name": "Lex", "bytes": "40805"}, {"name": "Makefile", "bytes": "1342678"}, {"name": "Objective-C", "bytes": "1121986"}, {"name": "Perl", "bytes": "461504"}, {"name": "Python", "bytes": "33978"}, {"name": "Scilab", "bytes": "21433"}, {"name": "Shell", "bytes": "138789"}, {"name": "SourcePawn", "bytes": "4687"}, {"name": "UnrealScript", "bytes": "6113"}, {"name": "Yacc", "bytes": "83091"}]}}
{"text": "\n\n/**\n * @file\n * @brief\n * This file defines the OpenThread crypto C APIs.\n */\n\n#ifndef OPENTHREAD_CRYPTO_H_\n#define OPENTHREAD_CRYPTO_H_\n\n#include \n#include \n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * @addtogroup api-crypto\n *\n * @brief\n * This module includes cryptographic functions.\n *\n * @{\n *\n */\n\n#define OT_CRYPTO_HMAC_SHA_HASH_SIZE 32 ///< Length of HMAC SHA (in bytes).\n\n/**\n * This function performs HMAC computation.\n *\n * @param[in] aKey A pointer to the key.\n * @param[in] aKeyLength The key length in bytes.\n * @param[in] aBuf A pointer to the input buffer.\n * @param[in] aBufLength The length of @p aBuf in bytes.\n * @param[out] aHash A pointer to the output hash buffer.\n *\n */\nvoid otCryptoHmacSha256(\n const uint8_t *aKey, uint16_t aKeyLength,\n const uint8_t *aBuf, uint16_t aBufLength,\n uint8_t *aHash);\n\n/**\n * This method performs AES CCM computation.\n *\n * @param[in] aKey A pointer to the key.\n * @param[in] aKeyLength Length of the key in bytes.\n * @param[in] aTagLength Length of tag in bytes.\n * @param[in] aNonce A pointer to the nonce.\n * @param[in] aNonceLength Length of nonce in bytes.\n *\n * @param[in] aHeader A pointer to the header.\n * @param[in] aHeaderLength Length of header in bytes.\n *\n * @param[inout] aPlainText A pointer to the plaintext.\n * @param[inout] aCipherText A pointer to the ciphertext.\n * @param[in] aLength Plaintext length in bytes.\n * @param[in] aEncrypt `true` on encrypt and `false` on decrypt.\n *\n * @param[out] aTag A pointer to the tag.\n *\n */\nvoid otCryptoAesCcm(\n const uint8_t *aKey, uint16_t aKeyLength,\n uint8_t aTagLength,\n const void *aNonce, uint8_t aNonceLength,\n const void *aHeader, uint32_t aHeaderLength,\n void *aPlainText, void *aCipherText, uint32_t aLength, bool aEncrypt,\n void *aTag);\n\n/**\n * @}\n *\n */\n\n#ifdef __cplusplus\n} // extern \"C\"\n#endif\n\n#endif // OPENTHREAD_CRYPTO_H_\n", "meta": {"content_hash": "e9706e9d8632e56471be3249fed671f8", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 79, "avg_line_length": 25.10843373493976, "alnum_prop": 0.6228406909788867, "repo_name": "fbsder/openthread", "id": "d80a45af879bf664b492b6300da0961dd367f192", "size": "3692", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "include/openthread/crypto.h", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "Batchfile", "bytes": "10128"}, {"name": "C", "bytes": "574131"}, {"name": "C#", "bytes": "18077"}, {"name": "C++", "bytes": "3369485"}, {"name": "M4", "bytes": "47539"}, {"name": "Makefile", "bytes": "81726"}, {"name": "Python", "bytes": "1050179"}, {"name": "Ruby", "bytes": "3397"}, {"name": "Shell", "bytes": "26917"}]}}
{"text": "\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n Eterno Amor\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n \r\n\r\n \r\n\r\n\r\n \r\n\r\n \r\n \r\n
Eterno Amor
\r\n\r\n
\r\n Wanderley Caloni, January 6, 2016
\r\n
\r\n\r\n\r\n \r\n\r\n \r\n
\r\n
Um misto de remorso pelas agruras da guerra com a energia de uma investiga\u00e7\u00e3o guiada unicamente pela f\u00e9 (ou pelo amor). A beleza da fotografia fria e triste do front se contrap\u00f5e aos horizontes on\u00edricos do presente nost\u00e1lgico, que clama pela elucida\u00e7\u00e3o completa de um passado nebuloso que separou um casal apaixonado prestes a se casar. Eterno Amor \u00e9 pura poesia na forma de criatividade narrativa. Um Pierre Jeunet que retrabalha sua Am\u00e9lie Poulain em tra\u00e7os mais cru\u00e9is e menos esperan\u00e7osos, e que tenta soar como um romance \u00e9pico em torno de personagens com pouca alma e muita persist\u00eancia.
\n\n
Utilizando novamente Audrey Tautou, a namoradinha da Fran\u00e7a, o diretor Jean-Pierre Jeunet mais uma vez aplica a bel\u00edssima fotografia de seu colaborador Bruno Delbonnel (Harry Potter e o Enigma do Pr\u00edncipe, Inside Llewyn Davis: Balada de um Homem Comum, Am\u00e9lie Poulain) e a din\u00e2mica e inventiva montagem de seu editor Herv\u00e9 Schneid (Micmacs - Um Plano Complicado) para contar uma hist\u00f3ria cheia de poder criativo, mas que encontra em seu n\u00facleo um drama intranspon\u00edvel para o estilo do diretor.
\n\n
Sua busca incessante, no entanto, em tentar juntar todas as pistas que a bela mas manca Mathilde (Tatou) vai acumulando, testemunho ap\u00f3s testemunho, em busca da verdade definitiva a respeito do paradeiro de seu amor, Manech (Gaspard Ulliel), \u00e9 t\u00e3o contagiante que o mundo que se cria em torno acaba compensando a total falta de realismo nesse conto quase-surrealista.
\n\n
Com aspectos t\u00e9cnicos impressionantes a cada cena – exceto talvez pela m\u00fasica de Angelo Badalamenti, repetitiva e mon\u00f3tona, mas ainda assim condizente com a proposta do filme – e com um ritmo que vai se formando pela repeti\u00e7\u00e3o (a insist\u00eancia do carteiro em espalhar o cascalho da entrada da casa de Mathilde, s\u00f3 pelo bem da “entrada triunfal”), o roteiro da dupla Guillaume Laurant e do pr\u00f3prio Pierre Jeunet, baseados no romance de S\u00e9bastien Japrisot, n\u00e3o consegue se desvencilhar da sua complexidade em utilizar diferentes personagens que se parecem em situa\u00e7\u00f5es que se embaralham, o que se por um lado acaba contribuindo para a atmosfera de desorienta\u00e7\u00e3o de Mathilde, vai aos poucos se tornando uma distra\u00e7\u00e3o inc\u00f4moda para o espectador, que j\u00e1 n\u00e3o espera encontrar qualquer conex\u00e3o memor\u00e1vel entre as pistas.
\n\n
At\u00e9 mesmo a dualidade de cores frias da guerra com as cores sempre aquecidas do presente da protagonista, fascinante no come\u00e7o, tamb\u00e9m vai se esvaecendo com a cada vez mais distante capacidade de atribuir significado naquele emaranhado de s\u00edmbolos. Jeunet se deixa sabotar pela sua pr\u00f3pria obsess\u00e3o de detalhes, e assim como seu mais recente trabalho, Uma Viagem Extraordin\u00e1ria, se esquece das emo\u00e7\u00f5es prim\u00e1rias de seus personagens para focar unicamente nas idiossincrasias de sua complexa hist\u00f3ria.
\n\n
O que acaba por fim em tornar tudo aquilo uma imensa espiral de eventos que revela uma estrutura tal qual as escadas do farol onde o casal se encontrava: aparentemente infinita, mas se encarada com dedica\u00e7\u00e3o e empenho, alcan\u00e7\u00e1vel at\u00e9 por uma manca que deseja enxergar al\u00e9m de suas limita\u00e7\u00f5es f\u00edsicas. \u00c9 o metaf\u00edsico celebrado em vida. A m\u00e1gica de usar o cinema como cornuc\u00f3pia de simbolismos visuais.
\n\r\n
Imagens e cr\u00e9ditos no
IMDB.\r\n\r\n
\r\n\r\n \r\n Eterno Amor ● Eterno Amor. Un long dimanche de fian\u00e7ailles (France, 2004). Dirigido por Jean-Pierre Jeunet. Escrito por S\u00e9bastien Japrisot, Jean-Pierre Jeunet, Guillaume Laurant, Guillaume Laurant. Com Audrey Tautou, Gaspard Ulliel, Dominique Pinon, Chantal Neuwirth, Andr\u00e9 Dussollier, Ticky Holgado, Marion Cotillard, Dominique Bettenfeld, Jodie Foster. ● Nota: 4/5. Categoria: movies. Publicado em 2016-01-06. Texto escrito por Wanderley Caloni.\r\n\r\n
Quer comentar?
\r\n\r\n\r\n
\r\n\r\n \r\n\r\n \r\n \r\n\r\n
\r\n\r\n \r\n \r\n\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n\r\n", "meta": {"content_hash": "5750f5fb43c3be1ac0ed645741172b4e", "timestamp": "", "source": "github", "line_count": 296, "max_line_length": 842, "avg_line_length": 41.986486486486484, "alnum_prop": 0.6437882201480528, "repo_name": "cinetenisverde/cinetenisverde.github.io", "id": "50eb0e0d692d60f0129f5cd086d6384190bc5365", "size": "12522", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "eterno-amor/index.html", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "533"}, {"name": "HTML", "bytes": "31113501"}, {"name": "JavaScript", "bytes": "3266"}, {"name": "Python", "bytes": "2943"}]}}
{"text": "function toggle_visibility(id) {\n\t\t\t\t\tvar e = document.getElementById(id);\n\t\t\t\t\tif(e.style.display == 'block')\n\t\t\t\t\t\te.style.display = 'none';\n\t\t\t\t\telse\n\t\t\t\t\t\te.style.display = 'block';\n}\n \n \njQuery(document).ready(function($) {\n \n $(\".scroll\").click(function(event){\t\t\n \tevent.preventDefault();\n $('body').animate({scrollTop:$(this.hash).offset().top}, 1500);\n });\n});", "meta": {"content_hash": "7d199aa600dde168b96b11fead6cf842", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 91, "avg_line_length": 33.1875, "alnum_prop": 0.4218455743879473, "repo_name": "regravity/ThreadCSS", "id": "65450d0d0e315646c520802a73cde60b56721649", "size": "531", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "js/function.js", "mode": "33188", "license": "mit", "language": [{"name": "CSS", "bytes": "42847"}, {"name": "HTML", "bytes": "5902"}, {"name": "JavaScript", "bytes": "531"}]}}
{"text": "\npackage com.intellij.refactoring.move.moveInstanceMethod;\n\nimport com.intellij.openapi.actionSystem.DataContext;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.psi.*;\nimport com.intellij.refactoring.move.MoveCallback;\nimport com.intellij.refactoring.move.MoveHandlerDelegate;\nimport com.intellij.refactoring.move.moveClassesOrPackages.JavaMoveClassesOrPackagesHandler;\nimport org.jetbrains.annotations.Nullable;\n\npublic class MoveInstanceMethodHandlerDelegate extends MoveHandlerDelegate {\n @Override\n public boolean canMove(final PsiElement[] elements, @Nullable final PsiElement targetContainer) {\n if (elements.length != 1) return false;\n PsiElement element = elements [0];\n if (!(element instanceof PsiMethod)) return false;\n if (element instanceof SyntheticElement) return false;\n PsiMethod method = (PsiMethod) element;\n if (method.hasModifierProperty(PsiModifier.STATIC)) return false;\n return targetContainer == null || super.canMove(elements, targetContainer);\n }\n\n @Override\n public boolean isValidTarget(final PsiElement targetElement, PsiElement[] sources) {\n for (PsiElement source : sources) {\n if (JavaMoveClassesOrPackagesHandler.invalid4Move(source)) return false;\n }\n return targetElement instanceof PsiClass && !(targetElement instanceof PsiAnonymousClass);\n }\n\n @Override\n public boolean tryToMove(final PsiElement element, final Project project, final DataContext dataContext, final PsiReference reference,\n final Editor editor) {\n if (element instanceof PsiMethod) {\n PsiMethod method = (PsiMethod) element;\n if (!method.hasModifierProperty(PsiModifier.STATIC)) {\n new MoveInstanceMethodHandler().invoke(project, new PsiElement[]{method}, dataContext);\n return true;\n }\n }\n return false;\n }\n\n @Override\n public void doMove(final Project project, final PsiElement[] elements, final PsiElement targetContainer, final MoveCallback callback) {\n new MoveInstanceMethodHandler().invoke(project, elements, null);\n }\n}\n", "meta": {"content_hash": "258b6a6fd63e3565e06b0802904c7518", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 137, "avg_line_length": 42.2, "alnum_prop": 0.762085308056872, "repo_name": "xfournet/intellij-community", "id": "baeb4deb8b2b865eafb7fa19f7003296554b0a91", "size": "2710", "binary": false, "copies": "10", "ref": "refs/heads/master", "path": "java/java-impl/src/com/intellij/refactoring/move/moveInstanceMethod/MoveInstanceMethodHandlerDelegate.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "AMPL", "bytes": "20665"}, {"name": "AspectJ", "bytes": "182"}, {"name": "Batchfile", "bytes": "60827"}, {"name": "C", "bytes": "211454"}, {"name": "C#", "bytes": "1264"}, {"name": "C++", "bytes": "199030"}, {"name": "CMake", "bytes": "1675"}, {"name": "CSS", "bytes": "201445"}, {"name": "CoffeeScript", "bytes": "1759"}, {"name": "Erlang", "bytes": "10"}, {"name": "Groovy", "bytes": "3289024"}, {"name": "HLSL", "bytes": "57"}, {"name": "HTML", "bytes": "1901772"}, {"name": "J", "bytes": "5050"}, {"name": "Java", "bytes": "166392304"}, {"name": "JavaScript", "bytes": "570364"}, {"name": "Jupyter Notebook", "bytes": "93222"}, {"name": "Kotlin", "bytes": "4720744"}, {"name": "Lex", "bytes": "147486"}, {"name": "Makefile", "bytes": "2352"}, {"name": "NSIS", "bytes": "51061"}, {"name": "Objective-C", "bytes": "27861"}, {"name": "Perl", "bytes": "903"}, {"name": "Perl 6", "bytes": "26"}, {"name": "Protocol Buffer", "bytes": "6680"}, {"name": "Python", "bytes": "25477371"}, {"name": "Roff", "bytes": "37534"}, {"name": "Ruby", "bytes": "1217"}, {"name": "Shell", "bytes": "64141"}, {"name": "Smalltalk", "bytes": "338"}, {"name": "TeX", "bytes": "25473"}, {"name": "Thrift", "bytes": "1846"}, {"name": "TypeScript", "bytes": "9469"}, {"name": "Visual Basic", "bytes": "77"}, {"name": "XSLT", "bytes": "113040"}]}}
{"text": "/* A Bison parser, made by GNU Bison 3.0.4. */\n\n/* Bison interface for Yacc-like parsers in C\n\n Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see . */\n\n/* As a special exception, you may create a larger work that contains\n part or all of the Bison parser skeleton and distribute that work\n under terms of your choice, so long as that work isn't itself a\n parser generator using the skeleton or a modified version thereof\n as a parser skeleton. Alternatively, if you modify or redistribute\n the parser skeleton itself, you may (at your option) remove this\n special exception, which will cause the skeleton and the resulting\n Bison output files to be licensed under the GNU General Public\n License without this special exception.\n\n This special exception was added by the Free Software Foundation in\n version 2.2 of Bison. */\n\n#ifndef YY_YY_PARSE_H_INCLUDED\n# define YY_YY_PARSE_H_INCLUDED\n/* Debug traces. */\n#ifndef YYDEBUG\n# define YYDEBUG 0\n#endif\n#if YYDEBUG\nextern int yydebug;\n#endif\n\n/* Token type. */\n#ifndef YYTOKENTYPE\n# define YYTOKENTYPE\n enum yytokentype\n {\n CHAR = 258,\n NUMBER = 259,\n SECTEND = 260,\n SCDECL = 261,\n XSCDECL = 262,\n NAME = 263,\n PREVCCL = 264,\n EOF_OP = 265,\n OPTION_OP = 266,\n OPT_OUTFILE = 267,\n OPT_PREFIX = 268,\n OPT_YYCLASS = 269,\n OPT_HEADER = 270,\n OPT_EXTRA_TYPE = 271,\n OPT_TABLES = 272,\n CCE_ALNUM = 273,\n CCE_ALPHA = 274,\n CCE_BLANK = 275,\n CCE_CNTRL = 276,\n CCE_DIGIT = 277,\n CCE_GRAPH = 278,\n CCE_LOWER = 279,\n CCE_PRINT = 280,\n CCE_PUNCT = 281,\n CCE_SPACE = 282,\n CCE_UPPER = 283,\n CCE_XDIGIT = 284,\n CCE_NEG_ALNUM = 285,\n CCE_NEG_ALPHA = 286,\n CCE_NEG_BLANK = 287,\n CCE_NEG_CNTRL = 288,\n CCE_NEG_DIGIT = 289,\n CCE_NEG_GRAPH = 290,\n CCE_NEG_LOWER = 291,\n CCE_NEG_PRINT = 292,\n CCE_NEG_PUNCT = 293,\n CCE_NEG_SPACE = 294,\n CCE_NEG_UPPER = 295,\n CCE_NEG_XDIGIT = 296,\n CCL_OP_DIFF = 297,\n CCL_OP_UNION = 298,\n BEGIN_REPEAT_POSIX = 299,\n END_REPEAT_POSIX = 300,\n BEGIN_REPEAT_FLEX = 301,\n END_REPEAT_FLEX = 302\n };\n#endif\n/* Tokens. */\n#define CHAR 258\n#define NUMBER 259\n#define SECTEND 260\n#define SCDECL 261\n#define XSCDECL 262\n#define NAME 263\n#define PREVCCL 264\n#define EOF_OP 265\n#define OPTION_OP 266\n#define OPT_OUTFILE 267\n#define OPT_PREFIX 268\n#define OPT_YYCLASS 269\n#define OPT_HEADER 270\n#define OPT_EXTRA_TYPE 271\n#define OPT_TABLES 272\n#define CCE_ALNUM 273\n#define CCE_ALPHA 274\n#define CCE_BLANK 275\n#define CCE_CNTRL 276\n#define CCE_DIGIT 277\n#define CCE_GRAPH 278\n#define CCE_LOWER 279\n#define CCE_PRINT 280\n#define CCE_PUNCT 281\n#define CCE_SPACE 282\n#define CCE_UPPER 283\n#define CCE_XDIGIT 284\n#define CCE_NEG_ALNUM 285\n#define CCE_NEG_ALPHA 286\n#define CCE_NEG_BLANK 287\n#define CCE_NEG_CNTRL 288\n#define CCE_NEG_DIGIT 289\n#define CCE_NEG_GRAPH 290\n#define CCE_NEG_LOWER 291\n#define CCE_NEG_PRINT 292\n#define CCE_NEG_PUNCT 293\n#define CCE_NEG_SPACE 294\n#define CCE_NEG_UPPER 295\n#define CCE_NEG_XDIGIT 296\n#define CCL_OP_DIFF 297\n#define CCL_OP_UNION 298\n#define BEGIN_REPEAT_POSIX 299\n#define END_REPEAT_POSIX 300\n#define BEGIN_REPEAT_FLEX 301\n#define END_REPEAT_FLEX 302\n\n/* Value type. */\n#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED\ntypedef int YYSTYPE;\n# define YYSTYPE_IS_TRIVIAL 1\n# define YYSTYPE_IS_DECLARED 1\n#endif\n\n\nextern YYSTYPE yylval;\n\nint yyparse (void);\n\n#endif /* !YY_YY_PARSE_H_INCLUDED */\n", "meta": {"content_hash": "42ea53de0b18b9312c7c7ce32521c551", "timestamp": "", "source": "github", "line_count": 154, "max_line_length": 76, "avg_line_length": 26.733766233766232, "alnum_prop": 0.7002671848433325, "repo_name": "loki04/csibe", "id": "033f91974e11261d03432c8861554b8c22759016", "size": "4117", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/flex-2.6.0/src/parse.h", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "Awk", "bytes": "2800"}, {"name": "C", "bytes": "1097132"}, {"name": "C++", "bytes": "8474"}, {"name": "CMake", "bytes": "15006"}, {"name": "CSS", "bytes": "1746"}, {"name": "Groff", "bytes": "26612"}, {"name": "HTML", "bytes": "128005"}, {"name": "LLVM", "bytes": "5737"}, {"name": "Lex", "bytes": "136350"}, {"name": "M4", "bytes": "99282"}, {"name": "Makefile", "bytes": "325456"}, {"name": "PHP", "bytes": "3703"}, {"name": "Perl", "bytes": "12320"}, {"name": "Prolog", "bytes": "430"}, {"name": "Python", "bytes": "17647"}, {"name": "Shell", "bytes": "427842"}, {"name": "TeX", "bytes": "323102"}, {"name": "XSLT", "bytes": "12288"}, {"name": "Yacc", "bytes": "34188"}]}}
{"text": "class CreateBodyParts < ActiveRecord::Migration\n def change\n create_table :body_parts do |t|\n t.string :name\n t.string :slug\n\n t.timestamps\n end\n end\nend\n", "meta": {"content_hash": "bcbb25f0fca33b6b77f093ac63fc8a3c", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 47, "avg_line_length": 17.7, "alnum_prop": 0.6497175141242938, "repo_name": "ericallfesta/kirarirenew", "id": "2c5397417d461fc527311a5c819eb20986940424", "size": "177", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "proto.git 2/db/migrate/20140103132455_create_body_parts.rb", "mode": "33261", "license": "apache-2.0", "language": [{"name": "CSS", "bytes": "170444"}, {"name": "CoffeeScript", "bytes": "2178"}, {"name": "JavaScript", "bytes": "99649"}, {"name": "Ruby", "bytes": "234345"}]}}
{"text": "Making a formula is easy. Just `brew create URL` and then `brew install $FORMULA` (perhaps with `--debug --verbose`). Basically, a formula is a Ruby file. You can place it anywhere you want (local or remote) and install it by pointing to the file or URL.\n\nWe want your formula to be awesome, and the cookbook will tell you how.\n\n## Terminology - Homebrew speak\n\n\n \n \n Formula | \n The package definition | \n /usr/local/Library/Formula/foo.rb | \n
\n \n Keg | \n The installation prefix of a Formula | \n /usr/local/Cellar/foo/0.1 | \n
\n \n opt prefix | \n A symlink to the active version of a keg | \n /usr/local/opt/foo | \n
\n \n Cellar | \n All kegs are installed here | \n /usr/local/Cellar | \n
\n \n Tap | \n An optional repository (git) of Formulae | \n /usr/local/Library/Taps | \n
\n \n Bottle | \n Pre-built (binary) Keg that can be unpacked | \n qt-4.8.4.mountain_lion.bottle.1.tar.gz | \n
\n \n
\n\n_More general: `brew --prefix` and `brew --repository` instead of `/usr/local` but lets KISS._\n\n\n## An Introduction\n\nDid you see `/usr/local/.git`? Homebrew is built on Git. This means you can just do your work in `/usr/local` and merge in upstream changes as you go.\n\nHomebrew installs to the `Cellar`, it then symlinks some of the installation into `/usr/local` so that other programs can see what's going on. We suggest you `brew ls` a few of the kegs in your Cellar to see how it is all arranged.\n\nPackages are installed according to their formulae, which live in `$(brew --repository)/Library/Formula`. Check some out. You can view any formula at anytime; e.g. `brew edit wget`.\n\n\n\n# Basic Instructions\n\nMake sure you run `brew update` before you start. This turns your Homebrew installation into a Git repository.\n\nBefore contributing, make sure your package:\n\n* meets all our [Acceptable Formulae](Acceptable-Formulae.md) requirements\n* isn't already in Homebrew (check `brew search $FORMULA`)\n* isn't in another [Homebrew tap](https://github.com/Homebrew)\n* isn't already waiting to be merged (check the [issue tracker](https://github.com/Homebrew/homebrew/issues))\n* is still supported by upstream\n* has a stable, tagged version (i.e. not just a GitHub repository with no versions). See [Interesting-Taps-&-Branches](Interesting-Taps-&-Branches.md) for where pre-release and head-only versions belong.\n\nMake sure you search thoroughly (all aliases!). We don\u2019t want you to waste your time.\n\nBe sure to look over the [contributing guidelines](https://github.com/Homebrew/homebrew/blob/master/CONTRIBUTING.md) as well.\n\n\n## Will we merge your formula?\n\nProbably. But we have rules to keep the quality and goals of Homebrew intact: Please read [Acceptable Formulae](Acceptable-Formulae.md).\n\n## Some Quick Examples Before You Get Started\n\nFormulae aren\u2019t that complicated. [etl](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/etl.rb) is as simple as it gets.\n\nAnd then [Git](https://github.com/Homebrew/homebrew/tree/master/Library/Formula/git.rb) and [flac](https://github.com/Homebrew/homebrew/tree/master/Library/Formula/flac.rb) show more advanced functionality.\n\nA more complete example-formula [cheat-sheet](https://github.com/Homebrew/homebrew/blob/master/Library/Contributions/example-formula.rb) shows almost all the stuff you can use in a Formula.\n\n## Grab the URL\n\nAll you need to make a formula is a URL to the tarball.\n\n brew create http://example.com/foo-0.1.tar.gz\n\nThis creates:\n\n`$HOMEBREW_REPOSITORY/Library/Formula/foo.rb`\n\nAnd opens it in your `$EDITOR`. It'll look like:\n\n```ruby\nclass Foo < Formula\n url \"http://example.com/foo-0.1.tar.gz\"\n homepage \"\"\n sha256 \"85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7\"\n\n # depends_on \"cmake\" => :build\n\n def install\n system \"./configure\", \"--prefix=#{prefix}\", \"--disable-debug\", \"--disable-dependency-tracking\"\n# system \"cmake\", \".\", *std_cmake_args\n system \"make\", \"install\"\n end\nend\n```\n\n**Note:** If `brew` said `Warning: Version cannot be determined from URL` when doing the `create` step, you\u2019ll need to explicitly add the correct version to the formula with `version \"foo\"` **and then save the formula**. `brew install` should then proceed without any trouble.\n\n**Note:** If `brew` said `No formula found for \"php54-timezonedb\". Searching open pull requests...` and you are writing a Tap, you should run `brew tap --repair`.\n\n## Fill in the Homepage\n\n**We don\u2019t accept formulae without homepages!**\n\nHomebrew now has a description field (`desc`). Try and summarize this from the homepage.\n\n## Check the build system\n\n brew install -i foo\n\nYou\u2019re now at new prompt with the tarball extracted to a temporary sandbox.\n\nCheck the package\u2019s `README`. Does the package install with `autotools`, `cmake`, or something else? Delete the commented out cmake lines if the package uses autotools (i.e. if it has a `configure` script).\n\n\n## Check for dependencies\n\nThe `README` probably tells you about dependencies. Homebrew or OS X probably already has them. You can check for Homebrew deps with `brew search`. These are the common deps that OS X comes with:\n\n* `libexpat`\n* `libGL`\n* `libiconv`\n* `libpcap`\n* `libxml2`\n* `Python`\n* `Ruby`\n\nThere are plenty of others. Check `/usr/lib` to see.\n\nWe try to not duplicate libraries and complicated tools in core Homebrew. We dupe some common tools though. But generally, we avoid dupes because it\u2019s one of Homebrew\u2019s foundations. (And it causes build and usage problems!)\n\nThe one special exception is OpenSSL. Anything that uses OpenSSL *should* be built using Homebrew\u2019s shipped OpenSSL and our test bot's post-install audit will warn of this when it is detected. (*Of course, there are exceptions to the exception. Not everything can be forced onto our OpenSSL)*.\n\nBecause Homebrew\u2019s OpenSSL is `keg_only` to avoid conflicting with the system sometimes formulae need to have environmental variables set or special configuration flags passed to locate our preferred OpenSSL; you can see this mechanism in the [clamav](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/clamav.rb#L28) formula. Usually this is unnecessary because when OpenSSL is specified as a dependency Homebrew temporarily prepends the $PATH with that prefix.\n\nHomebrew maintains a special [tap that provides other useful dupes](https://github.com/Homebrew/homebrew-dupes).\n\n*Important:* Since the introduction of `superenv`, `brew --prefix`/bin is NOT on the `$PATH` during formula installation. If you have dependencies at build time, you must specify them and brew will add them to the `$PATH`. You can test around this with `--env=std`.\n\n\n## Specifying other formulae as dependencies\n\n```ruby\nclass Foo < Formula\n depends_on \"jpeg\"\n depends_on \"gtk+\" => :optional\n depends_on \"readline\" => :recommended\n depends_on \"boost\" => \"with-icu\"\n depends_on :x11 => :optional\nend\n```\n\nA String specifies a formula dependency.\n\nA Symbol specifies a special conditional dependency, such as X11.\n\nA Hash specifies a formula dependency with some additional information. Given a single string key, the value can take several forms:\n* a Symbol (currently one of `:build`, `:optional`, `:recommended`).\n - `:build` tags that dependency as a build-time only dependency, meaning it can be safely ignored\n when installing from a bottle and when listing missing dependencies using `brew missing`.\n - `:optional` generates an implicit `with-foo` option for the formula. This means that, given\n `depends_on \"foo\" => :optional`, the user must pass `--with-foo` in order to enable the dependency.\n - `:recommended` generates an implicit `without-foo` option, meaning that the dependency is enabled\n by default and the user must pass `--without-foo` to disable this dependency. The default\n description can be overridden using the normal option syntax (in this case, the option declaration must precede the dependency):\n\n ```ruby\n option \"with-foo\", \"Compile with foo bindings\" # This overrides the generated description if you want to\n depends_on \"foo\" => :optional # Generated description is \"Build with foo support\"\n ```\n\n* a String or an Array\n String values are interpreted as options to be passed to the dependency. You can also pass\n an array of strings, or an array of symbols and strings, in which case the symbols are\n interpreted as described above, and the strings are passed to the dependency as options.\n\n ```ruby\n depends_on \"foo\" => \"with-bar\"\n depends_on \"foo\" => %w{with-bar with-baz}\n depends_on \"foo\" => [:optional, \"with-bar\"]\n ```\n\n\n## Specifying other formulae as conflicts\n\nSometimes there\u2019s hard conflict between formulae, and it can\u2019t be avoided or circumvented with `keg_only`.\n\nPolarSSL is a good [example](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/polarssl.rb#L36-L37) formula for minor conflict.\n\nPolarSSL ship GNU\u2019s Hello, and compiles a `hello` binary. This is obviously non-essential to PolarSSL\u2019s functionality, and conflict with the `hello` formula would be overkill, so we just remove it.\n\nHowever, also in the PolarSSL formulae is a [firm conflict](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/polarssl.rb#L19) with `md5sha1sum`, because both `md5sha1sum` and `polarssl` compile identically-named binaries that *are* important for core functionality.\n\nAs a general rule, `conflicts_with` should be a last-resort option. It\u2019s a fairly blunt instrument.\n\nThe syntax for conflict that can\u2019t be worked around is\n\n```ruby\nconflicts_with \"blueduck\", :because => \"yellowduck also ships a duck binary\"\n```\n\n## Formulae Revisions\n\nIn Homebrew we sometimes accept formulae updates that don\u2019t include a version bump. These include homepage changes, resource updates, new patches or fixing a security issue with a formula.\n\nOccasionally, these updates require a forced-recompile of the formula itself or its dependents to either ensure formulae continue to function as expected or to close a security issue. This forced-recompile is known as a `revision` and inserted underneath the homepage/url/sha block.\n\nWhere a dependent of a formula fails against a new version of that dependency it must receive a `revision`. An example of such failure can be seen [here](https://github.com/Homebrew/homebrew/issues/31195) and the fix [here](https://github.com/Homebrew/homebrew/pull/31207).\n\n`Revisions` are also used for formulae that move from the system OpenSSL to the Homebrew-shipped OpenSSL without any other changes to that formula. This ensures users aren\u2019t left exposed to the potential security issues of the outdated OpenSSL. An example of this can be seen in [this commit](https://github.com/Homebrew/homebrew/commit/6b9d60d474d72b1848304297d91adc6120ea6f96).\n\n## Double-check for dependencies\n\nWhen you already have a lot of brews installed, its easy to miss a common dependency like `glib` or `gettext`.\n\nYou can double-check which libraries a binary links to with the `otool` command (perhaps you need to use `xcrun otool`):\n\n $ otool -L /usr/local/bin/ldapvi\n /usr/local/bin/ldapvi:\n\t/usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)\n\t/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)\n\t/usr/local/lib/libglib-2.0.0.dylib (compatibility version 4201.0.0, current version 4201.0.0)\n\t/usr/local/opt/gettext/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0)\n\t/usr/local/opt/readline/lib/libreadline.6.dylib (compatibility version 6.0.0, current version 6.3.0)\n\t/usr/local/lib/libpopt.0.dylib (compatibility version 1.0.0, current version 1.0.0)\n\t/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)\n\t/System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.4.0)\n\t/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)\n\n\n## Specifying gems, Python modules, Go projects, etc. as dependencies\n\nHomebrew doesn\u2019t package already packaged language-specific libraries. These should be installed directly from `gem`/`cpan`/`pip` etc.\n\nIf you're installing an application then please locally vendor all the language-specific dependencies:\n\n```ruby\nclass Foo < Formula\n resource \"pycrypto\" do\n url \"https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.tar.gz\"\n sha256 \"85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7\"\n end\n\n def install\n resource(\"pycrypto\").stage { system \"python\", *Language::Python.setup_install_args(libexec/\"vendor\") }\n end\nend\n```\n\n[jrnl](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/jrnl.rb) is an example of a formula that does this well. The end-result means the user doesn't have to faff with `pip` or Python and can just run `jrnl`.\n\n[homebrew-pypi-poet](https://github.com/tdsmith/homebrew-pypi-poet) can help you generate resource stanzas for the dependencies of your Python application.\n\nSimilarly, [homebrew-go-resources](https://github.com/samertm/homebrew-go-resources) can help you generate go\\_resource stanzas for the dependencies of your go application.\n\nIf your formula needs a gem or python module and it can't be made into a resource you\u2019ll need to check for these external dependencies:\n\n```ruby\nclass Foo < Formula\n depends_on \"mg\" => :ruby\n depends_on \"json\" => :python\n depends_on \"Authen::NTLM\" => :perl\nend\n```\n\nNote that we probably won't accept the formulae in this case; it's a far worse user experience than vendoring libraries with resources.\n\n## Test the formula\n\nExit out of the interactive shell.\n\n brew install --verbose --debug foo\n\nDebug will ask you to open an interactive shell when the build fails so you can try to figure out what went wrong.\n\nCheck the top of the `./configure` output (if applicable)! Some configure scripts do not recognize `--disable-debug`. If you see a warning about it, remove the option from the formula.\n\n## Add a test to the formula\n\nPlease add a `test do` block to the formula. This will be run by `brew test foo` and the [Brew Test Bot](Brew-Test-Bot.md).\n\nThe `test do` block automatically creates and changes to a temporary directory which is deleted after run. You can access this Pathname with the `testpath` function.\n\nWe want tests that don't require any user input and test the basic functionality of the application. For example `foo build-foo input.foo` is a good test and (despite their widespread use) `foo --version` and `foo --help` are bad tests. However, a bad test is better than no test at all.\n\nSee [cmake](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/cmake.rb) for an example of a formula with a good test. A basic `CMakeLists.txt` file is written CMake uses it to generate Makefiles. This test checks that CMake doesn't e.g. segfault during basic operation.\n\n## Manuals\n\nHomebrew expects to find man pages in `[prefix]/share/man/...`, and not in `[prefix]/man/...`.\n\nSome software installs to man instead of `share/man`, so check the output and add a `\"--mandir=#{man}\"` to the `./configure` line if needed.\n\n\n## A Quick Word on Naming\n\n**THE NAME IS VERY IMPORTANT!**\n\nName the formula like the project markets the product. So it\u2019s `pkg-config`, not `pkgconfig`; `sdl_mixer`, not `sdl-mixer` or `sdlmixer`.\n\nThe only exception is stuff like \u201cApache Ant\u201d. Apache sticks \u201cApache\u201d in front of everything, but we use the formula name `ant`. We only include the prefix in cases like *GNUplot* (because it\u2019s part of the name) and *GNU Go* (because everyone calls it \u201cGNU go\u201d\u2014nobody just calls it \u201cGo\u201d). The word \u201cGo\u201d is too common and there are too many implementations of it.\n\nIf you\u2019re not sure about the name check the homepage, and check the Wikipedia page.\n\n[ALSO CHECK WHAT DEBIAN CALLS IT!](https://www.debian.org/distrib/packages)\n\nWhere Homebrew already has a formula called `foo` we typically do not accept requests to replace that formula with something else also named `foo`. This is to avoid both confusing and surprising users\u2019 expectation.\n\nWhen two formulae share an upstream name, e.g. [`AESCrypt`](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/aescrypt.rb) and [`AESCrypt`](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/aescrypt-packetizer.rb) the newer formula must typically adapt the name to avoid conflict with the current formula.\n\nIf you\u2019re *still* not sure, just commit. We\u2019ll apply some arbitrary rule and make a decision ;)\n\nWhen importing classes, Homebrew will require the formula and then create an instance of the class. It does this by assuming the formula name can be directly converted to the class name using a `regexp`. The rules are simple:\n\n* `foo-bar.rb` => `FooBar`\n* `foobar.rb` => `Foobar`\n\nThus, if you change the name of the class, you must also rename the file. Filenames should be all lowercase.\n\nAdd aliases by creating symlinks in `Library/Aliases`.\n\n\n## Audit the formula\n\nYou can run `brew audit` to test formulae for adherence to Homebrew house style. This includes warnings for trailing whitespace, preferred URLs for certain source hosts, and a lot of other style issues. Fixing these warnings before committing will make the process a lot smoother for us.\n\nUse `brew info` and check if the version guessed by Homebrew from the URL is\ncorrect. Add an explicit `version` if not.\n\n## Commit\n\nEverything is built on Git, so contribution is easy:\n\n brew install git # if you already have git installed, skip this command\n brew update # required in more ways than you think (initializes the brew git repository if you don't already have it)\n cd `brew --repository`\n # Create a new git branch for your formula so your pull request is easy to\n # modify if any changes come up during review.\n git checkout -b \n git add Library/Formula/foo.rb\n git commit\n\nThe established standard for Git commit messages is:\n\n* the first line is a commit summary of *50 characters or less*, then\n* two (2) newlines, then\n* explain the commit throughly\n\nAt Homebrew, we like to put the name of the formula upfront like so \"foobar 7.3 (new formula)\".\nThis may seem crazy short, but you\u2019ll find that forcing yourself to summarise the commit encourages you to be atomic and concise. If you can\u2019t summarise it in 50-80 characters, you\u2019re probably trying to commit two commits as one. For a more thorough explanation, please read Tim Pope\u2019s excellent blog post, [A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).\n\nThe preferred commit message format for simple version updates is \"foobar 7.3\".\n\nEnsure you reference any relevant GitHub issue `#12345` in the commit message. Homebrew\u2019s history is the first thing future contributors will look to when trying to understand the current state of formulae they\u2019re interested in.\n\n\n## Push\n\nNow you just need to push back to GitHub.\n\nIf you haven\u2019t forked Homebrew yet, [go to the repo and hit the fork button](https://github.com/Homebrew/homebrew).\n\nIf you have already forked Homebrew on GitHub, then you can manually push (just make sure you have been pulling from the Homebrew/homebrew master):\n\n git push git@github.com:myname/homebrew.git \n\nNow, please open a Pull Request (on your GitHub repo page) for new and updated brews.\n\n* One formula per commit; one commit per formula\n* Keep merge commits out of the request\n* If you have any merge or mixup commits, please [squash](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) them.\n\nIf a commit touches multiple files, or isn\u2019t one logical bug fix, or a file is touched in multiple commits, we\u2019ll probably ask you to `rebase` and `squash` your commits. For this reason, you should avoid pushing to your `master` branch. Note, after rebase and/or squash, you'll need to push with `--force` to your remote.\n\n\n# Overview of the Formula Install Process\n\n\n* The result of `Formula.download_strategy` is instantiated.\n* `DownloadStrategy.fetch` is called (downloads tarball, checks out git repository, etc.)\n* A temporary sandbox is created in `/tmp/$formulaname`\n* `DownloadStrategy.stage` is called (extracts tarball to above sandbox, exports git repository to sandbox, etc.)\n* Patches are applied\n* Current directory is changed to the stage root (so when you `system make`, it works)\n* `Formula.install` is called\n* Anything installed to the keg is cleaned (see later)\n* The keg is symlinked into Homebrew\u2019s prefix\n* Caveats are displayed\n\n\n# Convenience Tools\n\n## Messaging\n\nThree commands are provided for displaying informational messages to the user:\n\n* `ohai` for general info\n* `opoo` for warning messages\n* `onoe` for error messages\n\nIn particular, when a test needs to be performed before installation use `onoe` to bail out gracefully. For example:\n\n```ruby\nif some_test?\n system \"make\", \"install\"\nelse\n onoe \"Error! Something is wrong.\"\nend\n```\n\n\n## bin.install \"foo\"\n\nYou\u2019ll see stuff like that in other formulae. This installs the file foo into the Formula\u2019s `bin` directory (`/usr/local/Cellar/pkg/0.1/bin`) and makes it executable (`chmod 0555 foo`).\n\n## inreplace\n\nA convenience function that can edit files in-place. For example:\n\n`inreplace \"path\", before, after`\n\n`before` and `after` can be strings or regexps. You can also use the block form:\n\n```ruby\ninreplace \"path\" do |s|\n s.gsub! /foo/, \"bar\"\nend\n```\n\nMake sure you modify `s`! This block ignores the returned value.\n\n`inreplace` should be used instead of patches when it is patching something that will never be accepted upstream e.g. make the software\u2019s build system respect Homebrew\u2019s installation hierarchy. If it's Homebrew and MacPorts or OS X specific it should be turned into a patch instead.\n\nIf you need modify variables in a Makefile, rather than using `inreplace`, pass them as arguments to make:\n\n```rb\nsystem \"make\", \"target\", \"VAR2=value1\", \"VAR2=value2\", \"VAR3=values can have spaces\"\n```\n\n```rb\nargs = %W[\n CC=#{ENV.cc}\n PREFIX=#{prefix}\n]\n\nsystem \"make\", *args\n```\n\nNote that values *can* contain unescaped spaces if you use the multiple-argument form of `system`.\n\n## Patches\n\nWhile patches should generally be avoided, sometimes they are necessary.\n\nWhen patching (i.e. fixing header file inclusion, fixing compiler warnings, etc.) the first thing to do is check whether or not the upstream project is aware of the issue. If not, file a bug report and/or submit your patch for inclusion. We may sometimes still accept your patch before it was submitted upstream but by getting the ball rolling on fixing the upstream issue you reduce the length of time we have to carry the patch around.\n\n*Always, always, always justify a patch with a code comment!* Otherwise, nobody will know when it is safe to remove the patch, or safe to leave it in when updating the formula. The comment should include a link to the relevant upstream issue(s).\n\nExternal patches can be declared using resource-style blocks:\n\n```rb\npatch do\n url \"https://example.com/example_patch.diff\"\n sha256 \"85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7\"\nend\n```\n\nA strip level of -p1 is assumed. It can be overridden using a symbol argument:\n\n```rb\npatch :p0 do\n url \"https://example.com/example_patch.diff\"\n sha256 \"85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7\"\nend\n```\n\nPatches can be declared in stable, devel, and head blocks. NOTE: always use a block instead of a conditional, i.e. `stable do ... end` instead of `if build.stable? then ... end`.\n\n```rb\nstable do\n # some other things...\n\n patch do\n url \"https://example.com/example_patch.diff\"\n sha256 \"85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7\"\n end\nend\n```\n\nEmbedded (__END__) patches can be declared like so:\n\n```rb\npatch :DATA\npatch :p0, :DATA\n```\n\nwith the patch data included at the end of the file:\n\n```\n__END__\ndiff --git a/foo/showfigfonts b/foo/showfigfonts\nindex 643c60b..543379c 100644\n--- a/foo/showfigfonts\n+++ b/foo/showfigfonts\n@@ -14,6 +14,7 @@\n\u2026\n```\n\nPatches can also be embedded by passing a string. This makes it possible to provide multiple embedded patches while making only some of them conditional.\n```rb\npatch :p0, \"...\"\n```\n\nIn embedded patches, the string `HOMEBREW_PREFIX` is replaced with the value of the constant `HOMEBREW_PREFIX` before the patch is applied.\n\n\n## Creating the diff\n\n brew install --interactive --git foo\n \u2026\n (make some edits)\n \u2026\n git diff | pbcopy\n brew edit foo\n\nNow just paste into the formula after `__END__`.\nInstead of `git diff | pbcopy`, for some editors `git diff >> path/to/your/formula/foo.rb` might help you that the diff is not touched (e.g. white space removal, indentation, etc.)\n\n\n\n# Advanced Formula Tricks\n\nIf anything isn\u2019t clear, you can usually figure it out with some `grep` and the `Library/Formula` directory. Please amend this document if you think it will help!\n\n\n## Unstable versions (`HEAD`, `devel`)\n\nFormulae can specify alternate downloads for the upstream project\u2019s `devel` release (unstable but not `trunk`) or `HEAD` (`master/trunk`).\n\n### HEAD\n\nHEAD URLs (activated by passing `--HEAD`) build the development cutting edge. Specifying it is easy:\n\n```ruby\nclass Foo < Formula\n head \"https://github.com/mxcl/lastfm-cocoa.git\"\nend\n```\n\nHomebrew understands `git`, `svn`, and `hg` URLs, and has a way to specify `cvs` repositories as a URL as well. You can test whether the `HEAD` is being built with `build.head?`.\n\nTo use a specific commit, tag, or branch from a repository, specify head with the `:tag` and `:revision`, `:revision`, or `:branch` option, like so:\n\n```ruby\nclass Foo < Formula\n head \"https://github.com/some/package.git\", :revision => \"090930930295adslfknsdfsdaffnasd13\"\n # or :branch => \"develop\"\n # or :tag => \"1_0_release\",\n # :revision => \"090930930295adslfknsdfsdaffnasd13\"\nend\n```\n\nFormulae that only have `head` versions should be submitted to [homebrew/headonly](https://github.com/Homebrew/homebrew-headonly) instead of Homebrew/homebrew.\n\n### devel\n\nThe \"devel\" spec (activated by passing `--devel`) is used for a project\u2019s unstable releases. It is specified in a block:\n\n```ruby\ndevel do\n url \"https://foo.com/foo-0.1.tar.gz\"\n sha256 \"85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7\"\nend\n```\n\nYou can test if the \"devel\" spec is in use with `build.devel?`.\n\n## Compiler selection\n\nSometimes a package fails to build when using a certain compiler. Since recent Xcode no longer includes a GCC compiler, we cannot simply force the use of GCC. Instead, the correct way to declare this is the `fails_with` DSL method. A properly constructed `fails_with` block documents the latest compiler build version known to cause compilation to fail, and the cause of the failure. For example:\n\n```ruby\nfails_with :llvm do\n build 2335\n cause <<-EOS.undent\n The \"cause\" field should include a short summary of the error. Include\n the URLs of any relevant information, such as upstream bug reports. Wrap\n the text at a sensible boundary (~72-80 characters), but do not break\n URLs over multiple lines.\n EOS\nend\n```\n\n`build` takes a Fixnum (you can find this number in your `brew --config` output). `cause` takes a string, and the use of heredocs is encouraged to improve readability and allow for more comprehensive documentation.\n\n`fails_with` declarations can be used with any of `:gcc`, `:llvm`, and `:clang`. Homebrew will use this information to select a working compiler (if one is available).\n\n\n## Specifying the Download Strategy explicitly\n\nTo use one of Homebrew\u2019s built-in download strategies, specify the `:using =>` flag on a `url` or `head`. For example:\n\n```ruby\nclass Sip < Formula\n url \"http://www.riverbankcomputing.co.uk/hg/sip/archive/4.11\"\n md5 \"dbafd7101a4e7caee6f529912a1356e5\"\n head \"http://www.riverbankcomputing.co.uk/hg/sip\", :using => :hg\n homepage \"http://www.riverbankcomputing.co.uk/software/sip\"\n```\n\nThe downloaders offered by Homebrew are:\n\n\n \n \n Value of :using | \n Corresponds To | \n
\n \n \n \n :bzr | \n BazaarDownloadStrategy | \n
\n \n :curl | \n CurlDownloadStrategy | \n
\n \n :cvs | \n CVSDownloadStrategy | \n
\n \n :git | \n GitDownloadStrategy | \n
\n \n :hg | \n MercurialDownloadStrategy | \n
\n \n :nounzip | \n NoUnzipCurlDownloadStrategy | \n
\n \n :post | \n CurlPostDownloadStrategy | \n
\n \n :svn | \n SubversionDownloadStrategy | \n
\n \n
\n\n\nIf you need more control over the way files are downloaded and staged, you can create a custom download strategy and specify it using the `url` method's `:using` option:\n\n\n```ruby\nclass MyDownloadStrategy < SomeHomebrewDownloadStrategy\n # Does something cool\nend\n\nclass Foo < Formula\n url \"something\", :using => MyDownloadStrategy\nend\n```\n\nSpecifying download strategies can be useful when used with a local repo, where a plain URL would not let you specify how to access it. For example:\n\n```ruby\nclass Bar < Formula\n head \"/users/abc/src/git.git\", :using => :git\nend\n```\n\n\n## Just copying some files\n\nWhen your code in the install function is run, the current working directory is set to the extracted tarball.\n\nSo it is easy to just copy some files:\n\n```ruby\nprefix.install \"file1\", \"file2\"\n```\n\nOr everything:\n\n```ruby\nprefix.install Dir[\"output/*\"]\n```\n\nGenerally we'd rather you were specific about what files or directories need to be installed rather than installing everything.\n\n### Variables for directory locations\n\n\n \n \n Name | \n Default | \n Example | \n
\n \n \n \n HOMEBREW_PREFIX | \n /usr/local | \n | \n
\n \n prefix | \n #{HOMEBREW_PREFIX}/Cellar/#{name}/#{version} | \n /usr/local/Cellar/foo/0.1 | \n
\n \n opt_prefix | \n #{HOMEBREW_PREFIX}/opt/#{name} | \n /usr/local/opt/foo | \n
\n \n bin | \n #{prefix}/bin | \n /usr/local/Cellar/foo/0.1/bin | \n
\n \n doc | \n #{prefix}/share/doc/foo | \n /usr/local/Cellar/foo/0.1/share/doc/foo | \n
\n \n include | \n #{prefix}/include | \n /usr/local/Cellar/foo/0.1/include | \n
\n \n info | \n #{prefix}/share/info | \n /usr/local/Cellar/foo/0.1/share/info | \n
\n \n lib | \n #{prefix}/lib | \n /usr/local/Cellar/foo/0.1/lib | \n
\n \n libexec | \n #{prefix}/libexec | \n /usr/local/Cellar/foo/0.1/libexec | \n
\n \n man | \n #{prefix}/share/man | \n /usr/local/Cellar/foo/0.1/share/man | \n
\n \n man[1-8] | \n #{prefix}/share/man/man[1-8] | \n /usr/local/Cellar/foo/0.1/share/man/man[1-8] | \n
\n \n sbin | \n #{prefix}/sbin | \n /usr/local/Cellar/foo/0.1/sbin | \n
\n \n share | \n #{prefix}/share | \n /usr/local/Cellar/foo/0.1/share | \n
\n \n etc | \n #{HOMEBREW_PREFIX}/etc | \n /usr/local/etc | \n
\n \n var | \n #{HOMEBREW_PREFIX}/var | \n /usr/local/var | \n
\n \n buildpath | \n A temporary dir somewhere on your system | \n /private/tmp/[formula-name]-0q2b/[formula-name] | \n
\n \n
\n\nThese can be used, for instance, in code such as\n\n```ruby\nbin.install Dir[\"output/*\"]\n```\n\nto install binaries into their correct location into the cellar, and\n\n```ruby\nman.mkpath\n```\n\nto create the directory structure to the man location.\n\nTo install man pages into specific locations, use `man1.install \"foo.1\", \"bar.1\"`, `man2.install \"foo.2\"`, etc.\n\nNote that in the context of Homebrew, `libexec` is reserved for private use by the formula and therefore is not symlinked into `HOMEBREW_PREFIX`.\n\n### Installation without linking into `/usr/local` (keg-only)\n\nIf you only need a program for a dependency and it does not need to be linked for public use in `/usr/local`, specify\n\n```ruby\nkeg_only \"This is my rationale.\"\n```\n\nin the Formula class.\n\n\n## Adding optional steps\n\nIf you want to add an option:\n\n```ruby\nclass Yourformula < Formula\n ...\n option \"with-ham\", \"Description of the option\"\n option \"without-spam\", \"Another description\"\n depends_on \"foo\" => :optional # will automatically add a with-foo option\n ...\n```\n\nAnd then to define the effects the options have:\n\n```ruby\nif build.with? \"ham\"\n # note, no \"with\" in the option name (it is added by the build.with? method)\nend\n\nif build.without? \"ham\"\n # works as you'd expect. True if `--without-ham` was given.\nend\n\nif build.include? \"enable-ham\"\n # the deprecated style, only useful for options other than `with`/`without` style\nend\n```\n\nOption names should be prefixed with one of the words `with`, `without`, `no`, or a verb in the imperative tense describing the action to be taken. For example, an option to run a test suite should be named `--with-test` or `--with-check` rather than `--test`, and an option to enable a shared library should be named `--enable-shared` rather than `--shared`.\n\nNote that options that aren\u2019t ` build.with? ` or ` build.without? ` should be actively deprecated where possible. See [wget](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/wget.rb#L27-L31) for an example.\n\nSee the [graphviz](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/graphviz.rb) formula for an example.\n\n\n## File level operations\n\nYou can use the file utilities provided by Ruby (`FileUtils`). These are included in the `Formula` class, so you do not need the `FileUtils.` prefix to use them. They are documented [here](http://www.ruby-doc.org/stdlib/libdoc/fileutils/rdoc/index.html).\n\nWhen creating symlinks, take special care to ensure they are *relative* symlinks. This makes it easier to create a relocatable bottle. For example, to create a symlink in `bin` to an executable in `libexec`, use\n\n```rb\nbin.install_symlink libexec/\"name\"\n```\n\n*not*\n\n```rb\nln_s libexec/\"name\", bin\n```\n\nThe symlinks created by `install_symlink` are guaranteed to be relative. `ln_s` will only produce a relative symlink when given a relative path.\n\n## Handling files that should persist over formula upgrades\n\nFor example, Ruby 1.9\u2019s gems should be installed to `var/lib/ruby/` so that gems don\u2019t need to be reinstalled when upgrading Ruby. You can usually do this with symlink trickery, or *better* a configure option.\n\n### launchd plist files\n\nHomebrew provides two Formula methods for launchd plist files. `plist_name` will return `homebrew.mxcl.`, and `plist_path` will return, for example, `/usr/local/Cellar/foo/0.1/homebrew.mxcl.foo.plist`.\n\n## Updating formulae\n\nEventually a new version of the software will be released. In this case you should update the `url` and `sha256`. Please leave the `bottle do ... end` block as-is; our CI system will update it when we pull your change.\n\nCheck if the formula you are updating is a dependency for any other formulae by running `brew uses UPDATED_FORMULA`. If it is a dependency please `brew reinstall` all the dependencies after it is installed and verify they work correctly.\n\n# Style guide\n\nHomebrew wants to maintain a consistent Ruby style across all formulae based on [Ruby Style Guide](https://github.com/styleguide/ruby). Other formulae may not have been updated to match this guide yet but all new ones should. Also:\n\n* The order of methods in a formula should be consistent with other formulae (e.g.: `def patches` goes before `def install`)\n* An empty line is required before the `__END__` line\n\n\n\n# Troubleshooting for people writing new formulae\n\n### Version detection fails\n\nHomebrew tries to automatically determine the version from the URL in order to save on duplication. If the tarball has a funny name though, you may have to assign the version number:\n\n```ruby\nclass Foobar\n version \"0.7\"\nend\n```\n\n## Bad Makefiles\n\nNot all projects have makefiles that will run in parallel so try to deparallelize:\n\n brew edit foo\n\nAdd all this to the formula (so there will already be a class line, don\u2019t add another or change that, and there\u2019s already an install function, don't add another one, add the lines in the install function below to the top of the problem formula\u2019s install function).\n\n```ruby\nclass Foo < Formula\n skip_clean :all\n def install\n ENV.deparallelize\n ENV.no_optimization\n system \"make\" # separate make and make install steps\n system \"make\", \"install\"\n end\nend\n```\n\nIf that fixes it, please open an [issue](https://github.com/Homebrew/homebrew/issues) so that we can fix it for everyone.\n\n## Still won\u2019t work?\n\nCheck out what MacPorts and Fink do:\n\n`brew -S --macports foo`\n\n`brew -S --fink foo`\n\n\n\n# Superenv Notes\n\n`superenv` is a \"super\" environment that tries to improve reliability for the general case. But it does make making formula harder.\n\nTo not use `superenv`, install with `--env=std`.\n\nSuperenv isolates builds by removing `/usr/local/bin` and all user-PATHs that are not determined to be essential to the build. It does this because other PATHs are full of stuff that breaks builds. (We have 15,000 tickets as testament!)\n\n`superenv` tries to remove bad-flags from the commands passed to `clang`/`gcc` and injects others (for example all `keg_only` dependencies are added to the `-I` and `-L` flags. If superenv troubles you, try to `brew install --env=std` and report to us if that fixes it.\n\n# Fortran\n\nSome software requires a Fortran compiler. This can be declared by adding `depends_on :fortran` to a formula. `:fortran` is a special dependency that does several things.\n\nFirst, it looks to see if you have set the `FC` environment variable. If it is set, Homebrew will use this value during compilation. If it is not set, it will check to see if `gfortran` is found in `PATH`. If it is, Homebrew will use its location as the value of `FC`. Otherwise, the `gcc` formula will be treated as a dependency and installed prior to compilation.\n\nIf you have set `FC` to a custom Fortran compiler, you may additionally set `FCFLAGS` and `FFLAGS`. Alternatively, you can pass `--default-fortran-flags` to `brew install` to use Homebrew's standard `CFLAGS`.\n\nWhen using Homebrew's own gfortran compiler, the standard `CFLAGS` are used and user-supplied values of `FCFLAGS` and `FFLAGS` are ignored for consistency and reproducibility reasons.\n\n\n# How to start over (reset to `master`)?\n\nHave you created a real mess in git which paralyzes you to create the commit you just want to push?\nThen you might consider start from scratch.\nYour changes will be discarded in favour of the `master` branch:\n\n`git checkout master`\n\n`git reset --hard FETCH_HEAD`\n", "meta": {"content_hash": "8d53a5d3ee66b814a3acde6349ddb05c", "timestamp": "", "source": "github", "line_count": 987, "max_line_length": 476, "avg_line_length": 41.4822695035461, "alnum_prop": 0.7218816403292382, "repo_name": "tylerball/homebrew", "id": "ca05738ca5b42bfeaae355e1ddbf5fd7b6a3e0b1", "size": "41092", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "share/doc/homebrew/Formula-Cookbook.md", "mode": "33188", "license": "bsd-2-clause", "language": [{"name": "C++", "bytes": "5889"}, {"name": "Groff", "bytes": "26137"}, {"name": "JavaScript", "bytes": "18"}, {"name": "Perl", "bytes": "547"}, {"name": "PostScript", "bytes": "485"}, {"name": "Ruby", "bytes": "4617578"}, {"name": "Shell", "bytes": "19080"}]}}
{"text": "package gr.demokritos.iit.ydsapi.model;\n\nimport com.google.gson.Gson;\nimport com.google.gson.GsonBuilder;\nimport com.google.gson.JsonArray;\nimport com.google.gson.JsonDeserializationContext;\nimport com.google.gson.JsonDeserializer;\nimport com.google.gson.JsonElement;\nimport com.google.gson.JsonObject;\nimport com.google.gson.JsonParseException;\nimport com.google.gson.JsonSerializationContext;\nimport com.google.gson.JsonSerializer;\nimport java.lang.reflect.Type;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.Set;\nimport org.bson.types.ObjectId;\n\n/**\n *\n * @author George K. \n */\npublic class BasketItem {\n\n private final String userID;\n private final String componentParentUUID;\n private final String title;\n private final ObjectId basketItemID;\n private final Set tags;\n private final Set filters;\n private final String compType;\n private final String contentType;\n private final BasketType type;\n private final boolean priv;\n private final String lang;\n\n private BasketItem(Builder builder) {\n this.userID = builder.user_id;\n this.componentParentUUID = builder.component_parent_UUID;\n this.title = builder.title;\n this.basketItemID = builder.basket_item_id;\n this.tags = builder.tags;\n this.filters = builder.filters;\n this.compType = builder.component_type;\n this.contentType = builder.content_type;\n this.type = builder.type;\n this.priv = builder.isPrivate;\n this.lang = builder.lang;\n }\n\n /**\n * obtain json request, utilizes {@link Builder} for safety\n *\n * @param jsonBasketItem\n */\n public BasketItem(String jsonBasketItem) {\n BasketItem bi\n = new GsonBuilder()\n .registerTypeAdapter(BasketItem.class, new BasketItemDeserializer())\n .create()\n .fromJson(jsonBasketItem, getClass());\n this.userID = bi.userID;\n this.componentParentUUID = bi.componentParentUUID;\n this.title = bi.title;\n this.basketItemID = bi.basketItemID;\n this.tags = bi.tags;\n this.filters = bi.filters;\n this.compType = bi.compType;\n this.contentType = bi.contentType;\n this.type = bi.type;\n this.priv = bi.priv;\n this.lang = bi.lang;\n }\n\n public String getUserID() {\n return userID;\n }\n\n public String getComponentParentUUID() {\n return componentParentUUID;\n }\n\n public String getTitle() {\n return title;\n }\n\n public ObjectId getBasketItemID() {\n return basketItemID;\n }\n\n public Set getTags() {\n return tags;\n }\n\n public Set getFilters() {\n return filters;\n }\n\n public String getComponentType() {\n return compType;\n }\n\n public String getContentType() {\n return contentType;\n }\n\n public BasketType getType() {\n return type;\n }\n\n public boolean isPrivate() {\n return priv;\n }\n\n public String getLang() {\n return lang;\n }\n\n @Override\n public String toString() {\n return \"BasketItem{\" + \"user_id=\" + userID\n + \", component_parent_UUID=\" + componentParentUUID\n + \", title=\" + title\n + \", basket_item_id=\" + basketItemID\n + \", tags=\" + tags\n + \", filters=\" + filters\n + \", component_type=\" + compType\n + \", content_type=\" + contentType\n + \", type=\" + type\n + \", priv=\" + priv\n + \", lang=\" + lang + '}';\n }\n\n public String toJSON() {\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder\n .registerTypeAdapter(BasketItem.class, new BasketItemSerializer())\n .disableHtmlEscaping()\n .setPrettyPrinting();\n Gson gson = gsonBuilder.create();\n return gson.toJson(this);\n }\n\n public JsonElement toJSONElement() {\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder\n .registerTypeAdapter(BasketItem.class, new BasketItemSerializer())\n .disableHtmlEscaping()\n .setPrettyPrinting();\n Gson gson = gsonBuilder.create();\n return gson.toJsonTree(this);\n }\n\n /**\n * we want only these specific fields to uniquely identify a\n * {@link BasketItem}\n *\n * @return\n */\n @Override\n public int hashCode() {\n int hash = 3;\n hash = 17 * hash + Objects.hashCode(this.componentParentUUID);\n hash = 17 * hash + Objects.hashCode(this.title);\n hash = 17 * hash + Objects.hashCode(this.compType);\n hash = 17 * hash + Objects.hashCode(this.contentType);\n hash = 17 * hash + Objects.hashCode(this.type);\n hash = 17 * hash + Objects.hashCode(this.lang);\n return hash;\n }\n\n @Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n final BasketItem other = (BasketItem) obj;\n if (!Objects.equals(this.componentParentUUID, other.componentParentUUID)) {\n return false;\n }\n if (!Objects.equals(this.title, other.title)) {\n return false;\n }\n if (!Objects.equals(this.compType, other.compType)) {\n return false;\n }\n if (!Objects.equals(this.contentType, other.contentType)) {\n return false;\n }\n if (this.type != other.type) {\n return false;\n }\n return Objects.equals(this.lang, other.lang);\n }\n\n /**\n * custom builder class for {@link BasketItem}\n */\n public static class Builder {\n\n private final String user_id;\n private final String component_parent_UUID;\n private final String title;\n private ObjectId basket_item_id;\n private Set tags;\n private Set filters;\n private String component_type;\n private String content_type;\n private BasketType type;\n private Boolean isPrivate;//\n private String lang;\n\n public Builder(String userIDArg, String compParentUUIDArg, String titleArg) {\n this.user_id = userIDArg;\n this.component_parent_UUID = compParentUUIDArg;\n this.title = titleArg;\n }\n\n /**\n *\n * @param lang\n * @return\n */\n public Builder withLang(String lang) {\n this.lang = lang;\n return this;\n }\n\n /**\n *\n * @param tagsArg\n * @return\n */\n public Builder withTags(Collection tagsArg) {\n if (tagsArg == null) {\n this.tags = new LinkedHashSet(0);\n } else {\n this.tags = new LinkedHashSet(tagsArg);\n }\n return this;\n }\n\n /**\n *\n * @param filtersArg\n * @return\n */\n public Builder withFilters(Collection filtersArg) {\n if (filtersArg == null) {\n this.filters = new LinkedHashSet(0);\n } else {\n this.filters = new LinkedHashSet(filtersArg);\n }\n return this;\n }\n\n /**\n *\n * @param compTarg\n * @return\n */\n public Builder withComponentType(String compTarg) {\n String compTargLower = compTarg.toLowerCase();\n if (!ComponentType.ACCEPTED.contains(compTargLower)) {\n throw new IllegalArgumentException(String.format(\"'%s' not accepted as a valid component type\", compTarg));\n } else {\n this.component_type = compTargLower;\n }\n return this;\n }\n\n /**\n *\n * @param contTarg\n * @return\n */\n public Builder withContentType(String contTarg) {\n this.content_type = contTarg;\n return this;\n }\n\n /**\n *\n * @param id\n * @return\n */\n public Builder withID(ObjectId id) {\n this.basket_item_id = id;\n return this;\n }\n\n /**\n *\n * @param typeArg\n * @return\n */\n public Builder withType(BasketType typeArg) {\n this.type = typeArg;\n return this;\n }\n\n /**\n *\n * @param typeArg\n * @return\n */\n public Builder withType(String typeArg) throws IllegalArgumentException {\n if (typeArg.equalsIgnoreCase(BasketType.DATASET.getDecl())) {\n this.type = BasketType.DATASET;\n } else if (typeArg.equalsIgnoreCase(BasketType.VISUALISATION.getDecl())) {\n this.type = BasketType.VISUALISATION;\n } else {\n throw new IllegalArgumentException(\"type must be one of \"\n + Arrays.asList(\n new String[]{\n BasketType.DATASET.getDecl(),\n BasketType.VISUALISATION.getDecl()\n }\n ).toString());\n }\n return this;\n }\n\n /**\n *\n * @param isPrivateArg\n * @return\n */\n public Builder withIsPrivate(boolean isPrivateArg) {\n this.isPrivate = isPrivateArg;\n return this;\n }\n\n public BasketItem build() {\n if (this.lang == null || this.lang.trim().isEmpty()) {\n this.lang = \"en\";\n }\n // default is 'private'\n if (this.isPrivate == null) {\n this.isPrivate = Boolean.TRUE;\n }\n // mandatory fields\n if (this.type == null) {\n throw new IllegalArgumentException(\"declare basket type\");\n }\n if (this.content_type == null) {\n throw new IllegalArgumentException(\"declare content type\");\n }\n if (this.component_type == null) {\n throw new IllegalArgumentException(\"declare component type\");\n }\n return new BasketItem(this);\n }\n }\n\n /**\n * basket types: dataset/visualization, 'ALL' is used to override call\n */\n public enum BasketType {\n\n DATASET(\"dataset\"), VISUALISATION(\"visualisation\"), ALL(\"all\");\n private final String type;\n\n private BasketType(String type) {\n this.type = type;\n }\n\n public String getDecl() {\n return type;\n }\n }\n\n public static final String FLD_USERID = \"user_id\";\n public static final String FLD_BASKET_ITEM_ID = \"basket_item_id\";\n public static final String FLD_OBJ_ID = \"_id\";\n public static final String FLD_COMPONENT_PARENT_UUID = \"component_parent_uuid\";\n public static final String FLD_TITLE = \"title\";\n public static final String FLD_TAGS = \"tags\";\n public static final String FLD_FILTERS = \"filters\";\n public static final String FLD_COMPONENT_TYPE = \"component_type\";\n public static final String FLD_CONTENT_TYPE = \"content_type\";\n public static final String FLD_TYPE = \"type\";\n public static final String FLD_IS_PRIVATE = \"is_private\";\n public static final String FLD_LANG = \"lang\";\n\n /**\n * Helper class to serialize as needed in the API\n */\n class BasketItemSerializer implements JsonSerializer {\n\n @Override\n public JsonElement serialize(BasketItem t, Type type, JsonSerializationContext jsc) {\n final JsonObject jsonObject = new JsonObject();\n jsonObject.addProperty(BasketItem.FLD_USERID, t.getUserID());\n if (t.getBasketItemID() != null) {\n jsonObject.addProperty(BasketItem.FLD_BASKET_ITEM_ID, t.getBasketItemID().toString());\n }\n jsonObject.addProperty(BasketItem.FLD_COMPONENT_PARENT_UUID, t.getComponentParentUUID());\n jsonObject.addProperty(BasketItem.FLD_TITLE, t.getTitle());\n jsonObject.addProperty(BasketItem.FLD_COMPONENT_TYPE, t.getComponentType());\n jsonObject.addProperty(BasketItem.FLD_CONTENT_TYPE, t.getContentType());\n jsonObject.addProperty(BasketItem.FLD_TYPE, t.getType().getDecl());\n jsonObject.addProperty(BasketItem.FLD_IS_PRIVATE, t.isPrivate());\n jsonObject.addProperty(BasketItem.FLD_LANG, t.getLang());\n\n final JsonElement jsonTags = jsc.serialize(t.getTags());\n jsonObject.add(BasketItem.FLD_TAGS, jsonTags);\n\n // add filters\n final JsonArray jsonFilters = new JsonArray();\n for (final BFilter filt : t.getFilters()) {\n final JsonElement jsonfil = filt.toJSONElement();\n jsonFilters.add(jsonfil);\n }\n jsonObject.add(BasketItem.FLD_FILTERS, jsonFilters);\n return jsonObject;\n }\n }\n\n class BasketItemDeserializer implements JsonDeserializer {\n\n @Override\n public BasketItem deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {\n final JsonObject jsonObject = json.getAsJsonObject();\n // initial\n final String user_id = jsonObject.get(BasketItem.FLD_USERID).getAsString();\n final String component_parent_uuid = jsonObject.get(BasketItem.FLD_COMPONENT_PARENT_UUID).getAsString();\n final String title = jsonObject.get(BasketItem.FLD_TITLE).getAsString();\n // init builder object\n Builder b = new Builder(user_id, component_parent_uuid, title);\n // other\n JsonElement jsonbitemID = jsonObject.get(BasketItem.FLD_OBJ_ID);\n if (jsonbitemID != null) {\n ObjectId id = new ObjectId(jsonbitemID.getAsString());\n b = b.withID(id);\n }\n // tags\n final JsonArray jsonTags = jsonObject.get(BasketItem.FLD_TAGS).getAsJsonArray();\n final List lTags = new ArrayList(jsonTags.size());\n for (int i = 0; i < jsonTags.size(); i++) {\n final JsonElement jsonTag = jsonTags.get(i);\n lTags.add(jsonTag.getAsString());\n }\n // add tags\n b = b.withTags(lTags);\n // filters\n final JsonArray jsonFilters = jsonObject.get(BasketItem.FLD_FILTERS).getAsJsonArray();\n final List lFilters = new ArrayList(jsonFilters.size());\n for (int i = 0; i < jsonFilters.size(); i++) {\n final JsonElement jsonFilt = jsonFilters.get(i);\n BFilter bf = new Gson().fromJson(jsonFilt, BFilter.class);\n lFilters.add(bf);\n }\n // add filters \n b = b.withFilters(lFilters);\n // add rest items\n final String component_type = jsonObject.get(BasketItem.FLD_COMPONENT_TYPE).getAsString();\n final String content_type = jsonObject.get(BasketItem.FLD_CONTENT_TYPE).getAsString();\n final String type = jsonObject.get(BasketItem.FLD_TYPE).getAsString();\n final boolean isPrivate = jsonObject.get(BasketItem.FLD_IS_PRIVATE).getAsBoolean();\n final String lang = jsonObject.get(BasketItem.FLD_LANG).getAsString();\n\n b = b.withComponentType(component_type)\n .withContentType(content_type)\n .withType(type)\n .withIsPrivate(isPrivate)\n .withLang(lang);\n\n return b.build();\n }\n }\n}\n", "meta": {"content_hash": "ff8352d76a1d05d222bfa1cf7aa871a5", "timestamp": "", "source": "github", "line_count": 479, "max_line_length": 133, "avg_line_length": 33.292275574112736, "alnum_prop": 0.5690098451119333, "repo_name": "YourDataStories/components-visualisation", "id": "d6b2924d122ec177734768bbab917638cd5222c2", "size": "15947", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "BackendUtilities/src/main/java/gr/demokritos/iit/ydsapi/model/BasketItem.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "CSS", "bytes": "42030"}, {"name": "HTML", "bytes": "353801"}, {"name": "Java", "bytes": "164739"}, {"name": "JavaScript", "bytes": "881627"}]}}
{"text": "#!/usr/bin/env node\n\nvar sys = require('sys')\n\t, fs = require('fs')\n\t, M = require('./Mustache')\n\t, compressor = require('node-minify');\n\nvar package = require('../package.json');\nvar code = '';\nvar docs = {};\n\ndocs.main = '';\ndocs.API = '';\ndocs.copyrightYear = new Date().getFullYear();\n\n// read in the the main.js file as our main boilerplate code\ncode += fs.readFileSync('./main.js', encoding = 'utf8');\ncode = M.Mustache.to_html(code, {'today': new Date().getTime(), 'version': package.version});\n\ndocs.main += fs.readFileSync('./docs.js', encoding = 'utf8');\n\n// parse entire lib directory and concat it into one file for the browser\nvar lib = paths('./lib');\n\nvar faker = require('../index');\n\n// generate bundle for code on the browser\nfor (var module in faker) {\n\tcode += ( '\\n' + 'faker.' + module + ' = {};');\n\tfor (var method in faker[module]) {\n\t\tcode += ( '\\n' + 'faker.' + module);\n\t\tcode += ( '.' + method + ' = ');\n\n\t\t// serialize arrays as JSON, otherwise use simple string conversion\n\t\tvar methodValue = faker[module][method];\n\t\tif (Array.isArray(methodValue)) {\n\t\t\tcode += JSON.stringify(methodValue) + ';\\n';\n\t\t} else {\n\t\t\tcode += (methodValue.toString() + ';\\n');\n\t\t}\n\t}\n}\n\n// generate nice tree of api for docs\ndocs.API += '';\nfor (var module in faker) {\n\tdocs.API += '- ' + module;\n\tdocs.API += '
';\n\tfor (var method in faker[module]) {\n\t\tdocs.API += '- ' + method + '
';\n\t}\n\tdocs.API += '
';\n\tdocs.API += ' ';\n}\ndocs.API += '
';\n\n// definitions hack\ncode += 'var definitions = faker.definitions;\\n';\ncode += 'var Helpers = faker.Helpers;\\n';\n\n// if we are running in a CommonJS env, export everything out\ncode +=[\"\\nif (typeof define == 'function'){\",\n\" define(function(){\",\n\"\t\treturn faker;\",\n\" });\",\n\"}\",\n\"else if(typeof module !== 'undefined' && module.exports) {\",\n\"\tmodule.exports = faker;\",\n\"}\",\n\"else {\",\n\"\twindow.faker = faker;\",\n\"}\",\n\"\",\n\"}()); // end faker closure\"].join('\\n');\n\n// generate core library\nfs.writeFile('../faker.js', code, function() {\n\tsys.puts(\"faker.js generated successfully!\");\n});\n\n// generate example js file as well\nfs.writeFile('../examples/js/faker.js', code, function() {\n\tsys.puts(\"faker.js generated successfully!\");\n});\n\nvar docOutput = M.Mustache.to_html(docs.main, {\"API\": docs.API, \"copyrightYear\": docs.copyrightYear});\n\n// generate some samples sets (move this code to another section)\nfs.writeFile('../Readme.md', docOutput, function() {\n\tsys.puts(\"Docs generated successfully!\");\n});\n\n// generates minified version Using Google Closure\nnew compressor.minify({\n type: 'gcc',\n fileIn: '../faker.js',\n fileOut: '../minfaker.js',\n callback: function(err){\n\t\t\tif(err) {\n console.log(err);\n }\n else sys.puts(\"Minified version generated successfully!\");\n }\n});\n\n\n/*********************** BUILD HELPER METHODS *********************/\n\n\t// Recursively traverse a hierarchy, returning a list of all relevant .js files.\nfunction paths(dir) {\n\tvar paths = [];\n\n\ttry {\n\t\tfs.statSync(dir);\n\t}\n\tcatch (e) {\n\t\treturn e;\n\t}\n\n\t(function traverse(dir, stack) {\n\t\tstack.push(dir);\n\t\tfs.readdirSync(stack.join('/')).forEach(function(file) {\n\t\t\tvar path = stack.concat([file]).join('/'),\n\t\t\t\tstat = fs.statSync(path);\n\n\t\t\tif (file[0] == '.' || file === 'vendor') {\n\t\t\t\treturn;\n\t\t\t} else if (stat.isFile() && /\\.js$/.test(file)) {\n\t\t\t\tpaths.push(path);\n\t\t\t} else if (stat.isDirectory()) {\n\t\t\t\tpaths.push(path);\n\t\t\t\ttraverse(file, stack);\n\t\t\t}\n\t\t});\n\t\tstack.pop();\n\t})(dir || '.', []);\n\n\treturn paths;\n}\n", "meta": {"content_hash": "76dc6e97bafea63b4e7ab27aa325fcb2", "timestamp": "", "source": "github", "line_count": 139, "max_line_length": 102, "avg_line_length": 25.280575539568346, "alnum_prop": 0.601593625498008, "repo_name": "kentcdodds/kcd-angular", "id": "08a408fea1ded05047142521e3df8106504dd89e", "size": "3514", "binary": false, "copies": "4", "ref": "refs/heads/main", "path": "resources/bower_components/Faker/BUILD/BUILD.js", "mode": "33261", "license": "mit", "language": [{"name": "CSS", "bytes": "9738"}, {"name": "HTML", "bytes": "37638"}, {"name": "JavaScript", "bytes": "37691"}]}}
{"text": "class GroupList\n{\npublic:\n\tGroupList(void);\n\t~GroupList(void);\n\t\n\tGroupData *AddGroup(const char *name);\n\tvoid RemoveGroup(GroupData *data);\n\tbool HasGroup(const char *item);\n\n\tGroupData *FindGroup(const char *name);\n\n\tGroupItem *ItemForGroup(const char *name);\n\tGroupItem *ItemForGroup(GroupData *data);\n};\n\n#endif", "meta": {"content_hash": "8e7fe41f8a29b2686eb7e0795e42f2fe", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 43, "avg_line_length": 18.529411764705884, "alnum_prop": 0.7396825396825397, "repo_name": "HaikuArchives/MrPeeps", "id": "b439962109fd869b64676a5cf89d1db7822481ae", "size": "402", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/GroupList.h", "mode": "33188", "license": "mit", "language": [{"name": "C", "bytes": "9728"}, {"name": "C++", "bytes": "245568"}, {"name": "Makefile", "bytes": "5308"}]}}
{"text": "package org.cgfalcon.myprolang.antlr.graphics;// Generated from Graphics.g4 by ANTLR 4.1\nimport org.antlr.v4.runtime.misc.NotNull;\nimport org.antlr.v4.runtime.tree.ParseTreeListener;\n\n/**\n * This interface defines a complete listener for a parse tree produced by\n * {@link GraphicsParser}.\n */\npublic interface GraphicsListener extends ParseTreeListener {\n\t/**\n\t * Enter a parse tree produced by {@link GraphicsParser#point}.\n\t * @param ctx the parse tree\n\t */\n\tvoid enterPoint(@NotNull GraphicsParser.PointContext ctx);\n\t/**\n\t * Exit a parse tree produced by {@link GraphicsParser#point}.\n\t * @param ctx the parse tree\n\t */\n\tvoid exitPoint(@NotNull GraphicsParser.PointContext ctx);\n\n\t/**\n\t * Enter a parse tree produced by {@link GraphicsParser#file}.\n\t * @param ctx the parse tree\n\t */\n\tvoid enterFile(@NotNull GraphicsParser.FileContext ctx);\n\t/**\n\t * Exit a parse tree produced by {@link GraphicsParser#file}.\n\t * @param ctx the parse tree\n\t */\n\tvoid exitFile(@NotNull GraphicsParser.FileContext ctx);\n\n\t/**\n\t * Enter a parse tree produced by {@link GraphicsParser#command}.\n\t * @param ctx the parse tree\n\t */\n\tvoid enterCommand(@NotNull GraphicsParser.CommandContext ctx);\n\t/**\n\t * Exit a parse tree produced by {@link GraphicsParser#command}.\n\t * @param ctx the parse tree\n\t */\n\tvoid exitCommand(@NotNull GraphicsParser.CommandContext ctx);\n}", "meta": {"content_hash": "87223a5ec1d56c43446b988da0d71696", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 88, "avg_line_length": 32.11904761904762, "alnum_prop": 0.7346182357301705, "repo_name": "cgfalcon/myprolang", "id": "aafe2f0572f6db9325e9b005570456535f134cc4", "size": "1349", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/org/cgfalcon/myprolang/antlr/graphics/GraphicsListener.java", "mode": "33188", "license": "apache-2.0", "language": [{"name": "ANTLR", "bytes": "385"}, {"name": "Java", "bytes": "30673"}]}}
{"text": "<#\n Suppress PSAvoidUsingConvertToSecureStringWithPlainText since SecureString\n objects are used for test passwords.\n#>\n[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]\nparam ()\n\n$testJobPrefix = 'MsiPackageTestJob'\n\n<#\n .SYNOPSIS\n Tests if the package with the given Id is installed.\n\n .PARAMETER ProductId\n The ID of the package to test for.\n#>\nfunction Test-PackageInstalledById\n{\n [OutputType([System.Boolean])]\n [CmdletBinding()]\n param\n (\n [Parameter()]\n [System.String]\n $ProductId\n )\n\n $uninstallRegistryKey = 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall'\n $uninstallRegistryKeyWow64 = 'HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall'\n\n $productEntry = $null\n\n if (-not [System.String]::IsNullOrEmpty($ProductId))\n {\n $productEntryKeyLocation = Join-Path -Path $uninstallRegistryKey -ChildPath $ProductId\n $productEntry = Get-Item -Path $productEntryKeyLocation -ErrorAction 'SilentlyContinue'\n\n if ($null -eq $productEntry)\n {\n $productEntryKeyLocation = Join-Path -Path $uninstallRegistryKeyWow64 -ChildPath $ProductId\n $productEntry = Get-Item $productEntryKeyLocation -ErrorAction 'SilentlyContinue'\n }\n }\n\n return ($null -ne $productEntry)\n}\n\n<#\n .SYNOPSIS\n Starts a simple mock http or https file server. Server will stay on and continue to be able\n to receive requests until the client calls Stop-Server. The server returns the job object\n and an EventWaitHandle object that the client will need to dispose of (by calling Stop-Server)\n once it is done sending requests.\n\n .PARAMETER FilePath\n The path to the file to add on to the mock file server. Should be an MSI file.\n\n .PARAMETER LogPath\n The path to the log file to write output to. This is important for debugging since\n most of the work of this function is done within a separate process. Default value\n will be in PSScriptRoot.\n\n .PARAMETER Https\n Indicates whether the server should use Https. If True then the file server will use Https\n and listen on port 'https://localhost:HttpsPort'. Otherwise the file server will use Http and\n listen on port 'http://localhost:HttpPort'\n Default value is False (Http).\n\n .PARAMETER HttpPort\n Specifies the TCP port to register an Http based HttpListener on.\n\n .PARAMETER HttspPort\n Specifies the TCP port to register an Https based HttpListener on.\n#>\nfunction Start-Server\n{\n [OutputType([System.Collections.Hashtable])]\n [CmdletBinding()]\n param\n (\n [Parameter(Mandatory = $true)]\n [ValidateNotNullOrEmpty()]\n [System.String]\n $FilePath,\n\n [Parameter()]\n [System.String]\n $LogPath = (Join-Path -Path $PSScriptRoot -ChildPath 'PackageTestLogFile.txt'),\n\n [Parameter()]\n [System.Boolean]\n $Https = $false,\n\n [Parameter(Mandatory = $true)]\n [ValidateScript({$_ -gt 0})]\n [System.UInt16]\n $HttpPort,\n\n [Parameter(Mandatory = $true)]\n [ValidateScript({$_ -gt 0})]\n [System.UInt16]\n $HttpsPort\n )\n\n # Create an event object to let the client know when the server is ready to begin receiving requests.\n $fileServerStarted = New-Object -TypeName 'System.Threading.EventWaitHandle' -ArgumentList @($false, [System.Threading.EventResetMode]::ManualReset,\n 'HttpIntegrationTest.FileServerStarted')\n $null = $fileServerStarted.Reset()\n\n <#\n The server is run on a separate process so that it can receive requests\n while the tests continue to run. It takes in the same parameterss that are passed\n in to this function. All helper functions that the server uses have to be\n defined within the scope of this script.\n #>\n $server =\n {\n param (\n [Parameter()]\n $FilePath,\n\n [Parameter()]\n $LogPath,\n\n [Parameter()]\n $Https,\n\n [Parameter()]\n $HttpPort,\n\n [Parameter()]\n $HttpsPort\n )\n\n <#\n .SYNOPSIS\n Stops the listener, removes the SSL binding if applicable, and closes the listener.\n\n .PARAMETER HttpListener\n The listner to stop and close.\n\n .PARAMETER Https\n Indicates whether https was used and if so, removes the SSL binding.\n\n .PARAMETER HttspPort\n Specifies the TCP port to de-register an Https based HttpListener from.\n #>\n function Stop-Listener\n {\n [CmdletBinding()]\n param\n (\n [Parameter(Mandatory = $true)]\n [System.Net.HttpListener]\n $HttpListener,\n\n [Parameter(Mandatory = $true)]\n [System.Boolean]\n $Https,\n\n [Parameter(Mandatory = $true)]\n [ValidateScript({$_ -gt 0})]\n [System.UInt16]\n $HttpsPort\n )\n\n Write-Log -LogFile $LogPath -Message 'Finished listening for requests. Shutting down HTTP server.'\n\n $ipPort = \"0.0.0.0:$HttpsPort\"\n\n if ($null -eq $HttpListener)\n {\n $errorMessage = 'HttpListener was null when trying to close'\n Write-Log -LogFile $LogPath -Message $errorMessage\n\n if ($Https)\n {\n Invoke-ConsoleCommand -Target $ipPort -Action 'removing SSL certificate binding' -ScriptBlock {\n netsh http delete sslcert ipPort=\"$ipPort\"\n }\n }\n\n throw $errorMessage\n }\n\n if ($HttpListener.IsListening)\n {\n Write-Log -LogFile $LogPath -Message 'HttpListener is about to be stopped'\n $HttpListener.Stop()\n }\n\n if ($Https)\n {\n Write-Log -LogFile $LogPath -Message 'Removing SSL binding'\n # Remove SSL Binding\n Invoke-ConsoleCommand -Target $ipPort -Action 'removing SSL certificate binding' -ScriptBlock {\n netsh http delete sslcert ipPort=\"$ipPort\"\n }\n }\n\n Write-Log -LogFile $LogPath -Message 'Closing listener'\n $HttpListener.Close()\n\n $null = netsh advfirewall set allprofiles state on\n }\n\n <#\n .SYNOPSIS\n Creates and registers an SSL certificate for Https connections.\n\n .PARAMETER HttspPort\n Specifies the TCP port to register an Https based HttpListener on.\n #>\n function Register-Ssl\n {\n [CmdletBinding()]\n param\n (\n [Parameter(Mandatory = $true)]\n [ValidateScript({$_ -gt 0})]\n [System.UInt16]\n $HttpsPort\n )\n\n # Create certificate\n $certificate = New-SelfSignedCertificate -CertStoreLocation 'Cert:\\LocalMachine\\My' -DnsName localhost\n Write-Log -LogFile $LogPath -Message 'Created certificate'\n\n $hash = $certificate.Thumbprint\n $certPassword = ConvertTo-SecureString -String 'password12345' -AsPlainText -Force\n $tempPath = 'C:\\certForTesting'\n\n $null = Export-PfxCertificate -Cert $certificate -FilePath $tempPath -Password $certPassword\n $null = Import-PfxCertificate -CertStoreLocation 'Cert:\\LocalMachine\\Root' -FilePath 'C:\\certForTesting' -Password $certPassword\n Remove-Item -Path $tempPath\n\n Write-Log -LogFile $LogPath -Message 'Finished importing certificate into root. About to bind it to port.'\n\n # Use net shell command to directly bind certificate to designated testing port\n $null = netsh http add sslcert ipport=0.0.0.0:$HttpsPort certhash=$hash appid='{833f13c2-319a-4799-9d1a-5b267a0c3593}' clientcertnegotiation=enable\n }\n\n <#\n .SYNOPSIS\n Defines the callback function required for BeginGetContext.\n\n .PARAMETER Callback\n The callback script - in this case the requestListener script defined below.\n #>\n function New-ScriptBlockCallback\n {\n [CmdletBinding()]\n param\n (\n [Parameter(Mandatory = $true)]\n [ValidateNotNullOrEmpty()]\n [System.Management.Automation.ScriptBlock]\n $Callback\n )\n\n # Add the CallbackEventBridge type if it's not already defined\n if (-not ('CallbackEventBridge' -as [System.Type]))\n {\n Add-Type @'\n using System;\n\n public sealed class CallbackEventBridge {\n public event AsyncCallback CallbackComplete = delegate { };\n\n private CallbackEventBridge() {}\n\n private void CallbackInternal(IAsyncResult result)\n {\n CallbackComplete(result);\n }\n\n public AsyncCallback Callback\n {\n get { return new AsyncCallback(CallbackInternal); }\n }\n\n public static CallbackEventBridge Create()\n {\n return new CallbackEventBridge();\n }\n }\n'@\n }\n\n $bridge = [CallbackEventBridge]::Create()\n Register-ObjectEvent -InputObject $bridge -EventName 'CallbackComplete' -Action $Callback -MessageData $args > $null\n $bridge.Callback\n\n Write-Log -LogFile $LogPath -Message 'Finished callback function'\n }\n\n <#\n .SYNOPSIS\n Invokes a console command and captures the exit code.\n\n .PARAMETER Target\n Where the command is being executed.\n\n .PARAMETER Action\n A description of the action being performed.\n\n .PARAMETER ScriptBlock\n The code to execute.\n\n #>\n function Invoke-ConsoleCommand\n {\n [CmdletBinding()]\n param\n (\n [Parameter(Mandatory = $true)]\n [System.String]\n $Target,\n\n [Parameter(Mandatory = $true)]\n [System.String]\n $Action,\n\n [Parameter(Mandatory = $true)]\n [System.Management.Automation.ScriptBlock]\n $ScriptBlock\n )\n\n $output = Invoke-Command -ScriptBlock $ScriptBlock\n\n if ($LASTEXITCODE)\n {\n $output = $output -join [Environment]::NewLine\n $message = ('Failed action ''{0}'' on target ''{1}'' (exit code {2}): {3}' -f $Action,$Target,$LASTEXITCODE,$output)\n Write-Error -Message $message\n Write-Log -LogFile $LogPath -Message \"Error from Invoke-ConsoleCommand: $message\"\n }\n else\n {\n $nonNullOutput = $output | Where-Object { $_ -ne $null }\n Write-Log -LogFile $LogPath -Message \"Output from Invoke-ConsoleCommand: $nonNullOutput\"\n }\n }\n\n <#\n .SYNOPSIS\n Writes the specified message to the specified log file.\n Does NOT overwrite what is already written there.\n\n .PARAMETER LogFile\n The path to the file to write to.\n\n .PARAMETER Message\n The message to write to the file.\n #>\n function Write-Log\n {\n [CmdletBinding()]\n param\n (\n [Parameter(Mandatory = $true)]\n [System.String]\n $LogFile,\n\n [Parameter(Mandatory = $true)]\n [System.String]\n $Message\n )\n\n $Message >> $LogFile\n }\n\n # End of function declarations - Beginning of function execution\n\n if ($null -eq (Get-NetFirewallRule -DisplayName 'UnitTestRule' -ErrorAction 'SilentlyContinue'))\n {\n $null = New-NetFirewallRule -DisplayName 'UnitTestRule' -Direction 'Inbound' -Program \"$PSHome\\powershell.exe\" -Authentication 'NotRequired' -Action 'Allow'\n }\n\n $null = netsh advfirewall set allprofiles state off\n\n Write-Log -LogFile $LogPath -Message (Get-Date)\n\n $HttpListener = New-Object 'System.Net.HttpListener'\n $fileServerStarted = $null\n\n try\n {\n # Set up the listener\n if ($Https)\n {\n $HttpListener.Prefixes.Add([Uri] \"https://localhost:$HttpsPort\")\n\n try\n {\n Register-SSL -HttpsPort $HttpsPort\n }\n catch\n {\n $errorMessage = \"Unable to bind SSL certificate to port. Error: $_\"\n Write-Log -LogFile $LogPath -Message $errorMessage\n throw $errorMessage\n }\n\n Write-Log -LogFile $LogPath -Message 'Certificate is registered'\n }\n else\n {\n $HttpListener.Prefixes.Add([Uri] \"http://localhost:$HttpPort\")\n }\n\n Write-Log -LogFile $LogPath -Message 'Finished listener setup - about to start listener'\n\n $HttpListener.Start()\n\n # Cue the tests that the listener is started and can begin receiving requests\n $fileServerStarted = New-Object -TypeName 'System.Threading.EventWaitHandle' `\n -ArgumentList @($false,\n [System.Threading.EventResetMode]::AutoReset,\n 'HttpIntegrationTest.FileServerStarted'\n )\n $fileServerStarted.Set()\n\n Write-Log -LogFile $LogPath -Message 'Listener is started'\n\n <#\n .SYNOPSIS\n Script block called by the callback function for BeginGetContext.\n Ends the current BeginGetContext, copies the response, and calls BeginGetContext again\n to continue receiving requests.\n\n .PARAMETER Result\n th IAsyncResult containing the listener object and path to the MSI file.\n\n #>\n $requestListener =\n {\n [CmdletBinding()]\n param\n (\n [Parameter()]\n [IAsyncResult]\n $Result\n )\n\n Write-Log -LogFile $LogPath -Message 'Starting request listener'\n\n $asyncState = $Result.AsyncState\n [System.Net.HttpListener] $listener = $asyncState.Listener\n $filepath = $asyncState.FilePath\n\n Write-Log -LogFile $LogPath -Message (ConvertTo-Json $asyncState)\n\n # Call EndGetContext to complete the asynchronous operation.\n $context = $listener.EndGetContext($Result)\n\n $response = $null\n\n try\n {\n # Prepare binary buffer for http/https response\n $fileInfo = New-Object -TypeName 'System.IO.FileInfo' -ArgumentList @( $filePath )\n $numBytes = $fileInfo.Length\n $fileStream = New-Object -TypeName 'System.IO.FileStream' -ArgumentList @( $filePath, 'Open' )\n $binaryReader = New-Object -TypeName 'System.IO.BinaryReader' -ArgumentList @( $fileStream )\n [System.Byte[]] $buf = $binaryReader.ReadBytes($numBytes)\n $fileStream.Close()\n\n Write-Log -LogFile $LogPath -Message 'Buffer prepared for response'\n\n $response = $context.Response\n $response.ContentType = 'application/octet-stream'\n $response.ContentLength64 = $buf.Length\n $response.OutputStream.Write($buf, 0, $buf.Length)\n\n Write-Log -LogFile $LogPath -Message 'Response written'\n\n $response.OutputStream.Flush()\n\n # Open the response stream again to receive more requests\n $listener.BeginGetContext((New-ScriptBlockCallback -Callback $requestListener), $asyncState)\n }\n catch\n {\n $errorMessage = \"error writing response: $_\"\n Write-Log -LogFile $LogPath -Message $errorMessage\n throw $errorMessage\n }\n finally\n {\n if ($null -ne $response)\n {\n $response.Dispose()\n }\n }\n }\n\n # Register the request listener scriptblock as the async callback\n $HttpListener.BeginGetContext((New-ScriptBlockCallback -Callback $requestListener), @{\n Listener = $Httplistener\n FilePath = $FilePath\n }) | Out-Null\n Write-Log -LogFile $LogPath -Message 'First BeginGetContext called'\n\n # Ensure that the request listener stays on until the server is done receiving responses - client is responsible for stopping the server.\n while ($true)\n {\n Start-Sleep -Milliseconds 100\n }\n }\n catch\n {\n $errorMessage = \"There were problems setting up the HTTP(s) listener. Error: $_\"\n\n Write-Log -LogFile $LogPath -Message $errorMessage\n\n 'Error Record Info' >> $LogPath\n $_ | ConvertTo-Xml -As String >> $LogPath\n\n 'Exception Info' >> $LogPath\n $_.Exception | ConvertTo-Xml -As String >> $LogPath\n\n 'Running Process Info' >> $LogPath\n Get-Process | Format-List | Out-String >> $LogPath\n\n 'Open TCP Connections Info' >> $LogPath\n Get-NetTCPConnection | Format-List | Out-String >> $LogPath\n\n throw $_\n }\n finally\n {\n if ($fileServerStarted)\n {\n $fileServerStarted.Dispose()\n }\n\n Write-Log -LogFile $LogPath -Message 'Stopping the Server'\n Stop-Listener -HttpListener $HttpListener -Https $Https -HttpsPort $HttpsPort\n }\n }\n\n if ($Https)\n {\n $jobName = $testJobPrefix + 'Https'\n }\n else\n {\n $jobName = $testJobPrefix + 'Http'\n }\n\n $job = Start-Job -ScriptBlock $server -Name $jobName -ArgumentList @( $FilePath, $LogPath, $Https, $HttpPort, $HttpsPort )\n\n # Verify that the job is receivable and does not contain an exception. If it does, re-throw it.\n try\n {\n $null = $job | Receive-Job\n }\n catch\n {\n Write-Error -Message 'Failed to setup HTTP(S) listener for MsiPackage Tests'\n throw $_\n }\n\n <#\n Return the event object so that client knows when it can start sending requests and\n the job object so that the client can stop the job once it is done sending requests.\n #>\n return @{\n FileServerStarted = $fileServerStarted\n Job = $job\n }\n}\n\n<#\n .SYNOPSIS\n Disposes the EventWaitHandle object and stops and removes the job to ensure that proper\n cleanup is done for the listener. If this function is not called after Start-Server then\n the listening port will remain open until the job is stopped or the machine is rebooted.\n\n .PARAMETER FileServerStarted\n The EventWaitHandle object returned by Start-Server to let the client know that it is ready\n to receive requests. The client is responsible for calling this function to ensure that\n this object is disposed of once the client is done sending requests.\n\n .PARAMETER Job\n The job object returned by Start-Server that needs to be stopped so that the server will\n close the listening port.\n#>\nfunction Stop-Server\n{\n [CmdletBinding()]\n param\n (\n [Parameter()]\n [System.Threading.EventWaitHandle]\n $FileServerStarted,\n\n [Parameter()]\n [System.Management.Automation.Job]\n $Job\n )\n\n if ($null -ne $FileServerStarted)\n {\n $FileServerStarted.Dispose()\n }\n\n if ($null -ne $Job)\n {\n Stop-Job -Job $Job\n Remove-Job -Job $Job\n }\n}\n\n<#\n .SYNOPSIS\n Removes any jobs associated with HTTP(S) servers that were created\n for MsiPackage tests.\n#>\nfunction Stop-EveryTestServerInstance\n{\n [CmdletBinding()]\n param ()\n\n Get-Job -Name \"$($testJobPrefix)*\" | Stop-Job\n Get-Job -Name \"$($testJobPrefix)*\" | Remove-Job\n}\n\n<#\n .SYNOPSIS\n Creates a new MSI package for testing.\n\n .PARAMETER DestinationPath\n The path at which to create the test msi file.\n#>\nfunction New-TestMsi\n{\n [CmdletBinding()]\n param\n (\n [Parameter(Mandatory = $true)]\n [ValidateNotNullOrEmpty()]\n [System.String]\n $DestinationPath\n )\n\n #region msiContentInBase64\n $msiContentInBase64 = '0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgAEAP7/DAAGAAAAAAAAAAEAAAABAAAAAQA' + `\n 'AAAAAAAAAEAAAAgAAAAEAAAD+////AAAAAAAAAAD/////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP3////+/////v///wYAAAD+////BAAAAP7////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '////////////////////////////////////////////////////////////9SAG8AbwB0ACAARQBuAHQAcgB' + `\n '5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFgAFAP//////////CQAAAIQQ' + `\n 'DAAAAAAAwAAAAAAAAEYAAAAAAAAAAAAAAADwRqG1qh/OAQMAAAAAEwAAAAAAAAUAUwB1AG0AbQBhAHIAeQBJA' + `\n 'G4AZgBvAHIAbQBhAHQAaQBvAG4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAIA////////////////AA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwCAAAAAAAAQEj/P+RD7EHkRaxEMUgAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAgETAAAABAAAAP////8A' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAOAcAAAAAAABASMpBMEOxOztCJkY3QhxCN' + `\n 'EZoRCZCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAACAQsAAAAKAAAA/////w' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP' + `\n '///////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n '////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'D///////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AP///////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AA////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQA' + `\n 'AAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAD+////CgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEA' + `\n 'AAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAACAAAAAhA' + `\n 'AAAIgAAACMAAAAkAAAAJQAAAP7////+/////v////7////+/////v////7////+////LgAAAP7////+/////v' + `\n '////7////+/////v////7///82AAAANwAAADgAAAA5AAAAOgAAADsAAAA8AAAAPQAAAD4AAAD+////QAAAAEE' + `\n 'AAABCAAAAQwAAAEQAAABFAAAARgAAAEcAAABIAAAASQAAAEoAAABLAAAA/v//////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '/////////////////////////////////////////////////////////////////////////////////////' + `\n '///////////////////7/AAAGAQIAAAAAAAAAAAAAAAAAAAAAAAEAAADghZ/y+U9oEKuRCAArJ7PZMAAAAAwC' + `\n 'AAAOAAAAAQAAAHgAAAACAAAAgAAAAAMAAACgAAAABAAAAMQAAAAFAAAA9AAAAAYAAAAIAQAABwAAAGwBAAAJA' + `\n 'AAAgAEAAAwAAACwAQAADQAAALwBAAAOAAAAyAEAAA8AAADQAQAAEgAAANgBAAATAAAABAIAAAIAAADkBAAAHg' + `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vwC8ALEAswC1ALcAuQC7AL4AwAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmwACgMEAwgDDAJgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALwAvAAAALsAuwAAAAAAAAABAACAAgAAgAAAAADEAMUAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGACIAKQAqACsAMQA+AE0AUgBgAGEAYgBmAHIAdgCAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAGAAYABgAGAAYABgAGAAYABgAiACIAIgApACkAKQAqACoAK' + `\n 'gArACsAKwArACsAKwAxADEAMQA+AD4APgA+AD4APgA+AD4ATQBNAFIAUgBSAFIAUgBSAFIAUgBgAGAAYABhAG' + `\n 'EAYQBiAGIAZgBmAGYAZgBmAGYAcgByAHYAdgB2AHYAdgB2AIAAgACAAIAAgACAAIAAAYACgAOABIAFgAaAB4A' + `\n 'IgAmACoABgAKAA4ABgAKAA4ABgAKAA4ABgAKAA4AEgAWABoABgAKAA4ABgAKAA4AEgAWABoAHgAiAAYACgAGA' + `\n 'AoADgASABYAGgAeACIABgAKAA4ABgAKAA4ABgAKAAYACgAOABIAFgAaAAYACgAGAAoADgASABYAGgAGAAoADg' + `\n 'ASABYAGgAeAAgAFABAAEgAPABEADgANAAwACwAjACUAJwAjACUAJwAjACUAJwArAC0AMAAzACUANgAxADoAPA' + `\n 'A+AEAAQgALAEUARwAwADMATgBQAFIAUABVAFgAWgBcADMAJwAjACUAJwAjACUAJwAlAAsAZwBpAGsAbQBvAHE' + `\n 'AcgAHAHYAeAB6AAEABwBQAIEAgwCFAFwAMwCJAIsAIK0grQSNBJEEkf+dApUgnf+d/51Irf+dApVIrf+dApVI' + `\n 'rf+dApVIrSadSI0Chf+dSJ1IrUid/48mrSadQJ//nwKVAoVInQKFJq1I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\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + `\n 'AAAAAAAAAAAAAAAAAAA='\n #endregion\n\n $msiContentInBytes = [System.Convert]::FromBase64String($msiContentInBase64)\n\n Set-Content -Path $DestinationPath -Value $msiContentInBytes -Encoding 'Byte' | Out-Null\n}\n\n<#\n .SYNOPSIS\n Clears the Package cache where files are downloaded from the file server when applicable.\n#>\nfunction Clear-PackageCache\n{\n [CmdletBinding()]\n param ()\n\n $packageCacheLocation = \"$env:ProgramData\\Microsoft\\Windows\\PowerShell\\Configuration\\\" + `\n 'BuiltinProvCache\\MSFT_xPackageResource'\n\n Remove-Item -Path $packageCacheLocation -ErrorAction 'SilentlyContinue' -Recurse\n}\n\n<#\n .SYNOPSIS\n Tests if the package with the given name is installed.\n\n .PARAMETER Name\n The name of the package to test for.\n#>\nfunction Test-PackageInstalledByName\n{\n [OutputType([System.Boolean])]\n [CmdletBinding()]\n param\n (\n [Parameter()]\n [System.String]\n $Name\n )\n\n $uninstallRegistryKey = 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall'\n $uninstallRegistryKeyWow64 = 'HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall'\n\n $productEntry = $null\n\n foreach ($registryKeyEntry in (Get-ChildItem -Path @( $uninstallRegistryKey, $uninstallRegistryKeyWow64) -ErrorAction 'Ignore' ))\n {\n if ($Name -eq (Get-LocalizedRegistryKeyValue -RegistryKey $registryKeyEntry -ValueName 'DisplayName'))\n {\n $productEntry = $registryKeyEntry\n break\n }\n }\n\n return ($null -ne $productEntry)\n}\n\n<#\n .SYNOPSIS\n Retrieves a localized registry key value.\n\n .PARAMETER RegistryKey\n The registry key to retrieve the value from.\n\n .PARAMETER ValueName\n The name of the value to retrieve.\n#>\nfunction Get-LocalizedRegistryKeyValue\n{\n [CmdletBinding()]\n param\n (\n [Parameter()]\n [System.Object]\n $RegistryKey,\n\n [Parameter(Mandatory = $true)]\n [ValidateNotNullOrEmpty()]\n [System.String]\n $ValueName\n )\n\n $localizedRegistryKeyValue = $RegistryKey.GetValue('{0}_Localized' -f $ValueName)\n\n if ($null -eq $localizedRegistryKeyValue)\n {\n $localizedRegistryKeyValue = $RegistryKey.GetValue($ValueName)\n }\n\n return $localizedRegistryKeyValue\n}\n\n<#\n .SYNOPSIS\n Creates a new test executable.\n\n .PARAMETER DestinationPath\n The path at which to create the test executable.\n#>\nfunction New-TestExecutable\n{\n [CmdletBinding()]\n param\n (\n [Parameter(Mandatory = $true)]\n [ValidateNotNullOrEmpty()]\n [System.String]\n $DestinationPath\n )\n\n if (Test-Path -Path $DestinationPath)\n {\n Write-Verbose -Message \"Removing old executable at $DestinationPath...\"\n Remove-Item -Path $DestinationPath -Force\n }\n\n $testExecutableCode = @'\n using System;\n using System.Collections.Generic;\n using System.Linq;\n using System.Management;\n using System.Text;\n using System.Threading.Tasks;\n using System.Management.Automation;\n using System.Management.Automation.Runspaces;\n using System.Runtime.InteropServices;\n namespace Providers.Package.UnitTests.MySuite\n {\n class ExeTestClass\n {\n public static void Main(string[] args)\n {\n string cmdline = System.Environment.CommandLine;\n Console.WriteLine(\"Cmdline was \" + cmdline);\n int endIndex = cmdline.IndexOf(\"\\\"\", 1);\n string self = cmdline.Substring(0, endIndex);\n string other = cmdline.Substring(self.Length + 1);\n string msiexecpath = System.IO.Path.Combine(System.Environment.SystemDirectory, \"msiexec.exe\");\n\n self = self.Replace(\"\\\"\", \"\");\n string packagePath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(self), \"DSCSetupProject.msi\");\n\n string msiexecargs = String.Format(\"/i \\\"{0}\\\" {1}\", packagePath, other);\n System.Diagnostics.Process.Start(msiexecpath, msiexecargs).WaitForExit();\n }\n }\n }\n'@\n\n Add-Type -TypeDefinition $testExecutableCode -OutputAssembly $DestinationPath -OutputType 'ConsoleApplication'\n}\n\nExport-ModuleMember -Function `\n New-TestMsi, `\n Clear-PackageCache, `\n New-TestExecutable, `\n Start-Server, `\n Stop-Server, `\n Test-PackageInstalledByName, `\n Test-PackageInstalledById, `\n Stop-EveryTestServerInstance\n", "meta": {"content_hash": "85d124a5a34af959d579a0150b1aa61a", "timestamp": "", "source": "github", "line_count": 1324, "max_line_length": 168, "avg_line_length": 58.58459214501511, "alnum_prop": 0.6052265167728128, "repo_name": "PowerShell/xPSDesiredStateConfiguration", "id": "e340a9674f367714b38aef81eb9ad5725d0b06ac", "size": "77566", "binary": false, "copies": "1", "ref": "refs/heads/Issue-729", "path": "tests/TestHelpers/DSC_xPackageResource.TestHelper.psm1", "mode": "33188", "license": "mit", "language": [{"name": "C#", "bytes": "7766"}, {"name": "PowerShell", "bytes": "2735024"}]}}
{"text": "local GUI = {\n\t-- GUI Survival\n\t{type = 'header', text = 'Survival', align = 'center'},\n\t{type = 'checkbox', text = 'Enable Lay on Hands', key = 'S_LOHE', default = true},\n\t{type = 'spinner', text = '', key = 'S_LOH', default = 10},\n\t{type = 'checkbox', text = 'Enable Flash of Light', key = 'S_FOLE', default = true},\n\t{type = 'spinner', text = '', key = 'S_FOL', default = 40},\n\t{type = 'checkbox', text = 'Enable Shield of Vengeance', key = 'S_SOVE', default = true},\n\t{type = 'spinner', text = '', key = 'S_SOV', default = 75},\n\t{type = 'checkbox', text = 'Enable Eye for an Eye', key = 'S_EFAEE', default = true},\n\t{type = 'spinner', text = '', key = 'S_EFAE', default = 90},\n\t--{type = 'checkbox', text = 'Enable Every Man for Himself (Stun)', key = 'S_EMFHSE', default = true},\n\t--{type = 'checkbox', text = 'Enable Blessing of Freedom (Root)', key = 'S_BOFRE', default = true},\n\t--{type = 'checkbox', text = 'Enable Blessing of Freedom (Snare)', key = 'S_BOFSE', default = true},\n\t{type = 'checkbox', text = 'Enable Gift of the Naaru', key = 'S_GOTNE', default = true},\n\t{type = 'spinner', text = '', key = 'S_GOTN', default = 40},\n\t{type = 'checkbox', text = 'Enable Healthstone', key = 'S_HSE', default = true},\n\t{type = 'spinner', text = '', key = 'S_HS', default = 20},\n\t{type = 'checkbox', text = 'Enable Ancient Healing Potion', key = 'S_AHPE', default = true},\n\t{type = 'spinner', text = '', key = 'S_AHP', default = 20},\n\t{type = 'ruler'},{type = 'spacer'},\n\n\t-- GUI Emergency Group Assistance\n\t{type = 'header', text = 'Emergency Group Assistance', align = 'center'},\n\t{type = 'checkbox', text = 'Enable Emergency Group Assistance', key = 'E_GAE', default = false},\n\t{type = 'text', text = 'Flash of Light'},\n\t{type = 'spinner', text = '', key = 'E_FOL', default = 35},\n\t{type = 'text', text = 'Lay on Hands'},\n\t{type = 'spinner', text = '', key = 'E_LOH', default = 10},\n\t{type = 'text', text = 'Blessing of Protection'},\n\t{type = 'spinner', text = '', key = 'E_BOP', default = 10},\n\t{type = 'ruler'},{type = 'spacer'},\n\n\t-- GUI Blessings\n\t{type = 'header', text = 'Blessings', align = 'center'},\n\t{type = 'text', text = 'Check to enable blessings on yourself'},\n\t{type = 'checkbox', text = 'Blessing of Kings', key = 'B_BOKP', default = false},\n\t{type = 'checkbox', text = 'Blessing of Wisdom', key = 'B_BOWP', default = false},\n\t{type = 'ruler'},{type = 'spacer'},\n}\n\nlocal exeOnLoad = function()\n\t-- Rotation loaded message.\n\tprint('|cfff58cba ----------------------------------------------------------------------|r')\n\tprint('|cfff58cba --- |rPaladin: |cfff58cbaRETRIBUTION|r')\n\tprint('|cfff58cba --- |rTalents: 1/2 - 2/2 - 3/1 - 4/2 - 5/2 - 6/1 - 7/2|r')\n\tprint('|cfff58cba --- |rNo Multitarget (AoE) enabled settings|r')\n\tprint('|cfff58cba ----------------------------------------------------------------------|r')\n\tprint('|cffff0000 Configuration: |rRight-click the MasterToggle and go to Combat Routines Settings|r')\n\n\tNeP.Interface:AddToggle({\n\t\t-- Cleanse Toxin\n\t\tkey = 'yuCT',\n\t\tname = 'Cleanse Toxin',\n\t\ttext = 'Enable/Disable: Automatic removal of Poison and Diseases',\n\t\ticon = 'Interface\\\\ICONS\\\\spell_holy_renew',\n\t})\n\tNeP.Interface:AddToggle({\n\t\t-- Emergency Group Assistance\n\t\tkey = 'yuEGA',\n\t\tname = 'Emergency Group Assistance',\n\t\ttext = 'Enable/Disable: Automatic LoH/BoP/FoL on group members',\n\t\ticon = 'Interface\\\\ICONS\\\\ability_fiegndead',\n\t})\nend\n\nlocal Survival = {\n\t-- Lay on Hands usage if enabled in UI.\n\t{'&Lay on Hands', 'UI(S_LOHE)&{!player.debuff(Ignite Soul)}&player.health<=UI(S_LOH)'},\n\t-- Shield of Vengeance usage if enabled in UI.\n\t{'&Shield of Vengeance', 'UI(S_SOVE)&player.health<=UI(S_SOV)'},\n\t-- Eye for an Eye usage if enabled in UI.\n\t{'Eye for an Eye', 'talent(5,2)&UI(S_EFAEE)&player.health<=UI(S_EFAE)'},\n\t-- Every Man for Himself usage if enabled in UI.\n\t--{'&Every Man for Himself', 'UI(S_EMFHSE)&player.state(stun)'},\n\t-- Blessing of Freedom usage if enabled in UI.\n\t--{'!Blessing of Freedom', 'UI(S_BOFRE)&player.state(root)'},\n\t-- Blessing of Freedom usage if enabled in UI.\n\t--{'!Blessing of Freedom', 'UI(S_BOFSE)&player.state(snare)'},\n\t-- Gift of the Naaru usage if enabled in UI.\n\t{'&Gift of the Naaru', 'UI(S_GOTNE)&{!player.debuff(Ignite Soul)}&player.health<=UI(S_GOTN)'},\n\t-- Healthstone usage if enabled in UI.\n\t{'#5512', 'UI(S_HSE)&{!player.debuff(Ignite Soul)}&player.health<=UI(S_HS)'},\n\t-- Ancient Healing Potion usage if enabled in UI.\n\t{'#127834', 'UI(S_AHPE)&{!player.debuff(Ignite Soul)}&player.health<=UI(S_AHP)'},\n}\n\nlocal Player = {\n\t-- Flash of Light usage if enabled in UI.\n\t{'!Flash of Light', 'UI(S_FOLE)&{!player.debuff(Ignite Soul)}&player.health<=UI(S_FOL)', 'player'},\n}\n\nlocal Emergency = {\n\t-- Flash of Light usage if enabled in UI.\n\t{'!Flash of Light', 'UI(E_GAE)&{!lowest.debuff(Ignite Soul)}&lowest.health<=UI(E_FOL)', 'lowest'},\n\t-- Lay on Hands usage if enabled in UI.\n\t{'!Lay on Hands', 'UI(E_GAE)&{!lowest.debuff(Ignite Soul)}&lowest.health<=UI(E_LOH)', 'lowest'},\n\t-- Blessing of Protection usage if enabled in UI.\n\t{'!Blessing of Protection', 'UI(E_GAE)&{!lowest.debuff(Ignite Soul)}&lowest.health<=UI(E_BOP)', 'lowest'},\n}\n\nlocal Interrupts = {\n\t{'&Rebuke', 'target.range<=5'},\n\t{'Hammer of Justice', '!equipped(Justice Gaze)&target.range<=10&spell(Rebuke).cooldown>gcd&!lastgcd(Rebuke)'},\n\t{'Hammer of Justice', 'equipped(Justice Gaze)&target.health>=75&target.range<=10&spell(Rebuke).cooldown>gcd&!lastgcd(Rebuke)'},\n\t{'Blinding Light', 'talent(3,3)&target.range<=10&spell(Rebuke).cooldown>gcd&!lastgcd(Rebuke)'},\n\t{'&Arcane Torrent', 'target.range<=8&spell(Rebuke).cooldown>gcd&!lastgcd(Rebuke)'},\n}\n\nlocal Dispel = {\n\t{'%dispelself'},\n}\n\nlocal Blessings = {\n\t{'Greater Blessing of Kings', 'UI(B_BOKP)&!player.buff(Greater Blessing of Kings)', 'player'},\n\t{'Greater Blessing of Wisdom', 'UI(B_BOWP)&!player.buff(Greater Blessing of Wisdom)', 'player'},\n}\n\n-- ####################################################################################\n-- Primairly sourced from legion-dev SimC.\n-- Updates to rotations from sources are considered for implementation.\n-- ####################################################################################\n\n-- SimC APL 4/20/2017\n-- https://github.com/simulationcraft/simc/blob/legion-dev/profiles/Tier19M/Paladin_Retribution_T19M.simc\n\nlocal Cooldowns = {\n\t--actions+=/arcane_torrent,if=holy_power<5&(buff.crusade.up|buff.avenging_wrath.up|time<2)\n\t{'&Arcane Torrent', 'holypower<5&{player.buff(Crusade)||player.buff(Avenging Wrath)||combat(player).time<2}'},\n\t--actions+=/holy_wrath\n\t{'Holy Wrath', 'talent(7,3)'},\n\t--actions+=/avenging_wrath\n\t{'&Avenging Wrath', '!talent(7,2)'},\n\t--actions+=/crusade,if=holy_power>=5&!equipped.137048|((equipped.137048|race.blood_elf)&holy_power>=2)\n\t{'&Crusade', 'talent(7,2)&{holypower>=5&!equipped(Liadrin\\'s Fury Unleashed)||{equipped(Liadrin\\'s Fury Unleashed)&holypower>=2}}'},\n}\n\nlocal Combat = {\n\t{'/startattack', '!isattacking'},\n\t--actions+=/judgment,if=time<2\n\t{'Judgment', 'combat(player).time<2'},\n\t--actions+=/blade_of_justice,if=time<2&(equipped.137048|race.blood_elf)\n\t{'Blade of Justice', 'combat(player).time<2&equipped(Liadrin\\'s Fury Unleashed)'},\n\t--actions+=/divine_hammer,if=time<2&(equipped.137048|race.blood_elf)\n\t{'Divine Hammer', 'talent(4,3)&combat(player).time<2&equipped(Liadrin\\'s Fury Unleashed)'},\n\t--actions+=/wake_of_ashes,if=holy_power<=1&time<2\n\t{'Wake of Ashes', 'holypower<=1&combat(player).time<2'},\n\t--actions+=/execution_sentence,if=spell_targets.divine_storm<=3&(cooldown.judgment.remainsgcd*4.5)&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*2)\n\t{'Execution Sentence','talent(1,2)&player.area(8).enemies<=3&{spell(Judgment).cooldowngcd*4.5}&{!talent(7,2)||talent(7,2)&!toggle(cooldowns)||spell(Crusade).cooldown>gcd*2}'},\n\t--actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&buff.divine_purpose.up&buff.divine_purpose.remains=2&player.buff(Divine Purpose).duration=2&holy_power>=5&buff.divine_purpose.react\n\t{'Divine Storm', 'target.debuff(Judgment)&player.area(8).enemies>=2&holypower>=5&player.buff(Divine Purpose)'},\n\t--actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&holy_power>=3&(buff.crusade.up&(buff.crusade.stack<15|buff.bloodlust.up)|buff.liadrins_fury_unleashed.up)\n\t{'Divine Storm', 'target.debuff(Judgment)&player.area(8).enemies>=2&holypower>=3&{player.buff(Crusade)&{player.buff(Crusade).count<15||hashero}||player.buff(Liadrin\\'s Fury Unleashed)}'},\n\t--actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&holy_power>=5&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*3)\n\t{'Divine Storm', 'target.debuff(Judgment)&player.area(8).enemies>=2&holypower>=5&{!talent(7,2)||talent(7,2)&!toggle(cooldowns)||spell(Crusade).cooldown>gcd*3}'},\n\t--actions+=/templars_verdict,if=debuff.judgment.up&buff.divine_purpose.up&buff.divine_purpose.remains=5&buff.divine_purpose.react\n\t{'Templar\\'s Verdict', 'target.debuff(Judgment)&holypower>=5&player.buff(Divine Purpose)'},\n\t--actions+=/templars_verdict,if=debuff.judgment.up&holy_power>=3&(buff.crusade.up&(buff.crusade.stack<15|buff.bloodlust.up)|buff.liadrins_fury_unleashed.up)\n\t{'Templar\\'s Verdict', 'target.debuff(Judgment)&holypower>=3&{player.buff(Crusade)&{player.buff(Crusade).count<15||hashero}||player.buff(Liadrin\\'s Fury Unleashed)}'},\n\t--actions+=/templars_verdict,if=debuff.judgment.up&holy_power>=5&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*3)&(!talent.execution_sentence.enabled|cooldown.execution_sentence.remains>gcd)\n\t{'Templar\\'s Verdict', 'target.debuff(Judgment)&holypower>=5&{!talent(7,2)||talent(7,2)&!toggle(cooldowns)||spell(Crusade).cooldown>gcd*3}&{!talent(1,2)||spell(Execution Sentence).cooldown>gcd}'},\n\t--actions+=/divine_storm,if=debuff.judgment.up&holy_power>=3&spell_targets.divine_storm>=2&(cooldown.wake_of_ashes.remainsgcd*4)\n\t{'Divine Storm', 'target.debuff(Judgment)&holypower>=3&player.area(8).enemies>=2&{spell(Wake of Ashes).cooldowngcd*4}'},\n\t--actions+=/templars_verdict,if=debuff.judgment.up&holy_power>=3&(cooldown.wake_of_ashes.remainsgcd*4)\n\t{'Templar\\'s Verdict', 'target.debuff(Judgment)&holypower>=3&{spell(Wake of Ashes).cooldowngcd*4}'},\n\t--actions+=/judgment,if=dot.execution_sentence.ticking&dot.execution_sentence.remains15)&(holy_power=0|holy_power=1&(cooldown.blade_of_justice.remains>gcd|cooldown.divine_hammer.remains>gcd)|holy_power=2&(cooldown.zeal.charges_fractional<=0.65|cooldown.crusader_strike.charges_fractional<=0.65))\n\t{'Wake of Ashes', 'holypower=0||holypower=1&{spell(Blade of Justice).cooldown>gcd||spell(Divine Hammer).cooldown>gcd}||holypower=2&{spell(Zeal).charges<=0.65||spell(Crusader Strike).charges<=0.65}'},\n\t--actions+=/blade_of_justice,if=(holy_power<=2&set_bonus.tier20_2pc=1|holy_power<=3&set_bonus.tier20_2pc=0)\n\t{'Blade of Justice', 'holypower<=2&set_bonus(T20)>=2||holypower<=3&set_bonus(T20)=0'},\n\t--actions+=/divine_hammer,if=(holy_power<=2&set_bonus.tier20_2pc=1|holy_power<=3&set_bonus.tier20_2pc=0)\n\t{'Divine Hammer', 'holypower<=2&set_bonus(T20)>=2||holypower<=3&set_bonus(T20)=0'},\n\t--actions+=/hammer_of_justice,if=equipped.137065&target.health.pct>=75&holy_power<=4\n\t{'Hammer of Justice', 'equipped(Justice Gaze)&target.health>=75&holypower<=4'},\n\t--actions+=/judgment\n\t{'Judgment'},\n\t--actions+=/zeal,if=charges=2&(set_bonus.tier20_2pc=0&holy_power<=2|(holy_power<=4&(cooldown.divine_hammer.remains>gcd*2|cooldown.blade_of_justice.remains>gcd*2)&cooldown.judgment.remains>gcd*2))|(set_bonus.tier20_2pc=1&holy_power<=1|(holy_power<=4&(cooldown.divine_hammer.remains>gcd*2|cooldown.blade_of_justice.remains>gcd*2)&cooldown.judgment.remains>gcd*2))\n\t{'Zeal', 'talent(2,2)&spell(Zeal).charges=2&{set_bonus(T20)=0&holypower<=2||{holypower<=4&{spell(Divine Hammer).cooldown>gcd*2||spell(Blade of Justice).cooldown>gcd*2}&spell(Judgment).cooldown>gcd*2}}||{set_bonus(T20)>=2&holypower<=1||{holypower<=4&{spell(Divine Hammer).cooldown>gcd*2||spell(Blade of Justice).cooldown>gcd*2}&spell(Judgment).cooldown>gcd*2}}'},\n\t--actions+=/crusader_strike,if=charges=2&(set_bonus.tier20_2pc=0&holy_power<=2|(holy_power<=4&(cooldown.divine_hammer.remains>gcd*2|cooldown.blade_of_justice.remains>gcd*2)&cooldown.judgment.remains>gcd*2))|(set_bonus.tier20_2pc=1&holy_power<=1|(holy_power<=4&(cooldown.divine_hammer.remains>gcd*2|cooldown.blade_of_justice.remains>gcd*2)&cooldown.judgment.remains>gcd*2))\n\t{'Crusader Strike', '!talent(2,2)&spell(Crusader Strike).charges=2&{set_bonus(T20)=0&holypower<=2||{holypower<=4&{spell(Divine Hammer).cooldown>gcd*2||spell(Blade of Justice).cooldown>gcd*2}&spell(Judgment).cooldown>gcd*2}}||{set_bonus(T20)>=2&holypower<=1||{holypower<=4&{spell(Divine Hammer).cooldown>gcd*2||spell(Blade of Justice).cooldown>gcd*2}&spell(Judgment).cooldown>gcd*2}}'},\n\t--actions+=/consecration\n\t{'Consecration', 'talent(1,3)'},\n\t--actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&buff.divine_purpose.react\n\t{'Divine Storm', 'target.debuff(Judgment)&player.area(8).enemies>=2&player.buff(Divine Purpose)'},\n\t--actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&buff.the_fires_of_justice.react&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*3)\n\t{'Divine Storm', 'target.debuff(Judgment)&player.area(8).enemies>=2&player.buff(The Fires of Justice)&{!talent(7,2)||talent(7,2)&!toggle(cooldowns)||spell(Crusade).cooldown>gcd*3}'},\n\t--actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&holy_power>=4&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*4)\n\t{'Divine Storm', 'target.debuff(Judgment)&player.area(8).enemies>=2&holypower>=4&{!talent(7,2)||talent(7,2)&!toggle(cooldowns)||spell(Crusade).cooldown>gcd*4}'},\n\t--actions+=/templars_verdict,if=debuff.judgment.up&buff.divine_purpose.react\n\t{'Templar\\'s Verdict', 'target.debuff(Judgment)&player.buff(Divine Purpose)'},\n\t--actions+=/templars_verdict,if=debuff.judgment.up&buff.the_fires_of_justice.react&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*3)\n\t{'Templar\\'s Verdict', 'target.debuff(Judgment)&player.buff(The Fires of Justice)&{!talent(7,2)||talent(7,2)&!toggle(cooldowns)||spell(Crusade).cooldown>gcd*3}'},\n\t--actions+=/templars_verdict,if=debuff.judgment.up&holy_power>=4&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*4)&(!talent.execution_sentence.enabled|cooldown.execution_sentence.remains>gcd*2)\n\t{'Templar\\'s Verdict', 'target.debuff(Judgment)&holypower>=4&{!talent(7,2)||talent(7,2)&!toggle(cooldowns)||spell(Crusade).cooldown>gcd*4}&{!talent(1,2)||spell(Execution Sentence).cooldown>gcd*2}'},\n\t--actions+=/zeal,if=holy_power<=4\n\t{'Zeal', 'talent(2,2)&holypower<=4'},\n\t--actions+=/crusader_strike,if=holy_power<=4\n\t{'Crusader Strike', '!talent(2,2)&holypower<=4'},\n\t--actions+=/divine_storm,if=debuff.judgment.up&holy_power>=3&spell_targets.divine_storm>=2&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*5)\n\t{'Divine Storm', 'target.debuff(Judgment)&holypower>=3&player.area(8).enemies>=2&{!talent(7,2)||talent(7,2)&!toggle(cooldowns)||spell(Crusade).cooldown>gcd*5}'},\n\t--actions+=/templars_verdict,if=debuff.judgment.up&holy_power>=3&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*5)\n\t{'Templar\\'s Verdict', 'target.debuff(Judgment)&holypower>=3&{!talent(7,2)||talent(7,2)&!toggle(cooldowns)||spell(Crusade).cooldown>gcd*5}'},\n}\n\nlocal inCombat = {\n\t{Dispel, '{!moving||moving}&toggle(yuCT)&spell(Cleanse Toxins).cooldown=0'},\n\t{Survival, '{!moving||moving}'},\n\t{Blessings, '{!moving||moving}'},\n\t{Player, '!moving&{!ingroup||ingroup}'},\n\t{Emergency, '!moving&ingroup&toggle(yuEGA)'},\n\t{Interrupts, '{!moving||moving}&toggle(interrupts)&target.interruptAt(70)&target.infront'},\n\t{Cooldowns, '{!moving||moving}&toggle(cooldowns)'},\n\t{Combat, '{!moving||moving}&target.infront&target.range<=8'},\n}\n\nlocal outCombat = {\n\t{Dispel, '{!moving||moving}&toggle(yuCT)&spell(Cleanse Toxins).cooldown=0'},\n\t{Interrupts, '{!moving||moving}&toggle(interrupts)&target.interruptAt(70)&target.infront'},\n\t{Blessings, '{!moving||moving}'},\n\t{Emergency, '!moving&ingroup&toggle(yuEGA)'},\n\t{'Flash of Light', '!moving&player.health<=70', 'player'},\n}\n\nNeP.CR:Add(70, {\n\tname = '|r[|cff00fff0Yumad|r] |cfff58cbaPaladin|r - |cfff58cbaRETRIBUTION|r',\n\tic = inCombat,\n\tooc = outCombat,\n\tgui = GUI,\n\tload = exeOnLoad\n})\n", "meta": {"content_hash": "c7616b79a3240f3cbe1e3df5e9f507c4", "timestamp": "", "source": "github", "line_count": 235, "max_line_length": 386, "avg_line_length": 74.63404255319149, "alnum_prop": 0.6929699526768915, "repo_name": "damuY/NerdPack-Yumad", "id": "98f0d77faae8519aed20647b8c750d214e2ff153", "size": "17539", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "rotations/paladin/retribution.lua", "mode": "33188", "license": "mit", "language": [{"name": "Lua", "bytes": "105029"}]}}
{"text": "import time\n\nimport game\nimport instances\nimport palette\nimport registry\n\nfrom entities import entity\nfrom entities.creatures import player\nfrom statuses import hastestatus\n\n\nclass TwitchChatManager(entity.Entity):\n special_viewers = []\n\n def __init__(self):\n super().__init__(' ')\n self.hidden = True\n self.time_since_last_help_message = 0\n TwitchChatManager.special_viewers = [viewer.lower() for viewer in game.Game.config['TWITCH']['SpecialViewers'].split('\\n') if viewer]\n\n def get_config_color(self, key):\n return tuple([int(d) for d in game.Game.config['TWITCH'][key].strip(' ').split(',')])\n\n def handle_events(self, event):\n current_scene = instances.scene_root\n\n if event.type == 'TWITCHCHATMESSAGE':\n if event.message:\n if event.message.upper() == '!JOIN':\n player_names = [e.name for e in current_scene.children if hasattr(e, 'name')]\n\n bonus = None\n\n if not event.nickname in player_names:\n # Set player color\n if 'broadcaster' in event.tags['badges']:\n try:\n player_color = self.get_config_color('BroadcasterColor')\n\n except:\n player_color = palette.get_nearest((255, 163, 0))\n\n elif event.tags['subscriber'] != '0':\n try:\n player_color = self.get_config_color('SubscriberColor')\n\n except:\n player_color = palette.BRIGHT_BLUE\n\n bonus = registry.Registry.get('weapon')()\n\n elif event.nickname.lower() in TwitchChatManager.special_viewers:\n try:\n player_color = self.get_config_color('SpecialViewerColor')\n\n except:\n player_color = palette.BRIGHT_RED\n\n else:\n try:\n player_color = self.get_config_color('ViewerColor')\n\n except:\n player_color = palette.get_nearest((255, 163, 0))\n\n # Add player\n pos = current_scene.get_location_near_stairs()\n p = player.Player(event.nickname[0], pos, fg=player_color)\n p.name = event.nickname\n\n if bonus:\n p.equip_weapon(bonus)\n\n current_scene.append(p)\n instances.console.print('{} has joined!'.format(p.display_string))\n\n elif event.message.upper() == '!LEAVE':\n for e in current_scene.children:\n if not e.isinstance('Player'):\n continue\n\n if e.name == event.nickname:\n e.die()\n instances.console.print('{} has left.'.format(e.display_string))\n\n elif event.message.upper().startswith('!CHEER'):\n s = event.message.split(' ')\n if len(s) <= 1:\n return\n\n player_names = [p.name for p in instances.scene_root.players if p.state != 'PlayerExitedState']\n if event.nickname in player_names:\n return\n\n player_name = s[1].lower()\n if player_name[0] == '@':\n player_name = player_name[1:]\n\n target_player = [p for p in instances.scene_root.players if p.state != 'PlayerExitedState' and p.name == player_name]\n target_player = target_player[0] if target_player else None\n if target_player:\n target_player.add_status(hastestatus.HasteStatus(target_player))\n\n elif event.message.upper() == '!HELP':\n current_time = time.time()\n if current_time - self.time_since_last_help_message > 30:\n help_message = 'Available commands: !join !leave !move [uldr] !move @username !stop !attack [uldr] !throw [uldr] !drop !cheer @username'\n instances.game.observer.send_message(help_message, instances.game.channel)\n self.time_since_last_help_message = current_time\n\n", "meta": {"content_hash": "eca08351fb6487a47772453eacbb8a2c", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 160, "avg_line_length": 41.2972972972973, "alnum_prop": 0.48276614310645727, "repo_name": "JoshuaSkelly/lunch-break-rl", "id": "ef49018a54b21a5b06d0e69a64e788b92e4ecddc", "size": "4584", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "twitchchatmanager.py", "mode": "33188", "license": "mit", "language": [{"name": "Python", "bytes": "69311"}]}}
{"text": "namespace {\n\nusing google_breakpad::Minidump;\nusing google_breakpad::MinidumpContext;\nusing google_breakpad::MinidumpException;\nusing google_breakpad::MinidumpMemoryInfo;\nusing google_breakpad::MinidumpMemoryInfoList;\nusing google_breakpad::MinidumpMemoryList;\nusing google_breakpad::MinidumpMemoryRegion;\nusing google_breakpad::MinidumpModule;\nusing google_breakpad::MinidumpModuleList;\nusing google_breakpad::MinidumpSystemInfo;\nusing google_breakpad::MinidumpThread;\nusing google_breakpad::MinidumpThreadList;\nusing google_breakpad::SynthMinidump::Context;\nusing google_breakpad::SynthMinidump::Dump;\nusing google_breakpad::SynthMinidump::Exception;\nusing google_breakpad::SynthMinidump::Memory;\nusing google_breakpad::SynthMinidump::Module;\nusing google_breakpad::SynthMinidump::Stream;\nusing google_breakpad::SynthMinidump::String;\nusing google_breakpad::SynthMinidump::SystemInfo;\nusing google_breakpad::SynthMinidump::Thread;\nusing google_breakpad::test_assembler::kBigEndian;\nusing google_breakpad::test_assembler::kLittleEndian;\nusing std::ifstream;\nusing std::istringstream;\nusing std::vector;\nusing ::testing::Return;\n\nclass MinidumpTest : public ::testing::Test {\npublic:\n void SetUp() {\n minidump_file_ = string(getenv(\"srcdir\") ? getenv(\"srcdir\") : \".\") +\n \"/src/processor/testdata/minidump2.dmp\";\n }\n string minidump_file_;\n};\n\nTEST_F(MinidumpTest, TestMinidumpFromFile) {\n Minidump minidump(minidump_file_);\n ASSERT_EQ(minidump.path(), minidump_file_);\n ASSERT_TRUE(minidump.Read());\n const MDRawHeader* header = minidump.header();\n ASSERT_NE(header, (MDRawHeader*)NULL);\n ASSERT_EQ(header->signature, u_int32_t(MD_HEADER_SIGNATURE));\n //TODO: add more checks here\n}\n\nTEST_F(MinidumpTest, TestMinidumpFromStream) {\n // read minidump contents into memory, construct a stringstream around them\n ifstream file_stream(minidump_file_.c_str(), std::ios::in);\n ASSERT_TRUE(file_stream.good());\n vector bytes;\n file_stream.seekg(0, std::ios_base::end);\n ASSERT_TRUE(file_stream.good());\n bytes.resize(file_stream.tellg());\n file_stream.seekg(0, std::ios_base::beg);\n ASSERT_TRUE(file_stream.good());\n file_stream.read(&bytes[0], bytes.size());\n ASSERT_TRUE(file_stream.good());\n string str(&bytes[0], bytes.size());\n istringstream stream(str);\n ASSERT_TRUE(stream.good());\n\n // now read minidump from stringstream\n Minidump minidump(stream);\n ASSERT_EQ(minidump.path(), \"\");\n ASSERT_TRUE(minidump.Read());\n const MDRawHeader* header = minidump.header();\n ASSERT_NE(header, (MDRawHeader*)NULL);\n ASSERT_EQ(header->signature, u_int32_t(MD_HEADER_SIGNATURE));\n //TODO: add more checks here\n}\n\nTEST(Dump, ReadBackEmpty) {\n Dump dump(0);\n dump.Finish();\n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n istringstream stream(contents);\n Minidump minidump(stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(0U, minidump.GetDirectoryEntryCount());\n}\n\nTEST(Dump, ReadBackEmptyBigEndian) {\n Dump big_minidump(0, kBigEndian);\n big_minidump.Finish();\n string contents;\n ASSERT_TRUE(big_minidump.GetContents(&contents));\n istringstream stream(contents);\n Minidump minidump(stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(0U, minidump.GetDirectoryEntryCount());\n}\n\nTEST(Dump, OneStream) {\n Dump dump(0, kBigEndian);\n Stream stream(dump, 0xfbb7fa2bU);\n stream.Append(\"stream contents\");\n dump.Add(&stream);\n dump.Finish();\n \n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(1U, minidump.GetDirectoryEntryCount());\n\n const MDRawDirectory *dir = minidump.GetDirectoryEntryAtIndex(0);\n ASSERT_TRUE(dir != NULL);\n EXPECT_EQ(0xfbb7fa2bU, dir->stream_type);\n\n u_int32_t stream_length;\n ASSERT_TRUE(minidump.SeekToStreamType(0xfbb7fa2bU, &stream_length));\n ASSERT_EQ(15U, stream_length);\n char stream_contents[15];\n ASSERT_TRUE(minidump.ReadBytes(stream_contents, sizeof(stream_contents)));\n EXPECT_EQ(string(\"stream contents\"),\n string(stream_contents, sizeof(stream_contents)));\n\n EXPECT_FALSE(minidump.GetThreadList());\n EXPECT_FALSE(minidump.GetModuleList());\n EXPECT_FALSE(minidump.GetMemoryList());\n EXPECT_FALSE(minidump.GetException());\n EXPECT_FALSE(minidump.GetAssertion());\n EXPECT_FALSE(minidump.GetSystemInfo());\n EXPECT_FALSE(minidump.GetMiscInfo());\n EXPECT_FALSE(minidump.GetBreakpadInfo());\n}\n\nTEST(Dump, OneMemory) {\n Dump dump(0, kBigEndian);\n Memory memory(dump, 0x309d68010bd21b2cULL);\n memory.Append(\"memory contents\");\n dump.Add(&memory);\n dump.Finish();\n\n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(1U, minidump.GetDirectoryEntryCount());\n\n const MDRawDirectory *dir = minidump.GetDirectoryEntryAtIndex(0);\n ASSERT_TRUE(dir != NULL);\n EXPECT_EQ((u_int32_t) MD_MEMORY_LIST_STREAM, dir->stream_type);\n\n MinidumpMemoryList *memory_list = minidump.GetMemoryList();\n ASSERT_TRUE(memory_list != NULL);\n ASSERT_EQ(1U, memory_list->region_count());\n\n MinidumpMemoryRegion *region1 = memory_list->GetMemoryRegionAtIndex(0);\n ASSERT_EQ(0x309d68010bd21b2cULL, region1->GetBase());\n ASSERT_EQ(15U, region1->GetSize());\n const u_int8_t *region1_bytes = region1->GetMemory();\n ASSERT_TRUE(memcmp(\"memory contents\", region1_bytes, 15) == 0);\n}\n\n// One thread --- and its requisite entourage.\nTEST(Dump, OneThread) {\n Dump dump(0, kLittleEndian);\n Memory stack(dump, 0x2326a0fa);\n stack.Append(\"stack for thread\");\n\n MDRawContextX86 raw_context;\n const u_int32_t kExpectedEIP = 0x6913f540;\n raw_context.context_flags = MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL;\n raw_context.edi = 0x3ecba80d;\n raw_context.esi = 0x382583b9;\n raw_context.ebx = 0x7fccc03f;\n raw_context.edx = 0xf62f8ec2;\n raw_context.ecx = 0x46a6a6a8;\n raw_context.eax = 0x6a5025e2;\n raw_context.ebp = 0xd9fabb4a;\n raw_context.eip = kExpectedEIP;\n raw_context.cs = 0xbffe6eda;\n raw_context.eflags = 0xb2ce1e2d;\n raw_context.esp = 0x659caaa4;\n raw_context.ss = 0x2e951ef7;\n Context context(dump, raw_context);\n \n Thread thread(dump, 0xa898f11b, stack, context,\n 0x9e39439f, 0x4abfc15f, 0xe499898a, 0x0d43e939dcfd0372ULL);\n \n dump.Add(&stack);\n dump.Add(&context);\n dump.Add(&thread);\n dump.Finish();\n\n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(2U, minidump.GetDirectoryEntryCount());\n\n MinidumpMemoryList *md_memory_list = minidump.GetMemoryList();\n ASSERT_TRUE(md_memory_list != NULL);\n ASSERT_EQ(1U, md_memory_list->region_count());\n\n MinidumpMemoryRegion *md_region = md_memory_list->GetMemoryRegionAtIndex(0);\n ASSERT_EQ(0x2326a0faU, md_region->GetBase());\n ASSERT_EQ(16U, md_region->GetSize());\n const u_int8_t *region_bytes = md_region->GetMemory();\n ASSERT_TRUE(memcmp(\"stack for thread\", region_bytes, 16) == 0);\n\n MinidumpThreadList *thread_list = minidump.GetThreadList();\n ASSERT_TRUE(thread_list != NULL);\n ASSERT_EQ(1U, thread_list->thread_count());\n\n MinidumpThread *md_thread = thread_list->GetThreadAtIndex(0);\n ASSERT_TRUE(md_thread != NULL);\n u_int32_t thread_id;\n ASSERT_TRUE(md_thread->GetThreadID(&thread_id));\n ASSERT_EQ(0xa898f11bU, thread_id);\n MinidumpMemoryRegion *md_stack = md_thread->GetMemory();\n ASSERT_TRUE(md_stack != NULL);\n ASSERT_EQ(0x2326a0faU, md_stack->GetBase());\n ASSERT_EQ(16U, md_stack->GetSize());\n const u_int8_t *md_stack_bytes = md_stack->GetMemory();\n ASSERT_TRUE(memcmp(\"stack for thread\", md_stack_bytes, 16) == 0);\n\n MinidumpContext *md_context = md_thread->GetContext();\n ASSERT_TRUE(md_context != NULL);\n ASSERT_EQ((u_int32_t) MD_CONTEXT_X86, md_context->GetContextCPU());\n\n u_int64_t eip;\n ASSERT_TRUE(md_context->GetInstructionPointer(&eip));\n EXPECT_EQ(kExpectedEIP, eip);\n\n const MDRawContextX86 *md_raw_context = md_context->GetContextX86();\n ASSERT_TRUE(md_raw_context != NULL);\n ASSERT_EQ((u_int32_t) (MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL),\n (md_raw_context->context_flags\n & (MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL)));\n EXPECT_EQ(0x3ecba80dU, raw_context.edi);\n EXPECT_EQ(0x382583b9U, raw_context.esi);\n EXPECT_EQ(0x7fccc03fU, raw_context.ebx);\n EXPECT_EQ(0xf62f8ec2U, raw_context.edx);\n EXPECT_EQ(0x46a6a6a8U, raw_context.ecx);\n EXPECT_EQ(0x6a5025e2U, raw_context.eax);\n EXPECT_EQ(0xd9fabb4aU, raw_context.ebp);\n EXPECT_EQ(kExpectedEIP, raw_context.eip);\n EXPECT_EQ(0xbffe6edaU, raw_context.cs);\n EXPECT_EQ(0xb2ce1e2dU, raw_context.eflags);\n EXPECT_EQ(0x659caaa4U, raw_context.esp);\n EXPECT_EQ(0x2e951ef7U, raw_context.ss);\n}\n\nTEST(Dump, ThreadMissingMemory) {\n Dump dump(0, kLittleEndian);\n Memory stack(dump, 0x2326a0fa);\n // Stack has no contents.\n\n MDRawContextX86 raw_context;\n memset(&raw_context, 0, sizeof(raw_context));\n raw_context.context_flags = MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL;\n Context context(dump, raw_context);\n\n Thread thread(dump, 0xa898f11b, stack, context,\n 0x9e39439f, 0x4abfc15f, 0xe499898a, 0x0d43e939dcfd0372ULL);\n\n dump.Add(&stack);\n dump.Add(&context);\n dump.Add(&thread);\n dump.Finish();\n\n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(2U, minidump.GetDirectoryEntryCount());\n\n // This should succeed even though the thread has no stack memory.\n MinidumpThreadList* thread_list = minidump.GetThreadList();\n ASSERT_TRUE(thread_list != NULL);\n ASSERT_EQ(1U, thread_list->thread_count());\n\n MinidumpThread* md_thread = thread_list->GetThreadAtIndex(0);\n ASSERT_TRUE(md_thread != NULL);\n\n u_int32_t thread_id;\n ASSERT_TRUE(md_thread->GetThreadID(&thread_id));\n ASSERT_EQ(0xa898f11bU, thread_id);\n\n MinidumpContext* md_context = md_thread->GetContext();\n ASSERT_NE(reinterpret_cast(NULL), md_context);\n\n MinidumpMemoryRegion* md_stack = md_thread->GetMemory();\n ASSERT_EQ(reinterpret_cast(NULL), md_stack);\n}\n\nTEST(Dump, ThreadMissingContext) {\n Dump dump(0, kLittleEndian);\n Memory stack(dump, 0x2326a0fa);\n stack.Append(\"stack for thread\");\n\n // Context is empty.\n Context context(dump);\n\n Thread thread(dump, 0xa898f11b, stack, context,\n 0x9e39439f, 0x4abfc15f, 0xe499898a, 0x0d43e939dcfd0372ULL);\n\n dump.Add(&stack);\n dump.Add(&context);\n dump.Add(&thread);\n dump.Finish();\n\n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(2U, minidump.GetDirectoryEntryCount());\n\n // This should succeed even though the thread has no stack memory.\n MinidumpThreadList* thread_list = minidump.GetThreadList();\n ASSERT_TRUE(thread_list != NULL);\n ASSERT_EQ(1U, thread_list->thread_count());\n\n MinidumpThread* md_thread = thread_list->GetThreadAtIndex(0);\n ASSERT_TRUE(md_thread != NULL);\n\n u_int32_t thread_id;\n ASSERT_TRUE(md_thread->GetThreadID(&thread_id));\n ASSERT_EQ(0xa898f11bU, thread_id);\n MinidumpMemoryRegion* md_stack = md_thread->GetMemory();\n ASSERT_NE(reinterpret_cast(NULL), md_stack);\n\n MinidumpContext* md_context = md_thread->GetContext();\n ASSERT_EQ(reinterpret_cast(NULL), md_context);\n}\n\nTEST(Dump, OneModule) {\n static const MDVSFixedFileInfo fixed_file_info = {\n 0xb2fba33a, // signature\n 0x33d7a728, // struct_version\n 0x31afcb20, // file_version_hi\n 0xe51cdab1, // file_version_lo\n 0xd1ea6907, // product_version_hi\n 0x03032857, // product_version_lo\n 0x11bf71d7, // file_flags_mask\n 0x5fb8cdbf, // file_flags\n 0xe45d0d5d, // file_os\n 0x107d9562, // file_type\n 0x5a8844d4, // file_subtype\n 0xa8d30b20, // file_date_hi\n 0x651c3e4e // file_date_lo\n };\n\n Dump dump(0, kBigEndian);\n String module_name(dump, \"single module\");\n Module module(dump, 0xa90206ca83eb2852ULL, 0xada542bd,\n module_name,\n 0xb1054d2a,\n 0x34571371,\n fixed_file_info, // from synth_minidump_unittest_data.h\n NULL, NULL);\n\n dump.Add(&module);\n dump.Add(&module_name);\n dump.Finish();\n \n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(1U, minidump.GetDirectoryEntryCount());\n\n const MDRawDirectory *dir = minidump.GetDirectoryEntryAtIndex(0);\n ASSERT_TRUE(dir != NULL);\n EXPECT_EQ((u_int32_t) MD_MODULE_LIST_STREAM, dir->stream_type);\n\n MinidumpModuleList *md_module_list = minidump.GetModuleList();\n ASSERT_TRUE(md_module_list != NULL);\n ASSERT_EQ(1U, md_module_list->module_count());\n\n const MinidumpModule *md_module = md_module_list->GetModuleAtIndex(0);\n ASSERT_TRUE(md_module != NULL);\n ASSERT_EQ(0xa90206ca83eb2852ULL, md_module->base_address());\n ASSERT_EQ(0xada542bd, md_module->size());\n ASSERT_EQ(\"single module\", md_module->code_file());\n\n const MDRawModule *md_raw_module = md_module->module();\n ASSERT_TRUE(md_raw_module != NULL);\n ASSERT_EQ(0xb1054d2aU, md_raw_module->time_date_stamp);\n ASSERT_EQ(0x34571371U, md_raw_module->checksum);\n ASSERT_TRUE(memcmp(&md_raw_module->version_info, &fixed_file_info,\n sizeof(fixed_file_info)) == 0);\n}\n\nTEST(Dump, OneSystemInfo) {\n Dump dump(0, kLittleEndian);\n String csd_version(dump, \"Petulant Pierogi\");\n SystemInfo system_info(dump, SystemInfo::windows_x86, csd_version);\n\n dump.Add(&system_info);\n dump.Add(&csd_version);\n dump.Finish();\n \n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(1U, minidump.GetDirectoryEntryCount());\n\n const MDRawDirectory *dir = minidump.GetDirectoryEntryAtIndex(0);\n ASSERT_TRUE(dir != NULL);\n EXPECT_EQ((u_int32_t) MD_SYSTEM_INFO_STREAM, dir->stream_type);\n\n MinidumpSystemInfo *md_system_info = minidump.GetSystemInfo();\n ASSERT_TRUE(md_system_info != NULL);\n ASSERT_EQ(\"windows\", md_system_info->GetOS());\n ASSERT_EQ(\"x86\", md_system_info->GetCPU());\n ASSERT_EQ(\"Petulant Pierogi\", *md_system_info->GetCSDVersion());\n ASSERT_EQ(\"GenuineIntel\", *md_system_info->GetCPUVendor());\n}\n\nTEST(Dump, BigDump) {\n Dump dump(0, kLittleEndian);\n\n // A SystemInfo stream.\n String csd_version(dump, \"Munificent Macaque\");\n SystemInfo system_info(dump, SystemInfo::windows_x86, csd_version);\n dump.Add(&csd_version);\n dump.Add(&system_info);\n\n // Five threads!\n Memory stack0(dump, 0x70b9ebfc);\n stack0.Append(\"stack for thread zero\");\n MDRawContextX86 raw_context0;\n raw_context0.context_flags = MD_CONTEXT_X86_INTEGER;\n raw_context0.eip = 0xaf0709e4;\n Context context0(dump, raw_context0);\n Thread thread0(dump, 0xbbef4432, stack0, context0,\n 0xd0377e7b, 0xdb8eb0cf, 0xd73bc314, 0x09d357bac7f9a163ULL);\n dump.Add(&stack0);\n dump.Add(&context0);\n dump.Add(&thread0);\n\n Memory stack1(dump, 0xf988cc45);\n stack1.Append(\"stack for thread one\");\n MDRawContextX86 raw_context1;\n raw_context1.context_flags = MD_CONTEXT_X86_INTEGER;\n raw_context1.eip = 0xe4f56f81;\n Context context1(dump, raw_context1);\n Thread thread1(dump, 0x657c3f58, stack1, context1,\n 0xa68fa182, 0x6f3cf8dd, 0xe3a78ccf, 0x78cc84775e4534bbULL);\n dump.Add(&stack1);\n dump.Add(&context1);\n dump.Add(&thread1);\n\n Memory stack2(dump, 0xc8a92e7c);\n stack2.Append(\"stack for thread two\");\n MDRawContextX86 raw_context2;\n raw_context2.context_flags = MD_CONTEXT_X86_INTEGER;\n raw_context2.eip = 0xb336a438;\n Context context2(dump, raw_context2);\n Thread thread2(dump, 0xdf4b8a71, stack2, context2,\n 0x674c26b6, 0x445d7120, 0x7e700c56, 0xd89bf778e7793e17ULL);\n dump.Add(&stack2);\n dump.Add(&context2);\n dump.Add(&thread2);\n\n Memory stack3(dump, 0x36d08e08);\n stack3.Append(\"stack for thread three\");\n MDRawContextX86 raw_context3;\n raw_context3.context_flags = MD_CONTEXT_X86_INTEGER;\n raw_context3.eip = 0xdf99a60c;\n Context context3(dump, raw_context3);\n Thread thread3(dump, 0x86e6c341, stack3, context3,\n 0x32dc5c55, 0x17a2aba8, 0xe0cc75e7, 0xa46393994dae83aeULL);\n dump.Add(&stack3);\n dump.Add(&context3);\n dump.Add(&thread3);\n\n Memory stack4(dump, 0x1e0ab4fa);\n stack4.Append(\"stack for thread four\");\n MDRawContextX86 raw_context4;\n raw_context4.context_flags = MD_CONTEXT_X86_INTEGER;\n raw_context4.eip = 0xaa646267;\n Context context4(dump, raw_context4);\n Thread thread4(dump, 0x261a28d4, stack4, context4,\n 0x6ebd389e, 0xa0cd4759, 0x30168846, 0x164f650a0cf39d35ULL);\n dump.Add(&stack4);\n dump.Add(&context4);\n dump.Add(&thread4);\n\n // Three modules!\n String module1_name(dump, \"module one\");\n Module module1(dump, 0xeb77da57b5d4cbdaULL, 0x83cd5a37, module1_name);\n dump.Add(&module1_name);\n dump.Add(&module1);\n\n String module2_name(dump, \"module two\");\n Module module2(dump, 0x8675884adfe5ac90ULL, 0xb11e4ea3, module2_name);\n dump.Add(&module2_name);\n dump.Add(&module2);\n\n String module3_name(dump, \"module three\");\n Module module3(dump, 0x95fc1544da321b6cULL, 0x7c2bf081, module3_name);\n dump.Add(&module3_name);\n dump.Add(&module3);\n\n // Add one more memory region, on top of the five stacks.\n Memory memory5(dump, 0x61979e828040e564ULL);\n memory5.Append(\"contents of memory 5\");\n dump.Add(&memory5);\n\n dump.Finish();\n\n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(4U, minidump.GetDirectoryEntryCount());\n\n // Check the threads.\n MinidumpThreadList *thread_list = minidump.GetThreadList();\n ASSERT_TRUE(thread_list != NULL);\n ASSERT_EQ(5U, thread_list->thread_count());\n u_int32_t thread_id;\n ASSERT_TRUE(thread_list->GetThreadAtIndex(0)->GetThreadID(&thread_id));\n ASSERT_EQ(0xbbef4432U, thread_id);\n ASSERT_EQ(0x70b9ebfcU,\n thread_list->GetThreadAtIndex(0)->GetMemory()->GetBase());\n ASSERT_EQ(0xaf0709e4U,\n thread_list->GetThreadAtIndex(0)->GetContext()->GetContextX86()\n ->eip);\n\n ASSERT_TRUE(thread_list->GetThreadAtIndex(1)->GetThreadID(&thread_id));\n ASSERT_EQ(0x657c3f58U, thread_id);\n ASSERT_EQ(0xf988cc45U,\n thread_list->GetThreadAtIndex(1)->GetMemory()->GetBase());\n ASSERT_EQ(0xe4f56f81U,\n thread_list->GetThreadAtIndex(1)->GetContext()->GetContextX86()\n ->eip);\n\n ASSERT_TRUE(thread_list->GetThreadAtIndex(2)->GetThreadID(&thread_id));\n ASSERT_EQ(0xdf4b8a71U, thread_id);\n ASSERT_EQ(0xc8a92e7cU,\n thread_list->GetThreadAtIndex(2)->GetMemory()->GetBase());\n ASSERT_EQ(0xb336a438U,\n thread_list->GetThreadAtIndex(2)->GetContext()->GetContextX86()\n ->eip);\n\n ASSERT_TRUE(thread_list->GetThreadAtIndex(3)->GetThreadID(&thread_id));\n ASSERT_EQ(0x86e6c341U, thread_id);\n ASSERT_EQ(0x36d08e08U,\n thread_list->GetThreadAtIndex(3)->GetMemory()->GetBase());\n ASSERT_EQ(0xdf99a60cU,\n thread_list->GetThreadAtIndex(3)->GetContext()->GetContextX86()\n ->eip);\n\n ASSERT_TRUE(thread_list->GetThreadAtIndex(4)->GetThreadID(&thread_id));\n ASSERT_EQ(0x261a28d4U, thread_id);\n ASSERT_EQ(0x1e0ab4faU,\n thread_list->GetThreadAtIndex(4)->GetMemory()->GetBase());\n ASSERT_EQ(0xaa646267U,\n thread_list->GetThreadAtIndex(4)->GetContext()->GetContextX86()\n ->eip);\n\n // Check the modules.\n MinidumpModuleList *md_module_list = minidump.GetModuleList();\n ASSERT_TRUE(md_module_list != NULL);\n ASSERT_EQ(3U, md_module_list->module_count());\n EXPECT_EQ(0xeb77da57b5d4cbdaULL,\n md_module_list->GetModuleAtIndex(0)->base_address());\n EXPECT_EQ(0x8675884adfe5ac90ULL,\n md_module_list->GetModuleAtIndex(1)->base_address());\n EXPECT_EQ(0x95fc1544da321b6cULL,\n md_module_list->GetModuleAtIndex(2)->base_address());\n}\n\nTEST(Dump, OneMemoryInfo) {\n Dump dump(0, kBigEndian);\n Stream stream(dump, MD_MEMORY_INFO_LIST_STREAM);\n\n // Add the MDRawMemoryInfoList header.\n const u_int64_t kNumberOfEntries = 1;\n stream.D32(sizeof(MDRawMemoryInfoList)) // size_of_header\n .D32(sizeof(MDRawMemoryInfo)) // size_of_entry\n .D64(kNumberOfEntries); // number_of_entries\n\n \n // Now add a MDRawMemoryInfo entry.\n const u_int64_t kBaseAddress = 0x1000;\n const u_int64_t kRegionSize = 0x2000;\n stream.D64(kBaseAddress) // base_address\n .D64(kBaseAddress) // allocation_base\n .D32(MD_MEMORY_PROTECT_EXECUTE_READWRITE) // allocation_protection\n .D32(0) // __alignment1\n .D64(kRegionSize) // region_size\n .D32(MD_MEMORY_STATE_COMMIT) // state\n .D32(MD_MEMORY_PROTECT_EXECUTE_READWRITE) // protection\n .D32(MD_MEMORY_TYPE_PRIVATE) // type\n .D32(0); // __alignment2\n\n dump.Add(&stream);\n dump.Finish();\n\n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(1U, minidump.GetDirectoryEntryCount());\n\n const MDRawDirectory *dir = minidump.GetDirectoryEntryAtIndex(0);\n ASSERT_TRUE(dir != NULL);\n EXPECT_EQ((u_int32_t) MD_MEMORY_INFO_LIST_STREAM, dir->stream_type);\n\n MinidumpMemoryInfoList *info_list = minidump.GetMemoryInfoList();\n ASSERT_TRUE(info_list != NULL);\n ASSERT_EQ(1U, info_list->info_count());\n\n const MinidumpMemoryInfo *info1 = info_list->GetMemoryInfoAtIndex(0);\n ASSERT_EQ(kBaseAddress, info1->GetBase());\n ASSERT_EQ(kRegionSize, info1->GetSize());\n ASSERT_TRUE(info1->IsExecutable());\n ASSERT_TRUE(info1->IsWritable());\n\n // Should get back the same memory region here.\n const MinidumpMemoryInfo *info2 =\n info_list->GetMemoryInfoForAddress(kBaseAddress + kRegionSize / 2);\n ASSERT_EQ(kBaseAddress, info2->GetBase());\n ASSERT_EQ(kRegionSize, info2->GetSize());\n}\n\nTEST(Dump, OneExceptionX86) {\n Dump dump(0, kLittleEndian);\n\n MDRawContextX86 raw_context;\n raw_context.context_flags = MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL;\n raw_context.edi = 0x3ecba80d;\n raw_context.esi = 0x382583b9;\n raw_context.ebx = 0x7fccc03f;\n raw_context.edx = 0xf62f8ec2;\n raw_context.ecx = 0x46a6a6a8;\n raw_context.eax = 0x6a5025e2;\n raw_context.ebp = 0xd9fabb4a;\n raw_context.eip = 0x6913f540;\n raw_context.cs = 0xbffe6eda;\n raw_context.eflags = 0xb2ce1e2d;\n raw_context.esp = 0x659caaa4;\n raw_context.ss = 0x2e951ef7;\n Context context(dump, raw_context);\n\n Exception exception(dump, context,\n 0x1234abcd, // thread id\n 0xdcba4321, // exception code\n 0xf0e0d0c0, // exception flags\n 0x0919a9b9c9d9e9f9ULL); // exception address\n \n dump.Add(&context);\n dump.Add(&exception);\n dump.Finish();\n\n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(1U, minidump.GetDirectoryEntryCount());\n\n MinidumpException *md_exception = minidump.GetException();\n ASSERT_TRUE(md_exception != NULL);\n\n u_int32_t thread_id;\n ASSERT_TRUE(md_exception->GetThreadID(&thread_id));\n ASSERT_EQ(0x1234abcdU, thread_id);\n\n const MDRawExceptionStream* raw_exception = md_exception->exception();\n ASSERT_TRUE(raw_exception != NULL);\n EXPECT_EQ(0xdcba4321, raw_exception->exception_record.exception_code);\n EXPECT_EQ(0xf0e0d0c0, raw_exception->exception_record.exception_flags);\n EXPECT_EQ(0x0919a9b9c9d9e9f9ULL,\n raw_exception->exception_record.exception_address);\n\n MinidumpContext *md_context = md_exception->GetContext();\n ASSERT_TRUE(md_context != NULL);\n ASSERT_EQ((u_int32_t) MD_CONTEXT_X86, md_context->GetContextCPU());\n const MDRawContextX86 *md_raw_context = md_context->GetContextX86();\n ASSERT_TRUE(md_raw_context != NULL);\n ASSERT_EQ((u_int32_t) (MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL),\n (md_raw_context->context_flags\n & (MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL)));\n EXPECT_EQ(0x3ecba80dU, raw_context.edi);\n EXPECT_EQ(0x382583b9U, raw_context.esi);\n EXPECT_EQ(0x7fccc03fU, raw_context.ebx);\n EXPECT_EQ(0xf62f8ec2U, raw_context.edx);\n EXPECT_EQ(0x46a6a6a8U, raw_context.ecx);\n EXPECT_EQ(0x6a5025e2U, raw_context.eax);\n EXPECT_EQ(0xd9fabb4aU, raw_context.ebp);\n EXPECT_EQ(0x6913f540U, raw_context.eip);\n EXPECT_EQ(0xbffe6edaU, raw_context.cs);\n EXPECT_EQ(0xb2ce1e2dU, raw_context.eflags);\n EXPECT_EQ(0x659caaa4U, raw_context.esp);\n EXPECT_EQ(0x2e951ef7U, raw_context.ss);\n}\n\nTEST(Dump, OneExceptionX86XState) {\n Dump dump(0, kLittleEndian);\n\n MDRawContextX86 raw_context;\n raw_context.context_flags = MD_CONTEXT_X86_INTEGER |\n MD_CONTEXT_X86_CONTROL | MD_CONTEXT_X86_XSTATE;\n raw_context.edi = 0x3ecba80d;\n raw_context.esi = 0x382583b9;\n raw_context.ebx = 0x7fccc03f;\n raw_context.edx = 0xf62f8ec2;\n raw_context.ecx = 0x46a6a6a8;\n raw_context.eax = 0x6a5025e2;\n raw_context.ebp = 0xd9fabb4a;\n raw_context.eip = 0x6913f540;\n raw_context.cs = 0xbffe6eda;\n raw_context.eflags = 0xb2ce1e2d;\n raw_context.esp = 0x659caaa4;\n raw_context.ss = 0x2e951ef7;\n Context context(dump, raw_context);\n\n Exception exception(dump, context,\n 0x1234abcd, // thread id\n 0xdcba4321, // exception code\n 0xf0e0d0c0, // exception flags\n 0x0919a9b9c9d9e9f9ULL); // exception address\n \n dump.Add(&context);\n dump.Add(&exception);\n dump.Finish();\n\n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(1U, minidump.GetDirectoryEntryCount());\n\n MinidumpException *md_exception = minidump.GetException();\n ASSERT_TRUE(md_exception != NULL);\n\n u_int32_t thread_id;\n ASSERT_TRUE(md_exception->GetThreadID(&thread_id));\n ASSERT_EQ(0x1234abcdU, thread_id);\n\n const MDRawExceptionStream* raw_exception = md_exception->exception();\n ASSERT_TRUE(raw_exception != NULL);\n EXPECT_EQ(0xdcba4321, raw_exception->exception_record.exception_code);\n EXPECT_EQ(0xf0e0d0c0, raw_exception->exception_record.exception_flags);\n EXPECT_EQ(0x0919a9b9c9d9e9f9ULL,\n raw_exception->exception_record.exception_address);\n\n MinidumpContext *md_context = md_exception->GetContext();\n ASSERT_TRUE(md_context != NULL);\n ASSERT_EQ((u_int32_t) MD_CONTEXT_X86, md_context->GetContextCPU());\n const MDRawContextX86 *md_raw_context = md_context->GetContextX86();\n ASSERT_TRUE(md_raw_context != NULL);\n ASSERT_EQ((u_int32_t) (MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL),\n (md_raw_context->context_flags\n & (MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL)));\n EXPECT_EQ(0x3ecba80dU, raw_context.edi);\n EXPECT_EQ(0x382583b9U, raw_context.esi);\n EXPECT_EQ(0x7fccc03fU, raw_context.ebx);\n EXPECT_EQ(0xf62f8ec2U, raw_context.edx);\n EXPECT_EQ(0x46a6a6a8U, raw_context.ecx);\n EXPECT_EQ(0x6a5025e2U, raw_context.eax);\n EXPECT_EQ(0xd9fabb4aU, raw_context.ebp);\n EXPECT_EQ(0x6913f540U, raw_context.eip);\n EXPECT_EQ(0xbffe6edaU, raw_context.cs);\n EXPECT_EQ(0xb2ce1e2dU, raw_context.eflags);\n EXPECT_EQ(0x659caaa4U, raw_context.esp);\n EXPECT_EQ(0x2e951ef7U, raw_context.ss);\n}\n\nTEST(Dump, OneExceptionARM) {\n Dump dump(0, kLittleEndian);\n\n MDRawContextARM raw_context;\n raw_context.context_flags = MD_CONTEXT_ARM_INTEGER;\n raw_context.iregs[0] = 0x3ecba80d;\n raw_context.iregs[1] = 0x382583b9;\n raw_context.iregs[2] = 0x7fccc03f;\n raw_context.iregs[3] = 0xf62f8ec2;\n raw_context.iregs[4] = 0x46a6a6a8;\n raw_context.iregs[5] = 0x6a5025e2;\n raw_context.iregs[6] = 0xd9fabb4a;\n raw_context.iregs[7] = 0x6913f540;\n raw_context.iregs[8] = 0xbffe6eda;\n raw_context.iregs[9] = 0xb2ce1e2d;\n raw_context.iregs[10] = 0x659caaa4;\n raw_context.iregs[11] = 0xf0e0d0c0;\n raw_context.iregs[12] = 0xa9b8c7d6;\n raw_context.iregs[13] = 0x12345678;\n raw_context.iregs[14] = 0xabcd1234;\n raw_context.iregs[15] = 0x10203040;\n raw_context.cpsr = 0x2e951ef7;\n Context context(dump, raw_context);\n\n Exception exception(dump, context,\n 0x1234abcd, // thread id\n 0xdcba4321, // exception code\n 0xf0e0d0c0, // exception flags\n 0x0919a9b9c9d9e9f9ULL); // exception address\n \n dump.Add(&context);\n dump.Add(&exception);\n dump.Finish();\n\n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(1U, minidump.GetDirectoryEntryCount());\n\n MinidumpException *md_exception = minidump.GetException();\n ASSERT_TRUE(md_exception != NULL);\n\n u_int32_t thread_id;\n ASSERT_TRUE(md_exception->GetThreadID(&thread_id));\n ASSERT_EQ(0x1234abcdU, thread_id);\n\n const MDRawExceptionStream* raw_exception = md_exception->exception();\n ASSERT_TRUE(raw_exception != NULL);\n EXPECT_EQ(0xdcba4321, raw_exception->exception_record.exception_code);\n EXPECT_EQ(0xf0e0d0c0, raw_exception->exception_record.exception_flags);\n EXPECT_EQ(0x0919a9b9c9d9e9f9ULL,\n raw_exception->exception_record.exception_address);\n\n MinidumpContext *md_context = md_exception->GetContext();\n ASSERT_TRUE(md_context != NULL);\n ASSERT_EQ((u_int32_t) MD_CONTEXT_ARM, md_context->GetContextCPU());\n const MDRawContextARM *md_raw_context = md_context->GetContextARM();\n ASSERT_TRUE(md_raw_context != NULL);\n ASSERT_EQ((u_int32_t) MD_CONTEXT_ARM_INTEGER,\n (md_raw_context->context_flags\n & MD_CONTEXT_ARM_INTEGER));\n EXPECT_EQ(0x3ecba80dU, raw_context.iregs[0]);\n EXPECT_EQ(0x382583b9U, raw_context.iregs[1]);\n EXPECT_EQ(0x7fccc03fU, raw_context.iregs[2]);\n EXPECT_EQ(0xf62f8ec2U, raw_context.iregs[3]);\n EXPECT_EQ(0x46a6a6a8U, raw_context.iregs[4]);\n EXPECT_EQ(0x6a5025e2U, raw_context.iregs[5]);\n EXPECT_EQ(0xd9fabb4aU, raw_context.iregs[6]);\n EXPECT_EQ(0x6913f540U, raw_context.iregs[7]);\n EXPECT_EQ(0xbffe6edaU, raw_context.iregs[8]);\n EXPECT_EQ(0xb2ce1e2dU, raw_context.iregs[9]);\n EXPECT_EQ(0x659caaa4U, raw_context.iregs[10]);\n EXPECT_EQ(0xf0e0d0c0U, raw_context.iregs[11]);\n EXPECT_EQ(0xa9b8c7d6U, raw_context.iregs[12]);\n EXPECT_EQ(0x12345678U, raw_context.iregs[13]);\n EXPECT_EQ(0xabcd1234U, raw_context.iregs[14]);\n EXPECT_EQ(0x10203040U, raw_context.iregs[15]);\n EXPECT_EQ(0x2e951ef7U, raw_context.cpsr);\n}\n\nTEST(Dump, OneExceptionARMOldFlags) {\n Dump dump(0, kLittleEndian);\n\n MDRawContextARM raw_context;\n // MD_CONTEXT_ARM_INTEGER, but with _OLD\n raw_context.context_flags = MD_CONTEXT_ARM_OLD | 0x00000002;\n raw_context.iregs[0] = 0x3ecba80d;\n raw_context.iregs[1] = 0x382583b9;\n raw_context.iregs[2] = 0x7fccc03f;\n raw_context.iregs[3] = 0xf62f8ec2;\n raw_context.iregs[4] = 0x46a6a6a8;\n raw_context.iregs[5] = 0x6a5025e2;\n raw_context.iregs[6] = 0xd9fabb4a;\n raw_context.iregs[7] = 0x6913f540;\n raw_context.iregs[8] = 0xbffe6eda;\n raw_context.iregs[9] = 0xb2ce1e2d;\n raw_context.iregs[10] = 0x659caaa4;\n raw_context.iregs[11] = 0xf0e0d0c0;\n raw_context.iregs[12] = 0xa9b8c7d6;\n raw_context.iregs[13] = 0x12345678;\n raw_context.iregs[14] = 0xabcd1234;\n raw_context.iregs[15] = 0x10203040;\n raw_context.cpsr = 0x2e951ef7;\n Context context(dump, raw_context);\n\n Exception exception(dump, context,\n 0x1234abcd, // thread id\n 0xdcba4321, // exception code\n 0xf0e0d0c0, // exception flags\n 0x0919a9b9c9d9e9f9ULL); // exception address\n \n dump.Add(&context);\n dump.Add(&exception);\n dump.Finish();\n\n string contents;\n ASSERT_TRUE(dump.GetContents(&contents));\n\n istringstream minidump_stream(contents);\n Minidump minidump(minidump_stream);\n ASSERT_TRUE(minidump.Read());\n ASSERT_EQ(1U, minidump.GetDirectoryEntryCount());\n\n MinidumpException *md_exception = minidump.GetException();\n ASSERT_TRUE(md_exception != NULL);\n\n u_int32_t thread_id;\n ASSERT_TRUE(md_exception->GetThreadID(&thread_id));\n ASSERT_EQ(0x1234abcdU, thread_id);\n\n const MDRawExceptionStream* raw_exception = md_exception->exception();\n ASSERT_TRUE(raw_exception != NULL);\n EXPECT_EQ(0xdcba4321, raw_exception->exception_record.exception_code);\n EXPECT_EQ(0xf0e0d0c0, raw_exception->exception_record.exception_flags);\n EXPECT_EQ(0x0919a9b9c9d9e9f9ULL,\n raw_exception->exception_record.exception_address);\n\n MinidumpContext *md_context = md_exception->GetContext();\n ASSERT_TRUE(md_context != NULL);\n ASSERT_EQ((u_int32_t) MD_CONTEXT_ARM, md_context->GetContextCPU());\n const MDRawContextARM *md_raw_context = md_context->GetContextARM();\n ASSERT_TRUE(md_raw_context != NULL);\n ASSERT_EQ((u_int32_t) MD_CONTEXT_ARM_INTEGER,\n (md_raw_context->context_flags\n & MD_CONTEXT_ARM_INTEGER));\n EXPECT_EQ(0x3ecba80dU, raw_context.iregs[0]);\n EXPECT_EQ(0x382583b9U, raw_context.iregs[1]);\n EXPECT_EQ(0x7fccc03fU, raw_context.iregs[2]);\n EXPECT_EQ(0xf62f8ec2U, raw_context.iregs[3]);\n EXPECT_EQ(0x46a6a6a8U, raw_context.iregs[4]);\n EXPECT_EQ(0x6a5025e2U, raw_context.iregs[5]);\n EXPECT_EQ(0xd9fabb4aU, raw_context.iregs[6]);\n EXPECT_EQ(0x6913f540U, raw_context.iregs[7]);\n EXPECT_EQ(0xbffe6edaU, raw_context.iregs[8]);\n EXPECT_EQ(0xb2ce1e2dU, raw_context.iregs[9]);\n EXPECT_EQ(0x659caaa4U, raw_context.iregs[10]);\n EXPECT_EQ(0xf0e0d0c0U, raw_context.iregs[11]);\n EXPECT_EQ(0xa9b8c7d6U, raw_context.iregs[12]);\n EXPECT_EQ(0x12345678U, raw_context.iregs[13]);\n EXPECT_EQ(0xabcd1234U, raw_context.iregs[14]);\n EXPECT_EQ(0x10203040U, raw_context.iregs[15]);\n EXPECT_EQ(0x2e951ef7U, raw_context.cpsr);\n}\n\n} // namespace\n", "meta": {"content_hash": "f94f54cb89eb0e4ea499942621181f06", "timestamp": "", "source": "github", "line_count": 955, "max_line_length": 78, "avg_line_length": 36.30994764397906, "alnum_prop": 0.6985234744491867, "repo_name": "mhoran/google-breakpad", "id": "1faf169d5c2a5128982dd28aecbfcbf57613fd52", "size": "36710", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/processor/minidump_unittest.cc", "mode": "33188", "license": "bsd-3-clause", "language": [{"name": "Assembly", "bytes": "7921"}, {"name": "C", "bytes": "1701689"}, {"name": "C++", "bytes": "6143738"}, {"name": "Objective-C", "bytes": "455134"}, {"name": "Perl", "bytes": "125"}, {"name": "Prolog", "bytes": "3262"}, {"name": "Python", "bytes": "447592"}, {"name": "Ruby", "bytes": "107"}, {"name": "Shell", "bytes": "565789"}]}}
{"text": "//====================================================================================================================//\n// File: qcan_server_memeory.hpp //\n// Description: QCAN classes - CAN server //\n// //\n// Copyright (C) MicroControl GmbH & Co. KG //\n// 53844 Troisdorf - Germany //\n// www.microcontrol.net //\n// //\n//--------------------------------------------------------------------------------------------------------------------//\n// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the //\n// following conditions are met: //\n// 1. Redistributions of source code must retain the above copyright notice, this list of conditions, the following //\n// disclaimer and the referenced file 'LICENSE'. //\n// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the //\n// following disclaimer in the documentation and/or other materials provided with the distribution. //\n// 3. Neither the name of MicroControl nor the names of its contributors may be used to endorse or promote products //\n// derived from this software without specific prior written permission. //\n// //\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance //\n// with the License. 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 distributed under the License is distributed //\n// on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for //\n// the specific language governing permissions and limitations under the License. //\n// //\n//====================================================================================================================//\n\n\n/*--------------------------------------------------------------------------------------------------------------------*\\\n** Include files **\n** **\n\\*--------------------------------------------------------------------------------------------------------------------*/\n\n#include \"qcan_defs.hpp\"\n\n/*--------------------------------------------------------------------------------------------------------------------*\\\n** Definitions **\n** **\n\\*--------------------------------------------------------------------------------------------------------------------*/\n\n#define QCAN_MEMORY_KEY \"QCAN_SERVER_SHARED_KEY\"\n\n/*--------------------------------------------------------------------------------------------------------------------*\\\n** Structures **\n** **\n\\*--------------------------------------------------------------------------------------------------------------------*/\n\ntypedef struct Server_s {\n uint32_t ulVersionMajor;\n uint32_t ulVersionMinor;\n} Server_ts;\n\ntypedef struct Network_s {\n uint32_t ulVersionMajor;\n uint32_t ulVersionMinor;\n} Network_ts;\n\ntypedef struct ServerSettings_s {\n Server_ts tsServer;\n Network_ts atsNetwork[QCAN_NETWORK_MAX];\n} ServerSettings_ts;\n\n", "meta": {"content_hash": "788a0242d048df14435187c11527b5aa", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 120, "avg_line_length": 82.03125, "alnum_prop": 0.27390476190476193, "repo_name": "JoTid/CANpie", "id": "4f6e40cb83b578d82ad00dca3ad4767a7bcfa101", "size": "5250", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "source/qcan/qcan_server_memory.hpp", "mode": "33188", "license": "apache-2.0", "language": [{"name": "Batchfile", "bytes": "1816"}, {"name": "C", "bytes": "580757"}, {"name": "C++", "bytes": "1054376"}, {"name": "Makefile", "bytes": "16403"}, {"name": "Objective-C", "bytes": "47189"}, {"name": "Prolog", "bytes": "1153"}, {"name": "QMake", "bytes": "55893"}, {"name": "Shell", "bytes": "848"}]}}
{"text": "[react-babylonjs](../README.md) / [Exports](../modules.md) / loaders\n\n# Module: loaders\n\n## Table of contents\n\n### Enumerations\n\n- [LoaderStatus](../enums/loaders.loaderstatus.md)\n- [TaskType](../enums/loaders.tasktype.md)\n\n### Classes\n\n- [LoadedModel](../classes/loaders.loadedmodel.md)\n\n### Interfaces\n\n- [ILoadedModel](../interfaces/loaders.iloadedmodel.md)\n\n### Type aliases\n\n- [AssetManagerContextProviderProps](loaders.md#assetmanagercontextproviderprops)\n- [AssetManagerContextType](loaders.md#assetmanagercontexttype)\n- [AssetManagerOptions](loaders.md#assetmanageroptions)\n- [AssetManagerProgressType](loaders.md#assetmanagerprogresstype)\n- [BinaryTask](loaders.md#binarytask)\n- [MeshTask](loaders.md#meshtask)\n- [SceneLoaderContextProviderProps](loaders.md#sceneloadercontextproviderprops)\n- [SceneLoaderContextType](loaders.md#sceneloadercontexttype)\n- [SceneLoaderOptions](loaders.md#sceneloaderoptions)\n- [Task](loaders.md#task)\n- [TextureTask](loaders.md#texturetask)\n\n### Variables\n\n- [AssetManagerContext](loaders.md#assetmanagercontext)\n- [AssetManagerContextProvider](loaders.md#assetmanagercontextprovider)\n- [SceneLoaderContext](loaders.md#sceneloadercontext)\n- [SceneLoaderContextProvider](loaders.md#sceneloadercontextprovider)\n\n### Functions\n\n- [useAssetManager](loaders.md#useassetmanager)\n- [useSceneLoader](loaders.md#usesceneloader)\n\n## Type aliases\n\n### AssetManagerContextProviderProps\n\n\u01ac **AssetManagerContextProviderProps**: { `children`: React.ReactNode ; `startProgress?`: [*AssetManagerProgressType*](loaders_useassetmanager.md#assetmanagerprogresstype) }\n\n#### Type declaration:\n\nName | Type |\n------ | ------ |\n`children` | React.ReactNode |\n`startProgress?` | [*AssetManagerProgressType*](loaders_useassetmanager.md#assetmanagerprogresstype) |\n\nDefined in: [loaders/useAssetManager.tsx:48](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useAssetManager.tsx#L48)\n\n___\n\n### AssetManagerContextType\n\n\u01ac **AssetManagerContextType**: { `lastProgress?`: [*AssetManagerProgressType*](loaders_useassetmanager.md#assetmanagerprogresstype) ; `updateProgress`: (`progress`: [*AssetManagerProgressType*](loaders_useassetmanager.md#assetmanagerprogresstype)) => *void* } \\| *undefined*\n\nDefined in: [loaders/useAssetManager.tsx:36](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useAssetManager.tsx#L36)\n\n___\n\n### AssetManagerOptions\n\n\u01ac **AssetManagerOptions**: { `reportProgress?`: *boolean* ; `scene?`: Scene ; `useDefaultLoadingScreen?`: *boolean* }\n\n#### Type declaration:\n\nName | Type |\n------ | ------ |\n`reportProgress?` | *boolean* |\n`scene?` | Scene |\n`useDefaultLoadingScreen?` | *boolean* |\n\nDefined in: [loaders/useAssetManager.tsx:61](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useAssetManager.tsx#L61)\n\n___\n\n### AssetManagerProgressType\n\n\u01ac **AssetManagerProgressType**: { `eventData`: IAssetsProgressEvent ; `eventState`: EventState } \\| *undefined*\n\nDefined in: [loaders/useAssetManager.tsx:43](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useAssetManager.tsx#L43)\n\n___\n\n### BinaryTask\n\n\u01ac **BinaryTask**: { `name`: *string* ; `taskType`: [*Binary*](../enums/loaders/useassetmanager.tasktype.md#binary) ; `url`: *string* }\n\n#### Type declaration:\n\nName | Type |\n------ | ------ |\n`name` | *string* |\n`taskType` | [*Binary*](../enums/loaders/useassetmanager.tasktype.md#binary) |\n`url` | *string* |\n\nDefined in: [loaders/useAssetManager.tsx:11](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useAssetManager.tsx#L11)\n\n___\n\n### MeshTask\n\n\u01ac **MeshTask**: { `meshesNames?`: *any* ; `name`: *string* ; `rootUrl`: *string* ; `sceneFilename`: *string* ; `taskType`: [*Mesh*](../enums/loaders/useassetmanager.tasktype.md#mesh) }\n\n#### Type declaration:\n\nName | Type |\n------ | ------ |\n`meshesNames?` | *any* |\n`name` | *string* |\n`rootUrl` | *string* |\n`sceneFilename` | *string* |\n`taskType` | [*Mesh*](../enums/loaders/useassetmanager.tasktype.md#mesh) |\n\nDefined in: [loaders/useAssetManager.tsx:17](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useAssetManager.tsx#L17)\n\n___\n\n### SceneLoaderContextProviderProps\n\n\u01ac **SceneLoaderContextProviderProps**: { `children`: React.ReactNode ; `startProgress?`: ISceneLoaderProgressEvent }\n\n#### Type declaration:\n\nName | Type |\n------ | ------ |\n`children` | React.ReactNode |\n`startProgress?` | ISceneLoaderProgressEvent |\n\nDefined in: [loaders/useSceneLoader.tsx:14](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useSceneLoader.tsx#L14)\n\n___\n\n### SceneLoaderContextType\n\n\u01ac **SceneLoaderContextType**: { `lastProgress?`: *Nullable* ; `updateProgress`: (`progress`: ISceneLoaderProgressEvent) => *void* } \\| *undefined*\n\nDefined in: [loaders/useSceneLoader.tsx:7](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useSceneLoader.tsx#L7)\n\n___\n\n### SceneLoaderOptions\n\n\u01ac **SceneLoaderOptions**: { `alwaysSelectAsActiveMesh?`: *boolean* ; `onModelLoaded?`: (`loadedModel`: [*ILoadedModel*](../interfaces/loaders/loadedmodel.iloadedmodel.md)) => *void* ; `receiveShadows?`: *boolean* ; `reportProgress?`: *boolean* ; `scaleToDimension?`: *number* ; `scene?`: Scene }\n\n#### Type declaration:\n\nName | Type | Description |\n------ | ------ | ------ |\n`alwaysSelectAsActiveMesh?` | *boolean* | Always select root mesh as active. Defaults to false. |\n`onModelLoaded?` | (`loadedModel`: [*ILoadedModel*](../interfaces/loaders/loadedmodel.iloadedmodel.md)) => *void* | Access to loaded model as soon as it is loaded, so it provides a way to hide or scale the meshes before the first render. |\n`receiveShadows?` | *boolean* | set that all meshes receive shadows. Defaults to false. |\n`reportProgress?` | *boolean* | SceneLoader progress events are set on context provider (when available). Defaults to false. |\n`scaleToDimension?` | *number* | Scale entire model within these square bounds Defaults to no scaling. |\n`scene?` | Scene | - |\n\nDefined in: [loaders/useSceneLoader.tsx:27](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useSceneLoader.tsx#L27)\n\n___\n\n### Task\n\n\u01ac **Task**: [*BinaryTask*](loaders_useassetmanager.md#binarytask) \\| [*MeshTask*](loaders_useassetmanager.md#meshtask) \\| [*TextureTask*](loaders_useassetmanager.md#texturetask)\n\nDefined in: [loaders/useAssetManager.tsx:34](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useAssetManager.tsx#L34)\n\n___\n\n### TextureTask\n\n\u01ac **TextureTask**: { `invertY?`: *boolean* ; `name`: *string* ; `noMipmap?`: *boolean* ; `samplingMode?`: *number* ; `taskType`: [*Texture*](../enums/loaders/useassetmanager.tasktype.md#texture) ; `url`: *string* }\n\n#### Type declaration:\n\nName | Type |\n------ | ------ |\n`invertY?` | *boolean* |\n`name` | *string* |\n`noMipmap?` | *boolean* |\n`samplingMode?` | *number* |\n`taskType` | [*Texture*](../enums/loaders/useassetmanager.tasktype.md#texture) |\n`url` | *string* |\n\nDefined in: [loaders/useAssetManager.tsx:25](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useAssetManager.tsx#L25)\n\n## Variables\n\n### AssetManagerContext\n\n\u2022 `Const` **AssetManagerContext**: *Context*<[*AssetManagerContextType*](loaders_useassetmanager.md#assetmanagercontexttype)\\>\n\nDefined in: [loaders/useAssetManager.tsx:41](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useAssetManager.tsx#L41)\n\n___\n\n### AssetManagerContextProvider\n\n\u2022 `Const` **AssetManagerContextProvider**: *React.FC*<[*AssetManagerContextProviderProps*](loaders_useassetmanager.md#assetmanagercontextproviderprops)\\>\n\nDefined in: [loaders/useAssetManager.tsx:53](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useAssetManager.tsx#L53)\n\n___\n\n### SceneLoaderContext\n\n\u2022 `Const` **SceneLoaderContext**: *Context*<[*SceneLoaderContextType*](loaders_usesceneloader.md#sceneloadercontexttype)\\>\n\nDefined in: [loaders/useSceneLoader.tsx:12](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useSceneLoader.tsx#L12)\n\n___\n\n### SceneLoaderContextProvider\n\n\u2022 `Const` **SceneLoaderContextProvider**: *React.FC*<[*SceneLoaderContextProviderProps*](loaders_usesceneloader.md#sceneloadercontextproviderprops)\\>\n\nDefined in: [loaders/useSceneLoader.tsx:19](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useSceneLoader.tsx#L19)\n\n## Functions\n\n### useAssetManager\n\n\u25b8 `Const`**useAssetManager**(`tasks`: [*Task*](loaders_useassetmanager.md#task)[], `options?`: [*AssetManagerOptions*](loaders_useassetmanager.md#assetmanageroptions)): AssetManagerResult\n\n#### Parameters:\n\nName | Type |\n------ | ------ |\n`tasks` | [*Task*](loaders_useassetmanager.md#task)[] |\n`options?` | [*AssetManagerOptions*](loaders_useassetmanager.md#assetmanageroptions) |\n\n**Returns:** AssetManagerResult\n\nDefined in: [loaders/useAssetManager.tsx:249](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useAssetManager.tsx#L249)\n\n___\n\n### useSceneLoader\n\n\u25b8 `Const`**useSceneLoader**(`rootUrl`: *string*, `sceneFilename`: *string*, `pluginExtension?`: *string*, `options?`: [*SceneLoaderOptions*](loaders_usesceneloader.md#sceneloaderoptions)): [*LoadedModel*](../classes/loaders/loadedmodel.loadedmodel.md)\n\n#### Parameters:\n\nName | Type |\n------ | ------ |\n`rootUrl` | *string* |\n`sceneFilename` | *string* |\n`pluginExtension?` | *string* |\n`options?` | [*SceneLoaderOptions*](loaders_usesceneloader.md#sceneloaderoptions) |\n\n**Returns:** [*LoadedModel*](../classes/loaders/loadedmodel.loadedmodel.md)\n\nDefined in: [loaders/useSceneLoader.tsx:202](https://github.com/brianzinn/react-babylonjs/blob/eba7b00/src/hooks/loaders/useSceneLoader.tsx#L202)\n", "meta": {"content_hash": "efc4b738c896959586b0276690520833", "timestamp": "", "source": "github", "line_count": 262, "max_line_length": 296, "avg_line_length": 37.48091603053435, "alnum_prop": 0.7344195519348269, "repo_name": "brianzinn/react-babylonJS", "id": "dec1387e403e9efd81620c5642b04ed3df2913ea", "size": "9843", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/hooks/modules/loaders.md", "mode": "33188", "license": "mit", "language": [{"name": "JavaScript", "bytes": "1014"}, {"name": "TypeScript", "bytes": "24537"}]}}
{"text": "function SendChatMessage(...)\nend;\n\nfunction SendAddonMessage(...)\nend;\n\nfunction GetDefaultLanguage()\n\treturn \"Common\";\nend;\n", "meta": {"content_hash": "b7f92922f981fb3896a0311358c8fdcc", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 30, "avg_line_length": 14.0, "alnum_prop": 0.746031746031746, "repo_name": "Thonik/FritoMod", "id": "752bbbd9051336f91963032e6e76ff3befa68dc4", "size": "126", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "wow/api/Chat.lua", "mode": "33188", "license": "mit", "language": []}}
{"text": "package com.intellij.java.codeInsight.daemon;\n\nimport com.intellij.JavaTestUtil;\nimport com.intellij.codeInsight.daemon.DaemonAnalyzerTestCase;\nimport com.intellij.codeInsight.daemon.impl.HighlightInfo;\nimport com.intellij.codeInsight.intention.IntentionAction;\nimport com.intellij.codeInspection.redundantCast.RedundantCastInspection;\nimport com.intellij.lang.annotation.HighlightSeverity;\nimport com.intellij.lang.java.JavaDocumentationProvider;\nimport com.intellij.openapi.editor.Document;\nimport com.intellij.openapi.editor.Editor;\nimport com.intellij.openapi.editor.EditorFactory;\nimport com.intellij.openapi.progress.EmptyProgressIndicator;\nimport com.intellij.openapi.progress.ProgressManager;\nimport com.intellij.openapi.project.Project;\nimport com.intellij.openapi.util.Disposer;\nimport com.intellij.psi.*;\nimport com.intellij.psi.infos.CandidateInfo;\nimport com.intellij.psi.search.searches.ReferencesSearch;\nimport com.intellij.psi.util.PsiTreeUtil;\nimport com.intellij.psi.util.TypeConversionUtil;\nimport com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase;\nimport com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl;\nimport com.intellij.util.ArrayUtilRt;\n\nimport java.util.List;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\npublic class LightAdvHighlightingFixtureTest extends LightJavaCodeInsightFixtureTestCase {\n \n\n @Override\n protected String getBasePath() {\n return JavaTestUtil.getRelativeJavaTestDataPath() + \"/codeInsight/daemonCodeAnalyzer/advFixture\";\n }\n\n public void testHidingOnDemandImports() {\n //noinspection StaticNonFinalField\n myFixture.addClass(\"package foo; public class Foo {\" +\n \" public static String foo;\" +\n \"}\");\n myFixture.addClass(\"package foo; public class Bar {\" +\n \" public static void foo(String s) {}\" +\n \"}\");\n myFixture.configureByFile(getTestName(false) + \".java\");\n myFixture.checkHighlighting(false, false, false);\n }\n\n public void testFilteredCandidates() {\n PsiFile file = myFixture.configureByText(\"a.java\", \"class a {{new StringBuilder().append();}}\");\n PsiCallExpression callExpression =\n PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getEditor().getCaretModel().getOffset()), PsiCallExpression.class);\n assertNotNull(callExpression);\n CandidateInfo[] candidates =\n PsiResolveHelper.getInstance(myFixture.getProject()).getReferencedMethodCandidates(callExpression, false);\n assertSize(27, candidates);\n String generateDoc = new JavaDocumentationProvider().generateDoc(callExpression, callExpression);\n assertEquals(\"Candidates for method call new StringBuilder().append() are:
\" +\n \"StringBuilder append(Object)
\" +\n \"StringBuilder append(String)
\" +\n \"StringBuilder append(StringBuilder)
\" +\n \"StringBuilder append(StringBuffer)
\" +\n \"StringBuilder append(CharSequence)
\" +\n \"StringBuilder append(CharSequence, int, int)
\" +\n \"StringBuilder append(char[])
\" +\n \"StringBuilder append(char[], int, int)
\" +\n \"StringBuilder append(boolean)
\" +\n \"StringBuilder append(char)
\" +\n \"StringBuilder append(int)
\" +\n \"StringBuilder append(long)
\" +\n \"StringBuilder append(float)
\" +\n \"StringBuilder append(double)
\", generateDoc);\n }\n\n public void testPackageNamedAsClassInDefaultPackage() {\n myFixture.addClass(\"package test; public class A {}\");\n PsiClass aClass = myFixture.addClass(\"public class test {}\");\n doTest();\n assertNull(ProgressManager.getInstance().runProcess(() -> ReferencesSearch.search(aClass).findFirst(), new EmptyProgressIndicator()));\n }\n\n public void testPackageNameAsClassFQName() {\n myFixture.addClass(\"package foo.Bar; class A {}\");\n myFixture.addClass(\"package foo; public class Bar { public static class Inner {}}\");\n doTest();\n }\n\n public void testInaccessibleFunctionalTypeParameter() {\n myFixture.addClass(\"package test; class A {}\");\n myFixture.addClass(\"package test; public interface I { void m(A a);}\");\n myFixture.addClass(\"package test; public interface J { A m();}\");\n doTest();\n }\n\n public void testBoundsPromotionWithCapturedWildcards() {\n myFixture.addClass(\"package a; public interface Provider {}\");\n myFixture.addClass(\"package b; public interface Provider {}\");\n doTest();\n }\n\n public void testStaticImportCompoundWithInheritance() {\n myFixture.addClass(\"package a; public interface A { static void foo(Object o){} static void foo(String str) {}}\");\n doTest();\n }\n\n public void testSuppressedInGenerated() {\n myFixture.enableInspections(new RedundantCastInspection());\n myFixture.addClass(\"package javax.annotation; public @interface Generated {}\");\n doTest();\n }\n\n public void testReferenceThroughInheritance() {\n myFixture.addClass(\"package test;\\n\" +\n \"public class A {\\n\" +\n \" public static class B {}\\n\" +\n \"}\");\n doTest();\n }\n\n public void testReferenceThroughInheritance1() {\n //noinspection UnnecessaryInterfaceModifier\n myFixture.addClass(\"package me;\\n\" +\n \"import me.Serializer.Format;\\n\" +\n \"public interface Serializer {\\n\" +\n \" public static interface Format {}\\n\" +\n \"}\\n\");\n doTest();\n }\n\n public void testUsageOfProtectedAnnotationOutsideAPackage() {\n myFixture.addClass(\"package a;\\n\" +\n \"import java.lang.annotation.ElementType;\\n\" +\n \"import java.lang.annotation.Target;\\n\" +\n \"\\n\" +\n \"public class A {\\n\" +\n \" @Target( { ElementType.METHOD, ElementType.TYPE } )\\n\" +\n \" protected @interface Test{\\n\" +\n \" }\\n\" +\n \"}\");\n doTest();\n }\n\n public void testPackageLocalClassUsedInArrayTypeOutsidePackage() {\n myFixture.addClass(\"package a; class A {}\");\n myFixture.addClass(\"package a; public class B {public static A[] getAs() {return null;}}\");\n doTest();\n }\n\n public void testProtectedFieldUsedInAnnotationParameterOfInheritor() {\n myFixture.addClass(\"package a; public class A {protected final static String A_FOO = \\\"A\\\";}\");\n doTest();\n }\n\n public void testStaticImportClassConflictingWithPackageName() {\n myFixture.addClass(\"package p.P1; class Unrelated {}\");\n myFixture.addClass(\"package p; public class P1 {public static final int FOO = 1;}\");\n doTest();\n }\n\n public void testAmbiguousMethodCallWhenStaticImported() {\n myFixture.addClass(\"package p;\" +\n \"class A {\\n\" +\n \" static A of(T t) {\\n\" +\n \" return null;\\n\" +\n \" }\\n\" +\n \"}\\n\" +\n \"class B {\\n\" +\n \" static B of(T t) {\\n\" +\n \" return null;\\n\" +\n \" }\\n\" +\n \" static B of(T... t) {\\n\" +\n \" return null;\\n\" +\n \" }\\n\" +\n \"}\\n\");\n doTest();\n }\n\n public void testClassPackageConflict() {\n myFixture.addClass(\"package a; public class b {}\");\n myFixture.addClass(\"package c; public class a {}\");\n doTest();\n }\n\n public void testClassPackageConflict1() {\n myFixture.addClass(\"package a; public class b {}\");\n myFixture.addClass(\"package c.d; public class a {}\");\n doTest();\n }\n\n public void testTypeAnnotations() {\n myFixture.addClass(\"import java.lang.annotation.ElementType;\\n\" +\n \"import java.lang.annotation.Target;\\n\" +\n \"@Target({ElementType.TYPE_USE})\\n\" +\n \"@interface Nullable {}\\n\");\n myFixture.addClass(\"class Middle extends Base<@Nullable R, String>{}\");\n myFixture.addClass(\"class Child extends Middle{}\");\n PsiClass baseClass = myFixture.addClass(\"class Base {}\");\n PsiClass fooClass = myFixture.addClass(\"class Foo {\\n\" +\n \" Child field;\\n\" +\n \"}\");\n PsiField fooField = fooClass.findFieldByName(\"field\", false);\n PsiType substituted =\n TypeConversionUtil.getSuperClassSubstitutor(baseClass, (PsiClassType)fooField.getType()).substitute(baseClass.getTypeParameters()[0]);\n assertEquals(1, substituted.getAnnotations().length);\n }\n\n public void testCodeFragmentMayAccessDefaultPackage() {\n myFixture.addClass(\"public class MainClass { }\");\n\n Project project = getProject();\n PsiElement context = JavaPsiFacade.getInstance(project).findPackage(\"\");\n JavaCodeFragment fragment = JavaCodeFragmentFactory.getInstance(project).createReferenceCodeFragment(\"MainClass\", context, true, true);\n Document document = PsiDocumentManager.getInstance(project).getDocument(fragment);\n Editor editor = EditorFactory.getInstance().createViewer(document, project);\n Disposer.register(myFixture.getTestRootDisposable(), () -> EditorFactory.getInstance().releaseEditor(editor));\n\n List highlights = CodeInsightTestFixtureImpl.instantiateAndRun(fragment, editor, ArrayUtilRt.EMPTY_INT_ARRAY, false);\n List problems = DaemonAnalyzerTestCase.filter(highlights, HighlightSeverity.WARNING);\n assertThat(problems).isEmpty();\n }\n\n public void testImplicitConstructorAccessibility() {\n myFixture.addClass(\"package a; public class Base {\" +\n \"private Base() {}\\n\" +\n \"protected Base(int... i) {}\\n\" +\n \"}\");\n doTest();\n }\n\n public void testDiamondsWithAnonymousProtectedConstructor() {\n myFixture.addClass(\"package a; public class Base { protected Base() {}}\");\n doTest();\n }\n \n public void testDiamondsWithProtectedCallInConstruction() {\n myFixture.addClass(\"package a; public class Base { \" +\n \" protected String createString() {return null;}\" +\n \"}\");\n doTest();\n }\n\n public void testDefaultAnnotationsApplicability() {\n myFixture.addClass(\"package foo; public @interface A {}\");\n myFixture.configureByFile(\"module-info.java\");\n myFixture.checkHighlighting();\n }\n\n public void testAlwaysFalseForLoop() {\n doTest();\n IntentionAction action = myFixture.findSingleIntention(\"Remove 'for' statement\");\n myFixture.launchAction(action);\n myFixture.checkResultByFile(getTestName(false) + \"_after.java\");\n }\n\n public void testProtectedInnerClass() {\n myFixture.addClass(\"package a;\\n\" +\n \"public class Outer {\\n\" +\n \" public Object get(Inner key) {\\n\" +\n \" return null;\\n\" +\n \" }\\n\" +\n \" public Inner get1() {return null;} \\n\" +\n \" public Inner f; \\n\" +\n \" protected class Inner {}\\n\" +\n \"}\");\n doTest();\n }\n \n public void testProtectedInnerClass1() {\n myFixture.addClass(\"package a;\\n\" +\n \"public class A {\\n\" +\n \" public T getData() {return null;}\\n\" +\n \"}\");\n myFixture.addClass(\"package a;\\n\" +\n \"public class Outer extends A {\\n\" +\n \" protected class Inner {}\\n\" +\n \"}\");\n doTest();\n }\n\n private void doTest() {\n myFixture.configureByFile(getTestName(false) + \".java\");\n myFixture.checkHighlighting();\n }\n}", "meta": {"content_hash": "ef7d91961df677bfcbca9006a8fcdde5", "timestamp": "", "source": "github", "line_count": 285, "max_line_length": 176, "avg_line_length": 46.435087719298245, "alnum_prop": 0.6320840259936528, "repo_name": "google/intellij-community", "id": "913fb7ace30ea2c7bbdb34897f4ae4c15628b887", "size": "13355", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/LightAdvHighlightingFixtureTest.java", "mode": "33188", "license": "apache-2.0", "language": []}}
{"text": "// Copyright 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// Unit tests for the SyncApi. Note that a lot of the underlying\n// functionality is provided by the Syncable layer, which has its own\n// unit tests. We'll test SyncApi specific things in this harness.\n\n#include \n#include