text
stringlengths
4
5.48M
meta
stringlengths
14
6.54k
<!doctype html> <html> <title>npm-rebuild</title> <meta http-equiv="content-type" value="text/html;utf-8"> <link rel="stylesheet" type="text/css" href="../../static/style.css"> <link rel="canonical" href="https://www.npmjs.org/doc/cli/npm-rebuild.html"> <script async=true src="../../static/toc.js"></script> <body> <div id="wrapper"> <h1><a href="../cli/npm-rebuild.html">npm-rebuild</a></h1> <p>Rebuild a package</p> <h2 id="synopsis">SYNOPSIS</h2> <pre><code>npm rebuild [&lt;name&gt; [&lt;name&gt; ...]] npm rb [&lt;name&gt; [&lt;name&gt; ...]] </code></pre><ul> <li><code>&lt;name&gt;</code>: The package to rebuild</li> </ul> <h2 id="description">DESCRIPTION</h2> <p>This command runs the <code>npm build</code> command on the matched folders. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary.</p> <h2 id="see-also">SEE ALSO</h2> <ul> <li><a href="../cli/npm-build.html">npm-build(1)</a></li> <li><a href="../cli/npm-install.html">npm-install(1)</a></li> </ul> </div> <table border=0 cellspacing=0 cellpadding=0 id=npmlogo> <tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18>&nbsp;</td></tr> <tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td colspan=6 style="width:60px;height:10px;background:#fff">&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td></tr> <tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2>&nbsp;</td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td></tr> <tr><td style="width:10px;height:10px;background:#fff" rowspan=2>&nbsp;</td></tr> <tr><td style="width:10px;height:10px;background:#fff">&nbsp;</td></tr> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr> </table> <p id="footer">npm-rebuild &mdash; [email protected]</p>
{'content_hash': '06378c0daa2675e4b2439a38825e91a9', 'timestamp': '', 'source': 'github', 'line_count': 42, 'max_line_length': 807, 'avg_line_length': 76.5, 'alnum_prop': 0.6999688764394647, 'repo_name': 'quantumlicht/collarbone', 'id': '6503efa94fd1e37fa75f711b1e4055d327b470b6', 'size': '3213', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'node_modules/npm/html/doc/cli/npm-rebuild.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '1060737'}, {'name': 'CoffeeScript', 'bytes': '96'}, {'name': 'JavaScript', 'bytes': '5791376'}, {'name': 'Python', 'bytes': '3630'}, {'name': 'Ruby', 'bytes': '9730'}, {'name': 'Shell', 'bytes': '2421'}]}
const chalk = require(`chalk`); module.exports = ({author, github, name}) => { console.log(); console.log(`Hey`, `${author},`); console.log(); console.log(`Created module`, chalk.yellow(`'${name}'`), `with generator-module-boilerplate`); console.log(); console.log(`use`, chalk.cyan(`npm run build:watch`), `/`, chalk.cyan(`npm run test:watch`), `for development mode`); console.log(`use`, chalk.cyan(`npm run build`), `for production builds (ES2015, CommonJS, UMD)`); console.log(`use`, chalk.cyan(`npm run release (premajor|patch|minor|major)`, `for releasing`)); console.log(); console.log(`everything is set up to push to https://github.com/${github}/${name}.git`); console.log(); };
{'content_hash': '0ad9a7aea4ceb6834db7acbe553f09b8', 'timestamp': '', 'source': 'github', 'line_count': 24, 'max_line_length': 119, 'avg_line_length': 30.0, 'alnum_prop': 0.6513888888888889, 'repo_name': 'duivvv/generator-module-boilerplate', 'id': 'd465c273cc1069a9386aad503aca2b29fde0dd9a', 'size': '720', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'generators/app/lib/init.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '6711'}]}
%biConvmatTocsv.m % % % author: steeve laquitaine %purpose: load raw data, extract data saved in structure and save them as % independent mat variables, convert each mat variable to .csv files % %input : % % myrootpath : folder where you cloned projBrainInference % subject : subject sid e.g., s24, s25, s323, s327, s357 % roi : brain region: e.g., 'V1', 'V2', etc., % %dependencies : % % the code requires "slDataMunging" code library % git clone https://github.com/steevelaquitaine/sldataMunging.git % % % %usage : % % %set subject id, prior and roi % clear % subject = 's25'; % prior = 'prior135'; % roi = 'V1'; % % %set raw file and path path in which "projBrainInference" project was % %cloned % rawfile = ['~/data/datafMRI/sltaskdotdirfmri05/slStckAnalyses/Concatenation/classif/' subject '/' prior '/myRandomCoh/accAtTimeleaveOneOutfisherbalancByRemovI/' roi '/d.mat']; % birootpath = '~/proj/steeve/'; % % %save and organize data in project "projBrainInference" % biloadRawSaveInBIproj(rawfile,birootpath,subject,prior,roi) % % %munge % biConvmatTocsv(birootpath,subject,prior,roi) function biConvmatTocsv(myrootpath,subject,prior,roi) %load raw data cd([myrootpath 'projBrainInference/data/' subject '/' prior '/' roi]) load('data.mat') %sort raw data from structure to variable in %separate.mat files instances = d.instances; save('instances','instances') directions = d.myRandomDir; save('directions','directions') coherences = d.myRandomCoh; save('coherences','coherences') switching = d.mySwitch; save('switching','switching') %save each separate variable in a separate .csv files slconvMatToCsv(d.instances,'instances') slconvMatToCsv(d.myRandomDir,'directions') slconvMatToCsv(d.myRandomCoh,'coherences') slconvMatToCsv(d.mySwitch,'switching')
{'content_hash': 'c30d930feb5b0bc58f2bd00441b4a89a', 'timestamp': '', 'source': 'github', 'line_count': 61, 'max_line_length': 184, 'avg_line_length': 30.983606557377048, 'alnum_prop': 0.6973544973544974, 'repo_name': 'steevelaquitaine/projBrainInference', 'id': 'd38f9ca8351a1b5f8de6fe701387eaa02bc5e201', 'size': '1891', 'binary': False, 'copies': '1', 'ref': 'refs/heads/gh-pages', 'path': 'munging/biConvmatTocsv.m', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '6857'}, {'name': 'HTML', 'bytes': '47369'}, {'name': 'JavaScript', 'bytes': '48'}, {'name': 'Matlab', 'bytes': '8505'}]}
//pure functions that compute things related to the game's logic import { roundNum } from "../shared/utils"; /* Internal coordinate system: Walls and junctions between four "walkable" cells (called pillars) also count as cells for the coordinate system, so the number of rows/columns with "walkable" cells (called ground cells) is actually half of the board's size (rounding up). Both dimensions of the board should be odd, as they start and end with a row / column of walkable cells. The first coordinate is the row (y-axis / height). The second coordinate is the column (x-axis / width). In the "classic" coordinate system, rows/columns with walls and pillar do not count. The "classic" coordinate system is only ever used in the UI to interact with humans. */ export const cellEnum = { ground: 0, wall: 1, pillar: 2, }; //maps 1->1, 3->2, 5->3, ... export const internalToClassicBoardSize = (internalDim) => { return (internalDim + 1) / 2; }; export const classicToInternalBoardSize = (classicDim) => { return 2 * classicDim - 1; }; //maps 0->1, 2->2, 4->3, ... export const internalToClassicCoord = (internalCoord) => { return internalCoord / 2 + 1; }; export const classicToInternalCoord = (classicCoord) => { return 2 * (classicCoord - 1); }; const boardPixelHeight = (dims, groundSize, wallWidth) => (wallWidth * (dims[0] - 1)) / 2 + (groundSize * (dims[0] + 1)) / 2; const boardPixelWidth = (dims, groundSize, wallWidth) => (wallWidth * (dims[1] - 1)) / 2 + (groundSize * (dims[1] + 1)) / 2; export const boardPixelDims = (dims, groundSize, wallWidth) => [ boardPixelHeight(dims, groundSize, wallWidth), boardPixelWidth(dims, groundSize, wallWidth), ]; const emptyBoardDistance = (start, goal) => { const [rowDiff, colDiff] = [ Math.abs(start[0] - goal[0]), Math.abs(start[1] - goal[1]), ]; return (rowDiff + colDiff) / 2; }; export const emptyBoardDistances = (boardSettings) => { return [ emptyBoardDistance(boardSettings.startPos[0], boardSettings.goalPos[0]), emptyBoardDistance(boardSettings.startPos[1], boardSettings.goalPos[1]), ]; }; export const timeControlToString = (timeControl) => { return roundNum(timeControl.duration) + "+" + roundNum(timeControl.increment); }; export function cellTypeByPos(pos) { if (pos[0] % 2 === 0 && pos[1] % 2 === 0) return cellEnum.ground; if (pos[0] % 2 !== pos[1] % 2) return cellEnum.wall; return cellEnum.pillar; //case i%2 === 1 && j%2 === 1 } export function posEq(pos1, pos2) { return pos1[0] === pos2[0] && pos1[1] === pos2[1]; } function dimensions(grid) { return [grid.length, grid[0].length]; } export function emptyGrid(dims) { let grid = []; for (let r = 0; r < dims[0]; r++) { grid[r] = []; for (let c = 0; c < dims[1]; c++) grid[r][c] = 0; } return grid; } function inBounds(pos, dims) { return pos[0] >= 0 && pos[0] < dims[0] && pos[1] >= 0 && pos[1] < dims[1]; } function isWallBuilt(grid, pos) { const cellType = cellTypeByPos(pos); if (cellType !== cellEnum.wall) return false; //cannot check for wall here return grid[pos[0]][pos[1]] !== 0; } function accessibleNeighbors(grid, pos) { const dims = dimensions(grid); if (cellTypeByPos(pos) !== cellEnum.ground) { return []; //only ground coords can access neighbors } const dirs = [ [0, 1], [0, -1], [1, 0], [-1, 0], ]; const res = []; const [pr, pc] = [pos[0], pos[1]]; for (let k = 0; k < dirs.length; k++) { const [dr, dc] = [dirs[k][0], dirs[k][1]]; const adjWall = [pr + dr, pc + dc]; const adjGround = [pr + 2 * dr, pc + 2 * dc]; if (inBounds(adjGround, dims) && !isWallBuilt(grid, adjWall)) { res.push(adjGround); } } return res; } export function distance(grid, start, target) { //implements bfs algorithm if (posEq(start, target)) return 0; const C = grid[0].length; const posToKey = (pos) => pos[0] * C + pos[1]; const queue = []; let i = 0; queue.push(start); const dist = new Map(); dist.set(posToKey(start), 0); while (i < queue.length) { const pos = queue[i]; i++; const nbrs = accessibleNeighbors(grid, pos); for (let k = 0; k < nbrs.length; k++) { let nbr = nbrs[k]; if (!dist.has(posToKey(nbr))) { dist.set(posToKey(nbr), dist.get(posToKey(pos)) + 1); if (posEq(nbr, target)) return dist.get(posToKey(nbr)); queue.push(nbr); } } } return -1; } //same as distance, but with early termination export function isDistanceAtMost(grid, start, target, maxDistance) { //implements bfs algorithm if (posEq(start, target)) return 0; const C = grid[0].length; const posToKey = (pos) => pos[0] * C + pos[1]; const queue = []; let i = 0; queue.push(start); const dist = new Map(); dist.set(posToKey(start), 0); while (i < queue.length) { const pos = queue[i]; i++; const dis = dist.get(posToKey(pos)); if (dis > maxDistance) return false; const nbrs = accessibleNeighbors(grid, pos); for (let k = 0; k < nbrs.length; k++) { let nbr = nbrs[k]; if (!dist.has(posToKey(nbr))) { if (posEq(nbr, target)) return dis + 1 <= maxDistance; dist.set(posToKey(nbr), dis + 1); queue.push(nbr); } } } return false; } function canReach(grid, start, target) { return distance(grid, start, target) !== -1; } //can handle more than 2 players, which is not used for now function isValidBoard(grid, playerPos, goals) { for (let k = 0; k < playerPos.length; k++) { if (!canReach(grid, playerPos[k], goals[k])) return false; } return true; } export function canBuildWall(grid, playerPos, goals, pos) { if (isWallBuilt(grid, pos)) return false; grid[pos[0]][pos[1]] = 1; //grid parameter is only modified in this scope var res = isValidBoard(grid, playerPos, goals); grid[pos[0]][pos[1]] = 0; return res; } export function rowNotation(pos) { if (pos[0] === 18) return "X"; return "" + (2 + pos[0]) / 2; } export function columnNotation(pos) { return String.fromCharCode(97 + pos[1] / 2); } export function actionNotation(pos) { if (cellTypeByPos(pos) === cellEnum.ground) return columnNotation(pos) + rowNotation(pos); else { const isVWall = pos[1] % 2 === 1; if (isVWall) return ( columnNotation([pos[0], pos[1] - 1]) + columnNotation([pos[0], pos[1] + 1]) + rowNotation(pos) ); else return ( columnNotation(pos) + rowNotation([pos[0] + 1, pos[1]]) + rowNotation([pos[0] - 1, pos[1]]) ); } } export function moveNotation(actions) { if (actions.length === 1) return actionNotation(actions[0]); const [a1, a2] = actions; //canonical order: ground moves first, then sorted by increasing columns, //then sorted by decreasing rows const a1First = cellTypeByPos(a1) === cellEnum.ground || cellTypeByPos(a1) !== cellEnum.ground || a1[1] < a2[1] || (a1[1] === a2[1] && a1[0] > a2[0]); return a1First ? actionNotation(a1) + " " + actionNotation(a2) : actionNotation(a2) + " " + actionNotation(a1); }
{'content_hash': '99bce9e15233ab129a9c9f1ec47cedda', 'timestamp': '', 'source': 'github', 'line_count': 240, 'max_line_length': 105, 'avg_line_length': 29.604166666666668, 'alnum_prop': 0.623082336382829, 'repo_name': 'nmamano/WallWars', 'id': '45016ee86e3d60d5a328d174d3961a47e4afc0f5', 'size': '7105', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'frontend/src/shared/gameLogicUtils.js', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Python', 'bytes': '19972'}]}
import PostNodeBuilder from 'content-kit-editor/models/post-node-builder'; const { module, test } = window.QUnit; import Renderer from 'content-kit-editor/renderers/editor-dom'; import RenderNode from 'content-kit-editor/models/render-node'; import RenderTree from 'content-kit-editor/models/render-tree'; const DATA_URL = "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs="; let builder; function render(renderTree, cards=[]) { let editor = {}; let renderer = new Renderer(editor, cards); return renderer.render(renderTree); } module("Unit: Renderer: Editor-Dom", { beforeEach() { builder = new PostNodeBuilder(); } }); test("It renders a dirty post", (assert) => { /* * renderTree is: * * renderNode * */ let renderNode = new RenderNode(builder.createPost()); let renderTree = new RenderTree(renderNode); renderNode.renderTree = renderTree; render(renderTree); assert.ok(renderTree.node.element, 'renderTree renders element for post'); assert.ok(!renderTree.node.isDirty, 'dirty node becomes clean'); assert.equal(renderTree.node.element.tagName, 'DIV', 'renderTree renders element for post'); }); test("It renders a dirty post with un-rendered sections", (assert) => { let post = builder.createPost(); let sectionA = builder.createMarkupSection('P'); post.appendSection(sectionA); let sectionB = builder.createMarkupSection('P'); post.appendSection(sectionB); let renderNode = new RenderNode(post); let renderTree = new RenderTree(renderNode); renderNode.renderTree = renderTree; render(renderTree); assert.equal(renderTree.node.element.outerHTML, '<div><p></p><p></p></div>', 'correct HTML is rendered'); assert.ok(renderTree.node.firstChild, 'sectionA creates a first child'); assert.equal(renderTree.node.firstChild.postNode, sectionA, 'sectionA is first renderNode child'); assert.ok(!renderTree.node.firstChild.isDirty, 'sectionA node is clean'); assert.equal(renderTree.node.lastChild.postNode, sectionB, 'sectionB is second renderNode child'); assert.ok(!renderTree.node.lastChild.isDirty, 'sectionB node is clean'); }); [ { name: 'markup', section: (builder) => builder.createMarkupSection('P') }, { name: 'image', section: (builder) => builder.createImageSection(DATA_URL) }, { name: 'card', section: (builder) => builder.createCardSection('new-card') } ].forEach((testInfo) => { test(`Remove nodes with ${testInfo.name} section`, (assert) => { let post = builder.createPost(); let section = testInfo.section(builder); post.appendSection(section); let postElement = document.createElement('div'); let sectionElement = document.createElement('p'); postElement.appendChild(sectionElement); let postRenderNode = new RenderNode(post); let renderTree = new RenderTree(postRenderNode); postRenderNode.renderTree = renderTree; postRenderNode.element = postElement; let sectionRenderNode = renderTree.buildRenderNode(section); sectionRenderNode.element = sectionElement; sectionRenderNode.scheduleForRemoval(); postRenderNode.appendChild(sectionRenderNode); render(renderTree); assert.equal(renderTree.node.element, postElement, 'post element remains'); assert.equal(renderTree.node.element.firstChild, null, 'section element removed'); assert.equal(renderTree.node.firstChild, null, 'section renderNode is removed'); }); }); test('renders a post with marker', (assert) => { let post = builder.createPost(); let section = builder.createMarkupSection('P'); post.appendSection(section); section.appendMarker( builder.createMarker('Hi', [ builder.createMarkup('STRONG') ]) ); let node = new RenderNode(post); let renderTree = new RenderTree(node); node.renderTree = renderTree; render(renderTree); assert.equal(node.element.innerHTML, '<p><strong>Hi</strong></p>'); }); test('renders a post with multiple markers', (assert) => { let post = builder.createPost(); let section = builder.createMarkupSection('P'); post.appendSection(section); let b = builder.createMarkup('B'); let i = builder.createMarkup('I'); section.appendMarker(builder.createMarker('hello ')); section.appendMarker( builder.createMarker('bold, ', [b]) ); section.appendMarker( builder.createMarker('italic,', [b,i]) ); section.appendMarker( builder.createMarker(' world.') ); let node = new RenderNode(post); let renderTree = new RenderTree(node); node.renderTree = renderTree; render(renderTree); assert.equal(node.element.innerHTML, '<p>hello <b>bold, <i>italic,</i></b> world.</p>'); }); test('renders a post with image', (assert) => { let url = DATA_URL; let post = builder.createPost(); let section = builder.createImageSection(url); post.appendSection(section); let node = new RenderNode(post); let renderTree = new RenderTree(node); node.renderTree = renderTree; render(renderTree); assert.equal(node.element.innerHTML, `<img src="${url}">`); }); test('renders a card section', (assert) => { let post = builder.createPost(); let cardSection = builder.createCardSection('my-card'); let card = { name: 'my-card', display: { setup(element) { element.innerHTML = 'I am a card'; } } }; post.appendSection(cardSection); let node = new RenderNode(post); let renderTree = new RenderTree(node); node.renderTree = renderTree; render(renderTree, [card]); assert.equal(node.element.firstChild.innerHTML, 'I am a card', 'card is rendered'); }); test('renders a card section into a non-contenteditable element', (assert) => { assert.expect(2); let post = builder.createPost(); let cardSection = builder.createCardSection('my-card'); let card = { name: 'my-card', display: { setup(element) { element.setAttribute('id', 'my-card-div'); } } }; post.appendSection(cardSection); let node = new RenderNode(post); let renderTree = new RenderTree(node); node.renderTree = renderTree; render(renderTree, [card]); let element = node.element.firstChild; assert.equal(element.getAttribute('id'), 'my-card-div', 'precond - correct element selected'); assert.equal(element.contentEditable, 'false', 'is not contenteditable'); }); /* * renderTree: * * post * | * section * | * |----------------| * | | * marker1 [b] marker2 [] * | | * <text1> <text2> * * add "b" markup to marker2, new tree should be: * * post * | * section * | * | * | * marker1 [b] * | * <text1> + <text2> */ test('rerender a marker after adding a markup to it', (assert) => { const post = builder.createPost(); const section = builder.createMarkupSection('p'); const b = builder.createMarkup('B'); const marker1 = builder.createMarker('text1', [b]); const marker2 = builder.createMarker('text2'); section.appendMarker(marker1); section.appendMarker(marker2); post.appendSection(section); let node = new RenderNode(post); let renderTree = new RenderTree(node); node.renderTree = renderTree; render(renderTree); assert.equal(node.element.innerHTML, '<p><b>text1</b>text2</p>'); marker2.addMarkup(b); marker2.renderNode.markDirty(); // rerender render(renderTree); assert.equal(node.element.innerHTML, '<p><b>text1text2</b></p>'); }); test('rerender a marker after removing a markup from it', (assert) => { const post = builder.createPost(); const section = builder.createMarkupSection('p'); const bMarkup = builder.createMarkup('B'); const marker1 = builder.createMarker('text1'); const marker2 = builder.createMarker('text2', [bMarkup]); section.appendMarker(marker1); section.appendMarker(marker2); post.appendSection(section); let node = new RenderNode(post); let renderTree = new RenderTree(node); node.renderTree = renderTree; render(renderTree); assert.equal(node.element.innerHTML, '<p>text1<b>text2</b></p>'); marker2.removeMarkup(bMarkup); marker2.renderNode.markDirty(); // rerender render(renderTree); assert.equal(node.element.innerHTML, '<p>text1text2</p>'); }); test('rerender a marker after removing a markup from it (when changed marker is first marker)', (assert) => { const post = builder.createPost(); const section = builder.createMarkupSection('p'); const bMarkup = builder.createMarkup('B'); const marker1 = builder.createMarker('text1', [bMarkup]); const marker2 = builder.createMarker('text2'); section.appendMarker(marker1); section.appendMarker(marker2); post.appendSection(section); let node = new RenderNode(post); let renderTree = new RenderTree(node); node.renderTree = renderTree; render(renderTree); assert.equal(node.element.innerHTML, '<p><b>text1</b>text2</p>'); marker1.removeMarkup(bMarkup); marker1.renderNode.markDirty(); // rerender render(renderTree); assert.equal(node.element.innerHTML, '<p>text1text2</p>'); }); test('rerender a marker after removing a markup from it (when both markers have same markup)', (assert) => { const post = builder.createPost(); const section = builder.createMarkupSection('p'); const bMarkup = builder.createMarkup('B'); const marker1 = builder.createMarker('text1', [bMarkup]); const marker2 = builder.createMarker('text2', [bMarkup]); section.appendMarker(marker1); section.appendMarker(marker2); post.appendSection(section); let node = new RenderNode(post); let renderTree = new RenderTree(node); node.renderTree = renderTree; render(renderTree); assert.equal(node.element.innerHTML, '<p><b>text1text2</b></p>'); marker1.removeMarkup(bMarkup); marker1.renderNode.markDirty(); // rerender render(renderTree); assert.equal(node.element.innerHTML, '<p>text1<b>text2</b></p>'); }); test('rerender a marker after removing a markup from it (when both markers have same markup)', (assert) => { const post = builder.createPost(); const section = builder.createMarkupSection('p'); const bMarkup = builder.createMarkup('B'); const marker1 = builder.createMarker('text1', [bMarkup]); const marker2 = builder.createMarker('text2', [bMarkup]); section.appendMarker(marker1); section.appendMarker(marker2); post.appendSection(section); let node = new RenderNode(post); let renderTree = new RenderTree(node); node.renderTree = renderTree; render(renderTree); assert.equal(node.element.innerHTML, '<p><b>text1text2</b></p>'); marker1.removeMarkup(bMarkup); marker1.renderNode.markDirty(); // rerender render(renderTree); assert.equal(node.element.innerHTML, '<p>text1<b>text2</b></p>'); }); /* test("It renders a renderTree with rendered dirty section", (assert) => { /* * renderTree is: * * post<dirty> * / \ * / \ * section section<dirty> * let post = builder.createPost let postRenderNode = { element: null, parent: null, isDirty: true, postNode: builder.createPost() } let renderTree = { node: renderNode } render(renderTree); assert.ok(renderTree.node.element, 'renderTree renders element for post'); assert.ok(!renderTree.node.isDirty, 'dirty node becomes clean'); assert.equal(renderTree.node.element.tagName, 'DIV', 'renderTree renders element for post'); }); */
{'content_hash': 'a56399a7d66d7fe799c5164d25b3b122', 'timestamp': '', 'source': 'github', 'line_count': 416, 'max_line_length': 109, 'avg_line_length': 28.30528846153846, 'alnum_prop': 0.6654777070063694, 'repo_name': 'bantic/content-kit-editor', 'id': '4612b94e8ef83f910af4eb7ffe43aa282d0aeae1', 'size': '11775', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/unit/renderers/editor-dom-test.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '57155'}, {'name': 'HTML', 'bytes': '6885'}, {'name': 'JavaScript', 'bytes': '490721'}, {'name': 'Shell', 'bytes': '585'}]}
namespace DEM::Game { enum class EActionStatus : U8 { Active = 0, Succeeded, Failed, Cancelled, NotQueued }; // Like an opaque iterator, but allows to check validity without access to the collection class HAction final { private: friend class CActionQueueComponent; const ::Events::PEventBase* _It = nullptr; HAction(const ::Events::PEventBase* It) : _It(It) {} public: HAction() = default; operator bool() const { return !!_It; } auto Get() const { return _It ? _It->get() : nullptr; } template<class T> T* As() const { static_assert(std::is_base_of_v<::Events::CEventBase, T>, "All entity actions must be derived from CEventBase"); return (_It && _It->get()) ? (*_It)->As<T>() : nullptr; } }; class CActionQueueComponent final { protected: std::vector<::Events::PEventBase> _Stack; std::deque<::Events::PEventBase> _Queue; EActionStatus _Status = EActionStatus::NotQueued; template<typename T, typename... TNext> inline bool IsActionOneOf(::Events::CEventID ID) const { static_assert(std::is_base_of_v<::Events::CEventBase, T>, "All entity actions must be derived from CEventBase"); if (ID == T::RTTI) return true; if constexpr (sizeof...(TNext) > 0) return IsActionOneOf<TNext...>(ID); return false; } //--------------------------------------------------------------------- // NB: handle must be valid, no additional checks performed inline auto ItFromHandle(HAction Handle) const { return _Stack.begin() + (Handle._It - _Stack.data()); } //--------------------------------------------------------------------- static inline HAction HandleFromIt(std::vector<::Events::PEventBase>::const_iterator It) { return HAction{ &(*It) }; } //--------------------------------------------------------------------- // ResetOnReuse - when false and immediate child is reused, its state and children are not reset template<typename T, bool ResetOnReuse, typename... TArgs> HAction PushChildT(HAction Parent, TArgs&&... Args) { static_assert(std::is_base_of_v<::Events::CEventBase, T>, "All entity actions must be derived from CEventBase"); if (!Parent) return {}; const auto ParentIt = ItFromHandle(Parent); // Try to find child of the same type, make it an immediate child of the Parent and protect from popping const auto ChildIt = ParentIt + 1; const auto ReuseIt = std::find_if(ChildIt, _Stack.cend(), [](const auto& Action) { return Action->GetID() == T::RTTI; }); if (ReuseIt == _Stack.cend()) { // Nothing to reuse, create new child _Stack.erase(ChildIt, _Stack.cend()); _Stack.push_back(std::make_unique<T>(std::forward<TArgs>(Args)...)); _Status = EActionStatus::Active; return HAction(&_Stack.back()); } if (ChildIt != ReuseIt) { // Low-level vector usage optimization, ignore iterator constantness std::swap(const_cast<::Events::PEventBase&>(*ChildIt), const_cast<::Events::PEventBase&>(*ReuseIt)); _Stack.erase(ChildIt + 1, _Stack.cend()); } else if constexpr (ResetOnReuse) _Stack.erase(ChildIt + 1, _Stack.cend()); // Reuse found child of the requested type T* pReused = static_cast<T*>(ChildIt->get()); pReused->~T(); n_placement_new(pReused, T(std::forward<TArgs>(Args)...)); if (ChildIt == (_Stack.cend() - 1)) _Status = EActionStatus::Active; return HandleFromIt(ChildIt); } //--------------------------------------------------------------------- public: CActionQueueComponent() = default; CActionQueueComponent(CActionQueueComponent&&) noexcept = default; CActionQueueComponent& operator =(CActionQueueComponent&&) noexcept = default; ~CActionQueueComponent() = default; //???small pool allocator for events? one for all components? one for all small things? can be static field, ensure MT safety template<typename T, typename... TArgs> void EnqueueAction(TArgs&&... Args) { static_assert(std::is_base_of_v<::Events::CEventBase, T>, "All entity actions must be derived from CEventBase"); _Queue.push_back(std::make_unique<T>(std::forward<TArgs>(Args)...)); } //--------------------------------------------------------------------- template<typename T, typename... TArgs> inline HAction PushOrUpdateChild(HAction Parent, TArgs&&... Args) { return PushChildT<T, false, TArgs...>(Parent, std::forward<TArgs>(Args)...); } //--------------------------------------------------------------------- template<typename T, typename... TArgs> inline HAction PushChild(HAction Parent, TArgs&&... Args) //???has practical use cases? { return PushChildT<T, true, TArgs...>(Parent, std::forward<TArgs>(Args)...); } //--------------------------------------------------------------------- void RunNextAction() { _Stack.clear(); if (_Queue.empty()) { _Status = EActionStatus::NotQueued; } else { _Stack.push_back(std::move(_Queue.front())); _Queue.pop_front(); _Status = EActionStatus::Active; } } //--------------------------------------------------------------------- void Reset(EActionStatus Status = EActionStatus::NotQueued) { _Stack.clear(); _Queue.clear(); _Status = Status; } //--------------------------------------------------------------------- HAction FindCurrent(::Events::CEventID ID, HAction From = {}) const { auto It = _Stack.crbegin(); if (From) { It = std::reverse_iterator(ItFromHandle(From)); if (It == _Stack.crend()) return {}; } // Walk from nested sub-actions to the stack root for (; It != _Stack.crend(); ++It) if ((*It)->GetID() == ID) // Could also check if it is a parametrized event and skip other checks if so return HandleFromIt((++It).base()); return {}; } //--------------------------------------------------------------------- template<typename... T> HAction FindCurrent(HAction From = {}) const { auto It = _Stack.crbegin(); if (From) { It = std::reverse_iterator(ItFromHandle(From)); if (It == _Stack.crend()) return {}; } // Walk from nested sub-actions to the stack root for (; It != _Stack.crend(); ++It) if (IsActionOneOf<T...>((*It)->GetID())) // Could also check if it is a parametrized event and skip other checks if so return HandleFromIt((++It).base()); return {}; } //--------------------------------------------------------------------- HAction GetChild(HAction Handle) const { if (!Handle) return {}; auto It = ++ItFromHandle(Handle); return (It == _Stack.cend()) ? HAction{} : HandleFromIt(It); } //--------------------------------------------------------------------- HAction GetParent(HAction Handle) const { if (!Handle) return {}; auto It = ItFromHandle(Handle); return (It == _Stack.cbegin()) ? HAction{} : HandleFromIt(--It); } //--------------------------------------------------------------------- HAction GetRoot() const { return _Stack.empty() ? HAction{} : HandleFromIt(_Stack.cbegin()); } //--------------------------------------------------------------------- HAction GetCurrent() const { return _Stack.empty() ? HAction{} : HandleFromIt(--_Stack.cend()); } //--------------------------------------------------------------------- size_t GetStackDepth() const { return _Stack.size(); } //--------------------------------------------------------------------- size_t GetQueueSize() const { return _Queue.size() + (_Stack.empty() ? 0 : 1); } //--------------------------------------------------------------------- EActionStatus GetStatus(HAction Handle) const { if (!Handle) return EActionStatus::NotQueued; if (Handle._It == &_Stack.back()) return _Status; return EActionStatus::Active; } //--------------------------------------------------------------------- // NB: pops child actions void SetStatus(HAction Handle, EActionStatus Status) { if (!Handle || Status == EActionStatus::NotQueued) return; _Stack.erase(++ItFromHandle(Handle), _Stack.cend()); // Pop children _Status = Status; } //--------------------------------------------------------------------- }; } namespace DEM::Meta { template<> inline constexpr auto RegisterClassName<Game::CActionQueueComponent>() { return "DEM::Game::CActionQueueComponent"; } template<> inline constexpr auto RegisterMembers<Game::CActionQueueComponent>() { return std::make_tuple ( ); } }
{'content_hash': 'feb2c82a6d0f8c32f1827ccbb7c20064', 'timestamp': '', 'source': 'github', 'line_count': 258, 'max_line_length': 128, 'avg_line_length': 31.94573643410853, 'alnum_prop': 0.5581169619024509, 'repo_name': 'niello/deusexmachina', 'id': '95a5948564491e001baa7aef39e629f78eb783a7', 'size': '8918', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'DEM/Game/src/Game/ECS/Components/ActionQueueComponent.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '122533'}, {'name': 'Awk', 'bytes': '688'}, {'name': 'Batchfile', 'bytes': '7513'}, {'name': 'C', 'bytes': '16388375'}, {'name': 'C#', 'bytes': '398813'}, {'name': 'C++', 'bytes': '36890379'}, {'name': 'CMake', 'bytes': '561047'}, {'name': 'CSS', 'bytes': '10638'}, {'name': 'Fortran', 'bytes': '87'}, {'name': 'FreeBasic', 'bytes': '3789'}, {'name': 'HTML', 'bytes': '1351597'}, {'name': 'Lua', 'bytes': '135757'}, {'name': 'M4', 'bytes': '52785'}, {'name': 'Makefile', 'bytes': '52318'}, {'name': 'Mathematica', 'bytes': '4491'}, {'name': 'NSIS', 'bytes': '4683'}, {'name': 'Objective-C', 'bytes': '55376'}, {'name': 'Pascal', 'bytes': '29093'}, {'name': 'Perl', 'bytes': '39592'}, {'name': 'PowerShell', 'bytes': '7410'}, {'name': 'Python', 'bytes': '160966'}, {'name': 'Roff', 'bytes': '5263'}, {'name': 'Ruby', 'bytes': '39'}, {'name': 'SWIG', 'bytes': '11981'}, {'name': 'Shell', 'bytes': '7830'}, {'name': 'TeX', 'bytes': '149544'}, {'name': 'VBA', 'bytes': '41547'}, {'name': 'Visual Basic .NET', 'bytes': '8505'}]}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.9.1"/> <title>MNE-CPP: Member List</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">MNE-CPP &#160;<span id="projectnumber">beta 1.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.9.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="pages.html"><span>Related&#160;Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">Ui_RapMusicToolboxAboutWidgetClass Member List</div> </div> </div><!--header--> <div class="contents"> <p>This is the complete list of members for <a class="el" href="class_ui___rap_music_toolbox_about_widget_class.html">Ui_RapMusicToolboxAboutWidgetClass</a>, including all inherited members.</p> <table class="directory"> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>retranslateUi</b>(QDialog *RapMusicToolboxAboutWidgetClass) (defined in <a class="el" href="class_ui___rap_music_toolbox_about_widget_class.html">Ui_RapMusicToolboxAboutWidgetClass</a>)</td><td class="entry"><a class="el" href="class_ui___rap_music_toolbox_about_widget_class.html">Ui_RapMusicToolboxAboutWidgetClass</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>setupUi</b>(QDialog *RapMusicToolboxAboutWidgetClass) (defined in <a class="el" href="class_ui___rap_music_toolbox_about_widget_class.html">Ui_RapMusicToolboxAboutWidgetClass</a>)</td><td class="entry"><a class="el" href="class_ui___rap_music_toolbox_about_widget_class.html">Ui_RapMusicToolboxAboutWidgetClass</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>textBrowser</b> (defined in <a class="el" href="class_ui___rap_music_toolbox_about_widget_class.html">Ui_RapMusicToolboxAboutWidgetClass</a>)</td><td class="entry"><a class="el" href="class_ui___rap_music_toolbox_about_widget_class.html">Ui_RapMusicToolboxAboutWidgetClass</a></td><td class="entry"></td></tr> </table></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Fri Mar 27 2015 22:54:37 for MNE-CPP by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.9.1 </small></address> </body> </html>
{'content_hash': 'd502ed1ea0f932200ba4b2f1fe42942c', 'timestamp': '', 'source': 'github', 'line_count': 106, 'max_line_length': 445, 'avg_line_length': 51.783018867924525, 'alnum_prop': 0.6656950264164693, 'repo_name': 'CBoensel/mne-cpp', 'id': 'fef3d95392a582dd707ec025bdaa55402cc9aec4', 'size': '5489', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'doc/html/class_ui___rap_music_toolbox_about_widget_class-members.html', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '533427'}, {'name': 'C++', 'bytes': '11295418'}, {'name': 'Prolog', 'bytes': '27894'}, {'name': 'QMake', 'bytes': '322871'}]}
package org.apache.servicecomb.foundation.protobuf.internal.schema.serializer.repeated.impl.longs; import org.apache.servicecomb.foundation.protobuf.internal.ProtoUtils; import org.apache.servicecomb.foundation.protobuf.internal.bean.PropertyDescriptor; import org.apache.servicecomb.foundation.protobuf.internal.schema.serializer.repeated.AbstractPrimitiveWriters; import org.apache.servicecomb.foundation.protobuf.internal.schema.serializer.repeated.RepeatedPrimitiveWriteSchemas; import io.protostuff.compiler.model.Field; import io.protostuff.runtime.FieldSchema; public class Int64PackedWriteSchemas { private static class Int64PackedWriters extends AbstractPrimitiveWriters<long[], Long> { public Int64PackedWriters(Field protoField) { super(protoField); primitiveArrayWriter = (o, value) -> o.writeObject(tag, tagSize, value, (output, array) -> { for (long element : array) { output.writePackedInt64(element); } }); arrayWriter = (o, value) -> o.writeObject(tag, tagSize, value, (output, array) -> { for (Long element : array) { if (element != null) { output.writePackedInt64(element); continue; } ProtoUtils.throwNotSupportNullElement(protoField); } }); collectionWriter = (o, value) -> o.writeObject(tag, tagSize, value, (output, collection) -> { for (Long element : collection) { if (element != null) { output.writePackedInt64(element); continue; } ProtoUtils.throwNotSupportNullElement(protoField); } }); stringArrayWriter = (o, value) -> o.writeObject(tag, tagSize, value, (output, array) -> { for (String element : array) { if (element != null) { long parsedValue = Long.parseLong(element, 10); output.writePackedInt64(parsedValue); continue; } ProtoUtils.throwNotSupportNullElement(protoField); } }); } } public static <T> FieldSchema<T> create(Field protoField, PropertyDescriptor propertyDescriptor) { return RepeatedPrimitiveWriteSchemas.create(protoField, propertyDescriptor, new Int64PackedWriters(protoField)); } }
{'content_hash': 'f9ddbafcb6d5389ec716850ea99b91bd', 'timestamp': '', 'source': 'github', 'line_count': 66, 'max_line_length': 116, 'avg_line_length': 36.74242424242424, 'alnum_prop': 0.6309278350515464, 'repo_name': 'ServiceComb/java-chassis', 'id': '1cc9f48f3747c9d5f2a7360c9a35ff2370d41ad3', 'size': '3226', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'foundations/foundation-protobuf/src/main/java/org/apache/servicecomb/foundation/protobuf/internal/schema/serializer/repeated/impl/longs/Int64PackedWriteSchemas.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '2679862'}, {'name': 'Protocol Buffer', 'bytes': '359'}, {'name': 'Python', 'bytes': '1681'}]}
package com.alibaba.jstorm.zk; import java.util.List; import java.util.Map; import org.apache.log4j.Logger; import backtype.storm.Config; import backtype.storm.utils.Utils; import com.alibaba.jstorm.cluster.ClusterState; import com.alibaba.jstorm.cluster.DistributedClusterState; import com.google.common.collect.Maps; public class ZkTool { private static Logger LOG = Logger.getLogger(ZkTool.class); public static final String READ_CMD = "read"; public static final String RM_CMD = "rm"; public static void usage() { LOG.info("Read ZK node's data, please do as following:"); LOG.info(ZkTool.class.getName() + " read zkpath"); LOG.info("\nDelete topology backup assignment, please do as following:"); LOG.info(ZkTool.class.getName() + " rm topologyname"); } public static String getData(DistributedClusterState zkClusterState, String path) throws Exception { byte[] data = zkClusterState.get_data(path, false); if (data == null || data.length == 0) { return null; } Object obj = Utils.deserialize(data, null); return obj.toString(); } public static void readData(String path) { DistributedClusterState zkClusterState = null; try { conf.put(Config.STORM_ZOOKEEPER_ROOT, "/"); zkClusterState = new DistributedClusterState(conf); String data = getData(zkClusterState, path); if (data == null) { LOG.info("No data of " + path); } StringBuilder sb = new StringBuilder(); sb.append("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n"); sb.append("Zk node " + path + "\n"); sb.append("Readable data:" + data + "\n"); sb.append("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n"); LOG.info(sb.toString()); } catch (Exception e) { if (zkClusterState == null) { LOG.error("Failed to connect ZK ", e); } else { LOG.error("Failed to read data " + path + "\n", e); } } finally { if (zkClusterState != null) { zkClusterState.close(); } } } public static void rmBakTopology(String topologyName) { DistributedClusterState zkClusterState = null; try { zkClusterState = new DistributedClusterState(conf); String path = ZkConstant.ASSIGNMENTS_BAK_SUBTREE; List<String> bakTopologys = zkClusterState .get_children(path, false); for (String tid : bakTopologys) { if (tid.equals(topologyName)) { LOG.info("Find backup " + topologyName); String topologyPath = assignment_bak_path(topologyName); zkClusterState.delete_node(topologyPath); LOG.info("Successfully delete topology " + topologyName + " backup Assignment"); return; } } LOG.info("No backup topology " + topologyName + " Assignment"); } catch (Exception e) { if (zkClusterState == null) { LOG.error("Failed to connect ZK ", e); } else { LOG.error("Failed to delete old topology " + topologyName + "\n", e); } } finally { if (zkClusterState != null) { zkClusterState.close(); } } } private static Map conf; /** * @param args * @throws Exception */ public static void main(String[] args) throws Exception { // TODO Auto-generated method stub if (args.length < 2) { LOG.info("Invalid parameter"); usage(); return; } conf = Utils.readStormConfig(); if (args[0].equalsIgnoreCase(READ_CMD)) { readData(args[1]); } else if (args[0].equalsIgnoreCase(RM_CMD)) { rmBakTopology(args[1]); } } /*******************************************************************/ public static String assignment_bak_path(String id) { return ZkConstant.ASSIGNMENTS_BAK_SUBTREE + ZkConstant.ZK_SEPERATOR + id; } @SuppressWarnings("rawtypes") public static ClusterState mk_distributed_cluster_state(Map _conf) throws Exception { return new DistributedClusterState(_conf); } public static Map<String, String> get_followers(ClusterState cluster_state) throws Exception { Map<String, String> ret = Maps.newHashMap(); List<String> followers = cluster_state.get_children( ZkConstant.NIMBUS_SLAVE_SUBTREE, false); if (followers == null || followers.size() == 0) { return ret; } for (String follower : followers) { if (follower != null) { String uptime = new String(cluster_state.get_data( ZkConstant.NIMBUS_SLAVE_SUBTREE + ZkConstant.ZK_SEPERATOR + follower, false)); ret.put(follower, uptime); } } return ret; } // public static List<String> get_follower_hosts(ClusterState cluster_state) // throws Exception { // List<String> followers = cluster_state.get_children( // ZkConstant.NIMBUS_SLAVE_SUBTREE, false); // if (followers == null || followers.size() == 0) { // return Lists.newArrayList(); // } // return followers; // } // // public static List<String> get_follower_hbs(ClusterState cluster_state) // throws Exception { // List<String> ret = Lists.newArrayList(); // List<String> followers = get_follower_hosts(cluster_state); // for (String follower : followers) { // ret.add(new String(cluster_state.get_data(ZkConstant.NIMBUS_SLAVE_SUBTREE // + ZkConstant.ZK_SEPERATOR + follower, false))); // } // return ret; // } }
{'content_hash': '158c1c1bb10f29441eaca5256b90b839', 'timestamp': '', 'source': 'github', 'line_count': 201, 'max_line_length': 77, 'avg_line_length': 26.393034825870647, 'alnum_prop': 0.6284637134778511, 'repo_name': 'irosariov/jstorm', 'id': '2d504d92d59b85b90ad43f3142a45039c4df52ba', 'size': '5305', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'jstorm-client-extension/src/main/java/com/alibaba/jstorm/zk/ZkTool.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'HTML', 'bytes': '58904'}, {'name': 'Java', 'bytes': '2517987'}, {'name': 'Python', 'bytes': '24613'}, {'name': 'Shell', 'bytes': '4129'}, {'name': 'Thrift', 'bytes': '10097'}]}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_19) on Fri Oct 29 16:39:40 MSD 2010 --> <TITLE> Picture (POI API Documentation) </TITLE> <META NAME="date" CONTENT="2010-10-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Picture (POI API Documentation)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Picture.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../org/apache/poi/sl/usermodel/Notes.html" title="interface in org.apache.poi.sl.usermodel"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../org/apache/poi/sl/usermodel/PictureData.html" title="interface in org.apache.poi.sl.usermodel"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/poi/sl/usermodel/Picture.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="Picture.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.apache.poi.sl.usermodel</FONT> <BR> Interface Picture</H2> <DL> <DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/apache/poi/sl/usermodel/Shape.html" title="interface in org.apache.poi.sl.usermodel">Shape</A>, <A HREF="../../../../../org/apache/poi/sl/usermodel/SimpleShape.html" title="interface in org.apache.poi.sl.usermodel">SimpleShape</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>Picture</B><DT>extends <A HREF="../../../../../org/apache/poi/sl/usermodel/SimpleShape.html" title="interface in org.apache.poi.sl.usermodel">SimpleShape</A></DL> </PRE> <P> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../org/apache/poi/sl/usermodel/PictureData.html" title="interface in org.apache.poi.sl.usermodel">PictureData</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/poi/sl/usermodel/Picture.html#getPictureData()">getPictureData</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_org.apache.poi.sl.usermodel.SimpleShape"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from interface org.apache.poi.sl.usermodel.<A HREF="../../../../../org/apache/poi/sl/usermodel/SimpleShape.html" title="interface in org.apache.poi.sl.usermodel">SimpleShape</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../org/apache/poi/sl/usermodel/SimpleShape.html#getFill()">getFill</A>, <A HREF="../../../../../org/apache/poi/sl/usermodel/SimpleShape.html#getHyperlink()">getHyperlink</A>, <A HREF="../../../../../org/apache/poi/sl/usermodel/SimpleShape.html#getLineStyle()">getLineStyle</A>, <A HREF="../../../../../org/apache/poi/sl/usermodel/SimpleShape.html#setHyperlink(org.apache.poi.sl.usermodel.Hyperlink)">setHyperlink</A></CODE></TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_org.apache.poi.sl.usermodel.Shape"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from interface org.apache.poi.sl.usermodel.<A HREF="../../../../../org/apache/poi/sl/usermodel/Shape.html" title="interface in org.apache.poi.sl.usermodel">Shape</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../org/apache/poi/sl/usermodel/Shape.html#getAnchor()">getAnchor</A>, <A HREF="../../../../../org/apache/poi/sl/usermodel/Shape.html#getParent()">getParent</A>, <A HREF="../../../../../org/apache/poi/sl/usermodel/Shape.html#getShapeType()">getShapeType</A>, <A HREF="../../../../../org/apache/poi/sl/usermodel/Shape.html#moveTo(float, float)">moveTo</A>, <A HREF="../../../../../org/apache/poi/sl/usermodel/Shape.html#setAnchor(java.awt.geom.Rectangle2D)">setAnchor</A></CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getPictureData()"><!-- --></A><H3> getPictureData</H3> <PRE> <A HREF="../../../../../org/apache/poi/sl/usermodel/PictureData.html" title="interface in org.apache.poi.sl.usermodel">PictureData</A> <B>getPictureData</B>()</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Picture.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../org/apache/poi/sl/usermodel/Notes.html" title="interface in org.apache.poi.sl.usermodel"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../org/apache/poi/sl/usermodel/PictureData.html" title="interface in org.apache.poi.sl.usermodel"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/poi/sl/usermodel/Picture.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="Picture.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <i>Copyright 2010 The Apache Software Foundation or its licensors, as applicable.</i> </BODY> </HTML>
{'content_hash': 'a9734b0b7af6577bd020e5e444d9fb21', 'timestamp': '', 'source': 'github', 'line_count': 233, 'max_line_length': 512, 'avg_line_length': 47.896995708154506, 'alnum_prop': 0.6112007168458782, 'repo_name': 'nimbleapps/export_to_spreadsheet', 'id': '9a36b30c5caa81c6a692ad6ffec39d1603e249c9', 'size': '11160', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/apache-poi/docs/apidocs/org/apache/poi/sl/usermodel/Picture.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '38183'}, {'name': 'JavaScript', 'bytes': '10610'}, {'name': 'Ruby', 'bytes': '62392'}]}
dojo.provide("dojox.grid.enhanced.plugins.exporter._ExportWriter"); //require Exporter here, so the implementations only need to require this file, //and the users only need to require the implementation file. dojo.require("dojox.grid.enhanced.plugins.Exporter"); dojo.declare("dojox.grid.enhanced.plugins.exporter._ExportWriter", null, { // summary: // This is an abstract class for all kinds of writers used in the Exporter plugin. // It utilizes the strategy pattern to break the export work into several stages, // and provide interfaces for all of them. // Implementations might choose some of the functions in this class to override, // thus providing their own functionalities. // The Exporter will go through the grid line by line. So in every line, all the Views // will be reached, and the header line is only handled once. // An *argObj* object is passed to most functions of this class. // It carries context arguments that make sense when they are called. /*===== argObj: { // grid: EnhancedGrid // The grid object we are now handling. grid: null, // isHeader: bool // Indicating which context we're handling, header or content. isHeader: true, // view: _View // Reference to the current _View object. view: null, // viewIdx: int // The index of the current _View object in the views array. // If the grid does not have any rowselector view, it conforms to the index // in the _ViewManager.views. viewIdx: -1, // subrow: _View.structure.cells[i] // Reference to the current subrow. // A subrow describe the innter structure of a row in a view, it's an array of cells subrow: null, // subrowIdx: int // The index of the current subrow in the subrow array: _View.structure.cells. subrowIdx: -1, // cell: dojox.grid.__CellDef // Reference to the current cell. cell: null, //cellIdx: int // The index of the current cell in the current subrow. // It's different from cell.index, which is the index in the whole line. cellIdx: -1, //row: item // The current row of data (logically), a.k.a.: current item. row: null, //rowIdx: int // The index of the current row (item). rowIdx: -1, // spCols: Array<int> // An array of special column indexes(flat,not regarding structure). // Special columns are typically attached to grid as a kind of UI facility // by the grid widget, instead of some real data. // For example, indirect selectors and row indexers. // Users can choose to export it or not. spCols: [], // colOffset: int // If the grid has a _RowSelector view or something else, this view will NOT be // passed to the user in argObj. So the column index (cell.index) will appear shifted // (start from 1 instead of 0). This colOffset is provided to remove this shift. // usage: // var correctColIndex = argObj.cell.index + argObj.colOffset; colOffset: 0 }, =====*/ constructor: function(/* object? */writerArgs){ // summary: // Writer initializations goes here. // writerArgs: object? // Any implementation of this class might accept a writerArgs object (optional), // which contains some writer-specific arguments given by the user. }, _getExportDataForCell: function(rowIndex, rowItem, cell, grid){ var data = (cell.get || grid.get).call(cell, rowIndex, rowItem); if(this.formatter){ return this.formatter(data, cell, rowIndex, rowItem); }else{ return data; } }, beforeHeader: function(/* EnhancedGrid */grid){ // summary: // We are going to start the travel in the grid. // Is there anything we should do now? // tags: // protected extension // return: // true: go on hanling the header row and then call afterHeader. // false: skip the header row, won't call afterHeader. return true; //Boolean }, afterHeader: function(){ // summary: // The header line has been handled. // tags: // protected extension // returns: // undefined }, beforeContent: function(/* Array */items){ // summary: // We are ready to go through all the contents(items). // tags: // protected extension // items: // All the items fetched from the store // return: // true: go on handling the contents and then call afterContent. // false: skip all the contents, won't call afterContent. return true; //Boolean }, afterContent: function(){ // summary: // We have finished the entire grid travel. // Do some clean up work if you need to. // tags: // protected extension // returns: // undefined }, beforeContentRow: function(/* object */argObj){ // summary: // Before handling a line of data (not header). // tags: // protected extension // argObj: // An object with at least the following context properties available: // { // grid,isHeader, // row,rowIdx, // spCols // } // return: // true: go on handling the current data row and then call afterContentRow. // false: skip the current data row, won't call afterContentRow. return true; //Boolean }, afterContentRow: function(/* object */argObj){ // summary: // After handling a line of data (not header). // tags: // protected extension // argObj: // An object with at least the following context properties available: // { // grid,isHeader, // row,rowIdx, // spCols // } // returns: // undefined }, beforeView: function(/* object */argObj){ // summary: // Before handling a view. // tags: // protected extension // argObj: // An object with at least the following context properties available: // { // grid,isHeader, // view,viewIdx, // spCols(if isHeader==false) // } // return: // true: go on handling the current view and then call afterView. // false: skip the current view, won't call afterView. return true; //Boolean }, afterView: function(/* object */argObj){ // summary: // After handling a view. // tags: // protected extension // argObj: // An object with at least the following context properties available: // { // grid,isHeader, // view,viewIdx, // spCols(if isHeader==false) // } // tags: // protected extension // returns: // undefined }, beforeSubrow: function(/* object */argObj){ // summary: // Before handling a subrow in a line (defined in the grid structure). // tags: // protected extension // argObj: // An object with at least the following context properties available: // { // grid,isHeader, // row,rowIdx, // view,viewIdx, // subrow,subrowIdx, // spCols(if isHeader==false) // } // return: // true: go on handling the current subrow and then call afterSubrow. // false: skip the current subrow, won't call afterSubrow. return true; //Boolean }, afterSubrow: function(/* object */argObj){ // summary: // Before handling a subrow in a line (defined in the grid structure). // tags: // protected extension // argObj: // An object with at least the following context properties available: // { // grid,isHeader, // row,rowIdx, // view,viewIdx, // subrow,subrowIdx, // spCols(if isHeader==false) // } // returns: // undefined }, handleCell: function(/* object */argObj){ // summary: // Handle a header cell or data cell. // tags: // protected extension // argObj: // An object with at least the following context properties available: // { // grid,isHeader, // row,rowIdx, // view,viewIdx, // subrow,subrowIdx, // cell,cellIdx, // spCols(if isHeader==false) // } // returns: // undefined }, toString: function(){ // summary: // Export to a string. // tags: // protected extension // returns: // The exported result string. return ''; //String } });
{'content_hash': '381db3d74f897139d16e68b9d9658ddf', 'timestamp': '', 'source': 'github', 'line_count': 267, 'max_line_length': 89, 'avg_line_length': 29.415730337078653, 'alnum_prop': 0.6543162719633308, 'repo_name': 'sulistionoadi/belajar-springmvc-dojo', 'id': '1c0feee4636ee80d525594fa4c2f903f879d6fbc', 'size': '7854', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'training-web/src/main/webapp/js/dojotoolkit/dojox/grid/enhanced/plugins/exporter/_ExportWriter.js', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'ActionScript', 'bytes': '21071'}, {'name': 'Groovy', 'bytes': '64'}, {'name': 'Java', 'bytes': '159748'}, {'name': 'JavaScript', 'bytes': '11238911'}, {'name': 'PHP', 'bytes': '560785'}, {'name': 'Perl', 'bytes': '282741'}, {'name': 'Racket', 'bytes': '156311'}, {'name': 'Ruby', 'bytes': '911'}, {'name': 'Scala', 'bytes': '1257'}, {'name': 'Shell', 'bytes': '14241'}, {'name': 'XQuery', 'bytes': '798'}]}
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>FST - Tobias Ortells</title> <meta name="description" content="Keep track of the statistics from Tobias Ortells. Average heat score, heat wins, heat wins percentage, epic heats road to the final"> <meta name="author" content=""> <link rel="apple-touch-icon" sizes="57x57" href="/favicon/apple-icon-57x57.png"> <link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-icon-60x60.png"> <link rel="apple-touch-icon" sizes="72x72" href="/favicon/apple-icon-72x72.png"> <link rel="apple-touch-icon" sizes="76x76" href="/favicon/apple-icon-76x76.png"> <link rel="apple-touch-icon" sizes="114x114" href="/favicon/apple-icon-114x114.png"> <link rel="apple-touch-icon" sizes="120x120" href="/favicon/apple-icon-120x120.png"> <link rel="apple-touch-icon" sizes="144x144" href="/favicon/apple-icon-144x144.png"> <link rel="apple-touch-icon" sizes="152x152" href="/favicon/apple-icon-152x152.png"> <link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-icon-180x180.png"> <link rel="icon" type="image/png" sizes="192x192" href="/favicon/android-icon-192x192.png"> <link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="96x96" href="/favicon/favicon-96x96.png"> <link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png"> <link rel="manifest" href="/manifest.json"> <meta name="msapplication-TileColor" content="#ffffff"> <meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> <meta name="theme-color" content="#ffffff"> <meta property="og:title" content="Fantasy Surfing tips"/> <meta property="og:image" content="https://fantasysurfingtips.com/img/just_waves.png"/> <meta property="og:description" content="See how great Tobias Ortells is surfing this year"/> <!-- Bootstrap Core CSS - Uses Bootswatch Flatly Theme: https://bootswatch.com/flatly/ --> <link href="https://fantasysurfingtips.com/css/bootstrap.css" rel="stylesheet"> <!-- Custom CSS --> <link href="https://fantasysurfingtips.com/css/freelancer.css" rel="stylesheet"> <link href="https://cdn.datatables.net/plug-ins/1.10.7/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet" /> <!-- Custom Fonts --> <link href="https://fantasysurfingtips.com/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css"> <script src="https://code.jquery.com/jquery-2.x-git.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-ujs/1.2.1/rails.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script> <script src="https://www.w3schools.com/lib/w3data.js"></script> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-2675412311042802", enable_page_level_ads: true }); </script> </head> <body> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <!-- Navigation --> <div w3-include-html="https://fantasysurfingtips.com/layout/header.html"></div> <!-- Header --> <div w3-include-html="https://fantasysurfingtips.com/layout/sponsor.html"></div> <section > <div class="container"> <div class="row"> <div class="col-sm-3 "> <div class="col-sm-2 "> </div> <div class="col-sm-8 "> <!-- <img src="http://fantasysurfingtips.com/img/surfers/torte.png" class="img-responsive" alt=""> --> <h3 style="text-align:center;">Tobias Ortells</h3> <a href="https://twitter.com/share" class="" data-via="fansurfingtips"><i class="fa fa-twitter"></i> Share on Twitter</i></a> <br/> <a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Ffantasysurfingtips.com%2Fsurfers%2Ftorte&amp;src=sdkpreparse"><i class="fa fa-facebook"></i> Share on Facebook</a> </div> <div class="col-sm-2 "> </div> </div> <div class="col-sm-3 portfolio-item"> </div> <div class="col-sm-3 portfolio-item"> <h6 style="text-align:center;">Avg Heat Score (FST DATA)</h6> <h1 style="text-align:center;">7.88</h1> </div> </div> <hr/> <h4 style="text-align:center;" >Competitions</h4> <hr/> <h4 style="text-align:center;" >Heat Stats (FST data)</h4> <div class="row"> <div class="col-sm-4 portfolio-item"> <h6 style="text-align:center;">Heats</h6> <h2 style="text-align:center;">2</h2> </div> <div class="col-sm-4 portfolio-item"> <h6 style="text-align:center;">Heat wins</h6> <h2 style="text-align:center;">0</h2> </div> <div class="col-sm-4 portfolio-item"> <h6 style="text-align:center;">HEAT WINS PERCENTAGE</h6> <h2 style="text-align:center;">0.0%</h2> </div> </div> <hr/> <h4 style="text-align:center;">Avg Heat Score progression</h4> <div id="avg_chart" style="height: 250px;"></div> <hr/> <h4 style="text-align:center;">Heat stats progression</h4> <div id="heat_chart" style="height: 250px;"></div> <hr/> <style type="text/css"> .heats-all{ z-index: 3; margin-left: 5px; cursor: pointer; } </style> <div class="container"> <div id="disqus_thread"></div> <script> /** * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/ var disqus_config = function () { this.page.url = "http://fantasysurfingtips.com/surfers/torte"; // Replace PAGE_URL with your page's canonical URL variable this.page.identifier = '2481'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable }; (function() { // DON'T EDIT BELOW THIS LINE var d = document, s = d.createElement('script'); s.src = '//fantasysurfingtips.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> </div> </section> <script type="text/javascript"> $('.heats-all').click(function(){ $('.heats-all-stat').css('display', 'none') $('#'+$(this).attr('id')+'-stat').css('display', 'block') }); $('.heats-2016').click(function(){ $('.heats-2016-stat').css('display', 'none') $('#'+$(this).attr('id')+'-stat').css('display', 'block') }); $('document').ready(function(){ new Morris.Line({ // ID of the element in which to draw the chart. element: 'avg_chart', // Chart data records -- each entry in this array corresponds to a point on // the chart. data: [], // The name of the data record attribute that contains x-values. xkey: 'year', // A list of names of data record attributes that contain y-values. ykeys: ['avg', 'avg_all'], // Labels for the ykeys -- will be displayed when you hover over the // chart. labels: ['Avg score in year', 'Avg score FST DATA'] }); new Morris.Bar({ // ID of the element in which to draw the chart. element: 'heat_chart', // Chart data records -- each entry in this array corresponds to a point on // the chart. data: [], // The name of the data record attribute that contains x-values. xkey: 'year', // A list of names of data record attributes that contain y-values. ykeys: ['heats', 'wins', 'percs'], // Labels for the ykeys -- will be displayed when you hover over the // chart. labels: ['Heats surfed', 'Heats won', 'Winning percentage'] }); }); </script> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> <!-- Footer --> <div w3-include-html="https://fantasysurfingtips.com/layout/footer.html"></div> <script type="text/javascript"> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-74337819-1', 'auto'); // Replace with your property ID. ga('send', 'pageview'); </script> <script> w3IncludeHTML(); </script> <!-- jQuery --> <script src="https://fantasysurfingtips.com/js/jquery.js"></script> <script src="https://cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script> <!-- Bootstrap Core JavaScript --> <script src="https://fantasysurfingtips.com/js/bootstrap.min.js"></script> <!-- Plugin JavaScript --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> <script src="https://fantasysurfingtips.com/js/classie.js"></script> <script src="https://fantasysurfingtips.com/js/cbpAnimatedHeader.js"></script> <!-- Contact Form JavaScript --> <script src="https://fantasysurfingtips.com/js/jqBootstrapValidation.js"></script> <script src="https://fantasysurfingtips.com/js/contact_me.js"></script> <!-- Custom Theme JavaScript --> <script src="https://fantasysurfingtips.com/js/freelancer.js"></script> <script type="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script> <script type="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script> </body> </html>
{'content_hash': '591cec1eaa6d0733982f15ce4f1467c5', 'timestamp': '', 'source': 'github', 'line_count': 286, 'max_line_length': 295, 'avg_line_length': 39.31818181818182, 'alnum_prop': 0.63121387283237, 'repo_name': 'chicofilho/fst', 'id': '32c1b85ba3cb82a2de66255f5f471b87feae3e96', 'size': '11245', 'binary': False, 'copies': '1', 'ref': 'refs/heads/gh-pages', 'path': 'surfers/mjun/torte.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '25157'}, {'name': 'HTML', 'bytes': '114679577'}, {'name': 'JavaScript', 'bytes': '43263'}, {'name': 'PHP', 'bytes': '1097'}]}
using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel; namespace Blog.Models { public class EditUserViewModel { public ApplicationUser User { get; set; } public string Password { get; set; } [DisplayName("Confirm Password")] [Compare("Password", ErrorMessage = "Password does not match.")] public string ConfirmPassword { get; set; } public IList<Role> Roles { get; set; } } }
{'content_hash': '19cd3b3191b184901d8a0bb605a69eb1', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 72, 'avg_line_length': 24.8, 'alnum_prop': 0.6653225806451613, 'repo_name': 'PeUzunov/QA-Automation-Team-Project', 'id': 'cbd29fa1fecd4a2e8f75e4a469555acc13806201', 'size': '498', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'Team Papaya/Blog/Models/EditUserViewModel.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '95'}, {'name': 'C#', 'bytes': '197929'}, {'name': 'HTML', 'bytes': '7027'}, {'name': 'JavaScript', 'bytes': '292403'}, {'name': 'Pascal', 'bytes': '863'}, {'name': 'PowerShell', 'bytes': '140094'}]}
<html> <head> <title>Mozilla/5.0 (Linux; Android 4.3; GT-I9500 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.136 Mobile Safari/537.36</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> </head> <body> <div class="container"> <div class="section"> <h1 class="header center orange-text">User agent detail</h1> <div class="row center"> Mozilla/5.0 (Linux; Android 4.3; GT-I9500 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.136 Mobile Safari/537.36 <p> Detected by 8 of 8 providers<br /> As bot detected by 0 of 7 </p> </div> </div> <div class="section"> <table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Actions</th></tr><tr><td>BrowscapPhp<br /><small>6011</small></td><td>Chrome 33.0</td><td>Blink </td><td>Android 4.3</td><td>Samsung</td><td>Galaxy S4</td><td>Mobile Phone</td><td>yes</td><td>yes</td><td></td><td></td><td></td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-cbfe2df3-330b-4abd-b5df-0ca181549ca9">Detail</a> <!-- Modal Structure --> <div id="modal-cbfe2df3-330b-4abd-b5df-0ca181549ca9" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapPhp result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.4\.3.*gt\-i9500 build\/.*\) applewebkit\/.* \(khtml, like gecko\) chrome\/33\..*safari\/.*$/ [browser_name_pattern] => mozilla/5.0 (*linux*android?4.3*gt-i9500 build/*) applewebkit/* (khtml, like gecko) chrome/33.*safari/* [parent] => Chrome 33.0 for Android [comment] => Chrome 33.0 [browser] => Chrome [browser_type] => Browser [browser_bits] => 32 [browser_maker] => Google Inc [browser_modus] => unknown [version] => 33.0 [majorver] => 33 [minorver] => 0 [platform] => Android [platform_version] => 4.3 [platform_description] => Android OS [platform_bits] => 32 [platform_maker] => Google Inc [alpha] => [beta] => [win16] => [win32] => [win64] => [frames] => 1 [iframes] => 1 [tables] => 1 [cookies] => 1 [backgroundsounds] => [javascript] => 1 [vbscript] => [javaapplets] => [activexcontrols] => [ismobiledevice] => 1 [istablet] => [issyndicationreader] => [crawler] => [cssversion] => 3 [aolversion] => 0 [device_name] => Galaxy S4 [device_maker] => Samsung [device_type] => Mobile Phone [device_pointing_method] => touchscreen [device_code_name] => GT-I9500 [device_brand_name] => Samsung [renderingengine_name] => Blink [renderingengine_version] => unknown [renderingengine_description] => a WebKit Fork by Google [renderingengine_maker] => Google Inc ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>DonatjUAParser<br /><small>v0.5.0</small></td><td>Chrome 33.0.1750.136</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-6fae891b-b0d5-4415-b07d-355015c3af67">Detail</a> <!-- Modal Structure --> <div id="modal-6fae891b-b0d5-4415-b07d-355015c3af67" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>DonatjUAParser result detail</h4> <p><pre><code class="php">Array ( [platform] => Android [browser] => Chrome [version] => 33.0.1750.136 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>PiwikDeviceDetector<br /><small>3.5.1</small></td><td>Chrome Mobile 33.0</td><td>Blink </td><td>Android 4.3</td><td>Samsung</td><td>GT-I9500</td><td>smartphone</td><td>yes</td><td></td><td></td><td></td><td></td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-fc0f1b55-50d8-49c2-bb12-4cc1d8144ebf">Detail</a> <!-- Modal Structure --> <div id="modal-fc0f1b55-50d8-49c2-bb12-4cc1d8144ebf" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>PiwikDeviceDetector result detail</h4> <p><pre><code class="php">Array ( [client] => Array ( [type] => browser [name] => Chrome Mobile [short_name] => CM [version] => 33.0 [engine] => Blink ) [operatingSystem] => Array ( [name] => Android [short_name] => AND [version] => 4.3 [platform] => ) [device] => Array ( [brand] => SA [brandName] => Samsung [model] => GT-I9500 [device] => 1 [deviceName] => smartphone ) [bot] => [extra] => Array ( [isBot] => [isBrowser] => 1 [isFeedReader] => [isMobileApp] => [isPIM] => [isLibrary] => [isMediaPlayer] => [isCamera] => [isCarBrowser] => [isConsole] => [isFeaturePhone] => [isPhablet] => [isPortableMediaPlayer] => [isSmartDisplay] => [isSmartphone] => 1 [isTablet] => [isTV] => [isDesktop] => [isMobile] => 1 [isTouchEnabled] => ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.0</small></td><td>Chrome 33.0.1750.136</td><td><i class="material-icons">close</i></td><td>Android 4.3</td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-8c08f104-4e61-421b-9405-291b09c383dc">Detail</a> <!-- Modal Structure --> <div id="modal-8c08f104-4e61-421b-9405-291b09c383dc" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>SinergiBrowserDetector result detail</h4> <p><pre><code class="php">Array ( [browser] => Sinergi\BrowserDetector\Browser Object ( [userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; Android 4.3; GT-I9500 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.136 Mobile Safari/537.36 ) [name:Sinergi\BrowserDetector\Browser:private] => Chrome [version:Sinergi\BrowserDetector\Browser:private] => 33.0.1750.136 [isRobot:Sinergi\BrowserDetector\Browser:private] => [isChromeFrame:Sinergi\BrowserDetector\Browser:private] => ) [operatingSystem] => Sinergi\BrowserDetector\Os Object ( [name:Sinergi\BrowserDetector\Os:private] => Android [version:Sinergi\BrowserDetector\Os:private] => 4.3 [isMobile:Sinergi\BrowserDetector\Os:private] => 1 [userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; Android 4.3; GT-I9500 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.136 Mobile Safari/537.36 ) ) [device] => Sinergi\BrowserDetector\Device Object ( [name:Sinergi\BrowserDetector\Device:private] => unknown [userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; Android 4.3; GT-I9500 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.136 Mobile Safari/537.36 ) ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UAParser<br /><small>v3.4.5</small></td><td>Chrome Mobile 33.0.1750</td><td><i class="material-icons">close</i></td><td>Android 4.3</td><td>Samsung</td><td>GT-I9500</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td></td><td></td><td><i class="material-icons">close</i></td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-8f4c86c5-433e-4536-b799-ad26d77264e0">Detail</a> <!-- Modal Structure --> <div id="modal-8f4c86c5-433e-4536-b799-ad26d77264e0" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UAParser result detail</h4> <p><pre><code class="php">UAParser\Result\Client Object ( [ua] => UAParser\Result\UserAgent Object ( [major] => 33 [minor] => 0 [patch] => 1750 [family] => Chrome Mobile ) [os] => UAParser\Result\OperatingSystem Object ( [major] => 4 [minor] => 3 [patch] => [patchMinor] => [family] => Android ) [device] => UAParser\Result\Device Object ( [brand] => Samsung [model] => GT-I9500 [family] => Samsung GT-I9500 ) [originalUserAgent] => Mozilla/5.0 (Linux; Android 4.3; GT-I9500 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.136 Mobile Safari/537.36 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhichBrowser<br /><small>2.0.9</small></td><td>Chrome 33</td><td>Blink 537.36</td><td>Android 4.3</td><td>Samsung</td><td>Galaxy S4</td><td>mobile:smart</td><td>yes</td><td><i class="material-icons">close</i></td><td></td><td></td><td><i class="material-icons">close</i></td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-62f1f3a3-0c44-4ecb-9ee2-48145e35736b">Detail</a> <!-- Modal Structure --> <div id="modal-62f1f3a3-0c44-4ecb-9ee2-48145e35736b" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhichBrowser result detail</h4> <p><pre><code class="php">Array ( [browser] => Array ( [name] => Chrome [version] => 33 [type] => browser ) [engine] => Array ( [name] => Blink [version] => 537.36 ) [os] => Array ( [name] => Android [version] => 4.3 ) [device] => Array ( [type] => mobile [subtype] => smart [manufacturer] => Samsung [model] => Galaxy S4 ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Woothee<br /><small>v1.2.0</small></td><td>Chrome 33.0.1750.136</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>smartphone</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td></td><td></td><td><i class="material-icons">close</i></td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-bd437f52-91e9-4ce8-88f7-6e5206ed6635">Detail</a> <!-- Modal Structure --> <div id="modal-bd437f52-91e9-4ce8-88f7-6e5206ed6635" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Woothee result detail</h4> <p><pre><code class="php">Array ( [name] => Chrome [vendor] => Google [version] => 33.0.1750.136 [category] => smartphone [os] => Android [os_version] => 4.3 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Wurfl<br /><small>1.6.4</small></td><td>Chrome Mobile 33</td><td><i class="material-icons">close</i></td><td>Android 4.3</td><td>Samsung</td><td>GT-I9500</td><td>Smartphone</td><td>yes</td><td>yes</td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-3a72b31e-c3c1-4317-a357-7a6d5e3c7027">Detail</a> <!-- Modal Structure --> <div id="modal-3a72b31e-c3c1-4317-a357-7a6d5e3c7027" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Wurfl result detail</h4> <p><pre><code class="php">Array ( [virtual] => Array ( [is_android] => true [is_ios] => false [is_windows_phone] => false [is_app] => false [is_full_desktop] => false [is_largescreen] => true [is_mobile] => true [is_robot] => false [is_smartphone] => true [is_touchscreen] => true [is_wml_preferred] => false [is_xhtmlmp_preferred] => false [is_html_preferred] => true [advertised_device_os] => Android [advertised_device_os_version] => 4.3 [advertised_browser] => Chrome Mobile [advertised_browser_version] => 33 [complete_device_name] => Samsung GT-I9500 (Galaxy S4) [form_factor] => Smartphone [is_phone] => true [is_app_webview] => false ) [all] => Array ( [brand_name] => Samsung [model_name] => GT-I9500 [unique] => true [ununiqueness_handler] => [is_wireless_device] => true [device_claims_web_support] => true [has_qwerty_keyboard] => true [can_skip_aligned_link_row] => true [uaprof] => http://wap.samsungmobile.com/uaprof/GT-I9500.xml [uaprof2] => [uaprof3] => [nokia_series] => 0 [nokia_edition] => 0 [device_os] => Android [mobile_browser] => Android Webkit [mobile_browser_version] => [device_os_version] => 4.3 [pointing_method] => touchscreen [release_date] => 2013_march [marketing_name] => Galaxy S4 [model_extra_info] => [nokia_feature_pack] => 0 [can_assign_phone_number] => true [is_tablet] => false [manufacturer_name] => [is_bot] => false [is_google_glass] => false [proportional_font] => false [built_in_back_button_support] => false [card_title_support] => true [softkey_support] => false [table_support] => true [numbered_menus] => false [menu_with_select_element_recommended] => false [menu_with_list_of_links_recommended] => true [icons_on_menu_items_support] => false [break_list_of_links_with_br_element_recommended] => true [access_key_support] => false [wrap_mode_support] => false [times_square_mode_support] => false [deck_prefetch_support] => false [elective_forms_recommended] => true [wizards_recommended] => false [image_as_link_support] => false [insert_br_element_after_widget_recommended] => false [wml_can_display_images_and_text_on_same_line] => false [wml_displays_image_in_center] => false [opwv_wml_extensions_support] => false [wml_make_phone_call_string] => wtai://wp/mc; [chtml_display_accesskey] => false [emoji] => false [chtml_can_display_images_and_text_on_same_line] => false [chtml_displays_image_in_center] => false [imode_region] => none [chtml_make_phone_call_string] => tel: [chtml_table_support] => false [xhtml_honors_bgcolor] => true [xhtml_supports_forms_in_table] => true [xhtml_support_wml2_namespace] => false [xhtml_autoexpand_select] => false [xhtml_select_as_dropdown] => false [xhtml_select_as_radiobutton] => false [xhtml_select_as_popup] => false [xhtml_display_accesskey] => false [xhtml_supports_invisible_text] => false [xhtml_supports_inline_input] => false [xhtml_supports_monospace_font] => false [xhtml_supports_table_for_layout] => true [xhtml_supports_css_cell_table_coloring] => true [xhtml_format_as_css_property] => false [xhtml_format_as_attribute] => false [xhtml_nowrap_mode] => false [xhtml_marquee_as_css_property] => false [xhtml_readable_background_color1] => #FFFFFF [xhtml_readable_background_color2] => #FFFFFF [xhtml_allows_disabled_form_elements] => true [xhtml_document_title_support] => true [xhtml_preferred_charset] => iso-8859-1 [opwv_xhtml_extensions_support] => false [xhtml_make_phone_call_string] => tel: [xhtmlmp_preferred_mime_type] => text/html [xhtml_table_support] => true [xhtml_send_sms_string] => sms: [xhtml_send_mms_string] => mms: [xhtml_file_upload] => supported [cookie_support] => true [accept_third_party_cookie] => true [xhtml_supports_iframe] => full [xhtml_avoid_accesskeys] => true [xhtml_can_embed_video] => none [ajax_support_javascript] => true [ajax_manipulate_css] => true [ajax_support_getelementbyid] => true [ajax_support_inner_html] => true [ajax_xhr_type] => standard [ajax_manipulate_dom] => true [ajax_support_events] => true [ajax_support_event_listener] => true [ajax_preferred_geoloc_api] => w3c_api [xhtml_support_level] => 4 [preferred_markup] => html_web_4_0 [wml_1_1] => false [wml_1_2] => false [wml_1_3] => false [html_wi_w3_xhtmlbasic] => true [html_wi_oma_xhtmlmp_1_0] => true [html_wi_imode_html_1] => false [html_wi_imode_html_2] => false [html_wi_imode_html_3] => false [html_wi_imode_html_4] => false [html_wi_imode_html_5] => false [html_wi_imode_htmlx_1] => false [html_wi_imode_htmlx_1_1] => false [html_wi_imode_compact_generic] => false [html_web_3_2] => true [html_web_4_0] => true [voicexml] => false [multipart_support] => false [total_cache_disable_support] => false [time_to_live_support] => false [resolution_width] => 1080 [resolution_height] => 1920 [columns] => 60 [max_image_width] => 360 [max_image_height] => 640 [rows] => 40 [physical_screen_width] => 63 [physical_screen_height] => 111 [dual_orientation] => true [density_class] => 3.0 [wbmp] => true [bmp] => false [epoc_bmp] => false [gif_animated] => false [jpg] => true [png] => true [tiff] => false [transparent_png_alpha] => true [transparent_png_index] => true [svgt_1_1] => true [svgt_1_1_plus] => false [greyscale] => false [gif] => true [colors] => 65536 [webp_lossy_support] => true [webp_lossless_support] => true [post_method_support] => true [basic_authentication_support] => true [empty_option_value_support] => true [emptyok] => false [nokia_voice_call] => false [wta_voice_call] => false [wta_phonebook] => false [wta_misc] => false [wta_pdc] => false [https_support] => true [phone_id_provided] => false [max_data_rate] => 42000 [wifi] => true [sdio] => false [vpn] => false [has_cellular_radio] => true [max_deck_size] => 2000000 [max_url_length_in_requests] => 256 [max_url_length_homepage] => 0 [max_url_length_bookmark] => 0 [max_url_length_cached_page] => 0 [max_no_of_connection_settings] => 0 [max_no_of_bookmarks] => 0 [max_length_of_username] => 0 [max_length_of_password] => 0 [max_object_size] => 0 [downloadfun_support] => false [directdownload_support] => true [inline_support] => false [oma_support] => true [ringtone] => false [ringtone_3gpp] => false [ringtone_midi_monophonic] => false [ringtone_midi_polyphonic] => false [ringtone_imelody] => false [ringtone_digiplug] => false [ringtone_compactmidi] => false [ringtone_mmf] => false [ringtone_rmf] => false [ringtone_xmf] => false [ringtone_amr] => false [ringtone_awb] => false [ringtone_aac] => false [ringtone_wav] => false [ringtone_mp3] => false [ringtone_spmidi] => false [ringtone_qcelp] => false [ringtone_voices] => 1 [ringtone_df_size_limit] => 0 [ringtone_directdownload_size_limit] => 0 [ringtone_inline_size_limit] => 0 [ringtone_oma_size_limit] => 0 [wallpaper] => false [wallpaper_max_width] => 0 [wallpaper_max_height] => 0 [wallpaper_preferred_width] => 0 [wallpaper_preferred_height] => 0 [wallpaper_resize] => none [wallpaper_wbmp] => false [wallpaper_bmp] => false [wallpaper_gif] => false [wallpaper_jpg] => false [wallpaper_png] => false [wallpaper_tiff] => false [wallpaper_greyscale] => false [wallpaper_colors] => 2 [wallpaper_df_size_limit] => 0 [wallpaper_directdownload_size_limit] => 0 [wallpaper_inline_size_limit] => 0 [wallpaper_oma_size_limit] => 0 [screensaver] => false [screensaver_max_width] => 0 [screensaver_max_height] => 0 [screensaver_preferred_width] => 0 [screensaver_preferred_height] => 0 [screensaver_resize] => none [screensaver_wbmp] => false [screensaver_bmp] => false [screensaver_gif] => false [screensaver_jpg] => false [screensaver_png] => false [screensaver_greyscale] => false [screensaver_colors] => 2 [screensaver_df_size_limit] => 0 [screensaver_directdownload_size_limit] => 0 [screensaver_inline_size_limit] => 0 [screensaver_oma_size_limit] => 0 [picture] => false [picture_max_width] => 0 [picture_max_height] => 0 [picture_preferred_width] => 0 [picture_preferred_height] => 0 [picture_resize] => none [picture_wbmp] => false [picture_bmp] => false [picture_gif] => false [picture_jpg] => false [picture_png] => false [picture_greyscale] => false [picture_colors] => 2 [picture_df_size_limit] => 0 [picture_directdownload_size_limit] => 0 [picture_inline_size_limit] => 0 [picture_oma_size_limit] => 0 [video] => false [oma_v_1_0_forwardlock] => false [oma_v_1_0_combined_delivery] => false [oma_v_1_0_separate_delivery] => false [streaming_video] => true [streaming_3gpp] => true [streaming_mp4] => true [streaming_mov] => false [streaming_video_size_limit] => 0 [streaming_real_media] => none [streaming_flv] => false [streaming_3g2] => false [streaming_vcodec_h263_0] => 10 [streaming_vcodec_h263_3] => -1 [streaming_vcodec_mpeg4_sp] => 2 [streaming_vcodec_mpeg4_asp] => -1 [streaming_vcodec_h264_bp] => 3.0 [streaming_acodec_amr] => nb [streaming_acodec_aac] => lc [streaming_wmv] => none [streaming_preferred_protocol] => rtsp [streaming_preferred_http_protocol] => apple_live_streaming [wap_push_support] => false [connectionless_service_indication] => false [connectionless_service_load] => false [connectionless_cache_operation] => false [connectionoriented_unconfirmed_service_indication] => false [connectionoriented_unconfirmed_service_load] => false [connectionoriented_unconfirmed_cache_operation] => false [connectionoriented_confirmed_service_indication] => false [connectionoriented_confirmed_service_load] => false [connectionoriented_confirmed_cache_operation] => false [utf8_support] => true [ascii_support] => false [iso8859_support] => false [expiration_date] => false [j2me_cldc_1_0] => false [j2me_cldc_1_1] => false [j2me_midp_1_0] => false [j2me_midp_2_0] => false [doja_1_0] => false [doja_1_5] => false [doja_2_0] => false [doja_2_1] => false [doja_2_2] => false [doja_3_0] => false [doja_3_5] => false [doja_4_0] => false [j2me_jtwi] => false [j2me_mmapi_1_0] => false [j2me_mmapi_1_1] => false [j2me_wmapi_1_0] => false [j2me_wmapi_1_1] => false [j2me_wmapi_2_0] => false [j2me_btapi] => false [j2me_3dapi] => false [j2me_locapi] => false [j2me_nokia_ui] => false [j2me_motorola_lwt] => false [j2me_siemens_color_game] => false [j2me_siemens_extension] => false [j2me_heap_size] => 0 [j2me_max_jar_size] => 0 [j2me_storage_size] => 0 [j2me_max_record_store_size] => 0 [j2me_screen_width] => 0 [j2me_screen_height] => 0 [j2me_canvas_width] => 0 [j2me_canvas_height] => 0 [j2me_bits_per_pixel] => 0 [j2me_audio_capture_enabled] => false [j2me_video_capture_enabled] => false [j2me_photo_capture_enabled] => false [j2me_capture_image_formats] => none [j2me_http] => false [j2me_https] => false [j2me_socket] => false [j2me_udp] => false [j2me_serial] => false [j2me_gif] => false [j2me_gif89a] => false [j2me_jpg] => false [j2me_png] => false [j2me_bmp] => false [j2me_bmp3] => false [j2me_wbmp] => false [j2me_midi] => false [j2me_wav] => false [j2me_amr] => false [j2me_mp3] => false [j2me_mp4] => false [j2me_imelody] => false [j2me_rmf] => false [j2me_au] => false [j2me_aac] => false [j2me_realaudio] => false [j2me_xmf] => false [j2me_wma] => false [j2me_3gpp] => false [j2me_h263] => false [j2me_svgt] => false [j2me_mpeg4] => false [j2me_realvideo] => false [j2me_real8] => false [j2me_realmedia] => false [j2me_left_softkey_code] => 0 [j2me_right_softkey_code] => 0 [j2me_middle_softkey_code] => 0 [j2me_select_key_code] => 0 [j2me_return_key_code] => 0 [j2me_clear_key_code] => 0 [j2me_datefield_no_accepts_null_date] => false [j2me_datefield_broken] => false [receiver] => false [sender] => false [mms_max_size] => 0 [mms_max_height] => 0 [mms_max_width] => 0 [built_in_recorder] => false [built_in_camera] => true [mms_jpeg_baseline] => false [mms_jpeg_progressive] => false [mms_gif_static] => false [mms_gif_animated] => false [mms_png] => false [mms_bmp] => false [mms_wbmp] => false [mms_amr] => false [mms_wav] => false [mms_midi_monophonic] => false [mms_midi_polyphonic] => false [mms_midi_polyphonic_voices] => 0 [mms_spmidi] => false [mms_mmf] => false [mms_mp3] => false [mms_evrc] => false [mms_qcelp] => false [mms_ota_bitmap] => false [mms_nokia_wallpaper] => false [mms_nokia_operatorlogo] => false [mms_nokia_3dscreensaver] => false [mms_nokia_ringingtone] => false [mms_rmf] => false [mms_xmf] => false [mms_symbian_install] => false [mms_jar] => false [mms_jad] => false [mms_vcard] => false [mms_vcalendar] => false [mms_wml] => false [mms_wbxml] => false [mms_wmlc] => false [mms_video] => false [mms_mp4] => false [mms_3gpp] => false [mms_3gpp2] => false [mms_max_frame_rate] => 0 [nokiaring] => false [picturemessage] => false [operatorlogo] => false [largeoperatorlogo] => false [callericon] => false [nokiavcard] => false [nokiavcal] => false [sckl_ringtone] => false [sckl_operatorlogo] => false [sckl_groupgraphic] => false [sckl_vcard] => false [sckl_vcalendar] => false [text_imelody] => false [ems] => false [ems_variablesizedpictures] => false [ems_imelody] => false [ems_odi] => false [ems_upi] => false [ems_version] => 0 [siemens_ota] => false [siemens_logo_width] => 101 [siemens_logo_height] => 29 [siemens_screensaver_width] => 101 [siemens_screensaver_height] => 50 [gprtf] => false [sagem_v1] => false [sagem_v2] => false [panasonic] => false [sms_enabled] => true [wav] => false [mmf] => false [smf] => false [mld] => false [midi_monophonic] => false [midi_polyphonic] => false [sp_midi] => false [rmf] => false [xmf] => false [compactmidi] => false [digiplug] => false [nokia_ringtone] => false [imelody] => false [au] => false [amr] => false [awb] => false [aac] => true [mp3] => true [voices] => 1 [qcelp] => false [evrc] => false [flash_lite_version] => [fl_wallpaper] => false [fl_screensaver] => false [fl_standalone] => false [fl_browser] => false [fl_sub_lcd] => false [full_flash_support] => false [css_supports_width_as_percentage] => true [css_border_image] => webkit [css_rounded_corners] => webkit [css_gradient] => none [css_spriting] => true [css_gradient_linear] => none [is_transcoder] => false [transcoder_ua_header] => user-agent [rss_support] => false [pdf_support] => true [progressive_download] => true [playback_vcodec_h263_0] => 10 [playback_vcodec_h263_3] => -1 [playback_vcodec_mpeg4_sp] => 0 [playback_vcodec_mpeg4_asp] => -1 [playback_vcodec_h264_bp] => 3.0 [playback_real_media] => none [playback_3gpp] => true [playback_3g2] => false [playback_mp4] => true [playback_mov] => false [playback_acodec_amr] => nb [playback_acodec_aac] => none [playback_df_size_limit] => 0 [playback_directdownload_size_limit] => 0 [playback_inline_size_limit] => 0 [playback_oma_size_limit] => 0 [playback_acodec_qcelp] => false [playback_wmv] => none [hinted_progressive_download] => true [html_preferred_dtd] => html4 [viewport_supported] => true [viewport_width] => device_width_token [viewport_userscalable] => no [viewport_initial_scale] => [viewport_maximum_scale] => [viewport_minimum_scale] => [mobileoptimized] => false [handheldfriendly] => false [canvas_support] => full [image_inlining] => true [is_smarttv] => false [is_console] => false [nfc_support] => true [ux_full_desktop] => false [jqm_grade] => A [is_sencha_touch_ok] => false [controlcap_is_smartphone] => default [controlcap_is_ios] => default [controlcap_is_android] => default [controlcap_is_robot] => default [controlcap_is_app] => default [controlcap_advertised_device_os] => default [controlcap_advertised_device_os_version] => default [controlcap_advertised_browser] => default [controlcap_advertised_browser_version] => default [controlcap_is_windows_phone] => default [controlcap_is_full_desktop] => default [controlcap_is_largescreen] => default [controlcap_is_mobile] => default [controlcap_is_touchscreen] => default [controlcap_is_wml_preferred] => default [controlcap_is_xhtmlmp_preferred] => default [controlcap_is_html_preferred] => default [controlcap_form_factor] => default [controlcap_complete_device_name] => default ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr></table> </div> <div class="section"> <h1 class="header center orange-text">About this comparison</h1> <div class="row center"> <h5 class="header light"> The primary goal of this project is simple<br /> I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br /> <br /> The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br /> <br /> You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br /> <br /> The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a> </h5> </div> </div> <div class="card"> <div class="card-content"> Comparison created <i>2016-01-26 16:42:02</i> | by <a href="https://github.com/ThaDafinser">ThaDafinser</a> </div> </div> </div> <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.1.1/list.min.js"></script> <script> $(document).ready(function(){ // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered $('.modal-trigger').leanModal(); }); </script> </body> </html>
{'content_hash': '95d2e93acef16e766f8a54991777a3c2', 'timestamp': '', 'source': 'github', 'line_count': 975, 'max_line_length': 553, 'avg_line_length': 40.098461538461535, 'alnum_prop': 0.5228667894413751, 'repo_name': 'ThaDafinser/UserAgentParserComparison', 'id': 'efb6b8cc15f80ff6676c508b8431609146e1fcde', 'size': '39097', 'binary': False, 'copies': '1', 'ref': 'refs/heads/gh-pages', 'path': 'v3/user-agent-detail/49/2e/492e5538-6c31-4ee7-b550-cbb481781fa6.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '2060859160'}]}
package org.apache.sling.engine.impl.parameters; import java.io.File; import java.util.Dictionary; import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Deactivate; import org.apache.felix.scr.annotations.Property; import org.apache.felix.scr.annotations.Reference; import org.apache.sling.commons.osgi.PropertiesUtil; import org.apache.sling.settings.SlingSettingsService; import org.osgi.service.component.ComponentContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Component( metatype = true, name = RequestParameterSupportConfigurer.PID, label = "Apache Sling Request Parameter Handling", description = "Configures Sling's request parameter handling.") public class RequestParameterSupportConfigurer { static final String PID = "org.apache.sling.engine.parameters"; /** default log */ private final Logger log = LoggerFactory.getLogger(PID); @Property( value = Util.ENCODING_DIRECT, label = "Default Parameter Encoding", description = "The default request parameter encoding used to decode request " + "parameters into strings. If this property is not set the default encoding " + "is 'ISO-8859-1' as mandated by the Servlet API spec. This default encoding " + "is used if the '_charset_' request parameter is not set to another " + "(supported) character encoding. Applications being sure to always use the " + "same encoding (e.g. UTF-8) can set this default here and may omit the " + "'_charset_' request parameter") private static final String PROP_FIX_ENCODING = "sling.default.parameter.encoding"; @Property( intValue = ParameterMap.DEFAULT_MAX_PARAMS, label = "Maximum POST Parameters", description = "The maximum number of parameters supported. To prevent a DOS-style attack with an " + "overrunning number of parameters the number of parameters supported can be limited. This " + "includes all of the query string as well as application/x-www-form-urlencoded and " + "multipart/form-data parameters. The default value is " + ParameterMap.DEFAULT_MAX_PARAMS + ".") private static final String PROP_MAX_PARAMS = "sling.default.max.parameters"; @Property( label = "Temporary File Location", description = "The size threshold after which the file will be written to disk. The default is " + "null, which means the directory given by the 'java.io.tmpdir' system property.") private static final String PROP_FILE_LOCATION = "file.location"; @Property( longValue = 256000, label = "File Save Threshold", description = "The size threshold after which the file will be written to disk. The default is 256KB.") private static final String PROP_FILE_SIZE_THRESHOLD = "file.threshold"; @Property( longValue = -1, label = "Maximum File Size", description = "The maximum size allowed for uploaded files. The default is -1, which means unlimited.") private static final String PROP_FILE_SIZE_MAX = "file.max"; @Property( longValue = -1, label = "Maximum Request Size", description = "The maximum size allowed for multipart/form-data requests. The default is -1, which means unlimited.") private static final String PROP_MAX_REQUEST_SIZE = "request.max"; @Property( boolValue = false, label = "Check Additional Parameters", description = "Enable this if you want to include request parameters added through the container, e.g through a valve.") private static final String PROP_CHECK_ADDITIONAL_PARAMETERS = "sling.default.parameter.checkForAdditionalContainerParameters"; @Reference private SlingSettingsService settignsService; @Activate @Deactivate private void configure(ComponentContext context) { @SuppressWarnings("unchecked") Dictionary<String, Object> props = context.getProperties(); final String fixEncoding = PropertiesUtil.toString(props.get(PROP_FIX_ENCODING), Util.ENCODING_DIRECT); final int maxParams = PropertiesUtil.toInteger(props.get(PROP_MAX_PARAMS), ParameterMap.DEFAULT_MAX_PARAMS); final long maxRequestSize = PropertiesUtil.toLong(props.get(PROP_MAX_REQUEST_SIZE), -1); final String fileLocation = getFileLocation(context, PropertiesUtil.toString(props.get(PROP_FILE_LOCATION), null)); final long maxFileSize = PropertiesUtil.toLong(props.get(PROP_FILE_SIZE_MAX), -1); final int fileSizeThreshold = PropertiesUtil.toInteger(props.get(PROP_FILE_SIZE_THRESHOLD), -1); final boolean checkAddParameters = PropertiesUtil.toBoolean(props.get(PROP_CHECK_ADDITIONAL_PARAMETERS), false); if (log.isInfoEnabled()) { log.info("Default Character Encoding: {}", fixEncoding); log.info("Parameter Number Limit: {}", (maxParams < 0) ? "unlimited" : maxParams); log.info("Maximum Request Size: {}", (maxParams < 0) ? "unlimited" : maxRequestSize); log.info("Temporary File Location: {}", fileLocation); log.info("Maximum File Size: {}", maxFileSize); log.info("Tempory File Creation Threshold: {}", fileSizeThreshold); log.info("Check for additional container parameters: {}", checkAddParameters); } Util.setDefaultFixEncoding(fixEncoding); ParameterMap.setMaxParameters(maxParams); ParameterSupport.configure(maxRequestSize, fileLocation, maxFileSize, fileSizeThreshold, checkAddParameters); } private String getFileLocation(final ComponentContext context, String fileLocation) { if (fileLocation != null) { File file = new File(fileLocation); if (!file.isAbsolute()) { file = new File(this.settignsService.getSlingHomePath(), fileLocation); fileLocation = file.getAbsolutePath(); } if (file.exists()) { if (!file.isDirectory()) { log.error( "Configured temporary file location {} exists but is not a directory; using java.io.tmpdir instead", fileLocation); fileLocation = null; } } else { if (!file.mkdirs()) { log.error("Cannot create temporary file directory {}; using java.io.tmpdir instead", fileLocation); fileLocation = null; } } } return fileLocation; } }
{'content_hash': '44eacf6de452e5c6569f60cce44e4019', 'timestamp': '', 'source': 'github', 'line_count': 138, 'max_line_length': 132, 'avg_line_length': 49.78260869565217, 'alnum_prop': 0.6554585152838428, 'repo_name': 'wimsymons/sling', 'id': '725df5540740dd32b20de3401db6bbe4b30db720', 'size': '7677', 'binary': False, 'copies': '12', 'ref': 'refs/heads/trunk', 'path': 'bundles/engine/src/main/java/org/apache/sling/engine/impl/parameters/RequestParameterSupportConfigurer.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ANTLR', 'bytes': '7722'}, {'name': 'Batchfile', 'bytes': '194'}, {'name': 'CSS', 'bytes': '82090'}, {'name': 'FreeMarker', 'bytes': '2264'}, {'name': 'Groff', 'bytes': '375'}, {'name': 'Groovy', 'bytes': '12843'}, {'name': 'HTML', 'bytes': '156821'}, {'name': 'Java', 'bytes': '24706370'}, {'name': 'JavaScript', 'bytes': '343672'}, {'name': 'Makefile', 'bytes': '1519'}, {'name': 'Python', 'bytes': '298'}, {'name': 'Ruby', 'bytes': '4896'}, {'name': 'Scala', 'bytes': '127988'}, {'name': 'Shell', 'bytes': '27621'}, {'name': 'XProc', 'bytes': '2290'}, {'name': 'XSLT', 'bytes': '8575'}]}
namespace DiscUtils { using System.IO; internal class BigEndianDataReader : DataReader { public BigEndianDataReader(Stream stream) : base(stream) { } public override ushort ReadUInt16() { return Utilities.ToUInt16BigEndian(Utilities.ReadFully(_stream, 2), 0); } public override int ReadInt32() { return Utilities.ToInt32BigEndian(Utilities.ReadFully(_stream, 4), 0); } public override uint ReadUInt32() { return Utilities.ToUInt32BigEndian(Utilities.ReadFully(_stream, 4), 0); } public override long ReadInt64() { return Utilities.ToInt64BigEndian(Utilities.ReadFully(_stream, 8), 0); } public override ulong ReadUInt64() { return Utilities.ToUInt64BigEndian(Utilities.ReadFully(_stream, 8), 0); } public override byte[] ReadBytes(int count) { return Utilities.ReadFully(_stream, count); } } }
{'content_hash': 'b3a8b18db8abf60e84bbff9831bc5a55', 'timestamp': '', 'source': 'github', 'line_count': 43, 'max_line_length': 83, 'avg_line_length': 25.88372093023256, 'alnum_prop': 0.555256064690027, 'repo_name': 'bplu4t2f/EzIso', 'id': 'cdb0fc8dfff1edc0b4bf1b763a2f35bb47ac4f8a', 'size': '2256', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'EzIso/discutils/src/BigEndianDataReader.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '684'}, {'name': 'C#', 'bytes': '4776499'}, {'name': 'PowerShell', 'bytes': '22059'}]}
var test = require('tape'); var Stream = require('stream').Stream; test('stream - pipe error handling - error listener catches', function (t) { var source = new Stream(); var dest = new Stream(); source.pipe(dest); var gotErr = null; source.on('error', function(err) { gotErr = err; }); var err = new Error('This stream turned into bacon.'); source.emit('error', err); t.strictEqual(gotErr, err); t.end(); }); test('stream - pipe erro handling - error without listener throws', function (t) { var source = new Stream(); var dest = new Stream(); source.pipe(dest); var err = new Error('This stream turned into bacon.'); var gotErr = null; try { source.emit('error', err); } catch (e) { gotErr = e; } t.strictEqual(gotErr, err); t.end(); });
{'content_hash': '449c27b9a07441af0164bcc70fdbd26a', 'timestamp': '', 'source': 'github', 'line_count': 38, 'max_line_length': 82, 'avg_line_length': 21.07894736842105, 'alnum_prop': 0.6217228464419475, 'repo_name': 'bbuchsbaum/psycloud', 'id': 'c8723f6ea5d79acce16c946560ef85fc2436a14f', 'size': '1935', 'binary': False, 'copies': '11', 'ref': 'refs/heads/master', 'path': 'node_modules/powerbuild/node_modules/browser-builtins/test/browser/stream-pipe-error-handling.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '138968'}, {'name': 'CoffeeScript', 'bytes': '234953'}, {'name': 'HTML', 'bytes': '11880'}, {'name': 'JavaScript', 'bytes': '3761442'}]}
package org.kaaproject.kaa.server.control; import org.kaaproject.kaa.server.common.AbstractServerApplication; import org.kaaproject.kaa.server.control.service.ControlService; import org.springframework.context.ApplicationContext; /** * The Class ControlServerApplication. */ public class ControlServerApplication extends AbstractServerApplication { private static final String[] DEFAULT_APPLICATION_CONTEXT_XMLS = new String[] { "controlContext.xml" }; private static final String[] DEFAULT_APPLICATION_CONFIGURATION_FILES = new String[] { "control-server.properties", "dao.properties" }; /** * The main method. * * @param args * the arguments */ public static void main(String[] args) { ControlServerApplication app = new ControlServerApplication(DEFAULT_APPLICATION_CONTEXT_XMLS, DEFAULT_APPLICATION_CONFIGURATION_FILES); app.startAndWait(args); } public ControlServerApplication(String[] defaultContextFiles, String[] defaultConfigurationFiles) { super(defaultContextFiles, defaultConfigurationFiles); } @Override protected String getName() { return "Control Server"; } @Override protected void init(ApplicationContext context) { final ControlService controlService = context.getBean("controlService", ControlService.class); controlService.start(); } }
{'content_hash': '62eb40aadf06dfd0b3be5df2d0d6c5ea', 'timestamp': '', 'source': 'github', 'line_count': 44, 'max_line_length': 143, 'avg_line_length': 32.20454545454545, 'alnum_prop': 0.7184191954834157, 'repo_name': 'kallelzied/kaa', 'id': '2c3fed6ec84854c24ae71838043c38cb789d3ae9', 'size': '2018', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'server/control/src/main/java/org/kaaproject/kaa/server/control/ControlServerApplication.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'AMPL', 'bytes': '19815'}, {'name': 'Batchfile', 'bytes': '4577'}, {'name': 'C', 'bytes': '1335841'}, {'name': 'C++', 'bytes': '1142799'}, {'name': 'CMake', 'bytes': '65161'}, {'name': 'CSS', 'bytes': '10183'}, {'name': 'HTML', 'bytes': '3112'}, {'name': 'Java', 'bytes': '8175012'}, {'name': 'Makefile', 'bytes': '5579'}, {'name': 'Python', 'bytes': '128276'}, {'name': 'Shell', 'bytes': '130848'}, {'name': 'Thrift', 'bytes': '21163'}, {'name': 'XSLT', 'bytes': '4062'}]}
require 'capybara/dsl' require 'capybara/rspec/matchers' World(Capybara::DSL) World(Capybara::RSpecMatchers) After do Capybara.reset_sessions! end Before do Capybara.use_default_driver end Before '@javascript' do Capybara.current_driver = Capybara.javascript_driver end Before do |scenario| scenario.source_tag_names.each do |tag| driver_name = tag.sub(/^@/, '').to_sym if Capybara.drivers.has_key?(driver_name) Capybara.current_driver = driver_name end end end
{'content_hash': '4f17608d90b58fdd2b270026159f9549', 'timestamp': '', 'source': 'github', 'line_count': 26, 'max_line_length': 54, 'avg_line_length': 19.03846153846154, 'alnum_prop': 0.7292929292929293, 'repo_name': 'olivierlacan/capybara', 'id': 'f9e9e76ec8db2f18f52f8a66ff6bd9bf0c7f432e', 'size': '525', 'binary': False, 'copies': '8', 'ref': 'refs/heads/master', 'path': 'lib/capybara/cucumber.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Cucumber', 'bytes': '1026'}, {'name': 'HTML', 'bytes': '34780'}, {'name': 'JavaScript', 'bytes': '3770'}, {'name': 'Ruby', 'bytes': '547406'}]}
package com.intel.analytics.bigdl.nn.keras import com.intel.analytics.bigdl.nn.abstractnn._ import com.intel.analytics.bigdl.tensor.Tensor import com.intel.analytics.bigdl.tensor.TensorNumericMath.TensorNumeric import com.intel.analytics.bigdl.utils.Shape import scala.reflect.ClassTag /** * Apply additive zero-centered Gaussian noise. * This is useful to mitigate overfitting (you could see it as a form of random data augmentation). * Gaussian Noise is a natural choice as corruption process for real valued inputs. * As it is a regularization layer, it is only active at training time. * * When you use this layer as the first layer of a model, you need to provide the argument * inputShape (a Single Shape, does not include the batch dimension). * * @param sigma Double, standard deviation of the noise distribution. * @tparam T Numeric type of parameter(e.g. weight, bias). Only support float/double now. */ class GaussianNoise[T: ClassTag]( val sigma: Double, val inputShape: Shape = null)(implicit ev: TensorNumeric[T]) extends KerasLayer[Tensor[T], Tensor[T], T](KerasLayer.addBatch(inputShape)) with IdentityOutputShape { override def doBuild(inputShape: Shape): AbstractModule[Tensor[T], Tensor[T], T] = { val layer = com.intel.analytics.bigdl.nn.GaussianNoise(stddev = sigma) layer.asInstanceOf[AbstractModule[Tensor[T], Tensor[T], T]] } } object GaussianNoise { def apply[@specialized(Float, Double) T: ClassTag]( sigma: Double, inputShape: Shape = null)(implicit ev: TensorNumeric[T]): GaussianNoise[T] = { new GaussianNoise[T](sigma, inputShape) } }
{'content_hash': '1bc84c96c6a778182a8cb7c3a2840aa4', 'timestamp': '', 'source': 'github', 'line_count': 43, 'max_line_length': 99, 'avg_line_length': 37.76744186046512, 'alnum_prop': 0.7481527093596059, 'repo_name': 'wzhongyuan/BigDL', 'id': '1c10da75fc356c07616df76d3d9eee2ee1c607e3', 'size': '2225', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/keras/GaussianNoise.scala', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Dockerfile', 'bytes': '5170'}, {'name': 'Java', 'bytes': '6829'}, {'name': 'Lua', 'bytes': '1904'}, {'name': 'Python', 'bytes': '1081865'}, {'name': 'RobotFramework', 'bytes': '30098'}, {'name': 'Scala', 'bytes': '9624826'}, {'name': 'Shell', 'bytes': '55733'}]}
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>huffman: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.11.0 / huffman - 8.5.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> huffman <small> 8.5.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-10-28 20:25:49 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-10-28 20:25:49 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.11.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.06.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.06.1 Official 4.06.1 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.5 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;[email protected]&quot; homepage: &quot;https://github.com/coq-contribs/huffman&quot; license: &quot;LGPL 2&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Huffman&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;keyword:data compression&quot; &quot;keyword:code&quot; &quot;keyword:huffman tree&quot; &quot;category:Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs of algorithms&quot; &quot;category:Miscellaneous/Extracted Programs/Combinatorics&quot; &quot;date:2003-10&quot; ] authors: [ &quot;Laurent Théry &lt;&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/huffman/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/huffman.git&quot; synopsis: &quot;A correctness proof of Huffman algorithm&quot; description: &quot;&quot;&quot; This directory contains the proof of correctness of Huffman algorithm as described in: David A. Huffman, &quot;A Method for the Construction of Minimum-Redundancy Codes,&quot; Proc. IRE, pp. 1098-1101, September 1952.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/huffman/archive/v8.5.0.tar.gz&quot; checksum: &quot;md5=24c177433fec3608f741355cbf411486&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-huffman.8.5.0 coq.8.11.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.11.0). The following dependencies couldn&#39;t be met: - coq-huffman -&gt; coq &lt; 8.6~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-huffman.8.5.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
{'content_hash': '844bf2a568144305b150c67fe38b1eee', 'timestamp': '', 'source': 'github', 'line_count': 165, 'max_line_length': 313, 'avg_line_length': 42.16969696969697, 'alnum_prop': 0.5480022995113538, 'repo_name': 'coq-bench/coq-bench.github.io', 'id': 'b922a70e9edf9866f6e95f64468827cf5b2876ff', 'size': '6984', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'clean/Linux-x86_64-4.06.1-2.0.5/released/8.11.0/huffman/8.5.0.html', 'mode': '33188', 'license': 'mit', 'language': []}
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var LoginComponent = /** @class */ (function () { function LoginComponent() { } LoginComponent.prototype.ngOnInit = function () { }; LoginComponent = __decorate([ core_1.Component({ template: "\n I am login component\n " }), __metadata("design:paramtypes", []) ], LoginComponent); return LoginComponent; }()); exports.LoginComponent = LoginComponent; //# sourceMappingURL=login.component.js.map
{'content_hash': 'fd0adcc4cb3adc018a8e49c99c23f703', 'timestamp': '', 'source': 'github', 'line_count': 26, 'max_line_length': 150, 'avg_line_length': 51.11538461538461, 'alnum_prop': 0.6139954853273137, 'repo_name': 'sailesh89/angularStarter', 'id': '4297e58af7879f974af2633e60276c974f0947ba', 'size': '1329', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'dist/login/login.component.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '2016'}, {'name': 'JavaScript', 'bytes': '1734'}, {'name': 'TypeScript', 'bytes': '13885'}]}
namespace pddl { namespace normalizedAST { //////////////////////////////////////////////////////////////////////////////////////////////////// // // Normalized AST // //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // PDDL Structure //////////////////////////////////////////////////////////////////////////////////////////////////// struct Action { Action() = default; Action(const Action &other) = delete; Action &operator=(const Action &&other) = delete; Action(Action &&other) = default; Action &operator=(Action &&other) = default; std::string name; VariableDeclarations parameters; std::experimental::optional<Precondition> precondition; std::experimental::optional<Effect> effect; }; //////////////////////////////////////////////////////////////////////////////////////////////////// struct Domain { Domain() = default; Domain(const Domain &other) = delete; Domain &operator=(const Domain &&other) = delete; Domain(Domain &&other) = delete; Domain &operator=(Domain &&other) = delete; std::string name; PrimitiveTypeDeclarations types; ConstantDeclarations constants; PredicateDeclarations predicates; DerivedPredicateDeclarations derivedPredicates; Actions actions; }; //////////////////////////////////////////////////////////////////////////////////////////////////// struct DerivedPredicate { using Arguments = Terms; explicit DerivedPredicate(Arguments &&arguments, DerivedPredicateDeclaration *declaration) : arguments{std::move(arguments)}, declaration{declaration} { } DerivedPredicate(const DerivedPredicate &other) = delete; DerivedPredicate &operator=(const DerivedPredicate &&other) = delete; DerivedPredicate(DerivedPredicate &&other) = default; DerivedPredicate &operator=(DerivedPredicate &&other) = default; Arguments arguments; DerivedPredicateDeclaration *declaration; }; //////////////////////////////////////////////////////////////////////////////////////////////////// struct DerivedPredicateDeclaration { explicit DerivedPredicateDeclaration() = default; DerivedPredicateDeclaration(const DerivedPredicateDeclaration &other) = delete; DerivedPredicateDeclaration &operator=(const DerivedPredicateDeclaration &&other) = delete; DerivedPredicateDeclaration(DerivedPredicateDeclaration &&other) = default; DerivedPredicateDeclaration &operator=(DerivedPredicateDeclaration &&other) = default; std::string name; std::vector<VariableDeclaration *> parameters; VariableDeclarations existentialParameters; std::experimental::optional<DerivedPredicatePrecondition> precondition; }; //////////////////////////////////////////////////////////////////////////////////////////////////// struct InitialState { InitialState() = default; InitialState(const InitialState &other) = delete; InitialState &operator=(const InitialState &&other) = delete; InitialState(InitialState &&other) = default; InitialState &operator=(InitialState &&other) = default; Facts facts; }; //////////////////////////////////////////////////////////////////////////////////////////////////// struct Problem { Problem() = default; Problem(Domain *domain) : domain{domain} { } Problem(const Problem &other) = delete; Problem &operator=(const Problem &&other) = delete; Problem(Problem &&other) = default; Problem &operator=(Problem &&other) = default; Domain *domain; std::string name; DerivedPredicateDeclarations derivedPredicates; ConstantDeclarations objects; InitialState initialState; std::experimental::optional<Goal> goal; }; //////////////////////////////////////////////////////////////////////////////////////////////////// struct Description { Description() = default; Description(const Description &other) = delete; Description &operator=(const Description &&other) = delete; Description(Description &&other) = default; Description &operator=(Description &&other) = default; DomainPointer domain; std::experimental::optional<ProblemPointer> problem; }; //////////////////////////////////////////////////////////////////////////////////////////////////// } } #endif
{'content_hash': '1ae9033b913a01da8ebd7da2e2af0b05', 'timestamp': '', 'source': 'github', 'line_count': 148, 'max_line_length': 100, 'avg_line_length': 28.58783783783784, 'alnum_prop': 0.5658236823445993, 'repo_name': 'potassco/plasp', 'id': '2848aa4cacd49fc981a7dee1325913f36084f1e5', 'size': '4446', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/pddl/include/pddl/NormalizedAST.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C++', 'bytes': '535128'}, {'name': 'CMake', 'bytes': '9732'}]}
module Google module Cloud module Bigquery module DataTransfer ## # # BigQuery Data Transfer API Contents # # | Class | Description | # | ----- | ----------- | # | [DataTransferServiceClient][] | The Google BigQuery Data Transfer Service API enables BigQuery users to configure the transfer of their data from other Google Products into BigQuery. | # | [Data Types][] | Data types for Google::Cloud::Bigquery::DataTransfer::V1 | # # [DataTransferServiceClient]: https://googleapis.dev/ruby/google-cloud-bigquery-data_transfer/latest/Google/Cloud/Bigquery/DataTransfer/V1/DataTransferServiceClient.html # module V1 # Represents a data source parameter with validation rules, so that # parameters can be rendered in the UI. These parameters are given to us by # supported data sources, and include all needed information for rendering # and validation. # Thus, whoever uses this api can decide to generate either generic ui, # or custom data source specific forms. # @!attribute [rw] param_id # @return [String] # Parameter identifier. # @!attribute [rw] display_name # @return [String] # Parameter display name in the user interface. # @!attribute [rw] description # @return [String] # Parameter description. # @!attribute [rw] type # @return [Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter::Type] # Parameter type. # @!attribute [rw] required # @return [true, false] # Is parameter required. # @!attribute [rw] repeated # @return [true, false] # Can parameter have multiple values. # @!attribute [rw] validation_regex # @return [String] # Regular expression which can be used for parameter validation. # @!attribute [rw] allowed_values # @return [Array<String>] # All possible values for the parameter. # @!attribute [rw] min_value # @return [Google::Protobuf::DoubleValue] # For integer and double values specifies minimum allowed value. # @!attribute [rw] max_value # @return [Google::Protobuf::DoubleValue] # For integer and double values specifies maxminum allowed value. # @!attribute [rw] fields # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>] # When parameter is a record, describes child fields. # @!attribute [rw] validation_description # @return [String] # Description of the requirements for this field, in case the user input does # not fulfill the regex pattern or min/max values. # @!attribute [rw] validation_help_url # @return [String] # URL to a help document to further explain the naming requirements. # @!attribute [rw] immutable # @return [true, false] # Cannot be changed after initial creation. # @!attribute [rw] recurse # @return [true, false] # If set to true, schema should be taken from the parent with the same # parameter_id. Only applicable when parameter type is RECORD. class DataSourceParameter # Parameter type. module Type # Type unspecified. TYPE_UNSPECIFIED = 0 # String parameter. STRING = 1 # Integer parameter (64-bits). # Will be serialized to json as string. INTEGER = 2 # Double precision floating point parameter. DOUBLE = 3 # Boolean parameter. BOOLEAN = 4 # Record parameter. RECORD = 5 # Page ID for a Google+ Page. PLUS_PAGE = 6 end end # Represents data source metadata. Metadata is sufficient to # render UI and request proper OAuth tokens. # @!attribute [rw] name # @return [String] # Data source resource name. # @!attribute [rw] data_source_id # @return [String] # Data source id. # @!attribute [rw] display_name # @return [String] # User friendly data source name. # @!attribute [rw] description # @return [String] # User friendly data source description string. # @!attribute [rw] client_id # @return [String] # Data source client id which should be used to receive refresh token. # When not supplied, no offline credentials are populated for data transfer. # @!attribute [rw] scopes # @return [Array<String>] # Api auth scopes for which refresh token needs to be obtained. Only valid # when +client_id+ is specified. Ignored otherwise. These are scopes needed # by a data source to prepare data and ingest them into BigQuery, # e.g., https://www.googleapis.com/auth/bigquery # @!attribute [rw] transfer_type # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferType] # Transfer type. Currently supports only batch transfers, # which are transfers that use the BigQuery batch APIs (load or # query) to ingest the data. # @!attribute [rw] supports_multiple_transfers # @return [true, false] # Indicates whether the data source supports multiple transfers # to different BigQuery targets. # @!attribute [rw] update_deadline_seconds # @return [Integer] # The number of seconds to wait for an update from the data source # before BigQuery marks the transfer as failed. # @!attribute [rw] default_schedule # @return [String] # Default data transfer schedule. # Examples of valid schedules include: # +1st,3rd monday of month 15:30+, # +every wed,fri of jan,jun 13:15+, and # +first sunday of quarter 00:00+. # @!attribute [rw] supports_custom_schedule # @return [true, false] # Specifies whether the data source supports a user defined schedule, or # operates on the default schedule. # When set to +true+, user can override default schedule. # @!attribute [rw] parameters # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>] # Data source parameters. # @!attribute [rw] help_url # @return [String] # Url for the help document for this data source. # @!attribute [rw] authorization_type # @return [Google::Cloud::Bigquery::DataTransfer::V1::DataSource::AuthorizationType] # Indicates the type of authorization. # @!attribute [rw] data_refresh_type # @return [Google::Cloud::Bigquery::DataTransfer::V1::DataSource::DataRefreshType] # Specifies whether the data source supports automatic data refresh for the # past few days, and how it's supported. # For some data sources, data might not be complete until a few days later, # so it's useful to refresh data automatically. # @!attribute [rw] default_data_refresh_window_days # @return [Integer] # Default data refresh window on days. # Only meaningful when +data_refresh_type+ = +SLIDING_WINDOW+. # @!attribute [rw] manual_runs_disabled # @return [true, false] # Disables backfilling and manual run scheduling # for the data source. # @!attribute [rw] minimum_schedule_interval # @return [Google::Protobuf::Duration] # The minimum interval for scheduler to schedule runs. class DataSource # The type of authorization needed for this data source. module AuthorizationType # Type unspecified. AUTHORIZATION_TYPE_UNSPECIFIED = 0 # Use OAuth 2 authorization codes that can be exchanged # for a refresh token on the backend. AUTHORIZATION_CODE = 1 # Return an authorization code for a given Google+ page that can then be # exchanged for a refresh token on the backend. GOOGLE_PLUS_AUTHORIZATION_CODE = 2 end # Represents how the data source supports data auto refresh. module DataRefreshType # The data source won't support data auto refresh, which is default value. DATA_REFRESH_TYPE_UNSPECIFIED = 0 # The data source supports data auto refresh, and runs will be scheduled # for the past few days. Does not allow custom values to be set for each # transfer config. SLIDING_WINDOW = 1 # The data source supports data auto refresh, and runs will be scheduled # for the past few days. Allows custom values to be set for each transfer # config. CUSTOM_SLIDING_WINDOW = 2 end end # A request to get data source info. # @!attribute [rw] name # @return [String] # The field will contain name of the resource requested, for example: # +projects/\\{project_id}/dataSources/\\{data_source_id}+ class GetDataSourceRequest; end # Request to list supported data sources and their data transfer settings. # @!attribute [rw] parent # @return [String] # The BigQuery project id for which data sources should be returned. # Must be in the form: +projects/\\{project_id}+ # @!attribute [rw] page_token # @return [String] # Pagination token, which can be used to request a specific page # of +ListDataSourcesRequest+ list results. For multiple-page # results, +ListDataSourcesResponse+ outputs # a +next_page+ token, which can be used as the # +page_token+ value to request the next page of list results. # @!attribute [rw] page_size # @return [Integer] # Page size. The default page size is the maximum value of 1000 results. class ListDataSourcesRequest; end # Returns list of supported data sources and their metadata. # @!attribute [rw] data_sources # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] # List of supported data sources and their transfer settings. # @!attribute [rw] next_page_token # @return [String] # Output only. The next-pagination token. For multiple-page list results, # this token can be used as the # +ListDataSourcesRequest.page_token+ # to request the next page of list results. class ListDataSourcesResponse; end # A request to create a data transfer configuration. If new credentials are # needed for this transfer configuration, an authorization code must be # provided. If an authorization code is provided, the transfer configuration # will be associated with the user id corresponding to the # authorization code. Otherwise, the transfer configuration will be associated # with the calling user. # @!attribute [rw] parent # @return [String] # The BigQuery project id where the transfer configuration should be created. # Must be in the format /projects/\\{project_id}/locations/\\{location_id} # If specified location and location of the destination bigquery dataset # do not match - the request will fail. # @!attribute [rw] transfer_config # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] # Data transfer configuration to create. # @!attribute [rw] authorization_code # @return [String] # Optional OAuth2 authorization code to use with this transfer configuration. # This is required if new credentials are needed, as indicated by # +CheckValidCreds+. # In order to obtain authorization_code, please make a # request to # https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri> # # * client_id should be OAuth client_id of BigQuery DTS API for the given # data source returned by ListDataSources method. # * data_source_scopes are the scopes returned by ListDataSources method. # * redirect_uri is an optional parameter. If not specified, then # authorization code is posted to the opener of authorization flow window. # Otherwise it will be sent to the redirect uri. A special value of # urn:ietf:wg:oauth:2.0:oob means that authorization code should be # returned in the title bar of the browser, with the page text prompting # the user to copy the code and paste it in the application. class CreateTransferConfigRequest; end # A request to update a transfer configuration. To update the user id of the # transfer configuration, an authorization code needs to be provided. # @!attribute [rw] transfer_config # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] # Data transfer configuration to create. # @!attribute [rw] authorization_code # @return [String] # Optional OAuth2 authorization code to use with this transfer configuration. # If it is provided, the transfer configuration will be associated with the # authorizing user. # In order to obtain authorization_code, please make a # request to # https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri> # # * client_id should be OAuth client_id of BigQuery DTS API for the given # data source returned by ListDataSources method. # * data_source_scopes are the scopes returned by ListDataSources method. # * redirect_uri is an optional parameter. If not specified, then # authorization code is posted to the opener of authorization flow window. # Otherwise it will be sent to the redirect uri. A special value of # urn:ietf:wg:oauth:2.0:oob means that authorization code should be # returned in the title bar of the browser, with the page text prompting # the user to copy the code and paste it in the application. # @!attribute [rw] update_mask # @return [Google::Protobuf::FieldMask] # Required list of fields to be updated in this request. class UpdateTransferConfigRequest; end # A request to get data transfer information. # @!attribute [rw] name # @return [String] # The field will contain name of the resource requested, for example: # +projects/\\{project_id}/transferConfigs/\\{config_id}+ class GetTransferConfigRequest; end # A request to delete data transfer information. All associated transfer runs # and log messages will be deleted as well. # @!attribute [rw] name # @return [String] # The field will contain name of the resource requested, for example: # +projects/\\{project_id}/transferConfigs/\\{config_id}+ class DeleteTransferConfigRequest; end # A request to get data transfer run information. # @!attribute [rw] name # @return [String] # The field will contain name of the resource requested, for example: # +projects/\\{project_id}/transferConfigs/\\{config_id}/runs/\\{run_id}+ class GetTransferRunRequest; end # A request to delete data transfer run information. # @!attribute [rw] name # @return [String] # The field will contain name of the resource requested, for example: # +projects/\\{project_id}/transferConfigs/\\{config_id}/runs/\\{run_id}+ class DeleteTransferRunRequest; end # A request to list data transfers configured for a BigQuery project. # @!attribute [rw] parent # @return [String] # The BigQuery project id for which data sources # should be returned: +projects/\\{project_id}+. # @!attribute [rw] data_source_ids # @return [Array<String>] # When specified, only configurations of requested data sources are returned. # @!attribute [rw] page_token # @return [String] # Pagination token, which can be used to request a specific page # of +ListTransfersRequest+ list results. For multiple-page # results, +ListTransfersResponse+ outputs # a +next_page+ token, which can be used as the # +page_token+ value to request the next page of list results. # @!attribute [rw] page_size # @return [Integer] # Page size. The default page size is the maximum value of 1000 results. class ListTransferConfigsRequest; end # The returned list of pipelines in the project. # @!attribute [rw] transfer_configs # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] # Output only. The stored pipeline transfer configurations. # @!attribute [rw] next_page_token # @return [String] # Output only. The next-pagination token. For multiple-page list results, # this token can be used as the # +ListTransferConfigsRequest.page_token+ # to request the next page of list results. class ListTransferConfigsResponse; end # A request to list data transfer runs. UI can use this method to show/filter # specific data transfer runs. The data source can use this method to request # all scheduled transfer runs. # @!attribute [rw] parent # @return [String] # Name of transfer configuration for which transfer runs should be retrieved. # Format of transfer configuration resource name is: # +projects/\\{project_id}/transferConfigs/\\{config_id}+. # @!attribute [rw] states # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] # When specified, only transfer runs with requested states are returned. # @!attribute [rw] page_token # @return [String] # Pagination token, which can be used to request a specific page # of +ListTransferRunsRequest+ list results. For multiple-page # results, +ListTransferRunsResponse+ outputs # a +next_page+ token, which can be used as the # +page_token+ value to request the next page of list results. # @!attribute [rw] page_size # @return [Integer] # Page size. The default page size is the maximum value of 1000 results. # @!attribute [rw] run_attempt # @return [Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] # Indicates how run attempts are to be pulled. class ListTransferRunsRequest # Represents which runs should be pulled. module RunAttempt # All runs should be returned. RUN_ATTEMPT_UNSPECIFIED = 0 # Only latest run per day should be returned. LATEST = 1 end end # The returned list of pipelines in the project. # @!attribute [rw] transfer_runs # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] # Output only. The stored pipeline transfer runs. # @!attribute [rw] next_page_token # @return [String] # Output only. The next-pagination token. For multiple-page list results, # this token can be used as the # +ListTransferRunsRequest.page_token+ # to request the next page of list results. class ListTransferRunsResponse; end # A request to get user facing log messages associated with data transfer run. # @!attribute [rw] parent # @return [String] # Transfer run name in the form: # +projects/\\{project_id}/transferConfigs/\\{config_Id}/runs/\\{run_id}+. # @!attribute [rw] page_token # @return [String] # Pagination token, which can be used to request a specific page # of +ListTransferLogsRequest+ list results. For multiple-page # results, +ListTransferLogsResponse+ outputs # a +next_page+ token, which can be used as the # +page_token+ value to request the next page of list results. # @!attribute [rw] page_size # @return [Integer] # Page size. The default page size is the maximum value of 1000 results. # @!attribute [rw] message_types # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] # Message types to return. If not populated - INFO, WARNING and ERROR # messages are returned. class ListTransferLogsRequest; end # The returned list transfer run messages. # @!attribute [rw] transfer_messages # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] # Output only. The stored pipeline transfer messages. # @!attribute [rw] next_page_token # @return [String] # Output only. The next-pagination token. For multiple-page list results, # this token can be used as the # +GetTransferRunLogRequest.page_token+ # to request the next page of list results. class ListTransferLogsResponse; end # A request to determine whether the user has valid credentials. This method # is used to limit the number of OAuth popups in the user interface. The # user id is inferred from the API call context. # If the data source has the Google+ authorization type, this method # returns false, as it cannot be determined whether the credentials are # already valid merely based on the user id. # @!attribute [rw] name # @return [String] # The data source in the form: # +projects/\\{project_id}/dataSources/\\{data_source_id}+ class CheckValidCredsRequest; end # A response indicating whether the credentials exist and are valid. # @!attribute [rw] has_valid_creds # @return [true, false] # If set to +true+, the credentials exist and are valid. class CheckValidCredsResponse; end # A request to schedule transfer runs for a time range. # @!attribute [rw] parent # @return [String] # Transfer configuration name in the form: # +projects/\\{project_id}/transferConfigs/\\{config_id}+. # @!attribute [rw] start_time # @return [Google::Protobuf::Timestamp] # Start time of the range of transfer runs. For example, # +"2017-05-25T00:00:00+00:00"+. # @!attribute [rw] end_time # @return [Google::Protobuf::Timestamp] # End time of the range of transfer runs. For example, # +"2017-05-30T00:00:00+00:00"+. class ScheduleTransferRunsRequest; end # A response to schedule transfer runs for a time range. # @!attribute [rw] runs # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] # The transfer runs that were scheduled. class ScheduleTransferRunsResponse; end end end end end end
{'content_hash': '4a9397722746d736b13dd782690783d1', 'timestamp': '', 'source': 'github', 'line_count': 485, 'max_line_length': 196, 'avg_line_length': 51.98144329896907, 'alnum_prop': 0.5931934473047479, 'repo_name': 'quartzmo/google-cloud-ruby', 'id': 'aabdc9afb38a1692eb43fcdad56f5256f7b21b25', 'size': '25788', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'google-cloud-bigquery-data_transfer/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/data_transfer/v1/data_transfer.rb', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '1412'}, {'name': 'C', 'bytes': '25027'}, {'name': 'CSS', 'bytes': '1422'}, {'name': 'DIGITAL Command Language', 'bytes': '2216'}, {'name': 'Dockerfile', 'bytes': '7419'}, {'name': 'HTML', 'bytes': '65207'}, {'name': 'JavaScript', 'bytes': '1862'}, {'name': 'Python', 'bytes': '261473'}, {'name': 'Ruby', 'bytes': '19823503'}, {'name': 'Shell', 'bytes': '6540'}]}
package flex2.compiler.asdoc; import java.util.ArrayList; /** * Stores the info for the class related to a method/field/class and parent classes. */ public class QualifiedNameInfo { private String packageName; /** * if method/field is inherited then contains parent classes. */ private ArrayList<String> classNames; /** * if method/field is inherited then contains parent classes namespace. */ private ArrayList<String> classNameSpaces; private String methodName; private String methodNameSpace; /** * contains combined value for packagename:class name/method name */ private String fullClassName; /** * This field stores the value to indicate whether method is a getter or setter. * values: Get|Set or null */ private String getterSetter; public QualifiedNameInfo() { packageName = ""; classNames = new ArrayList<String>(); classNameSpaces = new ArrayList<String>(); methodName = ""; methodNameSpace = ""; fullClassName = ""; getterSetter = ""; } public String getPackageName() { return packageName; } public void setPackageName(String packageName) { this.packageName = packageName; } public ArrayList<String> getClassNames() { return classNames; } public void setClassNames(ArrayList<String> classNames) { this.classNames = classNames; } public ArrayList<String> getClassNameSpaces() { return classNameSpaces; } public void setClassNameSpaces(ArrayList<String> classNameSpaces) { this.classNameSpaces = classNameSpaces; } public String getMethodName() { return methodName; } public void setMethodName(String methodName) { this.methodName = methodName; } public String getMethodNameSpace() { return methodNameSpace; } public void setMethodNameSpace(String methodNameSpace) { this.methodNameSpace = methodNameSpace; } public String getFullClassName() { return fullClassName; } public void setFullClassName(String fullClassName) { this.fullClassName = fullClassName; } public String getGetterSetter() { return getterSetter; } public void setGetterSetter(String getterSetter) { this.getterSetter = getterSetter; } }
{'content_hash': '94b3a217febfa698e86c4c29afff0acf', 'timestamp': '', 'source': 'github', 'line_count': 116, 'max_line_length': 85, 'avg_line_length': 21.439655172413794, 'alnum_prop': 0.6369119420989143, 'repo_name': 'apache/flex-sdk', 'id': 'd4c6cfe967244372eb08481b9ab466d16f38d39a', 'size': '3306', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'modules/compiler/src/java/flex2/compiler/asdoc/QualifiedNameInfo.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'AGS Script', 'bytes': '478'}, {'name': 'ASP', 'bytes': '6381'}, {'name': 'ActionScript', 'bytes': '34795676'}, {'name': 'AngelScript', 'bytes': '477651'}, {'name': 'Awk', 'bytes': '1958'}, {'name': 'Batchfile', 'bytes': '40336'}, {'name': 'C', 'bytes': '2845'}, {'name': 'C++', 'bytes': '12015'}, {'name': 'CSS', 'bytes': '508448'}, {'name': 'HTML', 'bytes': '84174'}, {'name': 'Java', 'bytes': '15078807'}, {'name': 'JavaScript', 'bytes': '109405'}, {'name': 'PureBasic', 'bytes': '362'}, {'name': 'Roff', 'bytes': '59633'}, {'name': 'Shell', 'bytes': '308605'}, {'name': 'Visual Basic', 'bytes': '4498'}, {'name': 'XSLT', 'bytes': '757371'}]}
<?php namespace Doctrine\ORM\Utility; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Query\QueryException; /** * The PersisterHelper contains logic to infer binding types which is used in * several persisters. * * @link www.doctrine-project.org * @since 2.5 * @author Jasper N. Brouwer <[email protected]> */ class PersisterHelper { /** * @param string $fieldName * @param ClassMetadata $class * @param EntityManagerInterface $em * * @return array * * @throws QueryException */ public static function getTypeOfField($fieldName, ClassMetadata $class, EntityManagerInterface $em) { if (isset( $class->fieldMappings[$fieldName] )) { return array($class->fieldMappings[$fieldName]['type']); } if (!isset( $class->associationMappings[$fieldName] )) { return array(); } $assoc = $class->associationMappings[$fieldName]; if (!$assoc['isOwningSide']) { return self::getTypeOfField($assoc['mappedBy'], $em->getClassMetadata($assoc['targetEntity']), $em); } if ($assoc['type'] & ClassMetadata::MANY_TO_MANY) { $joinData = $assoc['joinTable']; } else { $joinData = $assoc; } $types = array(); $targetClass = $em->getClassMetadata($assoc['targetEntity']); foreach ($joinData['joinColumns'] as $joinColumn) { $types[] = self::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $em); } return $types; } /** * @param string $columnName * @param ClassMetadata $class * @param EntityManagerInterface $em * * @return string * * @throws \RuntimeException */ public static function getTypeOfColumn($columnName, ClassMetadata $class, EntityManagerInterface $em) { if (isset( $class->fieldNames[$columnName] )) { $fieldName = $class->fieldNames[$columnName]; if (isset( $class->fieldMappings[$fieldName] )) { return $class->fieldMappings[$fieldName]['type']; } } // iterate over to-one association mappings foreach ($class->associationMappings as $assoc) { if (!isset( $assoc['joinColumns'] )) { continue; } foreach ($assoc['joinColumns'] as $joinColumn) { if ($joinColumn['name'] == $columnName) { $targetColumnName = $joinColumn['referencedColumnName']; $targetClass = $em->getClassMetadata($assoc['targetEntity']); return self::getTypeOfColumn($targetColumnName, $targetClass, $em); } } } // iterate over to-many association mappings foreach ($class->associationMappings as $assoc) { if (!( isset( $assoc['joinTable'] ) && isset( $assoc['joinTable']['joinColumns'] ) )) { continue; } foreach ($assoc['joinTable']['joinColumns'] as $joinColumn) { if ($joinColumn['name'] == $columnName) { $targetColumnName = $joinColumn['referencedColumnName']; $targetClass = $em->getClassMetadata($assoc['targetEntity']); return self::getTypeOfColumn($targetColumnName, $targetClass, $em); } } } throw new \RuntimeException(sprintf( 'Could not resolve type of column "%s" of class "%s"', $columnName, $class->getName() )); } }
{'content_hash': '277295579b1748f53a346347f0da269e', 'timestamp': '', 'source': 'github', 'line_count': 122, 'max_line_length': 112, 'avg_line_length': 30.581967213114755, 'alnum_prop': 0.555883141248995, 'repo_name': 'DerDu/MOC-Framework-Mark-V', 'id': 'afcd46121b9c725f7c79c2d7f869388e6d021618', 'size': '4712', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'Component/Database/Vendor/Doctrine2ORM/2.5.0/lib/Doctrine/ORM/Utility/PersisterHelper.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'ApacheConf', 'bytes': '110'}, {'name': 'HTML', 'bytes': '252'}, {'name': 'PHP', 'bytes': '299247'}, {'name': 'Smarty', 'bytes': '252'}]}
/* * This file is generated by jOOQ. */ package com.rpkit.store.bukkit.database.jooq.tables; import com.rpkit.store.bukkit.database.jooq.Keys; import com.rpkit.store.bukkit.database.jooq.RpkitStores; import com.rpkit.store.bukkit.database.jooq.tables.records.RpkitTimedStoreItemRecord; import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row3; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class RpkitTimedStoreItem extends TableImpl<RpkitTimedStoreItemRecord> { private static final long serialVersionUID = 1L; /** * The reference instance of * <code>rpkit_stores.rpkit_timed_store_item</code> */ public static final RpkitTimedStoreItem RPKIT_TIMED_STORE_ITEM = new RpkitTimedStoreItem(); /** * The class holding records for this type */ @Override public Class<RpkitTimedStoreItemRecord> getRecordType() { return RpkitTimedStoreItemRecord.class; } /** * The column <code>rpkit_stores.rpkit_timed_store_item.id</code>. */ public final TableField<RpkitTimedStoreItemRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column * <code>rpkit_stores.rpkit_timed_store_item.store_item_id</code>. */ public final TableField<RpkitTimedStoreItemRecord, Integer> STORE_ITEM_ID = createField(DSL.name("store_item_id"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column <code>rpkit_stores.rpkit_timed_store_item.duration</code>. */ public final TableField<RpkitTimedStoreItemRecord, Long> DURATION = createField(DSL.name("duration"), SQLDataType.BIGINT.nullable(false), this, ""); private RpkitTimedStoreItem(Name alias, Table<RpkitTimedStoreItemRecord> aliased) { this(alias, aliased, null); } private RpkitTimedStoreItem(Name alias, Table<RpkitTimedStoreItemRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** * Create an aliased <code>rpkit_stores.rpkit_timed_store_item</code> table * reference */ public RpkitTimedStoreItem(String alias) { this(DSL.name(alias), RPKIT_TIMED_STORE_ITEM); } /** * Create an aliased <code>rpkit_stores.rpkit_timed_store_item</code> table * reference */ public RpkitTimedStoreItem(Name alias) { this(alias, RPKIT_TIMED_STORE_ITEM); } /** * Create a <code>rpkit_stores.rpkit_timed_store_item</code> table reference */ public RpkitTimedStoreItem() { this(DSL.name("rpkit_timed_store_item"), null); } public <O extends Record> RpkitTimedStoreItem(Table<O> child, ForeignKey<O, RpkitTimedStoreItemRecord> key) { super(child, key, RPKIT_TIMED_STORE_ITEM); } @Override public Schema getSchema() { return aliased() ? null : RpkitStores.RPKIT_STORES; } @Override public Identity<RpkitTimedStoreItemRecord, Integer> getIdentity() { return (Identity<RpkitTimedStoreItemRecord, Integer>) super.getIdentity(); } @Override public UniqueKey<RpkitTimedStoreItemRecord> getPrimaryKey() { return Keys.KEY_RPKIT_TIMED_STORE_ITEM_PRIMARY; } @Override public RpkitTimedStoreItem as(String alias) { return new RpkitTimedStoreItem(DSL.name(alias), this); } @Override public RpkitTimedStoreItem as(Name alias) { return new RpkitTimedStoreItem(alias, this); } /** * Rename this table */ @Override public RpkitTimedStoreItem rename(String name) { return new RpkitTimedStoreItem(DSL.name(name), null); } /** * Rename this table */ @Override public RpkitTimedStoreItem rename(Name name) { return new RpkitTimedStoreItem(name, null); } // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @Override public Row3<Integer, Integer, Long> fieldsRow() { return (Row3) super.fieldsRow(); } }
{'content_hash': 'f6fbc88c8935a420c83dc0e45d5cac82', 'timestamp': '', 'source': 'github', 'line_count': 149, 'max_line_length': 166, 'avg_line_length': 30.40268456375839, 'alnum_prop': 0.6607064017660044, 'repo_name': 'RP-Kit/RPKit', 'id': 'd024ee4b1587cbff78b4b5297d8f989634489d5b', 'size': '4530', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'bukkit/rpk-stores-bukkit/src/main/java/com/rpkit/store/bukkit/database/jooq/tables/RpkitTimedStoreItem.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '80874'}, {'name': 'Kotlin', 'bytes': '3599677'}]}
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{'content_hash': '0193c84ae4fb1c603056b07f382c582d', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.23076923076923, 'alnum_prop': 0.6917293233082706, 'repo_name': 'mdoering/backbone', 'id': '60c9ac76a1db6ae1132927d0b8de57562d49f9ea', 'size': '203', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Magnoliopsida/Rosales/Rosaceae/Rubus/Rubus scissus/ Syn. Rubus fissus acicularis/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
<?php namespace Ratchet\WebSocket\Version; use Ratchet\WebSocket\Version\RFC6455\Frame; /** * @covers Ratchet\WebSocket\Version\Hybi10 */ class HyBi10Test extends \PHPUnit_Framework_TestCase { protected $_version; public function setUp() { $this->_version = new HyBi10(); } /** * Is this useful? */ public function testClassImplementsVersionInterface() { $constraint = $this->isInstanceOf('\\Ratchet\\WebSocket\\Version\\VersionInterface'); $this->assertThat($this->_version, $constraint); } /** * @dataProvider HandshakeProvider */ public function testKeySigningForHandshake($key, $accept) { $this->assertEquals($accept, $this->_version->sign($key)); } public static function HandshakeProvider() { return array( array('x3JJHMbDL1EzLkh9GBhXDw==', 'HSmrc0sMlYUkAGmm5OPpG2HaGWk=') , array('dGhlIHNhbXBsZSBub25jZQ==', 's3pPLMBiTxaQ9kYGzzhZRbK+xOo='), ); } /** * @dataProvider UnframeMessageProvider */ public function testUnframeMessage($message, $framed) { // $decoded = $this->_version->unframe(base64_decode($framed)); $frame = new Frame(); $frame->addBuffer(base64_decode($framed)); $this->assertEquals($message, $frame->getPayload()); } public static function UnframeMessageProvider() { return array( array('Hello World!', 'gYydAIfa1WXrtvIg0LXvbOP7') , array('!@#$%^&*()-=_+[]{}\|/.,<>`~', 'gZv+h96r38f9j9vZ+IHWrvOWoayF9oX6gtfRqfKXwOeg') , array('ಠ_ಠ', 'gYfnSpu5B/g75gf4Ow==') , array("The quick brown fox jumps over the lazy dog. All work and no play makes Chris a dull boy. I'm trying to get past 128 characters for a unit test here...", 'gf4Amahb14P8M7Kj2S6+4MN7tfHHLLmjzjSvo8IuuvPbe7j1zSn398A+9+/JIa6jzDSwrYh7lu/Ee6Ds2jD34sY/9+3He6fvySL37skwsvCIGL/xwSj34og/ou/Ee7Xs0XX3o+F8uqPcKa7qxjz398d7sObce6fi2y/3sppj9+DAOqXiyy+y8dt7sezae7aj3TW+94gvsvDce7/m2j75rYY='), ); } public function testUnframeMatchesPreFraming() { $string = 'Hello World!'; $framed = $this->_version->newFrame($string)->getContents(); $frame = new Frame(); $frame->addBuffer($framed); $this->assertEquals($string, $frame->getPayload()); } }
{'content_hash': '3af47dcc1e4a2f3773036fc63046a747', 'timestamp': '', 'source': 'github', 'line_count': 76, 'max_line_length': 395, 'avg_line_length': 31.61842105263158, 'alnum_prop': 0.6242197253433208, 'repo_name': 'cnits/CnitSymfony', 'id': 'dd737c80d56b9a85b75120a6f02ff3491b03517e', 'size': '2407', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'vendor/gos/ratchet/tests/unit/WebSocket/Version/HyBi10Test.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '3297'}, {'name': 'Batchfile', 'bytes': '290'}, {'name': 'CSS', 'bytes': '471234'}, {'name': 'HTML', 'bytes': '2954530'}, {'name': 'JavaScript', 'bytes': '713222'}, {'name': 'PHP', 'bytes': '293428'}, {'name': 'Ruby', 'bytes': '4440'}, {'name': 'Shell', 'bytes': '1853'}]}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_18) on Tue Oct 19 21:35:16 BST 2010 --> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <TITLE> Uses of Interface gr.forth.ics.graph.InspectableGraph (FlexiGraph Reference) </TITLE> <META NAME="date" CONTENT="2010-10-19"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Interface gr.forth.ics.graph.InspectableGraph (FlexiGraph Reference)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?gr/forth/ics/graph//class-useInspectableGraph.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="InspectableGraph.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Interface<br>gr.forth.ics.graph.InspectableGraph</B></H2> </CENTER> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Packages that use <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph"><B>gr.forth.ics.graph</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.algo"><B>gr.forth.ics.graph.algo</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.algo.transitivity"><B>gr.forth.ics.graph.algo.transitivity</B></A></TD> <TD>Object-oriented transitive closure and reduction algorithms.&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.event"><B>gr.forth.ics.graph.event</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.io"><B>gr.forth.ics.graph.io</B></A></TD> <TD>Input/Output utilities for reading/writing graphs.&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.io.gml"><B>gr.forth.ics.graph.io.gml</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.io.pajek"><B>gr.forth.ics.graph.io.pajek</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.layout"><B>gr.forth.ics.graph.layout</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.layout.circular"><B>gr.forth.ics.graph.layout.circular</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.layout.forces2d"><B>gr.forth.ics.graph.layout.forces2d</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.layout.random"><B>gr.forth.ics.graph.layout.random</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.metrics"><B>gr.forth.ics.graph.metrics</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#gr.forth.ics.graph.path"><B>gr.forth.ics.graph.path</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/package-summary.html">gr.forth.ics.graph</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Subinterfaces of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/package-summary.html">gr.forth.ics.graph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;interface</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/Graph.html" title="interface in gr.forth.ics.graph">Graph</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A modifiable graph.</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Classes in <A HREF="../../../../../gr/forth/ics/graph/package-summary.html">gr.forth.ics.graph</A> that implement <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/FoldingGraph.html" title="class in gr.forth.ics.graph">FoldingGraph</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/GraphForwarder.html" title="class in gr.forth.ics.graph">GraphForwarder</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/InspectableGraphForwarder.html" title="class in gr.forth.ics.graph">InspectableGraphForwarder</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/PrimaryGraph.html" title="class in gr.forth.ics.graph">PrimaryGraph</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fastest <A HREF="../../../../../gr/forth/ics/graph/Graph.html" title="interface in gr.forth.ics.graph"><CODE>Graph</CODE></A> implementation, which has the restriction that its nodes and edges cannot be contained in any other <code>PrimaryGraph</code> (but they can be contained in as many <A HREF="../../../../../gr/forth/ics/graph/SecondaryGraph.html" title="class in gr.forth.ics.graph"><CODE>SecondaryGraph</CODE></A>s as desirable).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/SecondaryGraph.html" title="class in gr.forth.ics.graph">SecondaryGraph</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flexible <A HREF="../../../../../gr/forth/ics/graph/Graph.html" title="interface in gr.forth.ics.graph"><CODE>Graph</CODE></A> implementation, which can contain (adopt) nodes and edges from any other graph.</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Fields in <A HREF="../../../../../gr/forth/ics/graph/package-summary.html">gr.forth.ics.graph</A> declared as <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>InspectableGraphForwarder.</B><B><A HREF="../../../../../gr/forth/ics/graph/InspectableGraphForwarder.html#inspectableGraph">inspectableGraph</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/package-summary.html">gr.forth.ics.graph</A> that return <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>InspectableGraphForwarder.</B><B><A HREF="../../../../../gr/forth/ics/graph/InspectableGraphForwarder.html#getDelegateGraph()">getDelegateGraph</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Tuple.</B><B><A HREF="../../../../../gr/forth/ics/graph/Tuple.html#getInspectableGraph(java.lang.Object)">getInspectableGraph</A></B>(java.lang.Object&nbsp;key)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the given key as InspectableGraph.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#intersection(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.InspectableGraph)">intersection</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g1, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g2)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#inverted(gr.forth.ics.graph.InspectableGraph)">inverted</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#subtraction(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.InspectableGraph)">subtraction</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g1, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g2)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#undirected(gr.forth.ics.graph.InspectableGraph)">undirected</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#union(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.InspectableGraph)">union</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g1, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g2)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#xor(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.InspectableGraph)">xor</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g1, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g2)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/package-summary.html">gr.forth.ics.graph</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B>SecondaryGraph.</B><B><A HREF="../../../../../gr/forth/ics/graph/SecondaryGraph.html#adoptGraph(gr.forth.ics.graph.InspectableGraph)">adoptGraph</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/event/NodeListener.html" title="interface in gr.forth.ics.graph.event">NodeListener</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#attachNodeNamer(gr.forth.ics.graph.InspectableGraph)">attachNodeNamer</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;java.util.Set&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#collectNodes(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Node, gr.forth.ics.graph.Direction)">collectNodes</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;start, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;java.util.Set&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#collectNodes(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Node, gr.forth.ics.graph.Direction, java.util.Set)">collectNodes</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;start, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction, java.util.Set&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;&nbsp;set)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/Graph.html" title="interface in gr.forth.ics.graph">Graph</A></CODE></FONT></TD> <TD><CODE><B>GraphCloner.</B><B><A HREF="../../../../../gr/forth/ics/graph/GraphCloner.html#copy(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Graph)">copy</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;source, <A HREF="../../../../../gr/forth/ics/graph/Graph.html" title="interface in gr.forth.ics.graph">Graph</A>&nbsp;copy)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copies the specified graph, into the supplied graph instance, and returns the copy.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#degreeAtLeast(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Direction, int)">degreeAtLeast</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#degreeAtLeast(gr.forth.ics.graph.InspectableGraph, int)">degreeAtLeast</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#degreeAtMost(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Direction, int)">degreeAtMost</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#degreeAtMost(gr.forth.ics.graph.InspectableGraph, int)">degreeAtMost</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#degreeEqual(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Direction, int)">degreeEqual</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#degreeEqual(gr.forth.ics.graph.InspectableGraph, int)">degreeEqual</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#equalGraphs(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.InspectableGraph)">equalGraphs</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g1, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g2)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true for graphs g1 and g2 have identical elements.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#inDegreeAtLeast(gr.forth.ics.graph.InspectableGraph, int)">inDegreeAtLeast</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#inDegreeAtMost(gr.forth.ics.graph.InspectableGraph, int)">inDegreeAtMost</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#inDegreeEqual(gr.forth.ics.graph.InspectableGraph, int)">inDegreeEqual</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#intersection(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.InspectableGraph)">intersection</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g1, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g2)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#inverted(gr.forth.ics.graph.InspectableGraph)">inverted</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B>GraphChecker.</B><B><A HREF="../../../../../gr/forth/ics/graph/GraphChecker.html#isAcyclic(gr.forth.ics.graph.InspectableGraph)">isAcyclic</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the specified graph is acyclic (in other words, a dag)</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B>GraphChecker.</B><B><A HREF="../../../../../gr/forth/ics/graph/GraphChecker.html#isBiconnected(gr.forth.ics.graph.InspectableGraph)">isBiconnected</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B>GraphChecker.</B><B><A HREF="../../../../../gr/forth/ics/graph/GraphChecker.html#isConnected(gr.forth.ics.graph.InspectableGraph)">isConnected</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether the specified graph is connected, using undirected semantics (without needing to wrap the graph in <A HREF="../../../../../gr/forth/ics/graph/Graphs.html#undirected(gr.forth.ics.graph.InspectableGraph)"><CODE>Graphs.undirected(InspectableGraph)</CODE></A>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B>GraphChecker.</B><B><A HREF="../../../../../gr/forth/ics/graph/GraphChecker.html#isForest(gr.forth.ics.graph.InspectableGraph)">isForest</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B>GraphChecker.</B><B><A HREF="../../../../../gr/forth/ics/graph/GraphChecker.html#isStronglyConnected(gr.forth.ics.graph.InspectableGraph)">isStronglyConnected</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether the specified graph is strongly connected.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B>GraphChecker.</B><B><A HREF="../../../../../gr/forth/ics/graph/GraphChecker.html#isTree(gr.forth.ics.graph.InspectableGraph)">isTree</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;int</CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#maxDegree(gr.forth.ics.graph.InspectableGraph)">maxDegree</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the max node degree found in the specified graph.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;int</CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#maxDegree(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Direction)">maxDegree</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the max node degree found in the specified graph, with the given direction.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;int</CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#minDegree(gr.forth.ics.graph.InspectableGraph)">minDegree</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the min node degree found in the specified graph.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;int</CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#minDegree(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Direction)">minDegree</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the min node degree found in the specified graph, with the given direction.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#outDegreeAtLeast(gr.forth.ics.graph.InspectableGraph, int)">outDegreeAtLeast</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#outDegreeAtMost(gr.forth.ics.graph.InspectableGraph, int)">outDegreeAtMost</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/util/Filter.html" title="interface in gr.forth.ics.util">Filter</A>&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Filters.</B><B><A HREF="../../../../../gr/forth/ics/graph/Filters.html#outDegreeEqual(gr.forth.ics.graph.InspectableGraph, int)">outDegreeEqual</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, int&nbsp;degree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;java.lang.Appendable</CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#printCompact(gr.forth.ics.graph.InspectableGraph)">printCompact</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;java.lang.Appendable</CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#printCompact(gr.forth.ics.graph.InspectableGraph, java.lang.Appendable)">printCompact</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, java.lang.Appendable&nbsp;appendable)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;java.lang.Appendable</CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#printPretty(gr.forth.ics.graph.InspectableGraph)">printPretty</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;java.lang.Appendable</CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#printPretty(gr.forth.ics.graph.InspectableGraph, java.lang.Appendable)">printPretty</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, java.lang.Appendable&nbsp;appendable)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B>SecondaryGraph.</B><B><A HREF="../../../../../gr/forth/ics/graph/SecondaryGraph.html#removeGraph(gr.forth.ics.graph.InspectableGraph)">removeGraph</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B>SecondaryGraph.</B><B><A HREF="../../../../../gr/forth/ics/graph/SecondaryGraph.html#retainGraph(gr.forth.ics.graph.InspectableGraph)">retainGraph</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#subtraction(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.InspectableGraph)">subtraction</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g1, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g2)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#undirected(gr.forth.ics.graph.InspectableGraph)">undirected</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#union(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.InspectableGraph)">union</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g1, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g2)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Graphs.</B><B><A HREF="../../../../../gr/forth/ics/graph/Graphs.html#xor(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.InspectableGraph)">xor</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g1, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g2)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../gr/forth/ics/graph/package-summary.html">gr.forth.ics.graph</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/InspectableGraphForwarder.html#InspectableGraphForwarder(gr.forth.ics.graph.InspectableGraph)">InspectableGraphForwarder</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;delegate)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/SecondaryGraph.html#SecondaryGraph(gr.forth.ics.graph.InspectableGraph)">SecondaryGraph</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/SecondaryGraph.html#SecondaryGraph(gr.forth.ics.graph.InspectableGraph, java.lang.Iterable)">SecondaryGraph</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, java.lang.Iterable&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;&nbsp;nodes)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.algo"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/algo/package-summary.html">gr.forth.ics.graph.algo</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Fields in <A HREF="../../../../../gr/forth/ics/graph/algo/package-summary.html">gr.forth.ics.graph.algo</A> declared as <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>AbstractSearch.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/AbstractSearch.html#graph">graph</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/algo/package-summary.html">gr.forth.ics.graph.algo</A> that return <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>BlockCutPointTree.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/BlockCutPointTree.html#get()">get</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the graph representing the block-cutpoint tree.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>AbstractSearch.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/AbstractSearch.html#getGraph()">getGraph</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Biconnectivity.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Biconnectivity.html#getGraph()">getGraph</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Clusterer.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Clusterer.html#getGraph()">getGraph</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Trees.NodeLevelFinder.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Trees.NodeLevelFinder.html#getGraph()">getGraph</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the graph that contained the tree that was inspected.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Trees.DiameterFinder.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Trees.DiameterFinder.html#getGraph()">getGraph</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the graph that contained the tree that was inspected.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>Trees.SubtreeAnalyzer.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Trees.SubtreeAnalyzer.html#getGraph()">getGraph</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the graph that contained the tree that was inspected.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>BlockCutPointTree.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/BlockCutPointTree.html#getOriginalGraph()">getOriginalGraph</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the graph instance from which this block-cutpoint tree was created.</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/algo/package-summary.html">gr.forth.ics.graph.algo</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/Trees.SubtreeAnalyzer.html" title="class in gr.forth.ics.graph.algo">Trees.SubtreeAnalyzer</A></CODE></FONT></TD> <TD><CODE><B>Trees.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Trees.html#analyzeSubtrees(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Node, gr.forth.ics.graph.Direction)">analyzeSubtrees</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;root, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;directionFromRootToKids)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds the number of nodes and leaves for every subtree of the specified tree.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/Layerer.html" title="interface in gr.forth.ics.graph.algo">Layerer</A></CODE></FONT></TD> <TD><CODE><B>Layerers.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Layerers.html#bfs(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Direction)">bfs</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/Layerer.html" title="interface in gr.forth.ics.graph.algo">Layerer</A></CODE></FONT></TD> <TD><CODE><B>Layerers.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Layerers.html#bfs(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Node, gr.forth.ics.graph.Direction)">bfs</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;n, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/Clusterer.html" title="interface in gr.forth.ics.graph.algo">Clusterer</A></CODE></FONT></TD> <TD><CODE><B>Clusterers.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Clusterers.html#connectedComponents(gr.forth.ics.graph.InspectableGraph)">connectedComponents</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the connected components of a graph, using undirected semantics (without needing to wrap the graph in <A HREF="../../../../../gr/forth/ics/graph/Graphs.html#undirected(gr.forth.ics.graph.InspectableGraph)"><CODE>Graphs.undirected(InspectableGraph)</CODE></A>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/Biconnectivity.html" title="class in gr.forth.ics.graph.algo">Biconnectivity</A></CODE></FONT></TD> <TD><CODE><B>Biconnectivity.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Biconnectivity.html#execute(gr.forth.ics.graph.InspectableGraph)">execute</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Executes the biconnectivity analyzer on the given graph.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/BlockCutPointTree.html" title="class in gr.forth.ics.graph.algo">BlockCutPointTree</A></CODE></FONT></TD> <TD><CODE><B>BlockCutPointTree.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/BlockCutPointTree.html#execute(gr.forth.ics.graph.InspectableGraph)">execute</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a block-cutpoint tree from a graph.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/KCoreDecomposition.html" title="class in gr.forth.ics.graph.algo">KCoreDecomposition</A></CODE></FONT></TD> <TD><CODE><B>KCoreDecomposition.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/KCoreDecomposition.html#execute(gr.forth.ics.graph.InspectableGraph)">execute</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a K-core decomposition for the specified graph.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A></CODE></FONT></TD> <TD><CODE><B>Trees.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Trees.html#findCenter(gr.forth.ics.graph.InspectableGraph)">findCenter</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;tree)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the center of the tree.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;int</CODE></FONT></TD> <TD><CODE><B>Trees.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Trees.html#findDiameter(gr.forth.ics.graph.InspectableGraph)">findDiameter</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds the diameter (number of edges in the longest path) of a tree.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/Trees.DiameterFinder.html" title="class in gr.forth.ics.graph.algo">Trees.DiameterFinder</A></CODE></FONT></TD> <TD><CODE><B>Trees.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Trees.html#findDiameter(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Node, gr.forth.ics.graph.Direction)">findDiameter</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;root, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;directionToKids)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds the diameter (number of edges in the longest path) of each subtree of a tree.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/Trees.NodeLevelFinder.html" title="class in gr.forth.ics.graph.algo">Trees.NodeLevelFinder</A></CODE></FONT></TD> <TD><CODE><B>Trees.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Trees.html#findNodeLevels(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Node, gr.forth.ics.graph.Direction)">findNodeLevels</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;root, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;directionToKids)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Executes the node-level finding algorithm on a tree.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/path/Path.html" title="interface in gr.forth.ics.graph.path">Path</A></CODE></FONT></TD> <TD><CODE><B>Dags.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Dags.html#longestPath(gr.forth.ics.graph.InspectableGraph)">longestPath</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds a longest path in a DAG.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;java.util.List&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Orders.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Orders.html#reverseTopological(gr.forth.ics.graph.InspectableGraph)">reverseTopological</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an inverse topological order of the specified graph, which must be acyclic.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/Clusterer.html" title="interface in gr.forth.ics.graph.algo">Clusterer</A></CODE></FONT></TD> <TD><CODE><B>Clusterers.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Clusterers.html#stronglyConnectedComponents(gr.forth.ics.graph.InspectableGraph)">stronglyConnectedComponents</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds the strongly connected components of a graph, using Tarjan's algorithm.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;java.util.List&lt;<A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&gt;</CODE></FONT></TD> <TD><CODE><B>Orders.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/Orders.html#topological(gr.forth.ics.graph.InspectableGraph)">topological</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a topological order of the specified graph, which must be acyclic.</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../gr/forth/ics/graph/algo/package-summary.html">gr.forth.ics.graph.algo</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/algo/AbstractSearch.html#AbstractSearch(gr.forth.ics.graph.InspectableGraph)">AbstractSearch</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/algo/AbstractSearch.html#AbstractSearch(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Node)">AbstractSearch</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;startNode)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/algo/Bfs.html#Bfs(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Direction)">Bfs</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/algo/Bfs.html#Bfs(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Node, gr.forth.ics.graph.Direction)">Bfs</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;startNode, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/algo/DegreeSorter.html#DegreeSorter(gr.forth.ics.graph.InspectableGraph)">DegreeSorter</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a BucketSort attached on the specified graph, where the degree of each node is taken via <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html#degree(gr.forth.ics.graph.Node)"><CODE>degree(Node)</CODE></A>, i.e. undirected.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/algo/DegreeSorter.html#DegreeSorter(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Direction)">DegreeSorter</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;degreeDirection)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a BucketSort attached on the specified graph, where the degree of each node is taken via <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html#degree(gr.forth.ics.graph.Node, gr.forth.ics.graph.Direction)"><CODE>degree(Node, Direction)</CODE></A>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/algo/Dfs.html#Dfs(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Direction)">Dfs</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/algo/Dfs.html#Dfs(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Node, gr.forth.ics.graph.Direction)">Dfs</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;startNode, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.algo.transitivity"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/package-summary.html">gr.forth.ics.graph.algo.transitivity</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/package-summary.html">gr.forth.ics.graph.algo.transitivity</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/Closure.html" title="interface in gr.forth.ics.graph.algo.transitivity">Closure</A></CODE></FONT></TD> <TD><CODE><B>Transitivity.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/Transitivity.html#acyclicClosure(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.algo.transitivity.SuccessorSetFactory)">acyclicClosure</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, <A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/SuccessorSetFactory.html" title="class in gr.forth.ics.graph.algo.transitivity">SuccessorSetFactory</A>&nbsp;successorSetFactory)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates the transitive <A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/Closure.html" title="interface in gr.forth.ics.graph.algo.transitivity"><CODE>Closure</CODE></A> of a directed acyclic graph, using the specified factory of successor sets.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;void</CODE></FONT></TD> <TD><CODE><B>Transitivity.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/Transitivity.html#acyclicClosureSweep(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.algo.transitivity.SuccessorSetFactory, gr.forth.ics.graph.algo.transitivity.Transitivity.SuccessorsListener)">acyclicClosureSweep</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, <A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/SuccessorSetFactory.html" title="class in gr.forth.ics.graph.algo.transitivity">SuccessorSetFactory</A>&nbsp;successorSetFactory, <A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/Transitivity.SuccessorsListener.html" title="interface in gr.forth.ics.graph.algo.transitivity">Transitivity.SuccessorsListener</A>&nbsp;listener)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sweeps the graph in reverse-topological order (i.e. starting with nodes with zero out-degree, and ending at nodes with zero in-degree), creates on-the-fly the successor set for each node, notifies the provided <A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/Transitivity.SuccessorsListener.html" title="interface in gr.forth.ics.graph.algo.transitivity"><CODE>Transitivity.SuccessorsListener</CODE></A> to do arbitrary processing when the complete successor set is available for each node, and then discards the successor sets when they are no longer needed.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/Closure.html" title="interface in gr.forth.ics.graph.algo.transitivity">Closure</A></CODE></FONT></TD> <TD><CODE><B>Transitivity.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/Transitivity.html#generalClosure(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.algo.transitivity.SuccessorSetFactory)">generalClosure</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, <A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/SuccessorSetFactory.html" title="class in gr.forth.ics.graph.algo.transitivity">SuccessorSetFactory</A>&nbsp;successorSetFactory)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/SuccessorSetFactory.html" title="class in gr.forth.ics.graph.algo.transitivity">SuccessorSetFactory</A></CODE></FONT></TD> <TD><CODE><B>SuccessorSetFactory.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/SuccessorSetFactory.html#intervalBased(gr.forth.ics.graph.InspectableGraph)">intervalBased</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>SuccessorSetFactory</code> that creates successor sets represented as integer intervals, which is much more compact than <code>HashSet</code>s.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/PathFinder.html" title="interface in gr.forth.ics.graph.algo.transitivity">PathFinder</A></CODE></FONT></TD> <TD><CODE><B>PathFinders.</B><B><A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/PathFinders.html#navigational(gr.forth.ics.graph.InspectableGraph)">navigational</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <A HREF="../../../../../gr/forth/ics/graph/algo/transitivity/PathFinder.html" title="interface in gr.forth.ics.graph.algo.transitivity"><CODE>PathFinder</CODE></A> that answers whether two nodes are connected simply by doing an exploration starting from the first node, and checking whether the second can be reached via some path.</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.event"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/event/package-summary.html">gr.forth.ics.graph.event</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/event/package-summary.html">gr.forth.ics.graph.event</A> that return <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></CODE></FONT></TD> <TD><CODE><B>GraphEvent.</B><B><A HREF="../../../../../gr/forth/ics/graph/event/GraphEvent.html#getSource()">getSource</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/event/package-summary.html">gr.forth.ics.graph.event</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/event/WeakListener.html" title="class in gr.forth.ics.graph.event">WeakListener</A></CODE></FONT></TD> <TD><CODE><B>WeakListener.</B><B><A HREF="../../../../../gr/forth/ics/graph/event/WeakListener.html#createAndAttach(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.event.GraphListener)">createAndAttach</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/event/GraphListener.html" title="interface in gr.forth.ics.graph.event">GraphListener</A>&nbsp;delegateListener)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a WeakListener and attaches it to a graph.</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../gr/forth/ics/graph/event/package-summary.html">gr.forth.ics.graph.event</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/event/GraphEvent.html#GraphEvent(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.event.GraphEvent.Type, java.lang.Object)">GraphEvent</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;source, <A HREF="../../../../../gr/forth/ics/graph/event/GraphEvent.Type.html" title="enum in gr.forth.ics.graph.event">GraphEvent.Type</A>&nbsp;type, java.lang.Object&nbsp;data)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.io"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/io/package-summary.html">gr.forth.ics.graph.io</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/io/package-summary.html">gr.forth.ics.graph.io</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;void</CODE></FONT></TD> <TD><CODE><B>GraphIO.</B><B><A HREF="../../../../../gr/forth/ics/graph/io/GraphIO.html#write(gr.forth.ics.graph.io.Format, gr.forth.ics.graph.InspectableGraph, java.io.File)">write</A></B>(<A HREF="../../../../../gr/forth/ics/graph/io/Format.html" title="enum in gr.forth.ics.graph.io">Format</A>&nbsp;format, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, java.io.File&nbsp;file)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a graph using the specified format to a target file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;void</CODE></FONT></TD> <TD><CODE><B>GraphIO.</B><B><A HREF="../../../../../gr/forth/ics/graph/io/GraphIO.html#write(gr.forth.ics.graph.io.Format, gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.Locator, java.io.File)">write</A></B>(<A HREF="../../../../../gr/forth/ics/graph/io/Format.html" title="enum in gr.forth.ics.graph.io">Format</A>&nbsp;format, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;locator, java.io.File&nbsp;file)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a graph using the specified format to a target file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;void</CODE></FONT></TD> <TD><CODE><B>GraphIO.</B><B><A HREF="../../../../../gr/forth/ics/graph/io/GraphIO.html#write(gr.forth.ics.graph.io.Format, gr.forth.ics.graph.InspectableGraph, java.io.OutputStream)">write</A></B>(<A HREF="../../../../../gr/forth/ics/graph/io/Format.html" title="enum in gr.forth.ics.graph.io">Format</A>&nbsp;format, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, java.io.OutputStream&nbsp;out)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a graph using the specified format to a target output stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B>GraphWriter.</B><B><A HREF="../../../../../gr/forth/ics/graph/io/GraphWriter.html#write(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.Locator, java.io.OutputStream)">write</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;locator, java.io.OutputStream&nbsp;out)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.io.gml"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/io/gml/package-summary.html">gr.forth.ics.graph.io.gml</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/io/gml/package-summary.html">gr.forth.ics.graph.io.gml</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B>GmlWriter.</B><B><A HREF="../../../../../gr/forth/ics/graph/io/gml/GmlWriter.html#write(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.Locator, java.io.OutputStream)">write</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;locator, java.io.OutputStream&nbsp;out)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.io.pajek"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/io/pajek/package-summary.html">gr.forth.ics.graph.io.pajek</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/io/pajek/package-summary.html">gr.forth.ics.graph.io.pajek</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B>PajekWriter.</B><B><A HREF="../../../../../gr/forth/ics/graph/io/pajek/PajekWriter.html#write(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.Locator, java.io.OutputStream)">write</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;locator, java.io.OutputStream&nbsp;out)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.layout"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/layout/package-summary.html">gr.forth.ics.graph.layout</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/layout/package-summary.html">gr.forth.ics.graph.layout</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;void</CODE></FONT></TD> <TD><CODE><B>Locators.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/Locators.html#copy(gr.forth.ics.graph.layout.Locator, gr.forth.ics.graph.layout.Locator, gr.forth.ics.graph.InspectableGraph)">copy</A></B>(<A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;from, <A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;to, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/layout/GRect.html" title="class in gr.forth.ics.graph.layout">GRect</A></CODE></FONT></TD> <TD><CODE><B>Locators.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/Locators.html#getBoundingBox(gr.forth.ics.graph.layout.Locator, gr.forth.ics.graph.InspectableGraph)">getBoundingBox</A></B>(<A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;locator, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/layout/LayoutProcess.html" title="interface in gr.forth.ics.graph.layout">LayoutProcess</A></CODE></FONT></TD> <TD><CODE><B>Layout.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/Layout.html#layout(gr.forth.ics.graph.InspectableGraph)">layout</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;void</CODE></FONT></TD> <TD><CODE><B>Locators.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/Locators.html#zoomToRect(gr.forth.ics.graph.layout.Locator, gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.GRect)">zoomToRect</A></B>(<A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;locator, <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/GRect.html" title="class in gr.forth.ics.graph.layout">GRect</A>&nbsp;space)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.layout.circular"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/layout/circular/package-summary.html">gr.forth.ics.graph.layout.circular</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/layout/circular/package-summary.html">gr.forth.ics.graph.layout.circular</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/layout/circular/CircularOrder.html" title="class in gr.forth.ics.graph.layout.circular">CircularOrder</A></CODE></FONT></TD> <TD><CODE><B>Circular.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/circular/Circular.html#execute(gr.forth.ics.graph.InspectableGraph)">execute</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/layout/LayoutProcess.html" title="interface in gr.forth.ics.graph.layout">LayoutProcess</A></CODE></FONT></TD> <TD><CODE><B>CircularLayout.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/circular/CircularLayout.html#layout(gr.forth.ics.graph.InspectableGraph)">layout</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.layout.forces2d"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/package-summary.html">gr.forth.ics.graph.layout.forces2d</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/package-summary.html">gr.forth.ics.graph.layout.forces2d</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected abstract &nbsp;void</CODE></FONT></TD> <TD><CODE><B>AbstractForce.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/AbstractForce.html#apply(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.forces2d.ForceAggregator)">apply</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceAggregator.html" title="interface in gr.forth.ics.graph.layout.forces2d">ForceAggregator</A>&nbsp;forceMap)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;void</CODE></FONT></TD> <TD><CODE><B>EdgeForce.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/EdgeForce.html#apply(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.forces2d.ForceAggregator)">apply</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceAggregator.html" title="interface in gr.forth.ics.graph.layout.forces2d">ForceAggregator</A>&nbsp;forceMap)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;void</CODE></FONT></TD> <TD><CODE><B>NodeForce.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/NodeForce.html#apply(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.forces2d.ForceAggregator)">apply</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceAggregator.html" title="interface in gr.forth.ics.graph.layout.forces2d">ForceAggregator</A>&nbsp;forceMap)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;void</CODE></FONT></TD> <TD><CODE><B>NodeToNodeForce.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/NodeToNodeForce.html#apply(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.forces2d.ForceAggregator)">apply</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceAggregator.html" title="interface in gr.forth.ics.graph.layout.forces2d">ForceAggregator</A>&nbsp;forceMap)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B>AbstractForce.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/AbstractForce.html#apply(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.Locator, gr.forth.ics.graph.layout.forces2d.ForceAggregator)">apply</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;locator, <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceAggregator.html" title="interface in gr.forth.ics.graph.layout.forces2d">ForceAggregator</A>&nbsp;forceMap)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B>Force.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/Force.html#apply(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.Locator, gr.forth.ics.graph.layout.forces2d.ForceAggregator)">apply</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;locator, <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceAggregator.html" title="interface in gr.forth.ics.graph.layout.forces2d">ForceAggregator</A>&nbsp;forceMap)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B>Forces.ScaledForce.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/Forces.ScaledForce.html#apply(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.Locator, gr.forth.ics.graph.layout.forces2d.ForceAggregator)">apply</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;locator, <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceAggregator.html" title="interface in gr.forth.ics.graph.layout.forces2d">ForceAggregator</A>&nbsp;forceMap)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;<A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceAggregator.html" title="interface in gr.forth.ics.graph.layout.forces2d">ForceAggregator</A></CODE></FONT></TD> <TD><CODE><B>ForceLayoutProcess.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceLayoutProcess.html#createForceMap(gr.forth.ics.graph.InspectableGraph)">createForceMap</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;void</CODE></FONT></TD> <TD><CODE><B>ForceLayoutProcess.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceLayoutProcess.html#initProcess(gr.forth.ics.graph.InspectableGraph)">initProcess</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called before anything else, once.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/layout/LayoutProcess.html" title="interface in gr.forth.ics.graph.layout">LayoutProcess</A></CODE></FONT></TD> <TD><CODE><B>FruchtermanReingoldLayout.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/FruchtermanReingoldLayout.html#layout(gr.forth.ics.graph.InspectableGraph)">layout</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;void</CODE></FONT></TD> <TD><CODE><B>ForceLayoutProcess.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceLayoutProcess.html#step(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.Locator, gr.forth.ics.graph.layout.forces2d.ForceAggregator)">step</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/Locator.html" title="interface in gr.forth.ics.graph.layout">Locator</A>&nbsp;locator, <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceAggregator.html" title="interface in gr.forth.ics.graph.layout.forces2d">ForceAggregator</A>&nbsp;forceMap)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/package-summary.html">gr.forth.ics.graph.layout.forces2d</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceLayoutProcess.html#ForceLayoutProcess(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.layout.forces2d.Force...)">ForceLayoutProcess</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/Force.html" title="interface in gr.forth.ics.graph.layout.forces2d">Force</A>...&nbsp;forces)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/ForceLayoutProcess.html#ForceLayoutProcess(gr.forth.ics.graph.InspectableGraph, java.util.List)">ForceLayoutProcess</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, java.util.List&lt;<A HREF="../../../../../gr/forth/ics/graph/layout/forces2d/Force.html" title="interface in gr.forth.ics.graph.layout.forces2d">Force</A>&gt;&nbsp;forces)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.layout.random"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/layout/random/package-summary.html">gr.forth.ics.graph.layout.random</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/layout/random/package-summary.html">gr.forth.ics.graph.layout.random</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/layout/LayoutProcess.html" title="interface in gr.forth.ics.graph.layout">LayoutProcess</A></CODE></FONT></TD> <TD><CODE><B>RandomLayout.</B><B><A HREF="../../../../../gr/forth/ics/graph/layout/random/RandomLayout.html#layout(gr.forth.ics.graph.InspectableGraph)">layout</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.metrics"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/metrics/package-summary.html">gr.forth.ics.graph.metrics</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/metrics/package-summary.html">gr.forth.ics.graph.metrics</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/metrics/NodeMetric.html" title="interface in gr.forth.ics.graph.metrics">NodeMetric</A></CODE></FONT></TD> <TD><CODE><B>Metrics.</B><B><A HREF="../../../../../gr/forth/ics/graph/metrics/Metrics.html#degreeMetric(gr.forth.ics.graph.InspectableGraph)">degreeMetric</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/metrics/NodeMetric.html" title="interface in gr.forth.ics.graph.metrics">NodeMetric</A></CODE></FONT></TD> <TD><CODE><B>Metrics.</B><B><A HREF="../../../../../gr/forth/ics/graph/metrics/Metrics.html#degreeMetric(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Direction)">degreeMetric</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/metrics/BrandesMetrics.html" title="class in gr.forth.ics.graph.metrics">BrandesMetrics</A></CODE></FONT></TD> <TD><CODE><B>BrandesMetrics.</B><B><A HREF="../../../../../gr/forth/ics/graph/metrics/BrandesMetrics.html#execute(gr.forth.ics.graph.InspectableGraph, boolean)">execute</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, boolean&nbsp;directed)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/metrics/ClusteringMetrics.html" title="class in gr.forth.ics.graph.metrics">ClusteringMetrics</A></CODE></FONT></TD> <TD><CODE><B>ClusteringMetrics.</B><B><A HREF="../../../../../gr/forth/ics/graph/metrics/ClusteringMetrics.html#execute(gr.forth.ics.graph.InspectableGraph, boolean)">execute</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, boolean&nbsp;isDirected)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/metrics/NodeMetric.html" title="interface in gr.forth.ics.graph.metrics">NodeMetric</A></CODE></FONT></TD> <TD><CODE><B>Metrics.</B><B><A HREF="../../../../../gr/forth/ics/graph/metrics/Metrics.html#inDegreeMetric(gr.forth.ics.graph.InspectableGraph)">inDegreeMetric</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/metrics/NodeMetric.html" title="interface in gr.forth.ics.graph.metrics">NodeMetric</A></CODE></FONT></TD> <TD><CODE><B>Metrics.</B><B><A HREF="../../../../../gr/forth/ics/graph/metrics/Metrics.html#normalizedDegreeMetric(gr.forth.ics.graph.InspectableGraph)">normalizedDegreeMetric</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/metrics/NodeMetric.html" title="interface in gr.forth.ics.graph.metrics">NodeMetric</A></CODE></FONT></TD> <TD><CODE><B>Metrics.</B><B><A HREF="../../../../../gr/forth/ics/graph/metrics/Metrics.html#normalizedDegreeMetric(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Direction)">normalizedDegreeMetric</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/metrics/NodeMetric.html" title="interface in gr.forth.ics.graph.metrics">NodeMetric</A></CODE></FONT></TD> <TD><CODE><B>Metrics.</B><B><A HREF="../../../../../gr/forth/ics/graph/metrics/Metrics.html#normalizedInDegreeMetric(gr.forth.ics.graph.InspectableGraph)">normalizedInDegreeMetric</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/metrics/NodeMetric.html" title="interface in gr.forth.ics.graph.metrics">NodeMetric</A></CODE></FONT></TD> <TD><CODE><B>Metrics.</B><B><A HREF="../../../../../gr/forth/ics/graph/metrics/Metrics.html#normalizedOutDegreeMetric(gr.forth.ics.graph.InspectableGraph)">normalizedOutDegreeMetric</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/metrics/NodeMetric.html" title="interface in gr.forth.ics.graph.metrics">NodeMetric</A></CODE></FONT></TD> <TD><CODE><B>Metrics.</B><B><A HREF="../../../../../gr/forth/ics/graph/metrics/Metrics.html#outDegreeMetric(gr.forth.ics.graph.InspectableGraph)">outDegreeMetric</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="gr.forth.ics.graph.path"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A> in <A HREF="../../../../../gr/forth/ics/graph/path/package-summary.html">gr.forth.ics.graph.path</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../gr/forth/ics/graph/path/package-summary.html">gr.forth.ics.graph.path</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>abstract &nbsp;void</CODE></FONT></TD> <TD><CODE><B>Explorer.</B><B><A HREF="../../../../../gr/forth/ics/graph/path/Explorer.html#explore(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.path.Path, gr.forth.ics.graph.path.PathAccumulator)">explore</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;g, <A HREF="../../../../../gr/forth/ics/graph/path/Path.html" title="interface in gr.forth.ics.graph.path">Path</A>&nbsp;currentPath, <A HREF="../../../../../gr/forth/ics/graph/path/PathAccumulator.html" title="interface in gr.forth.ics.graph.path">PathAccumulator</A>&nbsp;accumulator)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/path/Path.html" title="interface in gr.forth.ics.graph.path">Path</A></CODE></FONT></TD> <TD><CODE><B>Cycles.</B><B><A HREF="../../../../../gr/forth/ics/graph/path/Cycles.html#findCycle(gr.forth.ics.graph.InspectableGraph)">findCycle</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds and returns a cycle of the specified graph, or <code>null</code> if no cycle was found.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../gr/forth/ics/graph/path/Path.html" title="interface in gr.forth.ics.graph.path">Path</A></CODE></FONT></TD> <TD><CODE><B>Paths.</B><B><A HREF="../../../../../gr/forth/ics/graph/path/Paths.html#findPath(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Node, gr.forth.ics.graph.Node, gr.forth.ics.graph.Direction)">findPath</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;start, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;target, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds a directed path from a node to another, in a given graph.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../gr/forth/ics/graph/path/Traverser.PathIterable.html" title="interface in gr.forth.ics.graph.path">Traverser.PathIterable</A></CODE></FONT></TD> <TD><CODE><B>Traverser.</B><B><A HREF="../../../../../gr/forth/ics/graph/path/Traverser.html#traverse(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.Node, gr.forth.ics.graph.Direction)">traverse</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/Node.html" title="interface in gr.forth.ics.graph">Node</A>&nbsp;startNode, <A HREF="../../../../../gr/forth/ics/graph/Direction.html" title="enum in gr.forth.ics.graph">Direction</A>&nbsp;direction)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initiates a traversal of the specified graph, starting with the given node (which must be contained in the graph) and returns a <A HREF="../../../../../gr/forth/ics/graph/path/Traverser.PathIterable.html" title="interface in gr.forth.ics.graph.path"><CODE>Traverser.PathIterable</CODE></A> that returns the explored paths in a step-by-step fashion.</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../gr/forth/ics/graph/path/package-summary.html">gr.forth.ics.graph.path</A> with parameters of type <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/path/GraphTraversal.html#GraphTraversal(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.path.ExpansionFront)">GraphTraversal</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/path/ExpansionFront.html" title="class in gr.forth.ics.graph.path">ExpansionFront</A>&nbsp;expansionFront)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/path/GraphTraversal.html#GraphTraversal(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.path.ExpansionFront, java.util.Collection)">GraphTraversal</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/path/ExpansionFront.html" title="class in gr.forth.ics.graph.path">ExpansionFront</A>&nbsp;expansionFront, java.util.Collection&lt;<A HREF="../../../../../gr/forth/ics/graph/path/PathFilter.html" title="class in gr.forth.ics.graph.path">PathFilter</A>&gt;&nbsp;filters)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../gr/forth/ics/graph/path/GraphTraversal.html#GraphTraversal(gr.forth.ics.graph.InspectableGraph, gr.forth.ics.graph.path.ExpansionFront, gr.forth.ics.graph.path.PathFilter...)">GraphTraversal</A></B>(<A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph">InspectableGraph</A>&nbsp;graph, <A HREF="../../../../../gr/forth/ics/graph/path/ExpansionFront.html" title="class in gr.forth.ics.graph.path">ExpansionFront</A>&nbsp;expansionFront, <A HREF="../../../../../gr/forth/ics/graph/path/PathFilter.html" title="class in gr.forth.ics.graph.path">PathFilter</A>...&nbsp;filters)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../gr/forth/ics/graph/InspectableGraph.html" title="interface in gr.forth.ics.graph"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?gr/forth/ics/graph//class-useInspectableGraph.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="InspectableGraph.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
{'content_hash': '4edd8cbe9d914098b7b663da140a0abe', 'timestamp': '', 'source': 'github', 'line_count': 1739, 'max_line_length': 460, 'avg_line_length': 74.5117883841288, 'alnum_prop': 0.6663193801321232, 'repo_name': 'DimitrisAndreou/flexigraph', 'id': 'f73c11c519c04b97eed92d49da713844d7c8033a', 'size': '129576', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'dist/javadoc/gr/forth/ics/graph/class-use/InspectableGraph.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '905742'}, {'name': 'Shell', 'bytes': '53'}]}
using System; using System.Net.Http; using NUnit.Framework; using SevenDigital.Api.Schema.ArtistEndpoint; using SevenDigital.Api.Wrapper.Exceptions; namespace SevenDigital.Api.Wrapper.Integration.Tests.Exceptions { [TestFixture] public class OriginalRequestLoggingTests { private InputParameterException _apiXmlException; [TestFixtureSetUp] public void SetUp() { // -- Deliberate error response Console.WriteLine("Trying artist/details without artistId parameter..."); _apiXmlException = Assert.Throws<InputParameterException>( async () => await Api<Artist>.Create.WithParameter("test", "true").Please()); } [Test] public void Should_be_set_up() { Assert.That(_apiXmlException, Is.Not.Null); } [Test] public void Can_access_the_original_request_uri_and_querystring_in_exception() { Assert.That(_apiXmlException.OriginalRequest.Url, Is.EqualTo("http://api.7digital.com/1.2/artist/details?test=true")); Console.WriteLine("Url: {0}", _apiXmlException.OriginalRequest.Url); } [Test] public void Can_access_the_original_request_headers_in_exception() { var originalRequestHeaders = _apiXmlException.OriginalRequest.Headers; Assert.That(originalRequestHeaders, Is.Not.Null); Assert.That(originalRequestHeaders["Authorization"], Is.Not.Null); Assert.That(originalRequestHeaders["Accept"], Is.Not.Null); Console.WriteLine("Authorization: {0}", originalRequestHeaders["Authorization"]); Console.WriteLine("Accept: {0}", originalRequestHeaders["Accept"]); } [Test] public void Can_access_the_original_request_method_in_exception() { Assert.That(_apiXmlException.OriginalRequest.Method, Is.EqualTo(HttpMethod.Get)); } } }
{'content_hash': '0990b8eb8bd28abbe3cb126f07e6db21', 'timestamp': '', 'source': 'github', 'line_count': 56, 'max_line_length': 121, 'avg_line_length': 31.482142857142858, 'alnum_prop': 0.7214974475326149, 'repo_name': 'bettiolo/SevenDigital.Api.Wrapper', 'id': '4d246e2577f804a30435f2e336ee4379fad71f46', 'size': '1763', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/SevenDigital.Api.Wrapper.Integration.Tests/Exceptions/OriginalRequestLoggingTests.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C#', 'bytes': '277246'}, {'name': 'PowerShell', 'bytes': '2429'}]}
package org.motechproject.mds.it.reposistory; import org.junit.Before; import org.junit.Test; import org.motechproject.mds.domain.Entity; import org.motechproject.mds.domain.Field; import org.motechproject.mds.dto.FieldDto; import org.motechproject.mds.dto.SettingDto; import org.motechproject.mds.dto.TypeDto; import org.motechproject.mds.it.BaseInstanceIT; import org.motechproject.mds.repository.ComboboxValueRepository; import org.motechproject.mds.service.MetadataService; import org.motechproject.mds.service.MotechDataService; import org.motechproject.mds.service.impl.MetadataServiceImpl; import org.motechproject.mds.util.ClassName; import org.motechproject.mds.util.Constants; import org.motechproject.mds.util.PropertyUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.util.ReflectionTestUtils; import javax.jdo.PersistenceManagerFactory; import java.util.ArrayList; import java.util.List; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; public class ComboboxValueRepositoryContextIT extends BaseInstanceIT { private static final String ENTITY_NAME = "TestForCbValues"; private static final String CB_FIELD_MULTI_NAME = "cbFieldMulti"; private static final String CB_FIELD_SINGLE_NAME = "cbFieldSingle"; private ComboboxValueRepository cbValueRepository; @Autowired private PersistenceManagerFactory persistenceManagerFactory; @Override protected String getEntityName() { return ENTITY_NAME; } @Override protected List<FieldDto> getEntityFields() { // combobox with multiple selection - string collection field FieldDto cbFieldMulti = new FieldDto(CB_FIELD_MULTI_NAME, CB_FIELD_MULTI_NAME, TypeDto.COLLECTION, false, null, "tooltip", "placeholder"); cbFieldMulti.addSetting(new SettingDto(Constants.Settings.ALLOW_USER_SUPPLIED, Constants.Util.TRUE)); cbFieldMulti.addSetting(new SettingDto(Constants.Settings.ALLOW_MULTIPLE_SELECTIONS, Constants.Util.TRUE)); // combobox without multiple selection - string field FieldDto cbFieldSingle = new FieldDto(CB_FIELD_SINGLE_NAME, CB_FIELD_SINGLE_NAME, TypeDto.COLLECTION, false, null, "tooltip2", "placeholder2"); cbFieldSingle.addSetting(new SettingDto(Constants.Settings.ALLOW_USER_SUPPLIED, Constants.Util.TRUE)); cbFieldSingle.addSetting(new SettingDto(Constants.Settings.ALLOW_MULTIPLE_SELECTIONS, Constants.Util.FALSE)); return asList(cbFieldMulti, cbFieldSingle); } @Before public void setUp() throws Exception { super.setUp(); setUpForInstanceTesting(); setUpTestData(); // normally this lives in the entities bundle cbValueRepository = new ComboboxValueRepository(); cbValueRepository.setPersistenceManagerFactory(persistenceManagerFactory); } @Test public void shouldRetrieveComboboxMultiSelectValuesFromDb() { // This service is normally taken from the generated entities bundle MetadataService metadataService = new MetadataServiceImpl(); ReflectionTestUtils.setField(metadataService, "persistenceManagerFactory", persistenceManagerFactory); String cbTableName = metadataService.getComboboxTableName(ClassName.getEntityClassName(ENTITY_NAME), CB_FIELD_MULTI_NAME); List<String> values = cbValueRepository.getComboboxValuesForCollection(cbTableName); assertNotNull(values); assertEquals(asList("five", "four", "one", "three", "two"), values); } @Test public void shouldRetrieveComboboxSingleSelectValuesFromDb() { Entity entity = getAllEntities().retrieveByClassName(ClassName.getEntityClassName(ENTITY_NAME)); Field cbField = entity.getField(CB_FIELD_SINGLE_NAME); List<String> values = cbValueRepository.getComboboxValuesForStringField(entity, cbField); assertNotNull(values); assertEquals(asList("five", "four", "one", "two"), values); } private void setUpTestData() throws Exception { MotechDataService service = getService(); service.create(objectInstance("one", asList("one", "two"))); service.create(objectInstance("two", asList("two", "one", "four"))); service.create(objectInstance("four", asList("four", "four", "four"))); service.create(objectInstance("five", singletonList("five"))); service.create(objectInstance("one", asList("one", "two", "four", "three"))); service.create(objectInstance(null, null)); service.create(objectInstance(null, singletonList(null))); service.create(objectInstance("", singletonList(""))); assertEquals("There were issues creating test data", 8, service.count()); } private Object objectInstance(String singleValue, List<String> multiValues) throws Exception { Class clazz = getEntityClass(); Object obj = clazz.newInstance(); PropertyUtil.setProperty(obj, CB_FIELD_SINGLE_NAME, singleValue); if (multiValues != null) { PropertyUtil.setProperty(obj, CB_FIELD_MULTI_NAME, new ArrayList<>(multiValues)); } return obj; } }
{'content_hash': 'b096cd525f6bce33139a7aeb8b53464a', 'timestamp': '', 'source': 'github', 'line_count': 126, 'max_line_length': 130, 'avg_line_length': 42.333333333333336, 'alnum_prop': 0.7335958005249343, 'repo_name': 'shubhambeehyv/motech', 'id': '43715380b1d475d7b2e0748c8239ce4f7195b5cf', 'size': '5334', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'platform/mds/mds/src/test/java/org/motechproject/mds/it/reposistory/ComboboxValueRepositoryContextIT.java', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '191409'}, {'name': 'HTML', 'bytes': '399257'}, {'name': 'Java', 'bytes': '5674934'}, {'name': 'JavaScript', 'bytes': '1908616'}, {'name': 'PLpgSQL', 'bytes': '1912'}, {'name': 'SQLPL', 'bytes': '363'}, {'name': 'Shell', 'bytes': '48075'}]}
.class Lcom/android/server/am/ActivityManagerService$8; .super Lcom/android/server/am/ActivityManagerService$ForegroundToken; .source "ActivityManagerService.java" # annotations .annotation system Ldalvik/annotation/EnclosingMethod; value = Lcom/android/server/am/ActivityManagerService;->setProcessForeground(Landroid/os/IBinder;IZ)V .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x0 name = null .end annotation # instance fields .field final synthetic this$0:Lcom/android/server/am/ActivityManagerService; # direct methods .method constructor <init>(Lcom/android/server/am/ActivityManagerService;)V .locals 0 .parameter .prologue .line 5108 iput-object p1, p0, Lcom/android/server/am/ActivityManagerService$8;->this$0:Lcom/android/server/am/ActivityManagerService; invoke-direct {p0, p1}, Lcom/android/server/am/ActivityManagerService$ForegroundToken;-><init>(Lcom/android/server/am/ActivityManagerService;)V return-void .end method # virtual methods .method public binderDied()V .locals 1 .prologue .line 5110 iget-object v0, p0, Lcom/android/server/am/ActivityManagerService$8;->this$0:Lcom/android/server/am/ActivityManagerService; invoke-virtual {v0, p0}, Lcom/android/server/am/ActivityManagerService;->foregroundTokenDied(Lcom/android/server/am/ActivityManagerService$ForegroundToken;)V .line 5111 return-void .end method
{'content_hash': '6ef55f617ba49ad8912dbf706450f598', 'timestamp': '', 'source': 'github', 'line_count': 48, 'max_line_length': 161, 'avg_line_length': 30.145833333333332, 'alnum_prop': 0.7774706288873532, 'repo_name': 'baidurom/devices-n7108', 'id': 'ef74507fd1b56bbd84fc2d5fb41afaca6ceeca6b', 'size': '1447', 'binary': False, 'copies': '2', 'ref': 'refs/heads/coron-4.1', 'path': 'services.jar.out/smali/com/android/server/am/ActivityManagerService$8.smali', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Makefile', 'bytes': '12697'}, {'name': 'Shell', 'bytes': '1974'}]}
#define JVERSION "9b 17-Jan-2016" #define JCOPYRIGHT "Copyright (C) 2016, Thomas G. Lane, Guido Vollbeding"
{'content_hash': '655d69fe581c8a1c4e8c5572816803fc', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 73, 'avg_line_length': 19.833333333333332, 'alnum_prop': 0.680672268907563, 'repo_name': 'scotthong/dlib-align-faces', 'id': 'bb53ffe7120fe2b2551fe57585633cbf02c27b7d', 'size': '410', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'libjpeg/windows_x86_64/include/jversion.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '67853'}, {'name': 'C++', 'bytes': '54082'}, {'name': 'CMake', 'bytes': '1623'}, {'name': 'Python', 'bytes': '3081'}]}
'use strict'; { const inputTags = ['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA']; const modelName = document.getElementById('django-admin-form-add-constants').dataset.modelName; if (modelName) { const form = document.getElementById(modelName + '_form'); for (const element of form.elements) { // HTMLElement.offsetParent returns null when the element is not // rendered. if (inputTags.includes(element.tagName) && !element.disabled && element.offsetParent) { element.focus(); break; } } } }
{'content_hash': '9d8ca4f96b75fc3c53e3f05c5a7bfb4e', 'timestamp': '', 'source': 'github', 'line_count': 16, 'max_line_length': 99, 'avg_line_length': 37.875, 'alnum_prop': 0.5874587458745875, 'repo_name': 'takis/django', 'id': '96a4c62ef4c353109f22c5d4c7bf7827fe74597b', 'size': '606', 'binary': False, 'copies': '47', 'ref': 'refs/heads/master', 'path': 'django/contrib/admin/static/admin/js/change_form.js', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '91756'}, {'name': 'HTML', 'bytes': '238967'}, {'name': 'JavaScript', 'bytes': '157514'}, {'name': 'Makefile', 'bytes': '125'}, {'name': 'Procfile', 'bytes': '47'}, {'name': 'Python', 'bytes': '16141182'}, {'name': 'Shell', 'bytes': '809'}, {'name': 'Smarty', 'bytes': '392'}]}
namespace llvm { /// A random number generator. /// /// Instances of this class should not be shared across threads. The /// seed should be set by passing the -rng-seed=<uint64> option. Use /// Module::createRNG to create a new RNG instance for use with that /// module. class RandomNumberGenerator { public: /// Returns a random number in the range [0, Max). uint_fast64_t operator()(); private: /// Seeds and salts the underlying RNG engine. /// /// This constructor should not be used directly. Instead use /// Module::createRNG to create a new RNG salted with the Module ID. RandomNumberGenerator(StringRef Salt); // 64-bit Mersenne Twister by Matsumoto and Nishimura, 2000 // http://en.cppreference.com/w/cpp/numeric/random/mersenne_twister_engine // This RNG is deterministically portable across C++11 // implementations. std::mt19937_64 Generator; // Noncopyable. RandomNumberGenerator(const RandomNumberGenerator &other) LLVM_DELETED_FUNCTION; RandomNumberGenerator & operator=(const RandomNumberGenerator &other) LLVM_DELETED_FUNCTION; friend class Module; }; } #endif
{'content_hash': '3ca7fcb78654335d044496739b9ff982', 'timestamp': '', 'source': 'github', 'line_count': 37, 'max_line_length': 76, 'avg_line_length': 30.37837837837838, 'alnum_prop': 0.7322064056939501, 'repo_name': 'impedimentToProgress/Ratchet', 'id': '7ada34f075e422843fd5a2599e3d855f5f31bd10', 'size': '2007', 'binary': False, 'copies': '22', 'ref': 'refs/heads/master', 'path': 'llvm/include/llvm/Support/RandomNumberGenerator.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '7704512'}, {'name': 'Batchfile', 'bytes': '13322'}, {'name': 'C', 'bytes': '781703'}, {'name': 'C++', 'bytes': '43693178'}, {'name': 'CMake', 'bytes': '255669'}, {'name': 'CSS', 'bytes': '9266'}, {'name': 'Emacs Lisp', 'bytes': '11520'}, {'name': 'Go', 'bytes': '131716'}, {'name': 'LLVM', 'bytes': '30529312'}, {'name': 'M4', 'bytes': '97430'}, {'name': 'Makefile', 'bytes': '287076'}, {'name': 'OCaml', 'bytes': '401181'}, {'name': 'Objective-C', 'bytes': '392650'}, {'name': 'Perl', 'bytes': '27878'}, {'name': 'Python', 'bytes': '512356'}, {'name': 'Roff', 'bytes': '18799'}, {'name': 'Shell', 'bytes': '120669'}, {'name': 'SourcePawn', 'bytes': '2461'}, {'name': 'Standard ML', 'bytes': '2841'}, {'name': 'Vim script', 'bytes': '13485'}]}
export const a = 1; //// [alwaysStrictModule3.js] // module ES2015 export var a = 1;
{'content_hash': 'd80605c0a2e12734a202b84057e8b2d9', 'timestamp': '', 'source': 'github', 'line_count': 5, 'max_line_length': 29, 'avg_line_length': 18.2, 'alnum_prop': 0.6263736263736264, 'repo_name': 'DLehenbauer/TypeScript', 'id': '894bad25143d9b65b4395f08ca5a2c5dd253dddc', 'size': '140', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'tests/baselines/reference/alwaysStrictModule3.js', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '945'}, {'name': 'Groovy', 'bytes': '721'}, {'name': 'HTML', 'bytes': '4887'}, {'name': 'JavaScript', 'bytes': '175'}, {'name': 'PowerShell', 'bytes': '2855'}, {'name': 'Shell', 'bytes': '264'}, {'name': 'TypeScript', 'bytes': '43316504'}]}
package com.senseidb.search.facet; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.longs.LongIterator; import it.unimi.dsi.fastutil.longs.LongOpenHashSet; import it.unimi.dsi.fastutil.longs.LongSet; import java.io.IOException; import java.util.Collections; import java.util.Properties; import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.ScoreDoc; import proj.zoie.api.DocIDMapper; import proj.zoie.api.ZoieSegmentReader; import com.browseengine.bobo.api.BoboSegmentReader; import com.browseengine.bobo.api.BrowseSelection; import com.browseengine.bobo.api.FacetSpec; import com.browseengine.bobo.docidset.EmptyDocIdSet; import com.browseengine.bobo.docidset.IntArrayDocIdSet; import com.browseengine.bobo.docidset.RandomAccessDocIdSet; import com.browseengine.bobo.facets.FacetCountCollectorSource; import com.browseengine.bobo.facets.FacetHandler; import com.browseengine.bobo.facets.filter.EmptyFilter; import com.browseengine.bobo.facets.filter.RandomAccessFilter; import com.browseengine.bobo.facets.filter.RandomAccessNotFilter; import com.browseengine.bobo.sort.DocComparator; import com.browseengine.bobo.sort.DocComparatorSource; public class UIDFacetHandler extends FacetHandler<long[]> { public UIDFacetHandler(String name) { super(name); } private static class SingleDocRandmAccessDocIdSet extends RandomAccessDocIdSet { final int docid; SingleDocRandmAccessDocIdSet(int doc) { docid = doc; } @Override public DocIdSetIterator iterator() throws IOException { return new DocIdSetIterator() { protected int _doc = -1; @Override public int advance(int id) throws IOException { _doc = id - 1; return nextDoc(); } @Override public int docID() { return _doc; } @Override public int nextDoc() throws IOException { if (_doc < docid) { return _doc = docid; } return _doc = DocIdSetIterator.NO_MORE_DOCS; } @Override public long cost() { // TODO Auto-generated method stub return 0; } }; } @Override public boolean get(int doc) { return doc == docid; } } private RandomAccessFilter buildRandomAccessFilter(final long val) throws IOException { return new RandomAccessFilter() { @Override public RandomAccessDocIdSet getRandomAccessDocIdSet(BoboSegmentReader reader) throws IOException { ZoieSegmentReader<?> zoieReader = (ZoieSegmentReader<?>) (reader.getInnerReader()); DocIDMapper docidMapper = zoieReader.getDocIDMapper(); final int docid = docidMapper.getDocID(val); if (docid == DocIDMapper.NOT_FOUND) { return EmptyDocIdSet.getInstance(); } return new SingleDocRandmAccessDocIdSet(docid); } }; } private RandomAccessFilter buildRandomAccessFilter(final LongSet valSet) throws IOException { return new RandomAccessFilter() { @Override public RandomAccessDocIdSet getRandomAccessDocIdSet(BoboSegmentReader reader) throws IOException { ZoieSegmentReader<?> zoieReader = (ZoieSegmentReader<?>) (reader.getInnerReader()); DocIDMapper docidMapper = zoieReader.getDocIDMapper(); final IntArrayList docidList = new IntArrayList(valSet.size()); LongIterator iter = valSet.iterator(); while (iter.hasNext()) { long uid = iter.nextLong(); int docid = docidMapper.getDocID(uid); if (docid != DocIDMapper.NOT_FOUND) { docidList.add(docid); } } if (docidList.size() == 0) { return EmptyDocIdSet.getInstance(); } if (docidList.size() == 1) { int docId = docidList.getInt(0); if (!zoieReader.isDeletedInMask(docId)) { return new SingleDocRandmAccessDocIdSet(docidList.getInt(0)); } else { return EmptyDocIdSet.getInstance(); } } Collections.sort(docidList); final IntArrayDocIdSet intArraySet = new IntArrayDocIdSet(docidList.size()); for (int docId : docidList) { if (!zoieReader.isDeletedInMask(docId)) { intArraySet.addDoc(docId); } } return new RandomAccessDocIdSet() { @Override public boolean get(int docid) { return docidList.contains(docid); } @Override public DocIdSetIterator iterator() throws IOException { return intArraySet.iterator(); } }; } }; } @Override public RandomAccessFilter buildRandomAccessFilter(String value, Properties selectionProperty) throws IOException { try { long val = Long.parseLong(value); return buildRandomAccessFilter(val); } catch (Exception e) { throw new IOException(e.getMessage()); } } @Override public RandomAccessFilter buildRandomAccessAndFilter(String[] vals, Properties prop) throws IOException { LongSet longSet = new LongOpenHashSet(); for (String val : vals) { try { longSet.add(Long.parseLong(val)); } catch (Exception e) { throw new IOException(e.getMessage()); } } if (longSet.size() != 1) { return EmptyFilter.getInstance(); } else { return buildRandomAccessFilter(longSet.iterator().nextLong()); } } @Override public RandomAccessFilter buildRandomAccessOrFilter(String[] vals, Properties prop, boolean isNot) throws IOException { LongSet longSet = new LongOpenHashSet(); for (String val : vals) { try { longSet.add(Long.parseLong(val)); } catch (Exception e) { throw new IOException(e.getMessage()); } } RandomAccessFilter filter; if (longSet.size() == 1) { filter = buildRandomAccessFilter(longSet.iterator().nextLong()); } else { filter = buildRandomAccessFilter(longSet); } if (filter == null) return filter; if (isNot) { filter = new RandomAccessNotFilter(filter); } return filter; } @Override public DocComparatorSource getDocComparatorSource() { return new DocComparatorSource() { @Override public DocComparator getComparator(AtomicReader reader, int docbase) throws IOException { final UIDFacetHandler uidFacetHandler = UIDFacetHandler.this; if (reader instanceof BoboSegmentReader) { BoboSegmentReader boboReader = (BoboSegmentReader) reader; final long[] uidArray = uidFacetHandler.getFacetData(boboReader); return new DocComparator() { @Override public Comparable<?> value(ScoreDoc doc) { int docid = doc.doc; return Long.valueOf(uidArray[docid]); } @Override public int compare(ScoreDoc doc1, ScoreDoc doc2) { long uid1 = uidArray[doc1.doc]; long uid2 = uidArray[doc2.doc]; if (uid1 == uid2) { return 0; } else { if (uid1 < uid2) return -1; return 1; } } }; } else { throw new IOException("reader must be instance of: " + BoboSegmentReader.class); } } }; } @Override public FacetCountCollectorSource getFacetCountCollectorSource(BrowseSelection sel, FacetSpec fspec) { throw new UnsupportedOperationException("not supported"); } @Override public String[] getFieldValues(BoboSegmentReader reader, int id) { long[] uidArray = getFacetData(reader); return new String[] { String.valueOf(uidArray[id]) }; } @Override public Object[] getRawFieldValues(BoboSegmentReader reader, int id) { long[] uidArray = getFacetData(reader); return new Long[] { uidArray[id] }; } @Override public long[] load(BoboSegmentReader reader) throws IOException { IndexReader innerReader = reader.getInnerReader(); if (innerReader instanceof ZoieSegmentReader) { ZoieSegmentReader<?> zoieReader = (ZoieSegmentReader<?>) innerReader; return zoieReader.getUIDArray(); } else { throw new IOException("inner reader not instance of " + ZoieSegmentReader.class); } } }
{'content_hash': 'e2253f117dae70cd9846229504ac0983', 'timestamp': '', 'source': 'github', 'line_count': 275, 'max_line_length': 103, 'avg_line_length': 30.89818181818182, 'alnum_prop': 0.6512886901259268, 'repo_name': 'senseidb/sensei', 'id': '6f64b352700f5c2cea2774ed654db15b2cb36c0c', 'size': '8497', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'sensei-core/src/main/java/com/senseidb/search/facet/UIDFacetHandler.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ANTLR', 'bytes': '36434'}, {'name': 'CSS', 'bytes': '27692'}, {'name': 'Java', 'bytes': '1840774'}, {'name': 'JavaScript', 'bytes': '545266'}, {'name': 'Python', 'bytes': '218444'}, {'name': 'Shell', 'bytes': '6666'}, {'name': 'Tcl', 'bytes': '34306'}]}
package org.jbpm.services.task.audit.commands; import org.jbpm.services.task.commands.TaskContext; import org.jbpm.services.task.commands.UserGroupCallbackTaskCommand; import org.jbpm.services.task.utils.ClassUtil; import org.kie.api.runtime.Context; import org.kie.api.task.model.Status; import org.kie.api.task.model.TaskSummary; import org.kie.internal.query.QueryFilter; import org.kie.internal.task.api.TaskPersistenceContext; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import java.util.ArrayList; import java.util.List; @XmlRootElement(name = "get-tasks-by-variable-name-and-value-command") @XmlAccessorType(XmlAccessType.NONE) public class GetTasksByVariableNameAndValueCommand extends UserGroupCallbackTaskCommand<List<TaskSummary>> { private static final long serialVersionUID = 5077599352603072633L; @XmlElement private List<Status> statuses; @XmlElement private String variableName; @XmlElement private String variableValue; @XmlElement(type=QueryFilter.class) private QueryFilter filter; public GetTasksByVariableNameAndValueCommand() { } public GetTasksByVariableNameAndValueCommand(String userId, String variableName, String variableValue, List<Status> status, QueryFilter filter) { this.userId = userId; this.variableName = variableName; this.variableValue = variableValue; this.statuses = status; this.filter = filter; } public List<Status> getStatuses() { return statuses; } public String getVariableName() { return variableName; } public String getVariableValue() { return variableValue; } public List<TaskSummary> execute(Context cntxt) { TaskContext context = (TaskContext) cntxt; doCallbackUserOperation(userId, context); if(statuses == null ){ statuses = new ArrayList<Status>(); statuses.add(Status.Ready); statuses.add(Status.InProgress); statuses.add(Status.Reserved); } if(groupIds == null) { groupIds = doUserGroupCallbackOperation(userId, null, context); if(groupIds == null) { groupIds = new ArrayList<String>(); } } TaskPersistenceContext persistenceContext = context.getPersistenceContext(); List<TaskSummary> tasks = (List<TaskSummary>) persistenceContext.queryWithParametersInTransaction("TasksByStatusByVariableNameAndValue", persistenceContext.addParametersToMap( "userId", userId, "groupIds", groupIds, "variableName", variableName, "variableValue", variableValue, "status", statuses), ClassUtil.<List<TaskSummary>>castClass(List.class)); return tasks; } }
{'content_hash': '390967a4fe5e46e8d2337b6d9c548de3', 'timestamp': '', 'source': 'github', 'line_count': 92, 'max_line_length': 149, 'avg_line_length': 34.57608695652174, 'alnum_prop': 0.6535680603583779, 'repo_name': 'droolsjbpm/jbpm', 'id': '3458db59cf67e8d73fcc6d060427f6c902d58f77', 'size': '3800', 'binary': False, 'copies': '11', 'ref': 'refs/heads/master', 'path': 'jbpm-human-task/jbpm-human-task-audit/src/main/java/org/jbpm/services/task/audit/commands/GetTasksByVariableNameAndValueCommand.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'FreeMarker', 'bytes': '24447'}, {'name': 'HTML', 'bytes': '271'}, {'name': 'Java', 'bytes': '12516887'}, {'name': 'PLSQL', 'bytes': '5187'}, {'name': 'PLpgSQL', 'bytes': '11997'}, {'name': 'Protocol Buffer', 'bytes': '6518'}, {'name': 'Shell', 'bytes': '98'}, {'name': 'Visual Basic', 'bytes': '2545'}]}
/** * @fileoverview Utility functions used only in test code, that facilitate * testing what happens when an event handler throws. * * By default, Jasmine handles the global error event and fails the test, so we * we need to intercept it ourselves to avoid this. */ /** * Causes Jasmine's default global error handler (which fails the current test) * to be restored after each test in the current `describe`. This allows those * tests to safely overwrite `onerror`, and thereby test behavior that occurs in * case of an unhandled error. * * This must be called directly within the callback body of a `describe`, before * any `it` calls. */ export function restoreErrorHandlerAfterEach(): void { let errorHandler: typeof onerror; beforeEach(() => { errorHandler = onerror; }); afterEach(() => { onerror = errorHandler; }); }
{'content_hash': '8f158dba2eb5e2f9404c936c0d3fa518', 'timestamp': '', 'source': 'github', 'line_count': 28, 'max_line_length': 80, 'avg_line_length': 30.678571428571427, 'alnum_prop': 0.7136204889406287, 'repo_name': 'google/fledge-shim', 'id': 'bbbc21c129c1934fcc7305e9398374ff9ff2b3b8', 'size': '946', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'testing/error.ts', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'HTML', 'bytes': '155'}, {'name': 'JavaScript', 'bytes': '8560'}, {'name': 'TypeScript', 'bytes': '262168'}]}
package org.jasig.cas.support.spnego.authentication.principal; import org.jasig.cas.authentication.principal.DefaultPrincipalFactory; import org.jasig.cas.authentication.principal.Principal; import org.junit.Test; import java.util.HashSet; import java.util.Set; import static org.junit.Assert.*; /** * @author Misagh Moayyed * @since 3.0.0 */ public class SpnegoCredentialsTests { @Test public void verifyToStringWithNoPrincipal() { final SpnegoCredential credentials = new SpnegoCredential(new byte[] {}); assertTrue(credentials.toString().contains("unknown")); } @Test public void verifyToStringWithPrincipal() { final SpnegoCredential credentials = new SpnegoCredential(new byte[] {}); final Principal principal = new DefaultPrincipalFactory().createPrincipal("test"); credentials.setPrincipal(principal); assertEquals("test", credentials.toString()); } /** * Important for SPNEGO in particular as the credential will be hashed prior to Principal resolution */ @Test public void verifyCredentialsHashSafelyWithoutPrincipal() { final SpnegoCredential credential = new SpnegoCredential(new byte[] {}); final Set<SpnegoCredential> set = new HashSet<>(); try { set.add(credential); } catch(final Exception e) { fail(e.getMessage()); } } /** * Make sure that when the Principal becomes populated / changes we return a new hash */ @Test public void verifyPrincipalAffectsHash(){ final SpnegoCredential credential = new SpnegoCredential(new byte[] {}); final int hash1 = credential.hashCode(); final Principal principal = new DefaultPrincipalFactory().createPrincipal("test"); credential.setPrincipal(principal); final int hash2 = credential.hashCode(); assertNotEquals(hash1, hash2); } }
{'content_hash': '52dae89ff76f11dc12ca276159b7fcee', 'timestamp': '', 'source': 'github', 'line_count': 60, 'max_line_length': 104, 'avg_line_length': 32.233333333333334, 'alnum_prop': 0.6851085832471562, 'repo_name': 'y1011/cas-server', 'id': 'a2e5e33a422acefd9ce4627bc9eb26b9a5070b37', 'size': '1934', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'cas-server-support-spnego/src/test/java/org/jasig/cas/support/spnego/authentication/principal/SpnegoCredentialsTests.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '873711'}, {'name': 'Java', 'bytes': '3210304'}, {'name': 'JavaScript', 'bytes': '731812'}, {'name': 'PLSQL', 'bytes': '4554'}, {'name': 'Shell', 'bytes': '4150'}]}
package com.nilhcem.hostseditor.core; import android.content.Context; import com.stericson.RootShell.RootShell; import com.stericson.RootShell.exceptions.RootDeniedException; import com.stericson.RootShell.execution.Command; import com.stericson.RootTools.RootTools; import org.apache.commons.io.FileUtils; import org.apache.commons.io.LineIterator; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.concurrent.TimeoutException; import javax.inject.Inject; import javax.inject.Singleton; import timber.log.Timber; @Singleton public class HostsManager { private static final String UTF_8 = "UTF-8"; private static final String HOSTS_FILE_NAME = "hosts"; private static final String HOSTS_FILE_PATH = "/system/etc/" + HOSTS_FILE_NAME; private static final String LINE_SEPARATOR = System.getProperty("line.separator", "\n"); private static final String MOUNT_TYPE_RO = "ro"; private static final String MOUNT_TYPE_RW = "rw"; private static final String COMMAND_RM = "rm -f"; private static final String COMMAND_CHOWN = "chown 0:0"; private static final String COMMAND_CHMOD_644 = "chmod 644"; // Do not access this field directly even in the same class, use getAllHosts() instead. private List<Host> mHosts; @Inject public HostsManager() { } /** * Gets all host entries from hosts file. * <p><b>Must be in an async call.</b></p> * * @param forceRefresh if we want to force using the hosts file (not the cache) * @return a list of host entries */ public synchronized List<Host> getHosts(boolean forceRefresh) { if (mHosts == null || forceRefresh) { mHosts = Collections.synchronizedList(new ArrayList<Host>()); LineIterator it = null; try { it = FileUtils.lineIterator(new File(HOSTS_FILE_PATH), UTF_8); while (it.hasNext()) { Host host = Host.fromString(it.nextLine()); if (host != null) { mHosts.add(host); } } } catch (IOException e) { Timber.e(e, "I/O error while opening hosts file"); } finally { if (it != null) { LineIterator.closeQuietly(it); } } } return mHosts; } /** * Saves new hosts file and creates a backup of previous file. * <p><b>Must be in an async call.</b></p> * * @param appContext application context * @return {@code true} if everything was working as expected, or {@code false} otherwise */ public synchronized boolean saveHosts(Context appContext) { if (!RootTools.isAccessGiven()) { Timber.w("Can't get root access"); return false; } // Step 1: Create temporary hosts file in /data/data/project_package/files/hosts if (!createTempHostsFile(appContext)) { Timber.w("Can't create temporary hosts file"); return false; } String tmpFile = String.format(Locale.US, "%s/%s", appContext.getFilesDir().getAbsolutePath(), HOSTS_FILE_NAME); String backupFile = String.format(Locale.US, "%s.bak", tmpFile); // Step 2: Get canonical path for /etc/hosts (it could be a symbolic link) String hostsFilePath = HOSTS_FILE_PATH; File hostsFile = new File(HOSTS_FILE_PATH); if (hostsFile.exists()) { try { if (FileUtils.isSymlink(hostsFile)) { hostsFilePath = hostsFile.getCanonicalPath(); } } catch (IOException e1) { Timber.e(e1, "Can't find hosts file"); } } else { Timber.w("Hosts file was not found in filesystem"); } try { // Step 3: Create backup of current hosts file (if any) RootTools.remount(hostsFilePath, MOUNT_TYPE_RW); runRootCommand(COMMAND_RM, backupFile); RootTools.copyFile(hostsFilePath, backupFile, false, true); // Step 4: Replace hosts file with generated file runRootCommand(COMMAND_RM, hostsFilePath); RootTools.copyFile(tmpFile, hostsFilePath, false, true); // Step 5: Give proper rights runRootCommand(COMMAND_CHOWN, hostsFilePath); runRootCommand(COMMAND_CHMOD_644, hostsFilePath); // Step 6: Delete local file appContext.deleteFile(HOSTS_FILE_NAME); } catch (Exception e) { Timber.e(e, "Failed running root command"); return false; } finally { RootTools.remount(hostsFilePath, MOUNT_TYPE_RO); } return true; } /** * Returns a list of hosts matching the constraint parameter. */ public List<Host> filterHosts(CharSequence constraint) { List<Host> all = getHosts(false); List<Host> hosts = new ArrayList<>(); for (Host host : all) { if (host.isValid()) { if (host.getIp().contains(constraint) || host.getHostName().contains(constraint) || (host.getComment() != null && host.getComment().contains(constraint))) { hosts.add(host); } } } return hosts; } /** * Creates a temporary hosts file in {@code /data/data/project_package/files/hosts}. * <p><b>Must be in an async call.</b></p> * * @param appContext application context * @return {@code true} if the temp file was created, or {@code false} otherwise */ private boolean createTempHostsFile(Context appContext) { OutputStreamWriter writer = null; try { FileOutputStream out = appContext.openFileOutput(HOSTS_FILE_NAME, Context.MODE_PRIVATE); writer = new OutputStreamWriter(out); for (Host host : getHosts(false)) { writer.append(host.toString()).append(LINE_SEPARATOR); } writer.flush(); } catch (IOException e) { Timber.e(e, "Error creating temporary hosts file"); return false; } finally { if (writer != null) { try { writer.close(); } catch (IOException e) { Timber.e(e, "Error while closing writer"); } } } return true; } /** * Executes a single argument root command. * <p><b>Must be in an async call.</b></p> * * @param command a command, ie {@code "rm -f"}, {@code "chmod 644"}... * @param uniqueArg the unique argument for the command, usually the file name */ private void runRootCommand(String command, String uniqueArg) throws IOException, TimeoutException, RootDeniedException { Command cmd = new Command(0, false, String.format(Locale.US, "%s %s", command, uniqueArg)); RootShell.getShell(true).add(cmd); } }
{'content_hash': '5446e18ec1233e48b6e671c5064ab244', 'timestamp': '', 'source': 'github', 'line_count': 204, 'max_line_length': 125, 'avg_line_length': 35.75, 'alnum_prop': 0.5901549430961196, 'repo_name': 'RyanTech/hosts-editor-android', 'id': 'c7434accdfa1fb76c44a2edcb81d70c3162c17d6', 'size': '7293', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'app/src/main/java/com/nilhcem/hostseditor/core/HostsManager.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '74742'}]}
package plugin import ( "fmt" "io" "testing" "github.com/docker/cli/internal/test" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" "gotest.tools/v3/golden" ) func TestListErrors(t *testing.T) { testCases := []struct { description string args []string flags map[string]string expectedError string listFunc func(filter filters.Args) (types.PluginsListResponse, error) }{ { description: "too many arguments", args: []string{"foo"}, expectedError: "accepts no arguments", }, { description: "error listing plugins", args: []string{}, expectedError: "error listing plugins", listFunc: func(filter filters.Args) (types.PluginsListResponse, error) { return types.PluginsListResponse{}, fmt.Errorf("error listing plugins") }, }, { description: "invalid format", args: []string{}, flags: map[string]string{ "format": "{{invalid format}}", }, expectedError: "template parsing error", }, } for _, tc := range testCases { cli := test.NewFakeCli(&fakeClient{pluginListFunc: tc.listFunc}) cmd := newListCommand(cli) cmd.SetArgs(tc.args) for key, value := range tc.flags { cmd.Flags().Set(key, value) } cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } } func TestList(t *testing.T) { singlePluginListFunc := func(_ filters.Args) (types.PluginsListResponse, error) { return types.PluginsListResponse{ { ID: "id-foo", Name: "name-foo", Enabled: true, Config: types.PluginConfig{ Description: "desc-bar", }, }, }, nil } testCases := []struct { description string args []string flags map[string]string golden string listFunc func(filter filters.Args) (types.PluginsListResponse, error) }{ { description: "list with no additional flags", args: []string{}, golden: "plugin-list-without-format.golden", listFunc: singlePluginListFunc, }, { description: "list with filters", args: []string{}, flags: map[string]string{ "filter": "foo=bar", }, golden: "plugin-list-without-format.golden", listFunc: func(filter filters.Args) (types.PluginsListResponse, error) { assert.Check(t, is.Equal("bar", filter.Get("foo")[0])) return singlePluginListFunc(filter) }, }, { description: "list with quiet option", args: []string{}, flags: map[string]string{ "quiet": "true", }, golden: "plugin-list-with-quiet-option.golden", listFunc: singlePluginListFunc, }, { description: "list with no-trunc option", args: []string{}, flags: map[string]string{ "no-trunc": "true", "format": "{{ .ID }}", }, golden: "plugin-list-with-no-trunc-option.golden", listFunc: func(_ filters.Args) (types.PluginsListResponse, error) { return types.PluginsListResponse{ { ID: "xyg4z2hiSLO5yTnBJfg4OYia9gKA6Qjd", Name: "name-foo", Enabled: true, Config: types.PluginConfig{ Description: "desc-bar", }, }, }, nil }, }, { description: "list with format", args: []string{}, flags: map[string]string{ "format": "{{ .Name }}", }, golden: "plugin-list-with-format.golden", listFunc: singlePluginListFunc, }, { description: "list output is sorted based on plugin name", args: []string{}, flags: map[string]string{ "format": "{{ .Name }}", }, golden: "plugin-list-sort.golden", listFunc: func(_ filters.Args) (types.PluginsListResponse, error) { return types.PluginsListResponse{ { ID: "id-1", Name: "plugin-1-foo", }, { ID: "id-2", Name: "plugin-10-foo", }, { ID: "id-3", Name: "plugin-2-foo", }, }, nil }, }, } for _, tc := range testCases { cli := test.NewFakeCli(&fakeClient{pluginListFunc: tc.listFunc}) cmd := newListCommand(cli) cmd.SetArgs(tc.args) for key, value := range tc.flags { cmd.Flags().Set(key, value) } assert.NilError(t, cmd.Execute()) golden.Assert(t, cli.OutBuffer().String(), tc.golden) } }
{'content_hash': 'b58a4f1594199cf2fe78c79ee89cc8c3', 'timestamp': '', 'source': 'github', 'line_count': 174, 'max_line_length': 82, 'avg_line_length': 24.67241379310345, 'alnum_prop': 0.6091311437223387, 'repo_name': 'thaJeztah/cli', 'id': 'ed30eb1c596ff2a1f103754daf2b604d24ad2cf8', 'size': '4293', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'cli/command/plugin/list_test.go', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Dockerfile', 'bytes': '9508'}, {'name': 'Go', 'bytes': '2499191'}, {'name': 'HCL', 'bytes': '3179'}, {'name': 'Makefile', 'bytes': '8025'}, {'name': 'Shell', 'bytes': '311752'}]}
namespace asio { namespace ip { namespace detail { namespace socket_option { // Helper template for implementing multicast enable loopback options. template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name> class multicast_enable_loopback { public: #if defined(__sun) || defined(__osf__) typedef unsigned char ipv4_value_type; typedef unsigned char ipv6_value_type; #elif defined(_AIX) || defined(__hpux) || defined(__QNXNTO__) typedef unsigned char ipv4_value_type; typedef unsigned int ipv6_value_type; #else typedef int ipv4_value_type; typedef int ipv6_value_type; #endif // Default constructor. multicast_enable_loopback() : ipv4_value_(0), ipv6_value_(0) { } // Construct with a specific option value. explicit multicast_enable_loopback(bool v) : ipv4_value_(v ? 1 : 0), ipv6_value_(v ? 1 : 0) { } // Set the value of the boolean. multicast_enable_loopback& operator=(bool v) { ipv4_value_ = v ? 1 : 0; ipv6_value_ = v ? 1 : 0; return *this; } // Get the current value of the boolean. bool value() const { return !!ipv4_value_; } // Convert to bool. operator bool() const { return !!ipv4_value_; } // Test for false. bool operator!() const { return !ipv4_value_; } // Get the level of the socket option. template <typename Protocol> int level(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return IPv6_Level; return IPv4_Level; } // Get the name of the socket option. template <typename Protocol> int name(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return IPv6_Name; return IPv4_Name; } // Get the address of the boolean data. template <typename Protocol> void* data(const Protocol& protocol) { if (protocol.family() == PF_INET6) return &ipv6_value_; return &ipv4_value_; } // Get the address of the boolean data. template <typename Protocol> const void* data(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return &ipv6_value_; return &ipv4_value_; } // Get the size of the boolean data. template <typename Protocol> std::size_t size(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return sizeof(ipv6_value_); return sizeof(ipv4_value_); } // Set the size of the boolean data. template <typename Protocol> void resize(const Protocol& protocol, std::size_t s) { if (protocol.family() == PF_INET6) { if (s != sizeof(ipv6_value_)) { std::length_error ex("multicast_enable_loopback socket option resize"); asio::detail::throw_exception(ex); } ipv4_value_ = ipv6_value_ ? 1 : 0; } else { if (s != sizeof(ipv4_value_)) { std::length_error ex("multicast_enable_loopback socket option resize"); asio::detail::throw_exception(ex); } ipv6_value_ = ipv4_value_ ? 1 : 0; } } private: ipv4_value_type ipv4_value_; ipv6_value_type ipv6_value_; }; // Helper template for implementing unicast hops options. template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name> class unicast_hops { public: // Default constructor. unicast_hops() : value_(0) { } // Construct with a specific option value. explicit unicast_hops(int v) : value_(v) { } // Set the value of the option. unicast_hops& operator=(int v) { value_ = v; return *this; } // Get the current value of the option. int value() const { return value_; } // Get the level of the socket option. template <typename Protocol> int level(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return IPv6_Level; return IPv4_Level; } // Get the name of the socket option. template <typename Protocol> int name(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return IPv6_Name; return IPv4_Name; } // Get the address of the data. template <typename Protocol> int* data(const Protocol&) { return &value_; } // Get the address of the data. template <typename Protocol> const int* data(const Protocol&) const { return &value_; } // Get the size of the data. template <typename Protocol> std::size_t size(const Protocol&) const { return sizeof(value_); } // Set the size of the data. template <typename Protocol> void resize(const Protocol&, std::size_t s) { if (s != sizeof(value_)) { std::length_error ex("unicast hops socket option resize"); asio::detail::throw_exception(ex); } #if defined(__hpux) if (value_ < 0) value_ = value_ & 0xFF; #endif } private: int value_; }; // Helper template for implementing multicast hops options. template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name> class multicast_hops { public: #if defined(ASIO_WINDOWS) && defined(UNDER_CE) typedef int ipv4_value_type; #else typedef unsigned char ipv4_value_type; #endif typedef int ipv6_value_type; // Default constructor. multicast_hops() : ipv4_value_(0), ipv6_value_(0) { } // Construct with a specific option value. explicit multicast_hops(int v) { if (v < 0 || v > 255) { std::out_of_range ex("multicast hops value out of range"); asio::detail::throw_exception(ex); } ipv4_value_ = (ipv4_value_type)v; ipv6_value_ = v; } // Set the value of the option. multicast_hops& operator=(int v) { if (v < 0 || v > 255) { std::out_of_range ex("multicast hops value out of range"); asio::detail::throw_exception(ex); } ipv4_value_ = (ipv4_value_type)v; ipv6_value_ = v; return *this; } // Get the current value of the option. int value() const { return ipv6_value_; } // Get the level of the socket option. template <typename Protocol> int level(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return IPv6_Level; return IPv4_Level; } // Get the name of the socket option. template <typename Protocol> int name(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return IPv6_Name; return IPv4_Name; } // Get the address of the data. template <typename Protocol> void* data(const Protocol& protocol) { if (protocol.family() == PF_INET6) return &ipv6_value_; return &ipv4_value_; } // Get the address of the data. template <typename Protocol> const void* data(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return &ipv6_value_; return &ipv4_value_; } // Get the size of the data. template <typename Protocol> std::size_t size(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return sizeof(ipv6_value_); return sizeof(ipv4_value_); } // Set the size of the data. template <typename Protocol> void resize(const Protocol& protocol, std::size_t s) { if (protocol.family() == PF_INET6) { if (s != sizeof(ipv6_value_)) { std::length_error ex("multicast hops socket option resize"); asio::detail::throw_exception(ex); } if (ipv6_value_ < 0) ipv4_value_ = 0; else if (ipv6_value_ > 255) ipv4_value_ = 255; else ipv4_value_ = (ipv4_value_type)ipv6_value_; } else { if (s != sizeof(ipv4_value_)) { std::length_error ex("multicast hops socket option resize"); asio::detail::throw_exception(ex); } ipv6_value_ = ipv4_value_; } } private: ipv4_value_type ipv4_value_; ipv6_value_type ipv6_value_; }; // Helper template for implementing ip_mreq-based options. template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name> class multicast_request { public: // Default constructor. multicast_request() : ipv4_value_(), // Zero-initialisation gives the "any" address. ipv6_value_() // Zero-initialisation gives the "any" address. { } // Construct with multicast address only. explicit multicast_request(const address& multicast_address) : ipv4_value_(), // Zero-initialisation gives the "any" address. ipv6_value_() // Zero-initialisation gives the "any" address. { if (multicast_address.is_v6()) { using namespace std; // For memcpy. address_v6 ipv6_address = multicast_address.to_v6(); address_v6::bytes_type bytes = ipv6_address.to_bytes(); memcpy(ipv6_value_.ipv6mr_multiaddr.s6_addr, bytes.data(), 16); ipv6_value_.ipv6mr_interface = ipv6_address.scope_id(); } else { ipv4_value_.imr_multiaddr.s_addr = asio::detail::socket_ops::host_to_network_long( multicast_address.to_v4().to_uint()); ipv4_value_.imr_interface.s_addr = asio::detail::socket_ops::host_to_network_long( address_v4::any().to_uint()); } } // Construct with multicast address and IPv4 address specifying an interface. explicit multicast_request(const address_v4& multicast_address, const address_v4& network_interface = address_v4::any()) : ipv6_value_() // Zero-initialisation gives the "any" address. { ipv4_value_.imr_multiaddr.s_addr = asio::detail::socket_ops::host_to_network_long( multicast_address.to_uint()); ipv4_value_.imr_interface.s_addr = asio::detail::socket_ops::host_to_network_long( network_interface.to_uint()); } // Construct with multicast address and IPv6 network interface index. explicit multicast_request( const address_v6& multicast_address, unsigned long network_interface = 0) : ipv4_value_() // Zero-initialisation gives the "any" address. { using namespace std; // For memcpy. address_v6::bytes_type bytes = multicast_address.to_bytes(); memcpy(ipv6_value_.ipv6mr_multiaddr.s6_addr, bytes.data(), 16); if (network_interface) ipv6_value_.ipv6mr_interface = network_interface; else ipv6_value_.ipv6mr_interface = multicast_address.scope_id(); } // Get the level of the socket option. template <typename Protocol> int level(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return IPv6_Level; return IPv4_Level; } // Get the name of the socket option. template <typename Protocol> int name(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return IPv6_Name; return IPv4_Name; } // Get the address of the option data. template <typename Protocol> const void* data(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return &ipv6_value_; return &ipv4_value_; } // Get the size of the option data. template <typename Protocol> std::size_t size(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return sizeof(ipv6_value_); return sizeof(ipv4_value_); } private: asio::detail::in4_mreq_type ipv4_value_; asio::detail::in6_mreq_type ipv6_value_; }; // Helper template for implementing options that specify a network interface. template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name> class network_interface { public: // Default constructor. network_interface() { ipv4_value_.s_addr = asio::detail::socket_ops::host_to_network_long( address_v4::any().to_uint()); ipv6_value_ = 0; } // Construct with IPv4 interface. explicit network_interface(const address_v4& ipv4_interface) { ipv4_value_.s_addr = asio::detail::socket_ops::host_to_network_long( ipv4_interface.to_uint()); ipv6_value_ = 0; } // Construct with IPv6 interface. explicit network_interface(unsigned int ipv6_interface) { ipv4_value_.s_addr = asio::detail::socket_ops::host_to_network_long( address_v4::any().to_uint()); ipv6_value_ = ipv6_interface; } // Get the level of the socket option. template <typename Protocol> int level(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return IPv6_Level; return IPv4_Level; } // Get the name of the socket option. template <typename Protocol> int name(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return IPv6_Name; return IPv4_Name; } // Get the address of the option data. template <typename Protocol> const void* data(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return &ipv6_value_; return &ipv4_value_; } // Get the size of the option data. template <typename Protocol> std::size_t size(const Protocol& protocol) const { if (protocol.family() == PF_INET6) return sizeof(ipv6_value_); return sizeof(ipv4_value_); } private: asio::detail::in4_addr_type ipv4_value_; unsigned int ipv6_value_; }; } // namespace socket_option } // namespace detail } // namespace ip } // namespace asio #include "asio/detail/pop_options.hpp" #endif // ASIO_IP_DETAIL_SOCKET_OPTION_HPP
{'content_hash': 'd3e2bbb071a28fbcc92dd1fe2e4c960b', 'timestamp': '', 'source': 'github', 'line_count': 538, 'max_line_length': 79, 'avg_line_length': 24.539033457249072, 'alnum_prop': 0.6384638691107408, 'repo_name': 'mojmir-svoboda/DbgToolkit', 'id': 'c3912b718bb3dc6842ed2cab28d1ab4e070c44d8', 'size': '13982', 'binary': False, 'copies': '7', 'ref': 'refs/heads/master', 'path': '3rd/asio/include/asio/ip/detail/socket_option.hpp', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Awk', 'bytes': '3960'}, {'name': 'Batchfile', 'bytes': '2926'}, {'name': 'C', 'bytes': '3527150'}, {'name': 'C++', 'bytes': '8094856'}, {'name': 'CMake', 'bytes': '240374'}, {'name': 'HTML', 'bytes': '330871'}, {'name': 'M4', 'bytes': '9332'}, {'name': 'Makefile', 'bytes': '221500'}, {'name': 'PAWN', 'bytes': '673'}, {'name': 'Perl', 'bytes': '36555'}, {'name': 'Python', 'bytes': '1459'}, {'name': 'QMake', 'bytes': '9561'}, {'name': 'Scheme', 'bytes': '6418020'}, {'name': 'Shell', 'bytes': '1747'}, {'name': 'TeX', 'bytes': '1961'}, {'name': 'XSLT', 'bytes': '77656'}]}
namespace chromeos { UpdateScreenHandler::UpdateScreenHandler() : screen_(NULL), show_on_init_(false) { } UpdateScreenHandler::~UpdateScreenHandler() { if (screen_) screen_->OnActorDestroyed(this); } void UpdateScreenHandler::DeclareLocalizedValues( LocalizedValuesBuilder* builder) { builder->AddF("checkingForUpdatesMsg", IDS_CHECKING_FOR_UPDATE_MSG, IDS_SHORT_PRODUCT_NAME); builder->AddF("installingUpdateDesc", IDS_UPDATE_MSG, IDS_SHORT_PRODUCT_NAME); builder->Add("updateScreenTitle", IDS_UPDATE_SCREEN_TITLE); builder->Add("checkingForUpdates", IDS_CHECKING_FOR_UPDATES); builder->Add("downloading", IDS_DOWNLOADING); builder->Add("downloadingTimeLeftLong", IDS_DOWNLOADING_TIME_LEFT_LONG); builder->Add("downloadingTimeLeftStatusOneHour", IDS_DOWNLOADING_TIME_LEFT_STATUS_ONE_HOUR); builder->Add("downloadingTimeLeftStatusMinutes", IDS_DOWNLOADING_TIME_LEFT_STATUS_MINUTES); builder->Add("downloadingTimeLeftSmall", IDS_DOWNLOADING_TIME_LEFT_SMALL); #if !defined(OFFICIAL_BUILD) builder->Add("cancelUpdateHint", IDS_UPDATE_CANCEL); builder->Add("cancelledUpdateMessage", IDS_UPDATE_CANCELLED); #else builder->Add("cancelUpdateHint", IDS_EMPTY_STRING); builder->Add("cancelledUpdateMessage", IDS_EMPTY_STRING); #endif } void UpdateScreenHandler::Initialize() { if (show_on_init_) { Show(); show_on_init_ = false; } } void UpdateScreenHandler::SetDelegate(UpdateScreenActor::Delegate* screen) { screen_ = screen; } void UpdateScreenHandler::Show() { if (!page_is_ready()) { show_on_init_ = true; return; } ShowScreen(OobeUI::kScreenOobeUpdate, NULL); #if !defined(OFFICIAL_BUILD) CallJS("login.UpdateScreen.enableUpdateCancel"); #endif } void UpdateScreenHandler::Hide() { } void UpdateScreenHandler::PrepareToShow() { } void UpdateScreenHandler::ShowManualRebootInfo() { CallJS("cr.ui.Oobe.setUpdateMessage", l10n_util::GetStringUTF16(IDS_UPDATE_COMPLETED)); } void UpdateScreenHandler::SetProgress(int progress) { CallJS("cr.ui.Oobe.setUpdateProgress", progress); } void UpdateScreenHandler::ShowEstimatedTimeLeft(bool visible) { CallJS("cr.ui.Oobe.showEstimatedTimeLeft", visible); } void UpdateScreenHandler::SetEstimatedTimeLeft(const base::TimeDelta& time) { CallJS("cr.ui.Oobe.setEstimatedTimeLeft", time.InSecondsF()); } void UpdateScreenHandler::ShowProgressMessage(bool visible) { CallJS("cr.ui.Oobe.showProgressMessage", visible); } void UpdateScreenHandler::SetProgressMessage(ProgressMessage message) { scoped_ptr<StringValue> progress_message; switch (message) { case PROGRESS_MESSAGE_UPDATE_AVAILABLE: progress_message.reset(Value::CreateStringValue( l10n_util::GetStringUTF16(IDS_UPDATE_AVAILABLE))); break; case PROGRESS_MESSAGE_INSTALLING_UPDATE: progress_message.reset(Value::CreateStringValue( l10n_util::GetStringFUTF16(IDS_INSTALLING_UPDATE, l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)))); break; case PROGRESS_MESSAGE_VERIFYING: progress_message.reset(Value::CreateStringValue( l10n_util::GetStringUTF16(IDS_UPDATE_VERIFYING))); break; case PROGRESS_MESSAGE_FINALIZING: progress_message.reset(Value::CreateStringValue( l10n_util::GetStringUTF16(IDS_UPDATE_FINALIZING))); break; default: NOTREACHED(); }; if (progress_message.get()) CallJS("cr.ui.Oobe.setProgressMessage", *progress_message); } void UpdateScreenHandler::ShowCurtain(bool visible) { CallJS("cr.ui.Oobe.showUpdateCurtain", visible); } void UpdateScreenHandler::RegisterMessages() { #if !defined(OFFICIAL_BUILD) AddCallback("cancelUpdate", &UpdateScreenHandler::HandleUpdateCancel); #endif } #if !defined(OFFICIAL_BUILD) void UpdateScreenHandler::HandleUpdateCancel() { screen_->CancelUpdate(); } #endif } // namespace chromeos
{'content_hash': '22986578b1997526355b581b6da78996', 'timestamp': '', 'source': 'github', 'line_count': 131, 'max_line_length': 77, 'avg_line_length': 30.137404580152673, 'alnum_prop': 0.7266970618034447, 'repo_name': 'jing-bao/pa-chromium', 'id': '59dae516c0767074fb60daffb25283f86ed2c163', 'size': '4424', 'binary': False, 'copies': '8', 'ref': 'refs/heads/master', 'path': 'chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []}
Test for reply detect service --FILE-- <?php $reqPayloadString = <<<XML <ns1:echo xmlns:ns1="http://wso2.org/wsfphp/samples"><text>Hello World!</text></ns1:echo> XML; try { $reqMessage = new WSMessage($reqPayloadString, array("to"=>"http://localhost/samples/security/replay_detect/service.php", "action" => "http://wso2.org/wsfphp/samples/echoString")); $security_options = array("useUsernameToken" => TRUE ); $policy = new WSPolicy(array("security" => $security_options)); $security_token = new WSSecurityToken(array("user" => "Raigama", "password" => "RaigamaPW", "passwordType" => "Digest")); $client = new WSClient(array("useWSA" => TRUE, "policy" => $policy, "securityToken" => $security_token)); $resMessage = $client->request($reqMessage); printf("Response = %s \n", $resMessage->str); } catch (Exception $e) { if ($e instanceof WSFault) { printf("Soap Fault: %s\n", $e->Reason); } else { printf("Message = %s\n",$e->getMessage()); } } ?> --EXPECT-- Response = <ns1:echo xmlns:ns1="http://wso2.org/wsfphp/samples"><text>Hello World!</text></ns1:echo>
{'content_hash': '0a2074b0d607b56865dd1e967f3e37cf', 'timestamp': '', 'source': 'github', 'line_count': 39, 'max_line_length': 106, 'avg_line_length': 34.56410256410256, 'alnum_prop': 0.5356083086053413, 'repo_name': 'techhead/wsf_php_dist', 'id': 'de7f4e91359928e0da724fa68cf701a74b12ebf4', 'size': '1357', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/tests/samples/replay_detect.phpt', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Awk', 'bytes': '2682'}, {'name': 'C', 'bytes': '12834626'}, {'name': 'C++', 'bytes': '1397373'}, {'name': 'CSS', 'bytes': '2608'}, {'name': 'JavaScript', 'bytes': '7621'}, {'name': 'Objective-C', 'bytes': '17195'}, {'name': 'PHP', 'bytes': '1071141'}, {'name': 'Shell', 'bytes': '2249762'}, {'name': 'XSLT', 'bytes': '412043'}]}
/* global VERSION */ import DevtoolsBase from './base' import WebSocket from 'universal-websocket-client' export class Devtools extends DevtoolsBase { constructor(options) { super(options) this.trees = [] this.latestExecutionId = null this.version = VERSION this.init() } createSocket() { this.ws = new WebSocket(`ws://${this.host}`) } onMessage(event) { const message = JSON.parse(event.data) switch (message.type) { case 'pong': this.sendInitial() break case 'ping': this.sendInitial() break } } add(tree) { this.trees.push(tree) tree.contextProviders.unshift(this.Provider()) this.watchExecution(tree, 'ft') } remove(tree) { this.trees.splice(this.trees.indexOf(tree), 1) tree.contextProviders.splice(0, 1) tree.removeAllListeners('start') tree.removeAllListeners('end') tree.removeAllListeners('pathStart') tree.removeAllListeners('functionStart') tree.removeAllListeners('functionEnd') tree.removeAllListeners('error') } removeAll() { const trees = this.trees.reduce((newTrees, tree) => { newTrees.push(tree) return newTrees }, []) trees.forEach(tree => { this.remove(tree) }) } sendInitial() { const message = JSON.stringify({ type: 'init', source: 'ft', version: this.version, }) this.sendMessage(message) if (this.backlog.length) { this.sendBulkMessage(this.backlog, 'ft') this.backlog = [] } this.isConnected = true } /* Create the stringified message for the debugger. As we need to store mutations with the default true "storeMutations" option used by time travel and jumping between Cerebral apps, we are careful not doing unnecessary stringifying. */ createExecutionMessage(debuggingData, context, functionDetails, payload) { const type = 'execution' const data = { execution: { executionId: context.execution.id, functionIndex: functionDetails.functionIndex, payload: payload, datetime: context.execution.datetime, data: debuggingData, }, } return this.safeStringify({ type: type, source: 'ft', version: this.version, data: data, }) } Provider() { const sendExecutionData = this.sendExecutionData.bind(this) function provider(context, functionDetails, payload) { context.debugger = { send(data) { sendExecutionData(data, context, functionDetails, payload) }, wrapProvider(providerKey) { const provider = context[providerKey] context[providerKey] = Object.keys( provider ).reduce((wrappedProvider, key) => { const originalFunc = provider[key] wrappedProvider[key] = (...args) => { context.debugger.send({ method: `${providerKey}.${key}`, args: args, }) return originalFunc.apply(provider, args) } return wrappedProvider }, {}) }, } return context } return provider } } export default Devtools
{'content_hash': 'aaf829be4f016099934cbb732ebddd1e', 'timestamp': '', 'source': 'github', 'line_count': 127, 'max_line_length': 76, 'avg_line_length': 25.440944881889763, 'alnum_prop': 0.6084803466419065, 'repo_name': 'yusufsafak/cerebral', 'id': '947385c90ee99dbe61ee01fa8e5cd6abfa6f05dd', 'size': '3231', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'packages/node_modules/function-tree/src/devtools/index.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '11722'}, {'name': 'HTML', 'bytes': '2499'}, {'name': 'JavaScript', 'bytes': '176441'}]}
import CoordinateList from './CoordinateList'; import Coordinate from './Coordinate'; import extend from '../../../../extend'; import MathUtil from '../math/MathUtil'; import System from '../../../../java/lang/System'; import Comparator from '../../../../java/util/Comparator'; import Envelope from './Envelope'; export default function CoordinateArrays() {} extend(CoordinateArrays.prototype, { interfaces_: function () { return []; }, getClass: function () { return CoordinateArrays; } }); CoordinateArrays.isRing = function (pts) { if (pts.length < 4) return false; if (!pts[0].equals2D(pts[pts.length - 1])) return false; return true; }; CoordinateArrays.ptNotInList = function (testPts, pts) { for (var i = 0; i < testPts.length; i++) { var testPt = testPts[i]; if (CoordinateArrays.indexOf(testPt, pts) < 0) return testPt; } return null; }; CoordinateArrays.scroll = function (coordinates, firstCoordinate) { var i = CoordinateArrays.indexOf(firstCoordinate, coordinates); if (i < 0) return null; var newCoordinates = new Array(coordinates.length).fill(null); System.arraycopy(coordinates, i, newCoordinates, 0, coordinates.length - i); System.arraycopy(coordinates, 0, newCoordinates, coordinates.length - i, i); System.arraycopy(newCoordinates, 0, coordinates, 0, coordinates.length); }; CoordinateArrays.equals = function () { if (arguments.length === 2) { let coord1 = arguments[0], coord2 = arguments[1]; if (coord1 === coord2) return true; if (coord1 === null || coord2 === null) return false; if (coord1.length !== coord2.length) return false; for (var i = 0; i < coord1.length; i++) { if (!coord1[i].equals(coord2[i])) return false; } return true; } else if (arguments.length === 3) { let coord1 = arguments[0], coord2 = arguments[1], coordinateComparator = arguments[2]; if (coord1 === coord2) return true; if (coord1 === null || coord2 === null) return false; if (coord1.length !== coord2.length) return false; for (var i = 0; i < coord1.length; i++) { if (coordinateComparator.compare(coord1[i], coord2[i]) !== 0) return false; } return true; } }; CoordinateArrays.intersection = function (coordinates, env) { var coordList = new CoordinateList(); for (var i = 0; i < coordinates.length; i++) { if (env.intersects(coordinates[i])) coordList.add(coordinates[i], true); } return coordList.toCoordinateArray(); }; CoordinateArrays.hasRepeatedPoints = function (coord) { for (var i = 1; i < coord.length; i++) { if (coord[i - 1].equals(coord[i])) { return true; } } return false; }; CoordinateArrays.removeRepeatedPoints = function (coord) { if (!CoordinateArrays.hasRepeatedPoints(coord)) return coord; var coordList = new CoordinateList(coord, false); return coordList.toCoordinateArray(); }; CoordinateArrays.reverse = function (coord) { var last = coord.length - 1; var mid = Math.trunc(last / 2); for (var i = 0; i <= mid; i++) { var tmp = coord[i]; coord[i] = coord[last - i]; coord[last - i] = tmp; } }; CoordinateArrays.removeNull = function (coord) { var nonNull = 0; for (var i = 0; i < coord.length; i++) { if (coord[i] !== null) nonNull++; } var newCoord = new Array(nonNull).fill(null); if (nonNull === 0) return newCoord; var j = 0; for (var i = 0; i < coord.length; i++) { if (coord[i] !== null) newCoord[j++] = coord[i]; } return newCoord; }; CoordinateArrays.copyDeep = function () { if (arguments.length === 1) { let coordinates = arguments[0]; var copy = new Array(coordinates.length).fill(null); for (var i = 0; i < coordinates.length; i++) { copy[i] = new Coordinate(coordinates[i]); } return copy; } else if (arguments.length === 5) { let src = arguments[0], srcStart = arguments[1], dest = arguments[2], destStart = arguments[3], length = arguments[4]; for (var i = 0; i < length; i++) { dest[destStart + i] = new Coordinate(src[srcStart + i]); } } }; CoordinateArrays.isEqualReversed = function (pts1, pts2) { for (var i = 0; i < pts1.length; i++) { var p1 = pts1[i]; var p2 = pts2[pts1.length - i - 1]; if (p1.compareTo(p2) !== 0) return false; } return true; }; CoordinateArrays.envelope = function (coordinates) { var env = new Envelope(); for (var i = 0; i < coordinates.length; i++) { env.expandToInclude(coordinates[i]); } return env; }; CoordinateArrays.toCoordinateArray = function (coordList) { return coordList.toArray(CoordinateArrays.coordArrayType); }; CoordinateArrays.atLeastNCoordinatesOrNothing = function (n, c) { return c.length >= n ? c : []; }; CoordinateArrays.indexOf = function (coordinate, coordinates) { for (var i = 0; i < coordinates.length; i++) { if (coordinate.equals(coordinates[i])) { return i; } } return -1; }; CoordinateArrays.increasingDirection = function (pts) { for (var i = 0; i < Math.trunc(pts.length / 2); i++) { var j = pts.length - 1 - i; var comp = pts[i].compareTo(pts[j]); if (comp !== 0) return comp; } return 1; }; CoordinateArrays.compare = function (pts1, pts2) { var i = 0; while (i < pts1.length && i < pts2.length) { var compare = pts1[i].compareTo(pts2[i]); if (compare !== 0) return compare; i++; } if (i < pts2.length) return -1; if (i < pts1.length) return 1; return 0; }; CoordinateArrays.minCoordinate = function (coordinates) { var minCoord = null; for (var i = 0; i < coordinates.length; i++) { if (minCoord === null || minCoord.compareTo(coordinates[i]) > 0) { minCoord = coordinates[i]; } } return minCoord; }; CoordinateArrays.extract = function (pts, start, end) { start = MathUtil.clamp(start, 0, pts.length); end = MathUtil.clamp(end, -1, pts.length); var npts = end - start + 1; if (end < 0) npts = 0; if (start >= pts.length) npts = 0; if (end < start) npts = 0; var extractPts = new Array(npts).fill(null); if (npts === 0) return extractPts; var iPts = 0; for (var i = start; i <= end; i++) { extractPts[iPts++] = pts[i]; } return extractPts; }; function ForwardComparator() {} extend(ForwardComparator.prototype, { compare: function (o1, o2) { var pts1 = o1; var pts2 = o2; return CoordinateArrays.compare(pts1, pts2); }, interfaces_: function () { return [Comparator]; }, getClass: function () { return ForwardComparator; } }); function BidirectionalComparator() {} extend(BidirectionalComparator.prototype, { compare: function (o1, o2) { var pts1 = o1; var pts2 = o2; if (pts1.length < pts2.length) return -1; if (pts1.length > pts2.length) return 1; if (pts1.length === 0) return 0; var forwardComp = CoordinateArrays.compare(pts1, pts2); var isEqualRev = CoordinateArrays.isEqualReversed(pts1, pts2); if (isEqualRev) return 0; return forwardComp; }, OLDcompare: function (o1, o2) { var pts1 = o1; var pts2 = o2; if (pts1.length < pts2.length) return -1; if (pts1.length > pts2.length) return 1; if (pts1.length === 0) return 0; var dir1 = CoordinateArrays.increasingDirection(pts1); var dir2 = CoordinateArrays.increasingDirection(pts2); var i1 = dir1 > 0 ? 0 : pts1.length - 1; var i2 = dir2 > 0 ? 0 : pts1.length - 1; for (var i = 0; i < pts1.length; i++) { var comparePt = pts1[i1].compareTo(pts2[i2]); if (comparePt !== 0) return comparePt; i1 += dir1; i2 += dir2; } return 0; }, interfaces_: function () { return [Comparator]; }, getClass: function () { return BidirectionalComparator; } }); CoordinateArrays.ForwardComparator = ForwardComparator; CoordinateArrays.BidirectionalComparator = BidirectionalComparator; CoordinateArrays.coordArrayType = new Array(0).fill(null);
{'content_hash': '8faf5adf5cf8cfb6d2f48993ecbc74c3', 'timestamp': '', 'source': 'github', 'line_count': 242, 'max_line_length': 120, 'avg_line_length': 31.318181818181817, 'alnum_prop': 0.6644676078638343, 'repo_name': 'ocadni/citychrone', 'id': 'cbf4edee6e71f507c9425857b4a6c7576729b96a', 'size': '7579', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'node_modules/jsts/src/org/locationtech/jts/geom/CoordinateArrays.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '46395'}, {'name': 'HTML', 'bytes': '18635'}, {'name': 'JavaScript', 'bytes': '183571'}, {'name': 'Jupyter Notebook', 'bytes': '72'}, {'name': 'Shell', 'bytes': '296'}]}
require 'rubygems' $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require File.expand_path(File.dirname(__FILE__) + '/../test/http_request') gem 'minitest' require 'minitest/autorun' require 'webmock/minitest' test_class = defined?(MiniTest::Test) ? MiniTest::Test : MiniTest::Unit::TestCase test_class.class_eval do def assert_raise(*exp, &block) assert_raises(*exp, &block) end def assert_raise_with_message(e, message, &block) e = assert_raises(e, &block) if message.is_a?(Regexp) assert_match(message, e.message) else assert_equal(message, e.message) end end def assert_fail(message, &block) assert_raise_with_message(MiniTest::Assertion, message, &block) end end
{'content_hash': 'ca13be746d65ac4f3a58b9ef135eded5', 'timestamp': '', 'source': 'github', 'line_count': 34, 'max_line_length': 81, 'avg_line_length': 23.5, 'alnum_prop': 0.6708385481852316, 'repo_name': 'influxdb/webmock', 'id': '5ea5bd8e01b1c5614d01ea714fb5f449d632c492', 'size': '799', 'binary': False, 'copies': '27', 'ref': 'refs/heads/master', 'path': 'minitest/test_helper.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '366332'}]}
import { enNZ } from 'date-fns/locale' export default enNZ
{'content_hash': '5bdf5dbbcd3d80f474b64d9d1ab469b1', 'timestamp': '', 'source': 'github', 'line_count': 2, 'max_line_length': 38, 'avg_line_length': 29.5, 'alnum_prop': 0.7457627118644068, 'repo_name': 'BigBoss424/portfolio', 'id': 'dbf083d496aa859f07489b6a3afad14e6f5bbc0b', 'size': '156', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'v8/development/node_modules/date-fns/esm/locale/en-NZ/index.d.ts', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
collectd-couchbase is a [collectd](http://www.collectd.org/) plugin that collects statistics from Couchbase. ## Requirements * Collectd 4.9 or later (for the Python plugin) * Python 2.7 or later * Couchbase 4.1 or later ## Configuration The following mandatory configuration options describe how the plugin will connect to the Couchbase Server: * CollectTarget - Required option. Define the plugin running instance, has two options: 'NODE' - get nodes related metrics or 'BUCKET' - get bucket related metrics. Target 'BUCKET' requires to have username and password to connect to selected bucket * Host - Required option. Hostname or IP address of the Couchbase server, default is 'localhost' * Port - Required option. The port of the Couchbase server, default is '8091' The following optional settings may be specified to control the behavior of the plugin: * Username - the username for authentication to selected bucket, default is None. If your bucket has not set up username and password just ignore this parameter otherwise define them * Password - the password for authentication to selected bucket, default is None If your bucket has not set up username and password just ignore this parameter otherwise define them * Interval - interval between sync metrics calls, default is 10 seconds * CollectMode - define the mode of plugin running, has two options: 'default' - get basics metrics or 'detailed' - get all available metrics. See details in `metric_info.py` * CollectBucket - bucket name for retrieving metrics. * FieldLength - Set the number of characters used to encode dimension data. This option should only ever be set if you specifically compiled collectd with a non-default value for DATA_MAX_NAME_LEN in plugin.h * ClusterName - Set your couchbase cluster name. Default value is 'default' The following is an example Collectd configuration for this plugin: ``` LoadPlugin python <Plugin python> ModulePath "/opt/collectd-couchbase" Import couchbase <Module couchbase> CollectTarget "NODE" Host "localhost" Port "8091" CollectMode "default" ClusterName "MyCluster1" Interval 10 </Module> <Module couchbase> CollectTarget "BUCKET" Host "localhost" Port "8091" Username "USERNAME" Password "PASSWORD" Interval 10 CollectMode "default" CollectBucket "default" ClusterName "MyCluster1" </Module> </Plugin> ``` ## Known Issues ### Truncating of long dimensions in the plugin_instance field Collectd has a 64-byte limit on the plugin_instance field, which this plugin uses to post dimensions to SignalFx. The dimensions include the node name, bucket name, and cluster name. The combination of these names as generated by Couchbase may exceed 64 characters. As a result, the dimensions posted to SignalFx (usually the cluster name) may be truncated. This has no effect on the metrics and values to SignalFx, only some of the Couchbase-specific dimensions associated with those metrics.
{'content_hash': '14482b0af468af3283352b63be47c28b', 'timestamp': '', 'source': 'github', 'line_count': 78, 'max_line_length': 115, 'avg_line_length': 39.53846153846154, 'alnum_prop': 0.7454604409857328, 'repo_name': 'signalfx/collectd-couchbase', 'id': 'eac9bf84b6f115aff92724faa0d866ecb167a4f1', 'size': '3130', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Python', 'bytes': '310968'}, {'name': 'Shell', 'bytes': '895'}]}
// Copyright © 2018 Wave Engine S.L. All rights reserved. Use is subject to license terms. #region Using Statements using System; using System.Collections.Generic; using WaveEngine.Common.Graphics; using WaveEngine.Common; using WaveEngine.Common.Math; using WaveEngine.Framework.Graphics; using WaveEngine.Materials; using WaveEngine.Common.Graphics.VertexFormats; using System.Runtime.Serialization; using WaveEngine.Common.Attributes; using WaveEngine.Common.Attributes.Converters; #endregion namespace WaveEngine.Framework.Graphics { /// <summary> /// This class represent a Skybox. /// </summary> [DataContract(Namespace = "WaveEngine.Framework.Graphics")] public class Skybox : Drawable3D { /// <summary> /// The instances /// </summary> private static int instances; /// <summary> /// The camera3D /// </summary> [RequiredComponent(false)] [DontRenderProperty] public Camera3D Camera3D; /// <summary> /// The material /// </summary> private SkyboxMaterial material; /// <summary> /// The cubemap texture /// </summary> private string cubemapPath; /// <summary> /// The cube mesh /// </summary> private Mesh cubeMesh; /// <summary> /// The disposed /// </summary> private bool disposed; /// <summary> /// Rotation in euler angles /// </summary> private Vector3 rotation; /// <summary> /// Rotation expressed in quaternion /// </summary> private Quaternion orientation; /// <summary> /// Cached rotation transform /// </summary> private Matrix cachedRotation; #region Properties /// <summary> /// Gets or sets the SkyBox cubemap texture /// </summary> [DataMember] [RenderPropertyAsAsset(AssetType.Cubemap)] public string CubemapPath { get { return this.cubemapPath; } set { this.cubemapPath = value; if (this.isInitialized) { this.RefreshCubemapMaterial(); } } } /// <summary> /// Gets or sets the SkyBox cube rotation expressed in Euler angles (yaw, pitch, roll) /// </summary> [RenderProperty(typeof(Vector3RadianToDegreeConverter))] public Vector3 Rotation { get { return this.rotation; } set { this.rotation = value; Quaternion.CreateFromYawPitchRoll(value.X, value.Y, value.Z, out this.orientation); Matrix.CreateFromQuaternion(ref this.orientation, out this.cachedRotation); } } /// <summary> /// Gets or sets the SkyBox cube orientation expressed in quaternion. /// </summary> [DontRenderProperty] [DataMember] public Quaternion Orientation { get { return this.orientation; } set { this.orientation = value; Vector3.FromQuaternion(ref this.orientation, out this.rotation); Matrix.CreateFromQuaternion(ref this.orientation, out this.cachedRotation); } } #endregion #region Initialize /// <summary> /// Initializes a new instance of the <see cref="Skybox" /> class. /// </summary> public Skybox() : base("Skybox" + instances) { } /// <summary> /// Initializes a new instance of the <see cref="Skybox" /> class. /// </summary> /// <param name="cubemapTexture">The cubemap texture.</param> public Skybox(string cubemapTexture) : base("Skybox" + instances) { this.cubemapPath = cubemapTexture; } /// <summary> /// The default values. /// </summary> protected override void DefaultValues() { base.DefaultValues(); instances++; this.Rotation = Vector3.Zero; } #endregion #region Public Methods /// <summary> /// Performs further custom initialization for this instance. /// </summary> /// <exception cref="System.ObjectDisposedException">Skybox disposed.</exception> protected override void Initialize() { if (this.disposed) { throw new ObjectDisposedException("Skybox"); } base.Initialize(); Vector3[] normals = { new Vector3(0, 0, 1), new Vector3(0, 0, -1), new Vector3(1, 0, 0), new Vector3(-1, 0, 0), new Vector3(0, 1, 0), new Vector3(0, -1, 0) }; Vector2[] texCoord = { new Vector2(1, 1), new Vector2(0, 1), new Vector2(0, 0), new Vector2(1, 0), new Vector2(0, 0), new Vector2(1, 0), new Vector2(1, 1), new Vector2(0, 1), new Vector2(1, 0), new Vector2(1, 1), new Vector2(0, 1), new Vector2(0, 0), new Vector2(1, 0), new Vector2(1, 1), new Vector2(0, 1), new Vector2(0, 0), new Vector2(0, 1), new Vector2(0, 0), new Vector2(1, 0), new Vector2(1, 1), new Vector2(1, 0), new Vector2(1, 1), new Vector2(0, 1), new Vector2(0, 0), }; float sizeOverTwo = 0.5f; ushort[] indices = new ushort[36]; VertexPositionTexture[] vertices = new VertexPositionTexture[24]; ushort currentIndice = 0; ushort currentVertex = 0; // Create each face in turn. for (int i = 0, j = 0; i < normals.Length; i++, j += 4) { Vector3 normal = normals[i]; // Get two vectors perpendicular to the face normal and to each other. Vector3 side1 = new Vector3(normal.Y, normal.Z, normal.X); Vector3 side2 = Vector3.Cross(normal, side1); // Six indices (two triangles) per face. indices[currentIndice++] = (ushort)(currentVertex + 0); indices[currentIndice++] = (ushort)(currentVertex + 1); indices[currentIndice++] = (ushort)(currentVertex + 3); indices[currentIndice++] = (ushort)(currentVertex + 1); indices[currentIndice++] = (ushort)(currentVertex + 2); indices[currentIndice++] = (ushort)(currentVertex + 3); // 1 2 // 0 3 // Four vertices per face. vertices[currentVertex].Position = (normal - side1 - side2) * sizeOverTwo; vertices[currentVertex++].TexCoord = texCoord[j + 0]; vertices[currentVertex].Position = (normal - side1 + side2) * sizeOverTwo; vertices[currentVertex++].TexCoord = texCoord[j + 1]; vertices[currentVertex].Position = (normal + side1 + side2) * sizeOverTwo; vertices[currentVertex++].TexCoord = texCoord[j + 2]; vertices[currentVertex].Position = (normal + side1 - side2) * sizeOverTwo; vertices[currentVertex++].TexCoord = texCoord[j + 3]; } VertexBuffer vertexBuffer = new VertexBuffer(VertexPositionTexture.VertexFormat); vertexBuffer.SetData(vertices, 24); IndexBuffer indexBuffer = new IndexBuffer(indices); // create the quad this.cubeMesh = new Mesh(0, 24, 0, 12, vertexBuffer, indexBuffer, PrimitiveType.TriangleList) { DisableBatch = true }; this.RefreshCubemapMaterial(); } /// <summary> /// Allows to perform custom drawing. /// </summary> /// <param name="gameTime">The elapsed game time.</param> /// <remarks> /// This method will only be called if all the following points are true: /// <list type="bullet"><item><description>The entity passes the culling test.</description></item><item><description>The parent of the owner <see cref="Entity" /> of the <see cref="Drawable" /> cascades its visibility to its children and it is visible.</description></item><item><description>The <see cref="Drawable" /> is active.</description></item><item><description>The owner <see cref="Entity" /> of the <see cref="Drawable" /> is active and visible.</description></item></list> /// </remarks> public override void Draw(TimeSpan gameTime) { if (this.material == null) { return; } if (this.Camera3D == this.RenderManager.CurrentDrawingCamera3D) { var camera = this.Camera3D; Matrix scale = Matrix.CreateScale((camera.NearPlane + camera.FarPlane) * 0.5f); Matrix position = Matrix.CreateTranslation(camera.Position); Matrix worldTransform = Matrix.Multiply(Matrix.Multiply(scale, this.cachedRotation), position); this.RenderManager.DrawMesh(this.cubeMesh, this.material, ref worldTransform); } } #endregion #region Private Methods /// <summary> /// Refresh cubemap material /// </summary> private void RefreshCubemapMaterial() { if (this.material != null) { this.material.Unload(this.Assets); this.material = null; } if (!string.IsNullOrEmpty(this.cubemapPath)) { this.material = new SkyboxMaterial(this.cubemapPath); this.material.Initialize(this.Assets); } } /// <summary> /// Releases unmanaged and - optionally - managed resources. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected override void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { if (this.isInitialized) { this.GraphicsDevice.DestroyVertexBuffer(this.cubeMesh.VertexBuffer); this.GraphicsDevice.DestroyIndexBuffer(this.cubeMesh.IndexBuffer); if (!string.IsNullOrEmpty(this.cubemapPath)) { this.Assets.UnloadAsset(this.cubemapPath); } } this.disposed = true; } } } #endregion } }
{'content_hash': 'c1fafb3bb2d8a9f47146005dac241677', 'timestamp': '', 'source': 'github', 'line_count': 333, 'max_line_length': 492, 'avg_line_length': 33.510510510510514, 'alnum_prop': 0.5298861905188637, 'repo_name': 'WaveEngine/Components', 'id': 'e6e4eadfd5f98f40ba44d2763998a388fe242c49', 'size': '11162', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Shared/Graphics3D/Skybox.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C#', 'bytes': '1353911'}]}
import Mocha, { describe, it, before, } from 'mocha'; import Chai, { expect } from 'chai'; import Jsdom from 'mocha-jsdom'; import { WidgetConfigurationView } from '../../src/View/WidgetConfigurationView.js'; import { PlainDataWidgetData } from '../../src/DataModel/Config/WidgetData/DataWidgetData/PlainDataWidgetData'; import { View } from '../../src/View/View.js'; describe("WidgetConfigurationView", () => { let _widgetConfigurationView; Jsdom(); let getDummyWidgetData = (id, confData) => { if (!confData.title) { console.log("confData must contain title object."); return; } let wd = { _id: id, _configurableData: confData, }; wd.getID = () => wd._id; wd.getConfigurableData = () => wd._configurableData; return wd; }; let loadHTML = () => { $("body").html( '<div id="configureWidget" class="conf-popup"> ' + '<div class="conf-content"> ' + '<div class="conf-header"> ' + '<span id="widget_conf_title" class="conf-title">Configure $TITLE</span> ' + '<span id="widget_conf_close" class="conf-close close">&times;</span> ' + '</div> ' + '<div id="widget_conf_inner" class="conf-inner"> ' + '<table class="table table-striped"> ' + '<tbody id="widget_conf_table" class="conf-table"> </tbody> ' + '</table> ' + '</div> ' + '<div class="conf-footer"> ' + '<button id="widget_conf_save" accesskey="a" type="button" class="btn btn-primary conf-btn-save">Apply </button> ' + '</div> ' + '</div> ' + '</div>'); }; before(() => { //needed for inserting tooltips global.printAJAXerrors = false; let _view = new View("testView", false, false, false, "en"); _view._setUpLanguage(); loadHTML(); let wd = getDummyWidgetData("test", { title: { data: "title", type: TYPE_STRING } }); _widgetConfigurationView = new WidgetConfigurationView(wd); }); /** * Tests whether an addition with no carry is successful */ it("should add minutes to Dates correctly - Simple test", () => { expect(_widgetConfigurationView._configTableRowFactory._dateAddMinutes(new Date(0), 43)).to.eql(new Date(1970, 0, 1, 1, 43)); }); /** * Tests whether the addition of one year, one month, one day, one hour and one minute is successful. */ it("should add minutes to Dates correctly - Carry test", () => { expect(_widgetConfigurationView._configTableRowFactory._dateAddMinutes(new Date(0), (365 + 31 + 1) * 24 * 60 + 61)).to.eql(new Date(1971, 1, 2, 2, 1)); }); /** * Tests whether a table with four rows is created given a configurableData-Object with four attributes. */ it("should display the same amount of rows as there are configurable attributes", () => { //close popup again before inserting new widgetData _widgetConfigurationView._toggleView(null); let wd = getDummyWidgetData("test", { a: { data: "a", type: TYPE_STRING }, b: { data: [{ data: 1, type: TYPE_INTEGER }, { data: 2, type: TYPE_INTEGER }, { data: 3, type: TYPE_INTEGER }], type: TYPE_ARRAY }, c: { data: { attr1: { data: true, type: TYPE_BOOLEAN }, attr2: { data: false, type: TYPE_BOOLEAN }, attr3: { data: true, type: TYPE_BOOLEAN } }, type: TYPE_OBJECT }, title: { data: "title", type: TYPE_STRING } }); _widgetConfigurationView = new WidgetConfigurationView(wd); //expect row for a, b, c, and title. expect($("#widget_conf_table").children().length).to.equal(4); }); /** * Tests whether a table with four rows is created given a configurableData-Object with four attributes. */ it("should return an exact copy of the given configurableData object when nothing changes", () => { //close popup again before inserting new widgetData _widgetConfigurationView._toggleView(null); let confData = { a: { data: "valA", type: TYPE_STRING }, b: { data: [{ data: 1, type: TYPE_INTEGER }, { data: 2, type: TYPE_INTEGER }, { data: 3, type: TYPE_INTEGER }], type: TYPE_ARRAY }, c: { data: { attr1: { data: true, type: TYPE_BOOLEAN }, attr2: { data: false, type: TYPE_BOOLEAN }, attr3: { data: true, type: TYPE_BOOLEAN } }, type: TYPE_OBJECT }, title: { data: "title", type: TYPE_STRING } }; let wd = getDummyWidgetData("test", confData); _widgetConfigurationView = new WidgetConfigurationView(wd); //set attribute widgetConfigurableData _widgetConfigurationView._createConfigurableData(); expect(_widgetConfigurationView.widgetConfigurableData).to.deep.equal(confData); }); /** * Tests whether a table with four rows is created given a configurableData-Object with four attributes. */ it("should return the correct configurableData object after modifications - all types simple", () => { //close popup again before inserting new widgetData _widgetConfigurationView._toggleView(null); let confData = { a: { data: "valA", type: TYPE_STRING }, b: { data: [{ data: 1, type: TYPE_INTEGER }, { data: 2, type: TYPE_INTEGER }, { data: 3, type: TYPE_INTEGER }], type: TYPE_ARRAY }, c: { data: { attr1: { data: true, type: TYPE_BOOLEAN }, attr2: { data: false, type: TYPE_BOOLEAN }, attr3: { data: true, type: TYPE_BOOLEAN } }, type: TYPE_OBJECT }, title: { data: "title", type: TYPE_STRING } }; let wd = getDummyWidgetData("test", confData); _widgetConfigurationView = new WidgetConfigurationView(wd); //modify table let setAttr = (val, attr, key) => { $("#" + attr + "-test-config" + (key !== undefined ? "-" + key : "")).val(val); if (typeof val === "boolean") { $("#" + attr + "-test-config" + (key ? "-" + key : "")).attr("checked", val); } }; setAttr("modTitle", "title"); setAttr("modValA", "a"); setAttr(-1, "b", 0); setAttr(-2, "b", 1); setAttr(-3, "b", 2); setAttr(false, "c", "attr1"); setAttr(true, "c", "attr2"); setAttr(false, "c", "attr3"); let expectData = { a: { data: "modValA", type: TYPE_STRING }, b: { data: [{ data: -1, type: TYPE_INTEGER, options: null }, { data: -2, type: TYPE_INTEGER, options: null }, { data: -3, type: TYPE_INTEGER, options: null } ], type: TYPE_ARRAY }, c: { data: { attr1: { data: false, type: TYPE_BOOLEAN, options: null }, attr2: { data: true, type: TYPE_BOOLEAN, options: null }, attr3: { data: false, type: TYPE_BOOLEAN, options: null } }, type: TYPE_OBJECT }, title: { data: "modTitle", type: TYPE_STRING } }; //set attribute widgetConfigurableData _widgetConfigurationView._createConfigurableData(); expect(_widgetConfigurationView.widgetConfigurableData).to.deep.equal(expectData); }); /** * Tests whether a table with four rows is created given a configurableData-Object with four attributes. */ it("should return the correct configurableData object after modifications - all types in a tree", () => { _widgetConfigurationView._toggleView(null); let confData = { obj: { type: TYPE_OBJECT, data: { //array in object arr: { data: [ //simple in array { data: 25.7, type: TYPE_NUMBER }, //array in array { data: [{ data: 25.7, type: TYPE_NUMBER }], type: TYPE_ARRAY, "options": [null] }, //object in array { data: { simple: { data: 25.7, type: TYPE_NUMBER } }, type: TYPE_OBJECT } ], type: TYPE_ARRAY, "options": [null] }, //object in object obj: { //simple in object data: { simple: { data: 25.7, type: TYPE_NUMBER } }, type: TYPE_OBJECT, options: null } } }, title: { data: "OneTree", type: TYPE_STRING } }; let wd = getDummyWidgetData("test", confData); _widgetConfigurationView = new WidgetConfigurationView(wd); //modify table let setAttr = (val, attr, key) => { $("#" + attr + "-test-config" + (key !== undefined ? "-" + key : "")).val(val); if (typeof val === "boolean") { $("#" + attr + "-test-config" + (key ? "-" + key : "")).attr("checked", val); } }; let expectTree = { obj: { type: TYPE_OBJECT, data: { //array in object arr: { data: [ //simple in array { data: -25.0, type: TYPE_NUMBER, options: null }, //array in array { data: [{ data: -25.1, type: TYPE_NUMBER, options: null }], type: TYPE_ARRAY, options: null }, //object in array { data: { simple: { data: -25.2, type: TYPE_NUMBER, options: null } }, type: TYPE_OBJECT, options: null } ], type: TYPE_ARRAY, options: null }, //object in object obj: { //simple in object data: { simple: { data: -25.3, type: TYPE_NUMBER, options: null } }, type: TYPE_OBJECT, options: null } } }, title: { data: "ModOneTree", type: TYPE_STRING } }; setAttr("ModOneTree", "title"); setAttr(-25.0, "obj", "arr-0"); setAttr(-25.1, "obj", "arr-1-0"); setAttr(-25.2, "obj", "arr-2-simple"); setAttr(-25.3, "obj", "obj-simple"); //set attribute widgetConfigurableData _widgetConfigurationView._createConfigurableData(); expect(_widgetConfigurationView.widgetConfigurableData).to.be.deep.equal(expectTree); }); it("should save the configuration and close the View via saveExit()", () => { let plainTextWidgetData = new PlainDataWidgetData("test"); _widgetConfigurationView = new WidgetConfigurationView(plainTextWidgetData); let data = plainTextWidgetData.configurableData; _widgetConfigurationView._toggleView(data); _widgetConfigurationView._saveExit(); if ($("div.conf-popup#configureWidget").hasClass("open")) { //failed: WidgetConfigurationView still open expect(true).to.be.false; } expect(plainTextWidgetData.configurableData).to.deep.equal(data); }); });
{'content_hash': '312fe03b7e46d88c625baedf5193b740', 'timestamp': '', 'source': 'github', 'line_count': 471, 'max_line_length': 159, 'avg_line_length': 33.90021231422505, 'alnum_prop': 0.3764639569111292, 'repo_name': 'SensorThings-Dashboard/SensorThings-Dashboard', 'id': '546cd9dfe22fb3c3e19a1c0e8a7160894797d0c1', 'size': '15967', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'test/View/WidgetConfigurationViewTest.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '8197'}, {'name': 'HTML', 'bytes': '9521'}, {'name': 'JavaScript', 'bytes': '1187085'}, {'name': 'Python', 'bytes': '6748'}]}
import { SelectField } from 'material-ui'; import React from 'react'; export const renderSelectField = ({ input, label, meta: { touched, error }, children, ...custom }) => ( <SelectField floatingLabelText={label} errorText={touched && error} {...input} onChange={(event, index, value) => input.onChange(value)} children={children} {...custom} /> ); export default renderSelectField;
{'content_hash': '1b1979891230958b0407ed47a0a6f45e', 'timestamp': '', 'source': 'github', 'line_count': 21, 'max_line_length': 61, 'avg_line_length': 20.142857142857142, 'alnum_prop': 0.640661938534279, 'repo_name': 'sunway-official/acm-admin', 'id': '2c254a236d1a1a0cecc068924e8af4d4de75f9d6', 'size': '423', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/pages/schedule/render/selectField.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '45477'}, {'name': 'HTML', 'bytes': '2828'}, {'name': 'JavaScript', 'bytes': '539659'}]}
package org.zstack.appliancevm; import org.zstack.header.configuration.PythonClassInventory; import org.zstack.header.query.Queryable; import org.zstack.header.search.Inventory; import org.zstack.header.search.Parent; import org.zstack.header.search.TypeField; import org.zstack.header.vm.VmInstanceInventory; import org.zstack.header.vm.VmInstanceVO; import org.zstack.header.vm.VmNicInventory; import org.zstack.utils.CollectionUtils; import org.zstack.utils.function.Function; import javax.persistence.JoinColumn; import java.util.ArrayList; import java.util.Collection; import java.util.List; @Inventory(mappingVOClass = ApplianceVmVO.class, collectionValueOfMethod="valueOf1", parent = {@Parent(inventoryClass = VmInstanceInventory.class, type = ApplianceVmConstant.APPLIANCE_VM_TYPE)}) @PythonClassInventory public class ApplianceVmInventory extends VmInstanceInventory { @TypeField private String applianceVmType; private String managementNetworkUuid; private String defaultRouteL3NetworkUuid; private String status; protected ApplianceVmInventory(ApplianceVmVO vo) { super(vo); this.setApplianceVmType(vo.getApplianceVmType()); this.setManagementNetworkUuid(vo.getManagementNetworkUuid()); this.setDefaultRouteL3NetworkUuid(vo.getDefaultRouteL3NetworkUuid()); this.setStatus(vo.getStatus().toString()); } public ApplianceVmInventory() { } public String getManagementNetworkUuid() { return managementNetworkUuid; } public void setManagementNetworkUuid(String managementNetworkUuid) { this.managementNetworkUuid = managementNetworkUuid; } public static ApplianceVmInventory valueOf(ApplianceVmVO vo) { return new ApplianceVmInventory(vo); } public static List<ApplianceVmInventory> valueOf1(Collection<ApplianceVmVO> vos) { List<ApplianceVmInventory> invs = new ArrayList<ApplianceVmInventory>(vos.size()); for (ApplianceVmVO vo : vos) { invs.add(new ApplianceVmInventory(vo)); } return invs; } public String getApplianceVmType() { return applianceVmType; } public void setApplianceVmType(String applianceVmType) { this.applianceVmType = applianceVmType; } public String getDefaultRouteL3NetworkUuid() { return defaultRouteL3NetworkUuid; } public void setDefaultRouteL3NetworkUuid(String defaultRouteL3NetworkUuid) { this.defaultRouteL3NetworkUuid = defaultRouteL3NetworkUuid; } public VmNicInventory getManagementNic() { for (VmNicInventory nic : this.getVmNics()) { if (nic.getL3NetworkUuid().equals(getManagementNetworkUuid())) { return nic; } } return null; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } }
{'content_hash': '81a60bad6546e9e55bc447aac808361e', 'timestamp': '', 'source': 'github', 'line_count': 93, 'max_line_length': 117, 'avg_line_length': 32.70967741935484, 'alnum_prop': 0.7024983563445102, 'repo_name': 'SoftwareKing/zstack', 'id': 'a086ff7004044b0af18d0ab627e1c54fb9c50cb4', 'size': '3042', 'binary': False, 'copies': '10', 'ref': 'refs/heads/master', 'path': 'plugin/applianceVm/src/main/java/org/zstack/appliancevm/ApplianceVmInventory.java', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'AspectJ', 'bytes': '49265'}, {'name': 'Groovy', 'bytes': '16605'}, {'name': 'Java', 'bytes': '8041121'}, {'name': 'Shell', 'bytes': '146403'}]}
package jp.primecloud.auto.sdk.model.instance; import com.fasterxml.jackson.annotation.JsonProperty; public class InstanceVmware { @JsonProperty("MachineName") private String machineName; @JsonProperty("InstanceType") private String instanceType; @JsonProperty("ComputeResource") private String computeResource; @JsonProperty("ResourcePool") private String resourcePool; @JsonProperty("Datastore") private String datastore; @JsonProperty("KeyName") private String keyName; @JsonProperty("RootSize") private Integer rootSize; @JsonProperty("IpAddress") private String ipAddress; @JsonProperty("PrivateIpAddress") private String privateIpAddress; @JsonProperty("IsStaticIp") private Boolean isStaticIp; @JsonProperty("SubnetMask") private String subnetMask; @JsonProperty("DefaultGateway") private String defaultGateway; public String getMachineName() { return machineName; } public void setMachineName(String machineName) { this.machineName = machineName; } public String getInstanceType() { return instanceType; } public void setInstanceType(String instanceType) { this.instanceType = instanceType; } public String getComputeResource() { return computeResource; } public void setComputeResource(String computeResource) { this.computeResource = computeResource; } public String getResourcePool() { return resourcePool; } public void setResourcePool(String resourcePool) { this.resourcePool = resourcePool; } public String getDatastore() { return datastore; } public void setDatastore(String datastore) { this.datastore = datastore; } public String getKeyName() { return keyName; } public void setKeyName(String keyName) { this.keyName = keyName; } public Integer getRootSize() { return rootSize; } public void setRootSize(Integer rootSize) { this.rootSize = rootSize; } public String getIpAddress() { return ipAddress; } public void setIpAddress(String ipAddress) { this.ipAddress = ipAddress; } public String getPrivateIpAddress() { return privateIpAddress; } public void setPrivateIpAddress(String privateIpAddress) { this.privateIpAddress = privateIpAddress; } public Boolean getIsStaticIp() { return isStaticIp; } public void setIsStaticIp(Boolean isStaticIp) { this.isStaticIp = isStaticIp; } public String getSubnetMask() { return subnetMask; } public void setSubnetMask(String subnetMask) { this.subnetMask = subnetMask; } public String getDefaultGateway() { return defaultGateway; } public void setDefaultGateway(String defaultGateway) { this.defaultGateway = defaultGateway; } }
{'content_hash': '0f7262549691e9616ff56935806307d2', 'timestamp': '', 'source': 'github', 'line_count': 140, 'max_line_length': 62, 'avg_line_length': 21.478571428571428, 'alnum_prop': 0.6681077485866312, 'repo_name': 'primecloud-controller-org/pcc-java-sdk', 'id': 'd7945ce30f5f639950d68ed8b854e678bd8c489b', 'size': '3608', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/jp/primecloud/auto/sdk/model/instance/InstanceVmware.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '246979'}]}
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0"/> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css"> <link rel="stylesheet" href="../../css/froala_editor.css"> <link rel="stylesheet" href="../../css/froala_style.css"> <link rel="stylesheet" href="../../css/plugins/code_view.css"> <link rel="stylesheet" href="../../css/plugins/colors.css"> <link rel="stylesheet" href="../../css/plugins/emoticons.css"> <link rel="stylesheet" href="../../css/plugins/image_manager.css"> <link rel="stylesheet" href="../../css/plugins/image.css"> <link rel="stylesheet" href="../../css/plugins/line_breaker.css"> <link rel="stylesheet" href="../../css/plugins/table.css"> <link rel="stylesheet" href="../../css/plugins/file.css"> <link rel="stylesheet" href="../../css/plugins/char_counter.css"> <link rel="stylesheet" href="../../css/plugins/video.css"> <link rel="stylesheet" href="../../css/plugins/emoticons.css"> <link rel="stylesheet" href="../../css/plugins/fullscreen.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.css"> <style> body { text-align: center; } section { width: 80%; margin: auto; text-align: left; } #scrollable { float: left; overflow: scroll; background: lightblue; height: 300px; padding: 10px; position: relative; margin-top: 50px; margin-left: 50px; } #edit { border: solid 1px red; } </style> </head> <body> <section id="editor"> <div id="scrollable"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec facilisis diam in odio iaculis blandit. Nunc eu mauris sit amet purus viverra gravida ut a dui. Vivamus nec rutrum augue, pharetra faucibus purus. Maecenas non orci sagittis, vehicula lorem et, dignissim nunc. Suspendisse suscipit, diam non varius facilisis, enim libero tincidunt magna, sit amet iaculis eros libero sit amet eros. Vestibulum a rhoncus felis. Nam lacus nulla, consequat ac lacus sit amet, accumsan pellentesque risus. Aenean viverra mi at urna mattis fermentum. Curabitur porta metus in tortor elementum, in semper nulla ullamcorper. Vestibulum mattis tempor tortor quis gravida. In rhoncus risus nibh. Nullam condimentum dapibus massa vel fringilla. Sed hendrerit sed est quis facilisis. Ut sit amet nibh sem. Pellentesque imperdiet mollis libero.</p> <p><a href="http://google.com" title="Aenean sed hendrerit">Aenean sed hendrerit</a> velit. Nullam eu mi dolor. Maecenas et erat risus. Nulla ac auctor diam, non aliquet ante. Fusce ullamcorper, ipsum id tempor lacinia, sem tellus malesuada libero, quis ornare sem massa in orci. Sed dictum dictum tristique. Proin eros turpis, ultricies eu sapien eget, ornare rutrum ipsum. Pellentesque eros nisl, ornare nec ipsum sed, aliquet sollicitudin erat. Nulla tincidunt porta vehicula.</p> <p>Nullam laoreet imperdiet orci ac euismod. Curabitur vel lectus nisi. Phasellus accumsan aliquet augue, eu rutrum tellus iaculis in. Nunc viverra ultrices mollis. Curabitur malesuada nunc massa, ut imperdiet arcu lobortis sed. Cras ac arcu mauris. Maecenas id lectus nisl. Donec consectetur scelerisque quam at ultricies. Nam quis magna iaculis, condimentum metus ut, elementum metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus id tempus nisi.</p> <div id='edit' style="margin-top: 30px;"> Select some text so that the editor appears. Select some text so that the editor appears. Select some text so that the editor appears. Select some text so that the editor appears. Select some text so that the editor appears. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec facilisis diam in odio iaculis blandit. Nunc eu mauris sit amet purus viverra gravida ut a dui. Vivamus nec rutrum augue, pharetra faucibus purus. Maecenas non orci sagittis, vehicula lorem et, dignissim nunc. Suspendisse suscipit, diam non varius facilisis, enim libero tincidunt magna, sit amet iaculis eros libero sit amet eros. Vestibulum a rhoncus felis. Nam lacus nulla, consequat ac lacus sit amet, accumsan pellentesque risus. Aenean viverra mi at urna mattis fermentum. Curabitur porta metus in tortor elementum, in semper nulla ullamcorper. Vestibulum mattis tempor tortor quis gravida. In rhoncus risus nibh. Nullam condimentum dapibus massa vel fringilla. Sed hendrerit sed est quis facilisis. Ut sit amet nibh sem. Pellentesque imperdiet mollis libero.</p> </div> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec facilisis diam in odio iaculis blandit. Nunc eu mauris sit amet purus viverra gravida ut a dui. Vivamus nec rutrum augue, pharetra faucibus purus. Maecenas non orci sagittis, vehicula lorem et, dignissim nunc. Suspendisse suscipit, diam non varius facilisis, enim libero tincidunt magna, sit amet iaculis eros libero sit amet eros. Vestibulum a rhoncus felis. Nam lacus nulla, consequat ac lacus sit amet, accumsan pellentesque risus. Aenean viverra mi at urna mattis fermentum. Curabitur porta metus in tortor elementum, in semper nulla ullamcorper. Vestibulum mattis tempor tortor quis gravida. In rhoncus risus nibh. Nullam condimentum dapibus massa vel fringilla. Sed hendrerit sed est quis facilisis. Ut sit amet nibh sem. Pellentesque imperdiet mollis libero.</p> <p><a href="http://google.com" title="Aenean sed hendrerit">Aenean sed hendrerit</a> velit. Nullam eu mi dolor. Maecenas et erat risus. Nulla ac auctor diam, non aliquet ante. Fusce ullamcorper, ipsum id tempor lacinia, sem tellus malesuada libero, quis ornare sem massa in orci. Sed dictum dictum tristique. Proin eros turpis, ultricies eu sapien eget, ornare rutrum ipsum. Pellentesque eros nisl, ornare nec ipsum sed, aliquet sollicitudin erat. Nulla tincidunt porta vehicula.</p> <p>Nullam laoreet imperdiet orci ac euismod. Curabitur vel lectus nisi. Phasellus accumsan aliquet augue, eu rutrum tellus iaculis in. Nunc viverra ultrices mollis. Curabitur malesuada nunc massa, ut imperdiet arcu lobortis sed. Cras ac arcu mauris. Maecenas id lectus nisl. Donec consectetur scelerisque quam at ultricies. Nam quis magna iaculis, condimentum metus ut, elementum metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus id tempus nisi.</p> </div> </section> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/mode/xml/xml.min.js"></script> <script type="text/javascript" src="../../js/froala_editor.min.js"></script> <script type="text/javascript" src="../../js/plugins/align.min.js"></script> <script type="text/javascript" src="../../js/plugins/code_beautifier.min.js"></script> <script type="text/javascript" src="../../js/plugins/code_view.min.js"></script> <script type="text/javascript" src="../../js/plugins/colors.min.js"></script> <script type="text/javascript" src="../../js/plugins/draggable.min.js"></script> <script type="text/javascript" src="../../js/plugins/emoticons.min.js"></script> <script type="text/javascript" src="../../js/plugins/font_size.min.js"></script> <script type="text/javascript" src="../../js/plugins/font_family.min.js"></script> <script type="text/javascript" src="../../js/plugins/image.min.js"></script> <script type="text/javascript" src="../../js/plugins/image_manager.min.js"></script> <script type="text/javascript" src="../../js/plugins/line_breaker.min.js"></script> <script type="text/javascript" src="../../js/plugins/link.min.js"></script> <script type="text/javascript" src="../../js/plugins/lists.min.js"></script> <script type="text/javascript" src="../../js/plugins/paragraph_format.min.js"></script> <script type="text/javascript" src="../../js/plugins/paragraph_style.min.js"></script> <script type="text/javascript" src="../../js/plugins/video.min.js"></script> <script type="text/javascript" src="../../js/plugins/table.min.js"></script> <script type="text/javascript" src="../../js/plugins/url.min.js"></script> <script type="text/javascript" src="../../js/plugins/emoticons.min.js"></script> <script type="text/javascript" src="../../js/plugins/file.min.js"></script> <script type="text/javascript" src="../../js/plugins/entities.min.js"></script> <script type="text/javascript" src="../../js/plugins/char_counter.min.js"></script> <script type="text/javascript" src="../../js/plugins/inline_style.min.js"></script> <script type="text/javascript" src="../../js/plugins/save.min.js"></script> <script type="text/javascript" src="../../js/plugins/fullscreen.min.js"></script> <script type="text/javascript" src="../../js/languages/ro.js"></script> <script> $(function(){ $('#edit').froalaEditor({ toolbarInline: false, toolbarButtons: ['fullscreen', 'bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', 'color', 'emoticons', '-', 'paragraphFormat', 'paragraphStyle', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', '-', 'insertLink', 'insertImage', 'insertVideo', 'insertTable', 'insertFile', 'undo', 'redo', 'html'], scrollableContainer: '#scrollable', toolbarBottom: true }) }); </script> </body> </html>
{'content_hash': '78c75bf7c42f5fb8eca6879522b8d7e9', 'timestamp': '', 'source': 'github', 'line_count': 116, 'max_line_length': 843, 'avg_line_length': 85.05172413793103, 'alnum_prop': 0.7136630853436043, 'repo_name': 'ajaykiet2/htdocs', 'id': 'f0cee206f491e7b2da5f631469eb43d644a0409b', 'size': '9866', 'binary': False, 'copies': '23', 'ref': 'refs/heads/master', 'path': 'assets/libraries/froala_editor/html/tests/bottom_scrollable_container.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '785851'}, {'name': 'HTML', 'bytes': '635739'}, {'name': 'JavaScript', 'bytes': '590108'}, {'name': 'PHP', 'bytes': '5360830'}]}
require 'test_helper' class FibonacciSeriesTest < Minitest::Test def subject @subject ||= Fibonacci.new end def test_print assert_equal [0,1,1], subject.print(3) assert_equal [0,1,1,2,3,5,8], subject.print(7) end end
{'content_hash': 'cda27066f43b1da025c732e340e8a78c', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 50, 'avg_line_length': 18.46153846153846, 'alnum_prop': 0.6708333333333333, 'repo_name': 'sandipransing/math_series', 'id': '8931e1e5b984906cac771b9f1642eb56919cbe97', 'size': '240', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'test/fibonacci_series_test.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '5025'}, {'name': 'Shell', 'bytes': '115'}]}
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" /> <link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media="all"/> <link rel="stylesheet" href="../../../../../aui/css/aui-experimental.min.css" media="all"/> <!--[if IE 9]><link rel="stylesheet" href="../../../../../aui/css/aui-ie9.min.css" media="all"/><![endif]--> <style type="text/css" media="all"> @import url('../../../../../style.css'); @import url('../../../../../tree.css'); </style> <script src="../../../../../jquery-1.8.3.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-experimental.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-soy.min.js" type="text/javascript"></script> <script src="../../../../../package-nodes-tree.js" type="text/javascript"></script> <script src="../../../../../clover-tree.js" type="text/javascript"></script> <script src="../../../../../clover.js" type="text/javascript"></script> <script src="../../../../../clover-descriptions.js" type="text/javascript"></script> <script src="../../../../../cloud.js" type="text/javascript"></script> <title>ABA Route Transit Number Validator 1.0.1-SNAPSHOT</title> </head> <body> <div id="page"> <header id="header" role="banner"> <nav class="aui-header aui-dropdown2-trigger-group" role="navigation"> <div class="aui-header-inner"> <div class="aui-header-primary"> <h1 id="logo" class="aui-header-logo aui-header-logo-clover"> <a href="http://openclover.org" title="Visit OpenClover home page"><span class="aui-header-logo-device">OpenClover</span></a> </h1> </div> <div class="aui-header-secondary"> <ul class="aui-nav"> <li id="system-help-menu"> <a class="aui-nav-link" title="Open online documentation" target="_blank" href="http://openclover.org/documentation"> <span class="aui-icon aui-icon-small aui-iconfont-help">&#160;Help</span> </a> </li> </ul> </div> </div> </nav> </header> <div class="aui-page-panel"> <div class="aui-page-panel-inner"> <div class="aui-page-panel-nav aui-page-panel-nav-clover"> <div class="aui-page-header-inner" style="margin-bottom: 20px;"> <div class="aui-page-header-image"> <a href="http://cardatechnologies.com" target="_top"> <div class="aui-avatar aui-avatar-large aui-avatar-project"> <div class="aui-avatar-inner"> <img src="../../../../../img/clover_logo_large.png" alt="Clover icon"/> </div> </div> </a> </div> <div class="aui-page-header-main" > <h1> <a href="http://cardatechnologies.com" target="_top"> ABA Route Transit Number Validator 1.0.1-SNAPSHOT </a> </h1> </div> </div> <nav class="aui-navgroup aui-navgroup-vertical"> <div class="aui-navgroup-inner"> <ul class="aui-nav"> <li class=""> <a href="../../../../../dashboard.html">Project overview</a> </li> </ul> <div class="aui-nav-heading packages-nav-heading"> <strong>Packages</strong> </div> <div class="aui-nav project-packages"> <form method="get" action="#" class="aui package-filter-container"> <input type="text" autocomplete="off" class="package-filter text" placeholder="Type to filter packages..." name="package-filter" id="package-filter" title="Start typing package name (or part of the name) to search through the tree. Use arrow keys and the Enter key to navigate."/> </form> <p class="package-filter-no-results-message hidden"> <small>No results found.</small> </p> <div class="packages-tree-wrapper" data-root-relative="../../../../../" data-package-name="com.cardatechnologies.utils.validators.abaroutevalidator"> <div class="packages-tree-container"></div> <div class="clover-packages-lozenges"></div> </div> </div> </div> </nav> </div> <section class="aui-page-panel-content"> <div class="aui-page-panel-content-clover"> <div class="aui-page-header-main"><ol class="aui-nav aui-nav-breadcrumbs"> <li><a href="../../../../../dashboard.html"> Project Clover database Sat Aug 7 2021 12:29:33 MDT</a></li> <li><a href="test-pkg-summary.html">Package com.cardatechnologies.utils.validators.abaroutevalidator</a></li> <li><a href="test-Test_AbaRouteValidator_05.html">Class Test_AbaRouteValidator_05</a></li> </ol></div> <h1 class="aui-h2-clover"> Test testAbaNumberCheck_8467_good </h1> <table class="aui"> <thead> <tr> <th>Test</th> <th><label title="The test result. Either a Pass, Fail or Error.">Status</label></th> <th><label title="When the test execution was started">Start time</label></th> <th><label title="The total time in seconds taken to run this test.">Time (seconds)</label></th> <th><label title="A failure or error message if the test is not successful.">Message</label></th> </tr> </thead> <tbody> <tr> <td> <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/Test_AbaRouteValidator_05.html?line=23248#src-23248" >testAbaNumberCheck_8467_good</a> </td> <td> <span class="sortValue">1</span><span class="aui-lozenge aui-lozenge-success">PASS</span> </td> <td> 7 Aug 12:35:03 </td> <td> 0.0 </td> <td> <div></div> <div class="errorMessage"></div> </td> </tr> </tbody> </table> <div>&#160;</div> <table class="aui aui-table-sortable"> <thead> <tr> <th style="white-space:nowrap;"><label title="A class that was directly hit by this test.">Target Class</label></th> <th colspan="4"><label title="The percentage of coverage contributed by each single test.">Coverage contributed by</label> testAbaNumberCheck_8467_good</th> </tr> </thead> <tbody> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/AbaRouteValidator.html?id=31931#AbaRouteValidator" title="AbaRouteValidator" name="sl-47">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</a> </td> <td> <span class="sortValue">0.7352941</span>73.5% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="73.5% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:73.5%"></div></div></div> </td> </tr> </tbody> </table> </div> <!-- class="aui-page-panel-content-clover" --> <footer id="footer" role="contentinfo"> <section class="footer-body"> <ul> <li> Report generated by <a target="_new" href="http://openclover.org">OpenClover</a> v 4.4.1 on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT. </li> </ul> <ul> <li>OpenClover is free and open-source software. </li> </ul> </section> </footer> </section> <!-- class="aui-page-panel-content" --> </div> <!-- class="aui-page-panel-inner" --> </div> <!-- class="aui-page-panel" --> </div> <!-- id="page" --> </body> </html>
{'content_hash': 'c495c3d02c505b887acf3e863f8a6d69', 'timestamp': '', 'source': 'github', 'line_count': 209, 'max_line_length': 297, 'avg_line_length': 43.91387559808612, 'alnum_prop': 0.5095881455654827, 'repo_name': 'dcarda/aba.route.validator', 'id': 'd6678135160824d6f038d79cae8bf3a2f2ed5534', 'size': '9178', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'target13/site/clover/com/cardatechnologies/utils/validators/abaroutevalidator/Test_AbaRouteValidator_05_testAbaNumberCheck_8467_good_omz.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '18715254'}]}
/* global escape */ 'use strict'; exports.find = function(req, res, next){ req.query.name = req.query.name ? req.query.name : ''; req.query.limit = req.query.limit ? parseInt(req.query.limit, null) : 20; req.query.page = req.query.page ? parseInt(req.query.page, null) : 1; req.query.sort = req.query.sort ? req.query.sort : '_id'; var filters = {}; if (req.query.name) { filters.name = new RegExp('^.*?'+ req.query.name +'.*$', 'i'); } req.app.db.models.AdminGroup.pagedFind({ filters: filters, keys: 'name', limit: req.query.limit, page: req.query.page, sort: req.query.sort }, function(err, results) { if (err) { return next(err); } if (req.xhr) { res.header('Cache-Control', 'no-cache, no-store, must-revalidate'); results.filters = req.query; res.send(results); } else { results.filters = req.query; res.render('admin/admin-groups/index', { data: { results: escape(JSON.stringify(results)) } }); } }); }; exports.read = function(req, res, next){ req.app.db.models.AdminGroup.findById(req.params.id).exec(function(err, adminGroup) { if (err) { return next(err); } if (req.xhr) { res.send(adminGroup); } else { res.render('admin/admin-groups/details', { data: { record: escape(JSON.stringify(adminGroup)) } }); } }); }; exports.create = function(req, res){ var workflow = req.app.utility.workflow(req, res); workflow.on('validate', function() { if (!req.user.isMemberOf('root')) { workflow.outcome.errors.push('You may not create admin groups.'); return workflow.emit('response'); } if (!req.body.name) { workflow.outcome.errors.push('Please enter a name.'); return workflow.emit('response'); } workflow.emit('duplicateAdminGroupCheck'); }); workflow.on('duplicateAdminGroupCheck', function() { req.app.db.models.AdminGroup.findById(req.app.utility.slugify(req.body.name)).exec(function(err, adminGroup) { if (err) { return workflow.emit('exception', err); } if (adminGroup) { workflow.outcome.errors.push('That group already exists.'); return workflow.emit('response'); } workflow.emit('createAdminGroup'); }); }); workflow.on('createAdminGroup', function() { var fieldsToSet = { _id: req.app.utility.slugify(req.body.name), name: req.body.name }; req.app.db.models.AdminGroup.create(fieldsToSet, function(err, adminGroup) { if (err) { return workflow.emit('exception', err); } workflow.outcome.record = adminGroup; return workflow.emit('response'); }); }); workflow.emit('validate'); }; exports.update = function(req, res) { var workflow = req.app.utility.workflow(req, res); workflow.on('validate', function() { if (!req.user.isMemberOf('root')) { workflow.outcome.errors.push('You may not update admin groups.'); return workflow.emit('response'); } if (!req.body.name) { workflow.outcome.errfor.name = 'required'; return workflow.emit('response'); } workflow.emit('patchAdminGroup'); }); workflow.on('patchAdminGroup', function() { var fieldsToSet = { name: req.body.name }; req.app.db.models.AdminGroup.findByIdAndUpdate(req.params.id, fieldsToSet, function(err, adminGroup) { if (err) { return workflow.emit('exception', err); } workflow.outcome.adminGroup = adminGroup; console.log(workflow.outcome); return workflow.emit('response'); }); }); workflow.emit('validate'); }; exports.permissions = function(req, res){ var workflow = req.app.utility.workflow(req, res); workflow.on('validate', function() { if (!req.user.isMemberOf('root')) { workflow.outcome.errors.push('You may not change the permissions of admin groups.'); return workflow.emit('response'); } if (!req.body.permissions) { workflow.outcome.errfor.permissions = 'required'; return workflow.emit('response'); } workflow.emit('patchAdminGroup'); }); workflow.on('patchAdminGroup', function() { var fieldsToSet = { permissions: req.body.permissions }; req.app.db.models.AdminGroup.findByIdAndUpdate(req.params.id, fieldsToSet, function(err, adminGroup) { if (err) { return workflow.emit('exception', err); } workflow.outcome.adminGroup = adminGroup; return workflow.emit('response'); }); }); workflow.emit('validate'); }; exports.delete = function(req, res){ var workflow = req.app.utility.workflow(req, res); workflow.on('validate', function() { if (!req.user.isMemberOf('root')) { workflow.outcome.errors.push('You may not delete admin groups.'); return workflow.emit('response'); } workflow.emit('deleteAdminGroup'); }); workflow.on('deleteAdminGroup', function() { req.app.db.models.AdminGroup.findByIdAndRemove(req.params.id, function(err) { if (err) { return workflow.emit('exception', err); } workflow.emit('response'); }); }); workflow.emit('validate'); };
{'content_hash': '44dc10867c120bdc43a6382b769f5659', 'timestamp': '', 'source': 'github', 'line_count': 197, 'max_line_length': 114, 'avg_line_length': 26.411167512690355, 'alnum_prop': 0.6244474341725927, 'repo_name': 'hoegrammer/drywall', 'id': 'd176e737ecef532e49894f5674449dec5a1d21e7', 'size': '5203', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'views/admin/admin-groups/index.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '8341'}, {'name': 'JavaScript', 'bytes': '227176'}]}
Source: https://sketchfab.com/3d-models/low-poly-old-vintage-table-desk-free-c802441e808c4ae9a0cb1448ce3b6e82 License: https://creativecommons.org/licenses/by/4.0/ Artist: vracolacus https://sketchfab.com/vracolacus
{'content_hash': '9255b003a9136a3365782b11dde92160', 'timestamp': '', 'source': 'github', 'line_count': 3, 'max_line_length': 109, 'avg_line_length': 72.0, 'alnum_prop': 0.8240740740740741, 'repo_name': 'ripter/Workshops', 'id': '6d03896c1b4d13521c9f3f712fe1d5ae24a682b4', 'size': '216', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'aframe/juggle/public/assets/vintage_table_src.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '2994'}, {'name': 'HTML', 'bytes': '39558'}, {'name': 'JavaScript', 'bytes': '7410900'}, {'name': 'Lua', 'bytes': '492383'}, {'name': 'Makefile', 'bytes': '4032'}, {'name': 'PLSQL', 'bytes': '575045'}, {'name': 'Rust', 'bytes': '12030'}]}
.team { width: 20px; height: 20px; background:url(../img/team.png) no-repeat top left; display: inline-block; vertical-align: middle; } .team.team-bastia { background-position: 0px 0px; } .team.team-bordeaux { background-position: -30px 0px; } .team.team-caen { background-position: -60px 0px; } .team.team-evian-tg { background-position: -90px 0px; } .team.team-guingamp { background-position: -120px 0px; } .team.team-lens { background-position: -150px 0px; } .team.team-lille { background-position: -180px 0px; } .team.team-lorient { background-position: -210px 0px; } .team.team-lyon { background-position: -240px 0px; } .team.team-marseille { background-position: -270px 0px; } .team.team-metz { background-position: -300px 0px; } .team.team-monaco { background-position: -330px 0px; } .team.team-montpellier { background-position: -360px 0px; } .team.team-nantes { background-position: -390px 0px; } .team.team-nice { background-position: -420px 0px; } .team.team-paris-sg { background-position: -450px 0px; } .team.team-reims { background-position: -480px 0px; } .team.team-rennes { background-position: -510px 0px; } .team.team-saint-e-tienne { background-position: -540px 0px; } .team.team-toulouse { background-position: -570px 0px; } .team.team-arsenal { background-position: 0px -30px; } .team.team-aston-villa { background-position: -30px -30px; } .team.team-burnley { background-position: -60px -30px; } .team.team-chelsea { background-position: -90px -30px; } .team.team-crystal-palace { background-position: -120px -30px; } .team.team-everton { background-position: -150px -30px; } .team.team-hull-city { background-position: -180px -30px; } .team.team-leicester-city { background-position: -210px -30px; } .team.team-liverpool { background-position: -240px -30px; } .team.team-manchester-city { background-position: -270px -30px; } .team.team-manchester-united { background-position: -300px -30px; } .team.team-newscastle-united { background-position: -330px -30px; } .team.team-queens-park-rangers { background-position: -360px -30px; } .team.team-southampton { background-position: -390px -30px; } .team.team-stoke-city { background-position: -420px -30px; } .team.team-sunderland { background-position: -450px -30px; } .team.team-swansea-city { background-position: -480px -30px; } .team.team-tottenham-hotspur { background-position: -510px -30px; } .team.team-west-bromwich-albion { background-position: -540px -30px; } .team.team-west-ham-utd { background-position: -570px -30px; } .team.team-almeria { background-position: 0px -60px; } .team.team-athletic-bilbao { background-position: -30px -60px; } .team.team-atletico-madrid { background-position: -60px -60px; } .team.team-celta-vigo { background-position: -90px -60px; } .team.team-cordoba { background-position: -120px 0px; } .team.team-deportivo-la-corogne { background-position: -150px -60px; } .team.team-eibar { background-position: -180px -60px; } .team.team-elche { background-position: -210px -60px; } .team.team-espanyol-barcelone { background-position: -240px -60px; } .team.team-fc-barcelone { background-position: -270px -60px; } .team.team-fc-se-ville { background-position: -300px -60px; } .team.team-getafe { background-position: -330px -60px; } .team.team-granada-cf { background-position: -360px -60px; } .team.team-levante { background-position: -390px -60px; } .team.team-malaga { background-position: -420px -60px; } .team.team-rayo-vallecano { background-position: -450px -60px; } .team.team-real-madrid { background-position: -480px -60px; } .team.team-real-sociedad { background-position: -510px -60px; } .team.team-valence-cf { background-position: -540px -60px; } .team.team-villareal { background-position: -570px -60px; } .team.team-ac-milan { background-position: 0px -90px; } .team.team-as-roma { background-position: -30px -90px; } .team.team-atalanta-bergame { background-position: -60px -90px; } .team.team-cagliari { background-position: -90px -90px; } .team.team-cesena { background-position: -120px -90px; } .team.team-chievo-ve-rone { background-position: -150px -90px; } .team.team-empoli { background-position: -180px -90px; } .team.team-fiorentina { background-position: -210px -90px; } .team.team-genoa { background-position: -240px -90px; } .team.team-hellas-ve-rone { background-position: -270px -90px; } .team.team-inter-milan { background-position: -300px -90px; } .team.team-juventus-turin { background-position: -330px -90px; } .team.team-lazio-rome { background-position: -360px -90px; } .team.team-naples { background-position: -390px -90px; } .team.team-palerme { background-position: -420px -90px; } .team.team-parme { background-position: -450px -90px; } .team.team-sampdoria-ge-nes { background-position: -480px -90px; } .team.team-sassuolo { background-position: -510px -90px; } .team.team-torino { background-position: -540px -90px; } .team.team-udinese { background-position: -570px -90px; } .team.team-augsbourg { background-position: 0px -120px; } .team.team-bayer-leverkusen { background-position: -30px -120px; } .team.team-bayern-munich { background-position: -60px -120px; } .team.team-borussia-dortmund { background-position: -90px -120px; } .team.team-borussia-m-gladbach { background-position: -120px -120px; } .team.team-eintracht-francfort { background-position: -150px -120px; } .team.team-fc-cologne { background-position: -180px -120px; } .team.team-fsv-mayence-05 { background-position: -210px -120px; } .team.team-hambourg-sv { background-position: -240px -120px; } .team.team-hanovre-96 { background-position: -270px -120px; } .team.team-hertha-berlin { background-position: -300px -120px; } .team.team-hoffenheim { background-position: -330px -120px; } .team.team-sc-fribourg { background-position: -360px -120px; } .team.team-schalke-04 { background-position: -390px -120px; } .team.team-sc-paderborn-07 { background-position: -420px -120px; } .team.team-vfb-stuttgart { background-position: -450px -120px; } .team.team-vfl-wolfsburg { background-position: -480px -120px; } .team.team-werder-breme { background-position: -510px -120px; }
{'content_hash': '9e8905a002bb4278aa8895c1c4466818', 'timestamp': '', 'source': 'github', 'line_count': 109, 'max_line_length': 70, 'avg_line_length': 56.08256880733945, 'alnum_prop': 0.7271388843448389, 'repo_name': 'jbouzekri/free-bet', 'id': '02027c2b3a17dd91e803b0aa22221318d004556d', 'size': '6113', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/FreeBet/Bundle/UIBundle/Resources/public/css/teams.css', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '2647'}, {'name': 'CSS', 'bytes': '73985'}, {'name': 'HTML', 'bytes': '69612'}, {'name': 'JavaScript', 'bytes': '4944'}, {'name': 'PHP', 'bytes': '237126'}]}
// Originally from UpdatedComponentTests/StandardTesting/SOAP/SOAP_RequestTypes_Map_SimpleMap_DuplicateKey.xls; package com.betfair.cougar.tests.updatedcomponenttests.standardtesting.soap; import com.betfair.testing.utils.cougar.misc.XMLHelpers; import com.betfair.testing.utils.cougar.assertions.AssertionUtils; import com.betfair.testing.utils.cougar.beans.HttpCallBean; import com.betfair.testing.utils.cougar.beans.HttpResponseBean; import com.betfair.testing.utils.cougar.manager.CougarManager; import com.betfair.testing.utils.cougar.manager.RequestLogRequirement; import org.testng.annotations.Test; import org.w3c.dom.Document; import java.sql.Timestamp; import java.util.Map; /** * Ensure that when a SOAP request is received, Cougar can handle a SimpleMap datatype parameter that contains a duplicate key */ public class SOAPRequestTypesMapSimpleMapDuplicateKeyTest { @Test public void doTest() throws Exception { // Create the SOAP request as an XML Document (with a simple map parameter that contains a duplicate key) XMLHelpers xMLHelpers1 = new XMLHelpers(); Document createAsDocument1 = xMLHelpers1.getXMLObjectFromString("<SimpleMapOperationRequest><message><simpleMap><entry key=\"aaa\"><String>First Value for aaa</String></entry><entry key=\"aaa\"><String>Second Value for aaa</String></entry><entry key=\"bbb\"><String>Value for bbb</String></entry><entry key=\"ccc\"><String>Value for ccc</String></entry></simpleMap></message></SimpleMapOperationRequest>"); // Set up the Http Call Bean to make the request CougarManager cougarManager2 = CougarManager.getInstance(); HttpCallBean getNewHttpCallBean2 = cougarManager2.getNewHttpCallBean("87.248.113.14"); cougarManager2 = cougarManager2; getNewHttpCallBean2.setServiceName("Baseline"); getNewHttpCallBean2.setVersion("v2"); // Set the created SOAP request as the PostObject getNewHttpCallBean2.setPostObjectForRequestType(createAsDocument1, "SOAP"); // Get current time for getting log entries later Timestamp getTimeAsTimeStamp7 = new Timestamp(System.currentTimeMillis()); // Make the SOAP call to the operation cougarManager2.makeSoapCougarHTTPCalls(getNewHttpCallBean2); // Create the expected response object as an XML document XMLHelpers xMLHelpers4 = new XMLHelpers(); Document createAsDocument9 = xMLHelpers4.getXMLObjectFromString("<response><responseMap><entry key=\"aaa\"><String>Second Value for aaa</String></entry><entry key=\"bbb\"><String>Value for bbb</String></entry><entry key=\"ccc\"><String>Value for ccc</String></entry></responseMap></response>"); // Convert the expected response to SOAP for comparison with actual response // Check the response is as expected HttpResponseBean response5 = getNewHttpCallBean2.getResponseObjectsByEnum(com.betfair.testing.utils.cougar.enums.CougarMessageProtocolResponseTypeEnum.SOAP); AssertionUtils.multiAssertEquals(createAsDocument9, response5.getResponseObject()); // generalHelpers.pauseTest(2000L); // Check the log entries are as expected cougarManager2.verifyRequestLogEntriesAfterDate(getTimeAsTimeStamp7, new RequestLogRequirement("2.8", "simpleMapOperation") ); } }
{'content_hash': '10ce01084ba364e204d0081cb615eb8c', 'timestamp': '', 'source': 'github', 'line_count': 58, 'max_line_length': 414, 'avg_line_length': 57.46551724137931, 'alnum_prop': 0.7587758775877588, 'repo_name': 'olupas/cougar', 'id': '892ba328144a8bd5ec3735f211457fecec2336d3', 'size': '3987', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'cougar-test/cougar-normal-code-tests/src/test/java/com/betfair/cougar/tests/updatedcomponenttests/standardtesting/soap/SOAPRequestTypesMapSimpleMapDuplicateKeyTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C++', 'bytes': '83394'}, {'name': 'HTML', 'bytes': '23595'}, {'name': 'Java', 'bytes': '9535986'}, {'name': 'Shell', 'bytes': '19139'}, {'name': 'XSLT', 'bytes': '57361'}]}
> Rapid development with Apeman. > Rapider development with your own framework with Apeman. Overview -------- Apeman is an framework for rapid application development. Apeman is also a meta framework for frameworks which enables to make your development rapider. For more detail, see [Concept](../about/02 - Concept.md) Installation ------------ ```bash $ npm install apeman -g ``` For more detail, see [Installing apeman](../tutorials/01 - Installing apeman.md) Quick Start ----------- ```bash # Generate web project scaffold. $ apeman scaffold web ./hello-world # Setup modules. $ cd ./hello-world $ npm install # Setup project $ apeman task setup # Start application $ apeman app ```
{'content_hash': '03e200130a68d9c74c9e6bae1f1228ac', 'timestamp': '', 'source': 'github', 'line_count': 42, 'max_line_length': 94, 'avg_line_length': 16.738095238095237, 'alnum_prop': 0.705547652916074, 'repo_name': 'apeman-asset-labo/apeman-asset-guides', 'id': 'e9fb6ff57d20c985a96d2ec0365127a78c39e0fa', 'size': '728', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'dist/markdowns/en/about/01 - Apeman Meta Framework.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '1764'}, {'name': 'JavaScript', 'bytes': '6069'}, {'name': 'Shell', 'bytes': '119'}]}
Groups all the failed tests from a ``rake test'' into one chunk of text for easy reading.
{'content_hash': '0c5f6f7b5c0060a85ad51d6e282153fd', 'timestamp': '', 'source': 'github', 'line_count': 1, 'max_line_length': 89, 'avg_line_length': 90.0, 'alnum_prop': 0.7555555555555555, 'repo_name': 'jamiehenson/rake-test-filter', 'id': '1962779445b7fb91f98af54dc5302c26e072f1bf', 'size': '110', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'README.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '268'}]}
build: cd common && make my_build cd decode && make my_build cd exec && make my_build cd fetch && make my_build cd instr_buffer && make my_build cd issue && make my_build cd lsu && make my_build cd memory && make my_build cd salu && make my_build cd sgpr && make my_build cd simd && make my_build cd tracemon && make my_build cd vgpr && make my_build cd wavepool && make my_build cd compute_unit && make my_build cd simf && make my_build cd rfa && make my_build cd alu && make my_build cd dispatcher && make my_build fpga: build mkdir -p fpga_core cp common/build/* fpga_core/ cp decode/build/* fpga_core/ cp exec/build/* fpga_core/ cp fetch/build/* fpga_core/ cp issue/build/* fpga_core/ cp lsu/build/* fpga_core/ cp salu/build/* fpga_core/ cp sgpr/build/* fpga_core/ cp simd/build/* fpga_core/ cp vgpr/build/* fpga_core/ cp wavepool/build/* fpga_core/ cp simf/build/* fpga_core/ cp rfa/build/* fpga_core/ cp alu/build/* fpga_core/ cp fpga/* fpga_core/ compile: build vcs -full64 +libext+.v compute_unit/build/*.v decode/build/*.v exec/build/*.v fetch/build/*.v instr_buffer/build/*.v issue/build/*.v lsu/build/*.v memory/build/*.v salu/build/*.v sgpr/build/*.v simd/build/*.v tracemon/build/*.v tracemon/*.c vgpr/build/*.v wavepool/build/*.v -y common/build/ +lint=all -timescale=1ns/1ns -l compile.log -debug_all +v2k -sverilog check: cd decode && make clean && make compile cd exec && make clean && make compile cd fetch && make clean && make compile cd instr_buffer && make clean && make compile cd issue && make clean && make compile cd lsu && make clean && make compile cd memory && make clean && make compile cd salu && make clean && make compile cd sgpr && make clean && make compile cd simd && make clean && make compile cd tracemon && make clean && make compile cd vgpr && make clean && make compile cd wavepool && make clean && make compile cd simf && make clean && make compile cd rfa && make clean && make compile #cd alu && make clean && make compile make compile unbuild: cd common && make my_unbuild cd decode && make my_unbuild cd exec && make my_unbuild cd fetch && make my_unbuild cd instr_buffer && make my_unbuild cd issue && make my_unbuild cd lsu && make my_unbuild cd memory && make my_unbuild cd salu && make my_unbuild cd sgpr && make my_unbuild cd simd && make my_unbuild cd tracemon && make my_unbuild cd vgpr && make my_unbuild cd wavepool && make my_unbuild cd compute_unit && make my_unbuild cd simf && make my_unbuild cd rfa && make my_unbuild cd alu && make my_unbuild uncheck: cd decode && make clean cd exec && make clean cd fetch && make clean cd instr_buffer && make clean cd issue && make clean cd lsu && make clean cd memory && make clean cd salu && make clean cd sgpr && make clean cd simd && make clean cd tracemon && make clean cd vgpr && make clean cd wavepool && make clean cd simf && make clean cd rfa && make clean cd dispatcher && make clean #cd alu && make clean clean: unbuild uncheck rm -rf csrc/ simv simv.daidir/ compile.log
{'content_hash': '61db04fef248fed5721e1334255e63e3', 'timestamp': '', 'source': 'github', 'line_count': 102, 'max_line_length': 362, 'avg_line_length': 30.127450980392158, 'alnum_prop': 0.6840221282134722, 'repo_name': 'kDaniu/miaow', 'id': '1518e4e8e9b91bd0739314cdf2ed6c99339ab36b', 'size': '3073', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'src/verilog/rtl/Makefile', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '153447'}, {'name': 'C++', 'bytes': '23584'}, {'name': 'Coq', 'bytes': '4225'}, {'name': 'Makefile', 'bytes': '30901'}, {'name': 'Perl', 'bytes': '25733'}, {'name': 'Stata', 'bytes': '188527'}, {'name': 'Tcl', 'bytes': '111204'}, {'name': 'Verilog', 'bytes': '1726715'}]}
<h2>Random Number Generator</h2> <p>While the built-in <code>Math.random()</code> function provides suitable results for game development purposes, it has its own weaknesses. Most notably, it is not possible to seed the generator in order to reproduce a deterministic sequence of values. This is where <code>ROT.RNG</code> object comes to play.</p> <p><strong>Note:</strong> We use the excellent <em>Alea</em> algorithm, developed by Johannes Baagøe. For more information about the code, please see <a href="http://baagoe.org/en/wiki/Better_random_numbers_for_javascript">his article on RNGs in JavaScript</a>. Alea is distributed under the <a href="http://en.wikipedia.org/wiki/MIT_License">MIT License</a>.</p> <h2>Generating random values</h2> <p>Three main modes of operation are available:</p> <ul> <li><code>ROT.RNG.getUniform()</code> &ndash; random number [0..1) with uniform distribution (similar to <code>Math.random()</code>)</li> <li><code>ROT.RNG.getNormal(mean, stddev)</code> &ndash; random number with normal distribution, parametrized by a mean value and standard deviation</li> <li><code>ROT.RNG.getPercentage()</code> &ndash; random integer 1..100</li> </ul> <div class="example"> SHOW( ROT.RNG.getUniform(), ROT.RNG.getNormal(0, 10), ROT.RNG.getPercentage() ) </div> <div class="example"> var canvas = document.createElement("canvas"); canvas.width = 500; canvas.height = 200; SHOW(canvas); var ctx = canvas.getContext("2d"); ctx.fillStyle = "#fff"; ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.fillStyle = "#f00"; var data = []; for (var i=0;i&lt;40000;i++) { /* generate histogram */ var num = Math.round(ROT.RNG.getNormal(250, 100)); data[num] = (data[num] || 0) + 1; } for (var i=0;i&lt;data.length;i++) { /* plot histogram */ ctx.fillRect(i, canvas.height-data[i], 1, data[i]); } </div> <h2>Working with RNG state</h2> <p>RNG's internal state can be retrieved and set to produce identical results.</p> <div class="example"> var state = ROT.RNG.getState(); SHOW(ROT.RNG.getUniform()); ROT.RNG.setState(state); SHOW(ROT.RNG.getUniform()); </div> <p>The RNG can be seeded by a given number. Seeding initializes RNG's internal state. Retrieving the current seed is not very useful, but might come handy if you want to reproduce a behavior resulting from a random seed.</p> <div class="example"> var seed = ROT.RNG.getSeed(); ROT.RNG.setSeed(12345); SHOW( ROT.RNG.getUniform(), ROT.RNG.getUniform() ); ROT.RNG.setSeed(12345); SHOW( ROT.RNG.getUniform(), ROT.RNG.getUniform() ); </div>
{'content_hash': '60c02a3e144ea9e5152ebf3602f8371a', 'timestamp': '', 'source': 'github', 'line_count': 79, 'max_line_length': 213, 'avg_line_length': 32.32911392405063, 'alnum_prop': 0.7106499608457322, 'repo_name': 'uzudil/rot-gl.js', 'id': '45fd8fc01248105a4d46fb4a27e9a90d269b4dba', 'size': '2555', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'manual/pages/rng.html', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '12223'}, {'name': 'JavaScript', 'bytes': '422405'}, {'name': 'Shell', 'bytes': '178'}]}
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data; using System.Text; using System.Web.UI; using System.Web.UI.WebControls; namespace TravelAgent.Web.admin.visa { public partial class VisaOrderList : TravelAgent.Web.UI.BasePage { public int pcount; //总条数 public int page; //当前页 public readonly int pagesize = 10; //设置每页显示的大小 public string strordercode = ""; public string strordername = ""; public string strorderstartdate = ""; public string strorderenddate = ""; //public string strstartdate = ""; //public string strenddate = ""; public string orderstate = ""; public int clubid = 0; private static readonly TravelAgent.BLL.Order VisaOrderBll = new TravelAgent.BLL.Order(); protected void Page_Load(object sender, EventArgs e) { this.strordercode = string.IsNullOrEmpty(Request.Params["oc"]) ? "" : Request.Params["oc"]; this.strordername = string.IsNullOrEmpty(Request.Params["on"]) ? "" : Server.UrlDecode(Request.Params["on"]); this.strorderstartdate = string.IsNullOrEmpty(Request.Params["osd"]) ? "" : Request.Params["osd"]; this.strorderenddate = string.IsNullOrEmpty(Request.Params["oed"]) ? "" : Request.Params["oed"]; this.orderstate = string.IsNullOrEmpty(Request.Params["state"]) ? "":Request.Params["state"]; this.clubid = string.IsNullOrEmpty(Request.Params["clubid"]) ? 0 : Convert.ToInt32(Request.Params["clubid"]); if (!this.IsPostBack) { DataBindState(); RptBind("a.orderType=" + Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderType.签证) + this.CombSqlTxt(this.strordercode, this.strordername, this.strorderstartdate, this.strorderenddate, this.orderstate, this.clubid), "a.orderDate desc"); DateTime dtStartDate; DateTime dtEndDate; this.hljrorder.NavigateUrl = "/admin/visa/VisaOrderList.aspx?osd=" + DateTime.Now.ToString("yyyy-MM-dd") + "&oed=" + DateTime.Now.ToString("yyyy-MM-dd"); TravelAgent.Tool.DateHelper.GetDateOfWeek(DateTime.Now, out dtStartDate, out dtEndDate); this.hlbzorder.NavigateUrl = "/admin/visa/VisaOrderList.aspx?osd=" + dtStartDate.ToString("yyyy-MM-dd") + "&oed=" + dtEndDate.ToString("yyyy-MM-dd"); dtStartDate = DateTime.Now.AddDays(1 - (DateTime.Now.Day)); int year = DateTime.Now.Date.Year; int month = DateTime.Now.Date.Month; int dayCount = DateTime.DaysInMonth(year, month); dtEndDate = dtStartDate.AddDays(dayCount - 1); this.hlbyorder.NavigateUrl = "/admin/visa/VisaOrderList.aspx?osd=" + dtStartDate.ToString("yyyy-MM-dd") + "&oed=" + dtEndDate.ToString("yyyy-MM-dd"); if (Admin.Role.roleAuth.IndexOf(",visaorder_delete,") <= -1) { this.lbtnDel.Enabled = false; } } } /// <summary> /// 显示编辑按钮 /// </summary> /// <param name="id"></param> /// <param name="title"></param> /// <returns></returns> public string ShowEdit(string id) { StringBuilder sbEdit = new StringBuilder(); if (Admin.Role.roleAuth.IndexOf(",visaorder_opr,") > -1) { sbEdit.Append("<a href=\"EditVisaOrder.aspx?id=" + id + "\" class=\"tablelink club_art\" title=\"操作订单\" width=\"730px\" height=\"550px\">操作</a> "); } if (Admin.Role.roleAuth.IndexOf(",visaorder_delete,") > -1) { sbEdit.Append("<a id=\"" + id + "\" href=\"#\" class=\"tablelink club_delete\">删除</a>"); } return sbEdit.ToString(); } /// <summary> /// 绑定 /// </summary> /// <param name="strWhere"></param> /// <param name="orderby"></param> private void RptBind(string strWhere, string orderby) { if (!int.TryParse(Request.Params["page"] as string, out this.page)) { this.page = 0; } //获得总条数 this.pcount = VisaOrderBll.GetVisaOrderCount(strWhere); if (this.pcount > 0) { this.lbtnDel.Enabled = true; } else { this.lbtnDel.Enabled = false; } this.txtOrderCode.Text = this.strordercode; this.txtOrderName.Text = this.strordername; this.txtOrderStartDate.Text = this.strorderstartdate; this.txtOrderEndDate.Text = this.strorderenddate; this.ddlState.SelectedValue = this.orderstate.ToString(); DataSet ds = VisaOrderBll.GetPageList3(this.pagesize, this.page, strWhere, orderby); this.rptList.DataSource = ds; this.rptList.DataBind(); this.trNoRecord.Style["display"] = ds.Tables[0].Rows.Count == 0 ? "" : "none"; this.trPagination.Style["display"] = ds.Tables[0].Rows.Count == 0 ? "none" : ""; } /// <summary> /// 组合SQL语句 /// </summary> /// <param name="_classId"></param> /// <param name="_keywords"></param> /// <returns></returns> protected string CombSqlTxt(string _ordercode, string _ordername, string _orderstartdate, string _orderenddate, string _orderstate, int _clubid) { StringBuilder strTemp = new StringBuilder(); if (!_ordercode.Equals("")) { strTemp.Append(" and a.ordercode like '%" + _ordercode + "%'"); } if (!_ordername.Equals("")) { strTemp.Append(" and b.visaName like '%" + _ordername + "%'"); } if (!_orderstartdate.Equals("")) { strTemp.Append(" and a.orderDate>='" + Convert.ToDateTime(_orderstartdate) + "'"); } if (!_orderenddate.Equals("")) { strTemp.Append(" and a.orderDate<='" + Convert.ToDateTime(_orderenddate) + "'"); } if (!_orderstate.Equals("")) { strTemp.Append(" and a.orderState=" + _orderstate); } if (_clubid > 0) { strTemp.Append(" and a.clubid=" + _clubid); } return strTemp.ToString(); } /// <summary> /// 组合URL语句 /// </summary> /// <param name="_classId"></param> /// <param name="_keywords"></param> /// <returns></returns> protected string CombUrlTxt(string _ordercode, string _ordername, string _orderstartdate, string _orderenddate, string _orderstate, int _clubid) { StringBuilder strTemp = new StringBuilder(); if (!_ordercode.Equals("")) { strTemp.Append("oc=" + _ordercode + "&"); } if (!_ordername.Equals("")) { strTemp.Append("on=" + Server.UrlEncode(_ordername) + "&"); } if (!_orderstartdate.Equals("")) { strTemp.Append("osd=" + _orderstartdate + "&"); } if (!_orderenddate.Equals("")) { strTemp.Append("oed=" + _orderenddate + "&"); } if (!_orderstate.Equals("")) { strTemp.Append("state=" + _orderstate + "&"); } if (_clubid > 0) { strTemp.Append("clubid=" + _clubid + "&"); } return strTemp.ToString(); } /// <summary> /// 批量删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtnDel_Click(object sender, EventArgs e) { //批量删除 for (int i = 0; i < rptList.Items.Count; i++) { int id = Convert.ToInt32(((Label)rptList.Items[i].FindControl("lb_id")).Text); CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { VisaOrderBll.Delete(id); } } JscriptPrint("批量删除成功!", "VisaOrderList.aspx?" + CombUrlTxt(this.strordercode, this.strordername, this.strorderstartdate, this.strorderenddate, this.orderstate, this.clubid) + "page=0", "Success"); } /// <summary> /// 查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnQuery_Click(object sender, EventArgs e) { Response.Redirect("VisaOrderList.aspx?" + this.CombUrlTxt(this.txtOrderCode.Text.Trim(), this.txtOrderName.Text.Trim(), this.txtOrderStartDate.Text, this.txtOrderEndDate.Text,this.ddlState.SelectedValue, this.clubid) + "page=0"); } /// <summary> /// 绑定状态属性 /// </summary> private void DataBindState() { Dictionary<string, int> dc = TravelAgent.Tool.EnumHelper.GetDictionaryMemberKeyValue<TravelAgent.Tool.EnumSummary.OrderState>();//数据源 //Hashtable ht = TravelAgent.Tool.EnumHelper.GetMemberKeyValue<TravelAgent.Tool.EnumSummary.OrderState>();//数据源 this.ddlState.DataSource = dc; this.ddlState.DataTextField = "key"; this.ddlState.DataValueField = "value"; this.ddlState.DataBind(); this.ddlState.Items.Insert(0, new ListItem("订单状态", "")); } protected void lbtnExport_Click(object sender, EventArgs e) { string strSheetName = DateTime.Now.ToString("yyyyMMddHHmmssfff"); DataSet dsclub = VisaOrderBll.GetList2(0, "orderType=" + Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderType.签证) + this.CombSqlTxt(this.strordercode, this.strordername, this.strorderstartdate, this.strorderenddate, this.orderstate, this.clubid), "orderDate desc"); DataTable dt = GetJHDataTable(dsclub); TravelAgent.Tool.ExcelHelper.ExportExcel(Response, dt, strSheetName, strSheetName); } /// <summary> /// 返回计划DataTable /// </summary> /// <param name="lstPlan"></param> /// <returns></returns> public DataTable GetJHDataTable(DataSet dsQueryClub) { DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("编号", typeof(int))); dt.Columns.Add(new DataColumn("订单号", typeof(string))); dt.Columns.Add(new DataColumn("下单时间", typeof(string))); dt.Columns.Add(new DataColumn("签证名称", typeof(string))); dt.Columns.Add(new DataColumn("出发日期", typeof(string))); dt.Columns.Add(new DataColumn("成人", typeof(int))); dt.Columns.Add(new DataColumn("儿童", typeof(int))); dt.Columns.Add(new DataColumn("应支付", typeof(int))); dt.Columns.Add(new DataColumn("状态", typeof(string))); dt.Columns.Add(new DataColumn("联系人", typeof(string))); dt.Columns.Add(new DataColumn("联系电话", typeof(string))); DataRow row = null, qrow = null; Hashtable ht = new Hashtable(); for (int i = 0; i <= dsQueryClub.Tables[0].Rows.Count - 1; i++) { qrow = dsQueryClub.Tables[0].Rows[i]; row = dt.NewRow(); row["编号"] = qrow[0]; row["订单号"] = qrow[2]; row["下单时间"] = qrow[6]; row["签证名称"] = qrow[31]; row["出发日期"] = qrow[7]; row["成人"] = qrow[4]; row["儿童"] = qrow[5]; row["应支付"] = ShowTotal(Convert.ToInt32(qrow[5]), Convert.ToInt32(qrow[9]), Convert.ToInt32(qrow[23])); row["状态"] = TravelAgent.Tool.EnumHelper.GetMemberName<TravelAgent.Tool.EnumSummary.OrderState>(qrow[18]); row["联系人"] = qrow[12]; row["联系电话"] = qrow[13] + "/" + qrow[14] + "/" + qrow[15]; dt.Rows.Add(row); } return dt; } /// <summary> /// 返回总金额 /// </summary> /// <param name="orderprice"></param> /// <param name="attachprice"></param> /// <returns></returns> public int ShowTotal(int orderprice, int attachprice, int subprice) { return orderprice + attachprice + subprice; } } }
{'content_hash': '102ce208c5a3d65723ccf1dd7f9f4033', 'timestamp': '', 'source': 'github', 'line_count': 288, 'max_line_length': 279, 'avg_line_length': 44.895833333333336, 'alnum_prop': 0.5279195668986852, 'repo_name': 'huahuajjh/yueyouyuebei', 'id': 'c769f44c6631457fc08e6676e474511f9f90313b', 'size': '13244', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/TravelAgent.Web/TravelAgent.Web/admin/visa/VisaOrderList.aspx.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ASP', 'bytes': '1197300'}, {'name': 'C#', 'bytes': '2233158'}, {'name': 'CSS', 'bytes': '982253'}, {'name': 'HTML', 'bytes': '427129'}, {'name': 'JavaScript', 'bytes': '2742727'}, {'name': 'PHP', 'bytes': '2224'}, {'name': 'XSLT', 'bytes': '12273'}]}
<?php namespace Cocur\Plum\Converter; /** * CallbackConverterTest * * @package Cocur\Plum\Converter * @author Florian Eckerstorfer <[email protected]> * @copyright 2014 Florian Eckerstorfer * * @group unit */ class CallbackConverterTest extends \PHPUnit_Framework_TestCase { /** * @test * @covers Cocur\Plum\Converter\CallbackConverter::__construct() * @covers Cocur\Plum\Converter\CallbackConverter::convert() */ public function convertShouldCallCallback() { $converter = new CallbackConverter(function ($item) { return 'baz'; }); $this->assertEquals('baz', $converter->convert('bar')); } }
{'content_hash': 'ffcc18bf1d49a0c14cc6851763ddaca8', 'timestamp': '', 'source': 'github', 'line_count': 29, 'max_line_length': 79, 'avg_line_length': 23.03448275862069, 'alnum_prop': 0.6721556886227545, 'repo_name': 'cocur/plum', 'id': 'd10bfd73811808a23e1c7f8b74a7d2b9596e02d7', 'size': '898', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/Converter/CallbackConverterTest.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Makefile', 'bytes': '104'}, {'name': 'PHP', 'bytes': '68282'}]}
package org.springframework.cloud.vault.config; /** * Strategy interface to create {@link SecretBackendMetadata} from * {@link VaultSecretBackendDescriptor} properties. * * <p> * Classes implementing this interface must implement * {@link #supports(VaultSecretBackendDescriptor)} to determine whether a particular * {@link VaultSecretBackendDescriptor} is supported by this implementation. If a * {@link VaultSecretBackendDescriptor} instance is supported by the implementation, it * must be able to create {@link SecretBackendMetadata}, see * {@link #createMetadata(VaultSecretBackendDescriptor)}. * * <p> * Typically implemented by secret backend providers that implement access to a particular * backend using read operations. * * @author Mark Paluch * @see SecretBackendMetadata * @see VaultSecretBackendDescriptor */ public interface SecretBackendMetadataFactory<T extends VaultSecretBackendDescriptor> { /** * Converts a {@link VaultSecretBackendDescriptor} into a * {@link SecretBackendMetadata}. * * @param backendDescriptor must not be {@literal null}. * @return the {@link SecretBackendMetadata}. */ SecretBackendMetadata createMetadata(T backendDescriptor); /** * Checks whether the {@link VaultSecretBackendDescriptor} is supported by this * {@link SecretBackendMetadataFactory}. * * @param backendDescriptor must not be {@literal null}. * @return {@literal true} if the given {@link VaultSecretBackendDescriptor} is * supported. */ boolean supports(VaultSecretBackendDescriptor backendDescriptor); }
{'content_hash': '63d130a36f2cd52ea87b731b5970733e', 'timestamp': '', 'source': 'github', 'line_count': 44, 'max_line_length': 90, 'avg_line_length': 35.61363636363637, 'alnum_prop': 0.7683471601786854, 'repo_name': 'rhoegg/spring-cloud-vault-config', 'id': '61bfa65e09ad68ead1c7284c8fb44c8bb60575f5', 'size': '2182', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'spring-cloud-vault-config/src/main/java/org/springframework/cloud/vault/config/SecretBackendMetadataFactory.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '5006'}, {'name': 'Java', 'bytes': '241331'}, {'name': 'Shell', 'bytes': '16949'}]}
/** * Spring Boot specific {@link jakarta.servlet.Filter} implementations. */ package org.springframework.boot.web.servlet.filter;
{'content_hash': '0d181ca68fb961cda321611064dae84b', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 71, 'avg_line_length': 22.5, 'alnum_prop': 0.7555555555555555, 'repo_name': 'michael-simons/spring-boot', 'id': 'b81de5bd19310e1d21c6d6845ce166d3c4c36d78', 'size': '756', 'binary': False, 'copies': '10', 'ref': 'refs/heads/master', 'path': 'spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/filter/package-info.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '2138'}, {'name': 'CSS', 'bytes': '117'}, {'name': 'Dockerfile', 'bytes': '2309'}, {'name': 'Groovy', 'bytes': '29009'}, {'name': 'HTML', 'bytes': '58426'}, {'name': 'Java', 'bytes': '21591548'}, {'name': 'JavaScript', 'bytes': '33592'}, {'name': 'Kotlin', 'bytes': '434872'}, {'name': 'Mustache', 'bytes': '449'}, {'name': 'Ruby', 'bytes': '7867'}, {'name': 'Shell', 'bytes': '45438'}, {'name': 'Smarty', 'bytes': '2882'}, {'name': 'Vim Snippet', 'bytes': '135'}]}
#ifndef RTTR_VISITOR_REGISTRATION_H_ #define RTTR_VISITOR_REGISTRATION_H_ #include "rttr/detail/base/core_prerequisites.h" #include "rttr/type_list.h" #include <type_traits> namespace rttr { namespace detail { /* This is a slightly modified version (>= VS2015 compatible) of the code from Raul Ramos. */ /* MIT License Copyright (c) 2018 Raul Ramos */ // basic operations template<typename T, typename TL> struct push_back; template<typename T, typename...TS> struct push_back<T, type_list<TS...>> { using type = type_list<TS..., T>; }; template<typename T, typename Enable = void> struct is_class_complete_impl : std::false_type {}; template<typename T> struct is_class_complete_impl<T, enable_if_t<std::is_object<T>::value && !std::is_pointer<T>::value && (sizeof(T) > 0) > > : std::true_type {}; template<typename T> using is_class_complete = std::integral_constant<bool, is_class_complete_impl<T>::value>; } // end namespace detail } // end namespace rttr #define DECLARE_TL(_name) DECLARE_TL_IMPL(_name, __COUNTER__) #define DECLARE_TL_IMPL(_name, _start)\ /* Declare the type list meta-variable and initialize with an empty list */\ template<size_t IDX>\ struct _name##_history;\ \ template<> struct _name##_history<_start> {\ using type = rttr::type_list<>;\ };\ \ /* Check if the entry at "IDX" exists */\ template <size_t IDX>\ using _name##_is_defined = rttr::detail::is_class_complete<_name##_history<IDX>>;\ \ \ /* Read from an index IDX */\ template<size_t IDX, bool = std::is_same<std::true_type, _name##_is_defined<IDX>>::value>\ struct _name##_read;\ \ template<size_t IDX>\ struct _name##_read<IDX, true> {\ using type = typename _name##_history<IDX>::type;\ };\ \ template<size_t IDX>\ struct _name##_read<IDX, false> {\ using type = typename std::conditional< \ (IDX > _start), /* Should we stop searching? */\ typename _name##_read<IDX-1>::type, /* No */\ rttr::type_list<> /* Yes => failed => empty type_list */\ >::type;\ } #define READ_TL(_name) typename _name##_read<__COUNTER__ - 1>::type #define ADD_TL_IMPL(_name, _class, _idx)\ /* Define the current type_list at index _idx */\ template<>\ struct _name##_history<_idx> {\ using previous = typename _name##_read<_idx - 1>::type;\ using type = typename rttr::detail::push_back<_class, previous>::type;\ } #define ADD_TL(_name, _class) ADD_TL_IMPL(_name, _class, __COUNTER__) DECLARE_TL(rttr_visitor_list); #define RTTR_REGISTER_VISITOR(_class) ADD_TL(rttr_visitor_list, _class) #endif // RTTR_VISITOR_REGISTRATION_H_
{'content_hash': '1b960b5ec7a85f1d918785efc59dc764', 'timestamp': '', 'source': 'github', 'line_count': 93, 'max_line_length': 97, 'avg_line_length': 32.225806451612904, 'alnum_prop': 0.5685685685685685, 'repo_name': 'rttrorg/rttr', 'id': '69a60445c399c95084ced912036ca2341e0d1ea4', 'size': '5233', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/rttr/detail/visitor/visitor_registration.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C++', 'bytes': '2684229'}, {'name': 'CMake', 'bytes': '158994'}]}
<?php namespace Sixx\File; class Image { protected $image; protected $types = ['jpg', 'gif', 'png', 'jpeg']; /** * Constructor * * @param string */ public function __construct($name = null) { ! empty($name) ? $this->take($name) : null; } /** * check is image file * * @param string * @return bool */ protected function have($name) { if(! empty($name) && file_exists(realpath($name)) && count(array_keys($this->types, strtolower((new \SplFileInfo($name))->getExtension()))) > 0) { return true; } else trigger_error('Image class exepted real image'); return false; } /** * take image from file * * @param string * @return bool */ public function take($name) { if($this->have($name)) { $type = (new \SplFileInfo($name))->getExtension(); $keys = array_keys($this->types, $type); if(count($keys) > 0) { $func = 'imagecreatefrom' . str_replace('jpg', 'jpeg', $this->types[$keys[0]]); if(function_exists($func)) { $this->image = [ 'path' => realpath($name), 'info' => getimagesize($name), 'type' => (new \SplFileInfo($name))->getExtension(), 'image' => $func(realpath($name)) ]; } else trigger_error('Function ' . $func . ' not exist'); } else trigger_error('Not supported image format'); } return $this; } /** * save image * * @param string * @return bool */ public function save($name) { if(! empty($name) && ! empty($this->image) && is_resource($this->image['image'])) { $real = realpath(dirname($name)) . '/' . explode('.', basename($name))[0] . '.' . $this->image['type']; if( is_writable($real) || ! file_exists($real) && is_writable(realpath(dirname($name)))) { $func = 'image' . str_replace('jpg', 'jpeg', $this->image['type']); $func($this->image['image'], $real); imagedestroy($this->image['image']); $this->image = []; return true; } } return false; } }
{'content_hash': 'cff8f66d0b1b55f8839d068822d36bba', 'timestamp': '', 'source': 'github', 'line_count': 87, 'max_line_length': 115, 'avg_line_length': 27.735632183908045, 'alnum_prop': 0.4579361790302528, 'repo_name': 'sapsan4eg/sixx', 'id': '4330294f3517e19ba508efcfa44ed0e97a333150', 'size': '2721', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/File/Image.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '680'}, {'name': 'PHP', 'bytes': '179769'}]}
import { NgModule } from "@angular/core"; import { CommonModule } from "@angular/common"; import { SuiComponentFactory } from "./services/component-factory.service"; @NgModule({ imports: [CommonModule], providers: [ SuiComponentFactory ] }) export class SuiUtilityModule {}
{'content_hash': '334c136d7147ec50a08ff89caf9411e7', 'timestamp': '', 'source': 'github', 'line_count': 11, 'max_line_length': 75, 'avg_line_length': 26.818181818181817, 'alnum_prop': 0.6983050847457627, 'repo_name': 'edcarroll/ng2-semantic-ui', 'id': 'f1b7fc88f5c28efcc101dbb360175470efc262bc', 'size': '295', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'src/misc/util/util.module.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '1645'}, {'name': 'TypeScript', 'bytes': '309127'}]}
import logging from django.core.management.base import BaseCommand, CommandError from apps.processing.o2.util import util from django.db import connection, reset_queries logger = logging.getLogger(__name__) class Command(BaseCommand): help = 'Import all O2 observations' def handle(self, *args, **options): util.get_or_create_zsjs() streams = util.get_or_create_streams() try: logger.info( 'Importing mobility observations of {} mobility streams ' 'from O2 Liberty API.'.format(len(streams))) not_429 = util.load_mobility(streams) if(not_429): zsjs = util.get_or_create_shopping_mall_zsjs() logger.info('Importing socio-demo observations of {} ZSJs ' 'from O2 Liberty API.'.format(len(zsjs))) util.load_sociodemo(zsjs) except Exception as e: # for q in connection.queries: # print(q['sql']) self.stdout.write(self.style.ERROR(e))
{'content_hash': 'd6d1638637bebadf75e30cf0bfe32e8c', 'timestamp': '', 'source': 'github', 'line_count': 34, 'max_line_length': 75, 'avg_line_length': 31.294117647058822, 'alnum_prop': 0.5930451127819549, 'repo_name': 'gis4dis/poster', 'id': '7e20fdfe65ed758794bbd56a1ac1b4f9736cc2a1', 'size': '1064', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'apps/processing/o2/management/commands/o2_all_import.py', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '782'}, {'name': 'Dockerfile', 'bytes': '586'}, {'name': 'HTML', 'bytes': '12793'}, {'name': 'Jupyter Notebook', 'bytes': '23402'}, {'name': 'Makefile', 'bytes': '1178'}, {'name': 'Python', 'bytes': '493523'}, {'name': 'Shell', 'bytes': '1729'}]}
<?php namespace TW\neloBundle\Entity; use Doctrine\ORM\EntityRepository; /** * CategoryRepository * * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ class CategoryRepository extends EntityRepository { public function findAllProducts($id){ $em = $this->getEntityManager(); $repository = $em->getrepository('TWneloBundle:Category'); $category = $repository->find($id); $products = $category->getProducts(); return $products; } }
{'content_hash': '4839da46af6d868904664636e86bb771', 'timestamp': '', 'source': 'github', 'line_count': 25, 'max_line_length': 68, 'avg_line_length': 20.0, 'alnum_prop': 0.724, 'repo_name': 'zeronoctis/TW', 'id': '1648a02ad6f4b85202669d888232b758827f3a07', 'size': '500', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/TW/neloBundle/Entity/CategoryRepository.php', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '209072'}, {'name': 'Erlang', 'bytes': '2006'}, {'name': 'JavaScript', 'bytes': '34514'}, {'name': 'PHP', 'bytes': '110949'}, {'name': 'Perl', 'bytes': '2647'}]}
from __future__ import unicode_literals from PyQt5.QtCore import QAbstractTableModel, QModelIndex, Qt, QVariant class TabModel(QAbstractTableModel): """ Tabelaryczny model danych """ def __init__(self, pola=[], dane=[], parent=None): super(TabModel, self).__init__() self.pola = pola self.tabela = dane def aktualizuj(self, dane): """ Przypisuje źródło danych do modelu """ print(dane) self.tabela = dane def rowCount(self, parent=QModelIndex()): """ Zwraca ilość wierszy """ return len(self.tabela) def columnCount(self, parent=QModelIndex()): """ Zwraca ilość kolumn """ if self.tabela: return len(self.tabela[0]) else: return 0 def data(self, index, rola=Qt.DisplayRole): """ Wyświetlanie danych """ i = index.row() j = index.column() if rola == Qt.DisplayRole: return '{0}'.format(self.tabela[i][j]) else: return QVariant()
{'content_hash': 'dd9eea6bb8bf92874be86d85118eeb98', 'timestamp': '', 'source': 'github', 'line_count': 37, 'max_line_length': 71, 'avg_line_length': 28.0, 'alnum_prop': 0.5743243243243243, 'repo_name': 'koduj-z-klasa/python101', 'id': '81fa73fa4e4d5f0e81c2e86af934dcb7fa447f0d', 'size': '1068', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'docs/pyqt/todopw/tabmodel_z3.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '2740'}, {'name': 'HTML', 'bytes': '18056'}, {'name': 'Python', 'bytes': '157924'}]}
package ru.job4j.list; import java.util.ArrayList; import java.util.List; /** * Class for converting a two-dimensional array into an ArrayList. * * @author Dmitrii Eskov ([email protected]) * @since 23.01.2019 * @version 1.0 */ public class ConvertMatrix2List { /** * Converts a two-dimensional array into an ArrayList. * @param array - a two-dimensional array * @return an ArrayList */ public List<Integer> toList(int[][] array) { List<Integer> list = new ArrayList<>(); for (int[] row : array) { for (int cell : row) { list.add(cell); } } return list; } }
{'content_hash': 'e13c27390444ef9c1fb3de63aa9135d3', 'timestamp': '', 'source': 'github', 'line_count': 29, 'max_line_length': 66, 'avg_line_length': 23.137931034482758, 'alnum_prop': 0.5856929955290611, 'repo_name': 'DmitriiEskov/deskov', 'id': 'e4500bb36c9a0d88f2b66715beafc9a59c0bfdf4', 'size': '671', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'chapter_003/src/main/java/ru/job4j/list/ConvertMatrix2List.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '372065'}, {'name': 'TSQL', 'bytes': '1978'}]}
from django.core.exceptions import FieldDoesNotExist from django.utils.text import camel_case_to_spaces LABEL_LENGTH = 255 def model_has_field(model, field_name): try: model._meta.get_field(field_name) return True except FieldDoesNotExist: return False def model_name_to_snake(value): original_model_string = camel_case_to_spaces(value) new_model_string = original_model_string.replace(" ", "_") return new_model_string def snake_to_model_name(value): return "".join(map(str.title, value.split("_"))) def is_int(s): try: int(str(s)) except ValueError: return False return True
{'content_hash': '07215f2b6e8d12aacf2573fbb05dee93', 'timestamp': '', 'source': 'github', 'line_count': 30, 'max_line_length': 62, 'avg_line_length': 22.066666666666666, 'alnum_prop': 0.6676737160120846, 'repo_name': 'masschallenge/impact-api', 'id': 'b249afc1fa36b45141f9c89f07492d9db0af7f6a', 'size': '718', 'binary': False, 'copies': '1', 'ref': 'refs/heads/development', 'path': 'web/impact/impact/model_utils.py', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '5077'}, {'name': 'Dockerfile', 'bytes': '1735'}, {'name': 'HTML', 'bytes': '11542'}, {'name': 'JavaScript', 'bytes': '2332'}, {'name': 'Makefile', 'bytes': '17106'}, {'name': 'Python', 'bytes': '607293'}, {'name': 'Shell', 'bytes': '5185'}]}
require_relative '../abstract_table_geocoder' require_relative 'client' require_relative 'geocoder_client' module Carto module Gme class TableGeocoder < CartoDB::AbstractTableGeocoder DEFAULT_MAX_BLOCK_SIZE = 1000 # See https://developers.google.com/maps/documentation/geocoding/#Types ACCEPTED_ADDRESS_TYPES = ['street_address', 'route', 'intersection', 'neighborhood'] attr_reader :original_formatter, :processed_rows, :successful_processed_rows, :failed_processed_rows, :empty_processed_rows, :state, :max_block_size def initialize(arguments) super(arguments) @original_formatter = arguments.fetch(:original_formatter) client_id = arguments.fetch(:client_id) private_key = arguments.fetch(:private_key) @max_block_size = arguments[:max_block_size] || DEFAULT_MAX_BLOCK_SIZE gme_client = Client.new(client_id, private_key) @geocoder_client = GeocoderClient.new(gme_client) @usage_metrics = arguments.fetch(:usage_metrics) @log = arguments.fetch(:log) @geocoding_model = arguments.fetch(:geocoding_model) end def cancel; end def run change_status('running') init_rows_count ensure_georef_status_colummn_valid # Here's the actual stuff data_input_blocks.each do |data_block| geocode(data_block) update_table(data_block) @processed_rows += data_block.size end change_status('completed') rescue StandardError => e change_status('failed') raise e ensure total_requests = @successful_processed_rows + @empty_processed_rows + @failed_processed_rows @usage_metrics.incr(:geocoder_google, :success_responses, @successful_processed_rows) @usage_metrics.incr(:geocoder_google, :empty_responses, @empty_processed_rows) @usage_metrics.incr(:geocoder_google, :failed_responses, @failed_processed_rows) @usage_metrics.incr(:geocoder_google, :total_requests, total_requests) update_log_stats end # Empty methods, needed because they're triggered from geocoding.rb def remote_id; end def process_results; end # TODO: can be removed from here and abstract class def update_geocoding_status { processed_rows: processed_rows, state: @geocoding_model.state } end def name 'google' end private # Returns a "generator" def data_input_blocks Enumerator.new do |enum| begin data_input = connection.select(:cartodb_id, searchtext_expression) .from(@sequel_qualified_table_name) .where(cartodb_georef_status: nil) .limit(max_block_size) .all enum.yield data_input # last iteration when data_input.length < max_block_size, no need for another query end while data_input.length == max_block_size end end def searchtext_expression # The original_formatter has the following format: # `{street_column_name}[[, additional_free_text][, {province_column_name}][, country_free_text]]` # See https://github.com/jeremyevans/sequel/blob/master/doc/security.rdoc # See http://sequel.jeremyevans.net/rdoc/classes/Sequel/SQL/Builders.html atoms = original_formatter.split(',').map {|s| s.strip } Sequel.join(atoms.map { |atom| if match = /\A{(?<column_name>.*)}\z/.match(atom) Sequel.identifier(match[:column_name]) else atom end }, ',').as(:searchtext) end def geocode(data_block) data_block.each do |row| response = fetch_from_gme(row[:searchtext]) # If we get an error we get nil so we pass to the next row next if response.nil? if response['status'] != Client::OK_STATUS process_error_or_empty_status(response['status']) row.merge!(cartodb_georef_status: false) else result = response['results'].select { |r| r['types'] & ACCEPTED_ADDRESS_TYPES }.first if result.nil? @empty_processed_rows += 1 row.merge!(cartodb_georef_status: false) else @successful_processed_rows += 1 location = result['geometry']['location'] row.merge!(location.deep_symbolize_keys.merge(cartodb_georef_status: true)) end end end end def update_table(data_block) # At this point, data_block is an Array that looks like this: # [{:cartodb_id=>1, :searchtext=>"Some real street name", :lat=>19.29544, :lng=>-99.1472101, :cartodb_georef_status=>true}, # {:cartodb_id=>2, :searchtext=>"foo", :cartodb_georef_status=>false}] geocoded = data_block.select {|row| row[:cartodb_georef_status] == true} if geocoded.count > 0 geocoded_to_sql = geocoded.map {|row| "(#{row[:cartodb_id]}, #{row[:lat]}, #{row[:lng]})"}.join(',') query_geocoded = %Q{ UPDATE #{@qualified_table_name} as target SET the_geom = CDB_LatLng(geocoded.lat,geocoded.lng), cartodb_georef_status = TRUE FROM (VALUES #{geocoded_to_sql} ) as geocoded(cartodb_id,lat,lng) WHERE target.cartodb_id = geocoded.cartodb_id; } connection.run(query_geocoded) end non_geocoded = data_block.select {|row| row[:cartodb_georef_status] == false} if non_geocoded.count > 0 non_geocoded_to_sql = non_geocoded.map {|row| "(#{row[:cartodb_id]})"}.join(',') query_non_geocoded = %Q{ UPDATE #{@qualified_table_name} as target SET cartodb_georef_status = FALSE FROM (VALUES #{non_geocoded_to_sql} ) as nongeocoded(cartodb_id) WHERE target.cartodb_id = nongeocoded.cartodb_id; } connection.run(query_non_geocoded) end end private def init_rows_count @processed_rows = 0 @successful_processed_rows = 0 @failed_processed_rows = 0 @empty_processed_rows = 0 end def fetch_from_gme(search_text) @geocoder_client.geocode(search_text) rescue StandardError => e # Remove temporarily because it's flooding the logs # @log.append_and_store "Error geocoding using GME for text #{search_text}: #{e.message}" # CartoDB.notify_error('Error geocoding using GME', error: e.backtrace.join('\n'), search_text: search_text) @failed_processed_rows += 1 nil end def process_error_or_empty_status(status) case status when Client::ZERO_RESULTS_STATUS then @empty_processed_rows += 1 else @failed_processed_rows += 1 end end def update_log_stats @log.append_and_store "Geocoding using Google maps, job status update. "\ "Status: #{@status} --- Processed rows: #{@processed_rows} "\ "--- Success: #{@successful_processed_rows} --- Empty: #{@empty_processed_rows} "\ "--- Failed: #{@failed_processed_rows}" end def change_status(status) @status = status @geocoding_model.state = status @geocoding_model.save end end end end
{'content_hash': 'c63fab4ab03a0db1369e6940ff86b33d', 'timestamp': '', 'source': 'github', 'line_count': 197, 'max_line_length': 133, 'avg_line_length': 38.28934010152284, 'alnum_prop': 0.5940607185469973, 'repo_name': 'CartoDB/cartodb', 'id': 'a6122b1f9e4ffbe92241e174e5cbe8969ecf78f9', 'size': '7543', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'services/table-geocoder/lib/gme/table_geocoder.rb', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '7083'}, {'name': 'EJS', 'bytes': '311401'}, {'name': 'HTML', 'bytes': '6933668'}, {'name': 'JavaScript', 'bytes': '9784580'}, {'name': 'Jupyter Notebook', 'bytes': '47684'}, {'name': 'Makefile', 'bytes': '14050'}, {'name': 'Mustache', 'bytes': '30410'}, {'name': 'PLpgSQL', 'bytes': '1233'}, {'name': 'Procfile', 'bytes': '189'}, {'name': 'Python', 'bytes': '10350'}, {'name': 'Ruby', 'bytes': '6995180'}, {'name': 'SCSS', 'bytes': '1454540'}, {'name': 'Shell', 'bytes': '14538'}, {'name': 'Smarty', 'bytes': '654458'}, {'name': 'Vue', 'bytes': '755091'}]}
static const char *phTextView = "placeHolderTextView"; @implementation UITextView(PlaceHolde) - (UITextView *)placeHolderTextView { return objc_getAssociatedObject(self, phTextView); } - (void)setPlaceHolderTextView:(UITextView *)placeHolderTextView { objc_setAssociatedObject(self, phTextView, placeHolderTextView, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } - (void)addPlaceHolder:(NSString *)placeHolder { if (![self placeHolderTextView]) { self.delegate = self; UITextView *textView = [[UITextView alloc] initWithFrame:self.bounds]; textView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; textView.font = self.font; textView.backgroundColor = [UIColor clearColor]; textView.textColor = [UIColor grayColor]; textView.userInteractionEnabled = NO; textView.text = placeHolder; [self addSubview:textView]; [self setPlaceHolderTextView:textView]; } } # pragma mark - UITextViewDelegate - (void)textViewDidBeginEditing:(UITextView *)textView { self.placeHolderTextView.hidden = YES; // if (self.textViewDelegate) { // // } } - (void)textViewDidEndEditing:(UITextView *)textView { if (textView.text && [textView.text isEqualToString:@""]) { self.placeHolderTextView.hidden = NO; } } @end
{'content_hash': 'b0da94111f14956c7ab6fb8ebe154205', 'timestamp': '', 'source': 'github', 'line_count': 42, 'max_line_length': 103, 'avg_line_length': 32.23809523809524, 'alnum_prop': 0.7097488921713442, 'repo_name': 'wenghengcong/JSBProjectBase', 'id': 'ce863636f63c74ceca4b8ddc1032f83bc7d84ebe', 'size': '1556', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'JSBProjectBase/Category/UIKit/UIView/UITextView+PlaceHolde.m', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '1366192'}, {'name': 'C++', 'bytes': '98860'}, {'name': 'HTML', 'bytes': '4555'}, {'name': 'Objective-C', 'bytes': '906442'}, {'name': 'Ruby', 'bytes': '375'}]}
namespace Envoy { namespace Network { class MockIoHandle : public IoHandle { public: MockIoHandle(); ~MockIoHandle() override; void initializeFileEvent(Event::Dispatcher& dispatcher, Event::FileReadyCb cb, Event::FileTriggerType trigger, uint32_t events) override { createFileEvent_(dispatcher, cb, trigger, events); } MOCK_METHOD(os_fd_t, fdDoNotUse, (), (const)); MOCK_METHOD(Api::IoCallUint64Result, close, ()); MOCK_METHOD(bool, isOpen, (), (const)); MOCK_METHOD(Api::IoCallUint64Result, readv, (uint64_t max_length, Buffer::RawSlice* slices, uint64_t num_slice)); MOCK_METHOD(Api::IoCallUint64Result, read, (Buffer::Instance & buffer, absl::optional<uint64_t> max_length)); MOCK_METHOD(Api::IoCallUint64Result, writev, (const Buffer::RawSlice* slices, uint64_t num_slice)); MOCK_METHOD(Api::IoCallUint64Result, write, (Buffer::Instance & buffer)); MOCK_METHOD(Api::IoCallUint64Result, sendmsg, (const Buffer::RawSlice* slices, uint64_t num_slice, int flags, const Address::Ip* self_ip, const Address::Instance& peer_address)); MOCK_METHOD(Api::IoCallUint64Result, recvmsg, (Buffer::RawSlice * slices, const uint64_t num_slice, uint32_t self_port, RecvMsgOutput& output)); MOCK_METHOD(Api::IoCallUint64Result, recvmmsg, (RawSliceArrays & slices, uint32_t self_port, RecvMsgOutput& output)); MOCK_METHOD(Api::IoCallUint64Result, recv, (void* buffer, size_t length, int flags)); MOCK_METHOD(bool, supportsMmsg, (), (const)); MOCK_METHOD(bool, supportsUdpGro, (), (const)); MOCK_METHOD(Api::SysCallIntResult, bind, (Address::InstanceConstSharedPtr address)); MOCK_METHOD(Api::SysCallIntResult, listen, (int backlog)); MOCK_METHOD(IoHandlePtr, accept, (struct sockaddr * addr, socklen_t* addrlen)); MOCK_METHOD(Api::SysCallIntResult, connect, (Address::InstanceConstSharedPtr address)); MOCK_METHOD(Api::SysCallIntResult, setOption, (int level, int optname, const void* optval, socklen_t optlen)); MOCK_METHOD(Api::SysCallIntResult, getOption, (int level, int optname, void* optval, socklen_t* optlen)); MOCK_METHOD(Api::SysCallIntResult, setBlocking, (bool blocking)); MOCK_METHOD(absl::optional<int>, domain, ()); MOCK_METHOD(Address::InstanceConstSharedPtr, localAddress, ()); MOCK_METHOD(Address::InstanceConstSharedPtr, peerAddress, ()); MOCK_METHOD(IoHandlePtr, duplicate, ()); MOCK_METHOD(void, createFileEvent_, (Event::Dispatcher & dispatcher, Event::FileReadyCb cb, Event::FileTriggerType trigger, uint32_t events)); MOCK_METHOD(void, activateFileEvents, (uint32_t events)); MOCK_METHOD(void, enableFileEvents, (uint32_t events)); MOCK_METHOD(void, resetFileEvents, ()); MOCK_METHOD(Api::SysCallIntResult, shutdown, (int how)); MOCK_METHOD(absl::optional<std::chrono::milliseconds>, lastRoundTripTime, ()); MOCK_METHOD(Api::SysCallIntResult, ioctl, (unsigned long, void*, unsigned long, void*, unsigned long, unsigned long*)); }; } // namespace Network } // namespace Envoy
{'content_hash': '1c8313122747010193fb656634eb7881', 'timestamp': '', 'source': 'github', 'line_count': 61, 'max_line_length': 91, 'avg_line_length': 52.032786885245905, 'alnum_prop': 0.6912413358538122, 'repo_name': 'lyft/envoy', 'id': '3c661d836b05f623a1de9487ee4e67f88b413d86', 'size': '3321', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'test/mocks/network/io_handle.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '439'}, {'name': 'C', 'bytes': '9840'}, {'name': 'C++', 'bytes': '30180292'}, {'name': 'Dockerfile', 'bytes': '891'}, {'name': 'Emacs Lisp', 'bytes': '966'}, {'name': 'Go', 'bytes': '558'}, {'name': 'Jinja', 'bytes': '46306'}, {'name': 'Makefile', 'bytes': '303'}, {'name': 'PureBasic', 'bytes': '472'}, {'name': 'Python', 'bytes': '659418'}, {'name': 'Rust', 'bytes': '38417'}, {'name': 'Shell', 'bytes': '177423'}, {'name': 'Starlark', 'bytes': '1743784'}, {'name': 'Thrift', 'bytes': '748'}]}
#include <iostream> #include <vector> #include <string> #include "gokujyo_pack.h" #include "Stackwalker.h" const WCHAR kUnpackPath[] = L"data\\"; int main() { InitAllocCheck(); { std::string line; std::cout << "Press q to quit." << std::endl; std::cout << "Please enter the pack file name:"; while (std::cin >> line && line != "q" && line != "Q") { std::cout << "Begin to unpack " << line << std::endl; WCHAR pack_filename[MAX_PATH]; int wlen = MultiByteToWideChar(CP_ACP, 0, line.c_str(), -1, pack_filename, MAX_PATH); pack_filename[0] = L'\0'; WCHAR buf[MAX_PATH]; wcscpy_s(buf, MAX_PATH, kUnpackPath); int unpack_path_len = sizeof(kUnpackPath) / sizeof(kUnpackPath[0]); wcscpy_s(buf + unpack_path_len - 1, MAX_PATH - unpack_path_len + 1, pack_filename); gkj::Gpackage pack; pack.open(pack_filename); if (pack.extract_all(buf)) std::cout << "Success to unpack." << std::endl; else std::cout << "Fail to unpack." << std::endl; pack.close(); std::cout << "Press q to quit." << std::endl; std::cout << "Please enter the pack file name:"; } } DeInitAllocCheck(); return 0; }
{'content_hash': 'fb136b6912e94d521763771c10ea4aa4', 'timestamp': '', 'source': 'github', 'line_count': 51, 'max_line_length': 97, 'avg_line_length': 26.666666666666668, 'alnum_prop': 0.5205882352941177, 'repo_name': 'verashira/UnpackGokujyo', 'id': 'b9c08c5297706b3de458ad71a912f1f7c959c184', 'size': '3791', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'UnpackGokujyo/main.cpp', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '6965'}, {'name': 'C++', 'bytes': '112695'}]}
package org.apache.geode.management.internal.cli.commands; import java.util.Arrays; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import org.springframework.shell.core.annotation.CliCommand; import org.springframework.shell.core.annotation.CliOption; import org.apache.geode.cache.configuration.CacheConfig; import org.apache.geode.cache.configuration.DeclarableType; import org.apache.geode.cache.wan.GatewayReceiver; import org.apache.geode.distributed.DistributedMember; import org.apache.geode.management.cli.CliMetaData; import org.apache.geode.management.cli.ConverterHint; import org.apache.geode.management.cli.SingleGfshCommand; import org.apache.geode.management.internal.cli.AbstractCliAroundInterceptor; import org.apache.geode.management.internal.cli.GfshParseResult; import org.apache.geode.management.internal.cli.functions.CliFunctionResult; import org.apache.geode.management.internal.cli.functions.GatewayReceiverCreateFunction; import org.apache.geode.management.internal.cli.functions.GatewayReceiverFunctionArgs; import org.apache.geode.management.internal.cli.i18n.CliStrings; import org.apache.geode.management.internal.cli.result.model.ResultModel; import org.apache.geode.management.internal.security.ResourceOperation; import org.apache.geode.security.ResourcePermission; public class CreateGatewayReceiverCommand extends SingleGfshCommand { @CliCommand(value = CliStrings.CREATE_GATEWAYRECEIVER, help = CliStrings.CREATE_GATEWAYRECEIVER__HELP) @CliMetaData(relatedTopic = CliStrings.TOPIC_GEODE_WAN, interceptor = "org.apache.geode.management.internal.cli.commands.CreateGatewayReceiverCommand$Interceptor") @ResourceOperation(resource = ResourcePermission.Resource.CLUSTER, operation = ResourcePermission.Operation.MANAGE, target = ResourcePermission.Target.GATEWAY) public ResultModel createGatewayReceiver(@CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS}, optionContext = ConverterHint.MEMBERGROUP, help = CliStrings.CREATE_GATEWAYRECEIVER__GROUP__HELP) String[] onGroups, @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS}, optionContext = ConverterHint.MEMBERIDNAME, help = CliStrings.CREATE_GATEWAYRECEIVER__MEMBER__HELP) String[] onMember, @CliOption(key = CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART, help = CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART__HELP) Boolean manualStart, @CliOption(key = CliStrings.CREATE_GATEWAYRECEIVER__STARTPORT, help = CliStrings.CREATE_GATEWAYRECEIVER__STARTPORT__HELP) Integer startPort, @CliOption(key = CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT, help = CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT__HELP) Integer endPort, @CliOption(key = CliStrings.CREATE_GATEWAYRECEIVER__BINDADDRESS, help = CliStrings.CREATE_GATEWAYRECEIVER__BINDADDRESS__HELP) String bindAddress, @CliOption(key = CliStrings.CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS, help = CliStrings.CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS__HELP) Integer maximumTimeBetweenPings, @CliOption(key = CliStrings.CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE, help = CliStrings.CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE__HELP) Integer socketBufferSize, @CliOption(key = CliStrings.CREATE_GATEWAYRECEIVER__GATEWAYTRANSPORTFILTER, help = CliStrings.CREATE_GATEWAYRECEIVER__GATEWAYTRANSPORTFILTER__HELP) String[] gatewayTransportFilters, @CliOption(key = CliStrings.CREATE_GATEWAYRECEIVER__HOSTNAMEFORSENDERS, help = CliStrings.CREATE_GATEWAYRECEIVER__HOSTNAMEFORSENDERS__HELP) String hostnameForSenders, @CliOption(key = CliStrings.IFNOTEXISTS, help = CliStrings.IFNOTEXISTS_HELP, specifiedDefaultValue = "true", unspecifiedDefaultValue = "false") Boolean ifNotExists) { CacheConfig.GatewayReceiver configuration = buildConfiguration(manualStart, startPort, endPort, bindAddress, maximumTimeBetweenPings, socketBufferSize, gatewayTransportFilters, hostnameForSenders); GatewayReceiverFunctionArgs gatewayReceiverFunctionArgs = new GatewayReceiverFunctionArgs(configuration, ifNotExists); Set<DistributedMember> membersToCreateGatewayReceiverOn = getMembers(onGroups, onMember); List<CliFunctionResult> gatewayReceiverCreateResults = executeAndGetFunctionResult(GatewayReceiverCreateFunction.INSTANCE, gatewayReceiverFunctionArgs, membersToCreateGatewayReceiverOn); ResultModel result = ResultModel.createMemberStatusResult(gatewayReceiverCreateResults); result.setConfigObject(configuration); return result; } @Override public void updateClusterConfig(String group, CacheConfig config, Object configObject) { config.setGatewayReceiver((CacheConfig.GatewayReceiver) configObject); } private CacheConfig.GatewayReceiver buildConfiguration(Boolean manualStart, Integer startPort, Integer endPort, String bindAddress, Integer maximumTimeBetweenPings, Integer socketBufferSize, String[] gatewayTransportFilters, String hostnameForSenders) { CacheConfig.GatewayReceiver configuration = new CacheConfig.GatewayReceiver(); if (gatewayTransportFilters != null) { List<DeclarableType> filters = Arrays.stream(gatewayTransportFilters).map(fullyQualifiedClassName -> { DeclarableType thisFilter = new DeclarableType(); thisFilter.setClassName(fullyQualifiedClassName); return thisFilter; }).collect(Collectors.toList()); configuration.getGatewayTransportFilters().addAll(filters); } if (startPort != null) { configuration.setStartPort(String.valueOf(startPort)); } if (endPort != null) { configuration.setEndPort(String.valueOf(endPort)); } configuration.setBindAddress(bindAddress); if (maximumTimeBetweenPings != null) { configuration.setMaximumTimeBetweenPings(String.valueOf(maximumTimeBetweenPings)); } if (socketBufferSize != null) { configuration.setSocketBufferSize(String.valueOf(socketBufferSize)); } configuration.setHostnameForSenders(hostnameForSenders); configuration.setManualStart(manualStart); return configuration; } public static class Interceptor extends AbstractCliAroundInterceptor { @Override public ResultModel preExecution(GfshParseResult parseResult) { Integer startPort = (Integer) parseResult.getParamValue("start-port"); Integer endPort = (Integer) parseResult.getParamValue("end-port"); if (startPort == null) { startPort = GatewayReceiver.DEFAULT_START_PORT; } if (endPort == null) { endPort = GatewayReceiver.DEFAULT_END_PORT; } if (startPort > endPort) { return ResultModel.createError("start-port must be smaller than end-port."); } return ResultModel.createInfo(""); } } }
{'content_hash': '80c285ee848235120136974364e12f8b', 'timestamp': '', 'source': 'github', 'line_count': 149, 'max_line_length': 115, 'avg_line_length': 46.68456375838926, 'alnum_prop': 0.7701265094882116, 'repo_name': 'pdxrunner/geode', 'id': 'a02fbb7abd8a17c8a4f8a1d789177847c2e541b7', 'size': '7745', 'binary': False, 'copies': '2', 'ref': 'refs/heads/develop', 'path': 'geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateGatewayReceiverCommand.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '106708'}, {'name': 'Dockerfile', 'bytes': '16800'}, {'name': 'Go', 'bytes': '1205'}, {'name': 'Groovy', 'bytes': '5503'}, {'name': 'HTML', 'bytes': '3820747'}, {'name': 'Java', 'bytes': '28135686'}, {'name': 'JavaScript', 'bytes': '1781602'}, {'name': 'Python', 'bytes': '24351'}, {'name': 'Ruby', 'bytes': '6665'}, {'name': 'Shell', 'bytes': '134940'}]}
package main import ( "log" "time" ) // Consumer1 is a packet consumer that receives packets from a // channel, consumes them at a constant rate, and reports its // availability on a second channel. type Consumer2 struct { sel int in <-chan Packet avail chan<- int delay time.Duration end chan int } // NewConsumer2 creates and returns a new consumer that receives and // consumes packets from channel "in", at a constant rate of one // packet every "delay". It accepts only packets with selectors equal // to "sel". It reports its availability (ready to receive next // packet) by emiting its selector on channel "avail". The consumer // stops when when its input channel is closed. func NewConsumer2(sel int, in <-chan Packet, avail chan<- int, delay time.Duration) *Consumer2 { c := &Consumer2{sel: sel, in: in, avail: avail, delay: delay} c.end = make(chan int) go c.run() return c } // run runs as the consumer's goroutine. func (c *Consumer2) run() { var npck int // Initially, report availability. c.avail <- c.sel for pck := range c.in { npck++ if pck.sel != c.sel { // Drop packet, report availability. log.Printf("C%d: %03d/%d: Bad selector!\n", c.sel, pck.id, pck.sel) c.avail <- c.sel continue } // Delay for processing. <-time.After(c.delay) log.Printf("C%d: %03d/%d\n", c.sel, pck.id, pck.sel) // Report availability c.avail <- c.sel } c.end <- npck close(c.end) } // Wait waits for the consumer to end and returns the total number of // packets received by it (either consumed or dropped due to bad // selectors). func (c *Consumer2) Wait() int { return <-c.end }
{'content_hash': '76bab0f00899633617175869421a810a', 'timestamp': '', 'source': 'github', 'line_count': 64, 'max_line_length': 69, 'avg_line_length': 25.703125, 'alnum_prop': 0.6820668693009119, 'repo_name': 'npat-efault/musings', 'id': 'fc26bb09ef41462c3ee17c0f2c9e7be48724b816', 'size': '1645', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'demux-go/consumer2.go', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Go', 'bytes': '25492'}]}
<?php defined('C5_EXECUTE') or die('Access Denied.'); /** * @var string $file_access_file_types * @var string[] $file_access_file_types_blacklist * @var Concrete\Core\Form\Service\Form $form * @var Concrete\Core\Validation\CSRF\Token $token * @var Concrete\Core\Page\View\PageView $view */ ?> <form method="POST" action="<?= h($view->action('file_access_extensions')) ?>"> <?= $token->output('file_access_extensions') ?> <div class="form-group"> <?= $form->label('file-access-file-types', t('File Extensions to Accept'), ['class' => 'launch-tooltip', 'title' => t('Only files with the following extensions will be allowed. Separate extensions with commas. Periods and spaces will be ignored.')]) ?> <?= $form->textarea('file-access-file-types', h($file_access_file_types), ['rows' => 3]) ?> </div> <div class="ccm-dashboard-form-actions-wrapper"> <div class="ccm-dashboard-form-actions"> <input type="submit" class="pull-right btn btn-primary" value="<?= t('Save') ?>" /> </div> </div> <?php if ($file_access_file_types_blacklist !== []) { ?> <div class="alert alert-info"> <?= t('These file extensions will always be blocked: %s', '<code>' . implode('</code>, <code>', $file_access_file_types_blacklist) . '</code>') ?><br /> <br /> <?= t('If you want to unblock these extensions, you have to manually set the %s configuration key.', '<code>concrete.upload.extensions_blacklist</code>') ?> </div> <?php } ?> </form>
{'content_hash': '5eca2fecbd462323a7232684018a95e2', 'timestamp': '', 'source': 'github', 'line_count': 36, 'max_line_length': 260, 'avg_line_length': 43.72222222222222, 'alnum_prop': 0.6029224904701398, 'repo_name': 'rikzuiderlicht/concrete5', 'id': '0dccf924f4b6672818aed1eed89d1c13e93c6e99', 'size': '1574', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'concrete/single_pages/dashboard/system/files/filetypes.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '37'}, {'name': 'CSS', 'bytes': '512067'}, {'name': 'Hack', 'bytes': '45'}, {'name': 'JavaScript', 'bytes': '1420935'}, {'name': 'PHP', 'bytes': '11749724'}, {'name': 'PowerShell', 'bytes': '3841'}, {'name': 'Shell', 'bytes': '4521'}, {'name': 'Vue', 'bytes': '2153'}]}
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("PrompterPro.Validation.UnitTests")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("PrompterPro.Validation.UnitTests")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("0626110a-659b-4f04-ade6-b94210a45b4c")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
{'content_hash': 'fc145365a4d2bcd21a49aa3b27cbc32f', 'timestamp': '', 'source': 'github', 'line_count': 36, 'max_line_length': 84, 'avg_line_length': 39.916666666666664, 'alnum_prop': 0.7494780793319415, 'repo_name': 'Social-Projects/PrompterPro', 'id': '4bfcd0f097cfed2b44a487e7bf429e44a60eec77', 'size': '1440', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'Main/SoftServe.ITA.PrompterPro/UnitTests/PrompterPro.Validation.UnitTests/Properties/AssemblyInfo.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ASP', 'bytes': '123'}, {'name': 'C#', 'bytes': '313428'}, {'name': 'CSS', 'bytes': '15440'}, {'name': 'HTML', 'bytes': '21178'}, {'name': 'JavaScript', 'bytes': '848144'}, {'name': 'Smalltalk', 'bytes': '47548'}]}
<?php namespace Controllers; use Helpers\View; class BriefController extends BaseController{ //set the value of main_content to the path of the brief tour view file public function getIndex() { View::render('briefTour/briefTour'); } }
{'content_hash': '12a1ab02d7d7fd860b6bd37b05255acb', 'timestamp': '', 'source': 'github', 'line_count': 14, 'max_line_length': 71, 'avg_line_length': 17.5, 'alnum_prop': 0.746938775510204, 'repo_name': 'ggiddy/documentation', 'id': '13fc34c5ef06ca073be9da463d496762952be5b4', 'size': '495', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'application/controllers/BriefController.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '324'}, {'name': 'CSS', 'bytes': '4820'}, {'name': 'PHP', 'bytes': '285525'}]}
// The MIT License (MIT) // // Copyright (c) 2011-2013 Yamagishi Kazutoshi // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. (function() { 'use strict'; var DOMException = require('./domexception'); var Event = require('./event'); function EventTarget() { } (function(proto) { var _globalListenerList; var _globalTargetList; function _addEventListener(type, listener, capture) { var target = this; var listeners = _getEventListeners.call(this, type); var index; listener = _addEventListener.prepareListener(listener); if (typeof listener !== 'function') { return; } if (listeners.length < 1) { index = _globalTargetList.indexOf(target); if (index < 0) { index = _globalTargetList.push(target) - 1; } _globalListenerList[index] = _globalListenerList[index] || {}; _globalListenerList[index][type] = listeners; } listeners.push(listener); } _addEventListener.prepareListener = function prepareListener(listener) { var object = listener; var handleEvent; if (typeof listener === 'function') { return listener; } handleEvent = listener && object.handleEvent; if (typeof handleEvent !== 'function') { return; } return function listener(event) { handleEvent.call(object, event); }; }; function _dispatch(event) { var eventFlag = event._flag; eventFlag.dispatch = true; Object.defineProperty(event, 'target', { configurable: true, enumerable: true, value: this, writable: false }); // todo: If event's target attribute value is participating in a tree, let // event path be a static ordered list of all its ancestors in tree order, // or let event path be the empty list otherwise. Object.defineProperty(event, 'eventPhase', { configurable: true, enumerable: true, value: Event.CAPTURING_PHASE, writable: false, }); // todo: For each object in the event path invoke its event listeners with // event event, as long as event's stop propagation flag is unset. Object.defineProperty(event, 'eventPhase', { configurable: true, enumerable: true, value: Event.AT_TARGET, writable: false, }); if (!eventFlag.stopPropagation) { _dispatch.invoke.apply(this, arguments); } if (event.bubbles) { _dispatch.bubbling.apply(this, arguments); } eventFlag.dispatch = false; Object.defineProperty(event, 'eventPhase', { configurable: true, enumerable: true, value: Event.NONE, writable: false, }); Object.defineProperty(event, 'currentTarget', { configurable: true, enumerable: true, value: null, writable: false, }); if (eventFlag.canceled) { return false; } return true; } _dispatch.bubbling = function bubbling(event) { // todo: Reverse the order of event path. Object.defineProperty(event, 'eventPhase', { configurable: true, enumerable: true, value: Event.BUBBLING_PHASE, writable: false, }); // todo: For each object in the event path invoke its event listeners, // with event event as long as event's stop propagation flag is unset. }; _dispatch.invoke = function invoke(event) { var args = Array.prototype.slice.call(arguments); var target = event.target; var type = event.type; var listeners = _getEventListeners.call(target, type); var listener = this['on' + type]; if (typeof listener === 'function') { listeners.unshift(listener); } return listeners.some(function handleListener(listener) { if (!event.cancelable) { return listener.apply(target, args); } return event.defaultPrevented || listener.apply(target, args) === false; }); }; function _getEventListeners(type) { var target = this; var listenerList = _globalListenerList = _globalListenerList || []; var targetList = _globalTargetList = _globalTargetList || []; var index = targetList.lastIndexOf(target); var eachTypeListeners = listenerList[index] || {}; var listeners = eachTypeListeners[type] || []; return listeners; } function _removeEventListener(type, listener, capture) { var listeners = _getEventListeners.call(this, type); var index = listeners.lastIndexOf(listener); if (index < 0) { return; } listeners.splice(index, 1); } proto.addEventListener = function addEventListener(type, listener, capture) { if (listener === null) { return; } return _addEventListener.apply(this, arguments); }; proto.dispatchEvent = function dispatchEvent(event) { var eventFlag = event instanceof Event && event._flag; if (!eventFlag || eventFlag.dispatch || !eventFlag.initialized) { throw new TypeError(/* InvalidStateError */); } return _dispatch.apply(this, arguments); }; proto.removeEventListener = function removeEventListener(type, listener, capture) { return _removeEventListener.apply(this, arguments); }; })(EventTarget.prototype); module.exports = EventTarget; })();
{'content_hash': '67b3116132fcd5626b23fd4a012d7245', 'timestamp': '', 'source': 'github', 'line_count': 189, 'max_line_length': 87, 'avg_line_length': 34.31216931216931, 'alnum_prop': 0.6393215111796453, 'repo_name': 'genie88/promises-book', 'id': 'fd0041cdb19bbcffacb668ae6382b4279e974bc4', 'size': '6485', 'binary': False, 'copies': '15', 'ref': 'refs/heads/master', 'path': 'node_modules/w3c-xmlhttprequest/lib/eventtarget.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '9378'}, {'name': 'HTML', 'bytes': '1014'}, {'name': 'JavaScript', 'bytes': '544013'}, {'name': 'Makefile', 'bytes': '1323'}, {'name': 'Shell', 'bytes': '2534'}]}
from nltk import tokenize import re def find_urls(s): return re.findall(r'(https?://\S+)', s) def remove_url(s): return re.sub(r'(https?://\S+)', '', s, flags=re.MULTILINE) def get_post_id(fb_id): cur.execute("select id from \"Posts\" where fb_id = %s", (fb_id,)) inserted_id = cur.fetchone() if inserted_id: return inserted_id[0] else: return None def get_comment_id(fb_id): cur.execute("SELECT id FROM \"Comments\" WHERE fb_id = %s", (fb_id,)) inserted_id = cur.fetchone() if inserted_id: return inserted_id[0] else: return None def title_generator(s): def chomp(s): # if not s: return "" #print "chomping.." return s[:297] + "..." if len(s) < 300: #print "under 300" return s else: return chomp(s) # if len(s.split("\n\n")) > 1: # print ("found double new line") # return chomp(s.split("\n\n")[0]) # else: # print "attempting to tokenize..." # title = "" # next_title = "" # sentences = tokenize.sent_tokenize(s) # for i in range(0, len(sentences)): # if len(title) < 300: # title = next_title # next_title = title + sentences[i] # else: # return chomp(title) # return chomp(title) def strip_newline(s): #print "stripping newline" #print s return " ".join(s.split("\n"))
{'content_hash': '170874681d6f2e728328f59e5abc8aba', 'timestamp': '', 'source': 'github', 'line_count': 50, 'max_line_length': 73, 'avg_line_length': 28.58, 'alnum_prop': 0.5381385584324703, 'repo_name': 'simplyianm/hackit', 'id': '2785553c12a846a61b9d5041c82cbf26c8a06bd8', 'size': '1429', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Python', 'bytes': '15852'}, {'name': 'Shell', 'bytes': '1892'}]}
<?php namespace Symfony\Component\Mailer\Tests\Transport; use PHPUnit\Framework\TestCase; use Symfony\Component\Mailer\Exception\TransportException; use Symfony\Component\Mailer\Transport\FailoverTransport; use Symfony\Component\Mailer\Transport\RoundRobinTransport; use Symfony\Component\Mailer\Transport\TransportInterface; use Symfony\Component\Mime\RawMessage; /** * @group time-sensitive */ class FailoverTransportTest extends TestCase { public function testSendNoTransports() { $this->expectException(TransportException::class); new FailoverTransport([]); } public function testToString() { $t1 = $this->createMock(TransportInterface::class); $t1->expects($this->once())->method('__toString')->willReturn('t1://local'); $t2 = $this->createMock(TransportInterface::class); $t2->expects($this->once())->method('__toString')->willReturn('t2://local'); $t = new FailoverTransport([$t1, $t2]); $this->assertEquals('failover(t1://local t2://local)', (string) $t); } public function testSendFirstWork() { $t1 = $this->createMock(TransportInterface::class); $t1->expects($this->exactly(3))->method('send'); $t2 = $this->createMock(TransportInterface::class); $t2->expects($this->never())->method('send'); $t = new FailoverTransport([$t1, $t2]); $t->send(new RawMessage('')); $this->assertTransports($t, 1, []); $t->send(new RawMessage('')); $this->assertTransports($t, 1, []); $t->send(new RawMessage('')); $this->assertTransports($t, 1, []); } public function testSendAllDead() { $t1 = $this->createMock(TransportInterface::class); $t1->expects($this->once())->method('send')->will($this->throwException(new TransportException())); $t2 = $this->createMock(TransportInterface::class); $t2->expects($this->once())->method('send')->will($this->throwException(new TransportException())); $t = new FailoverTransport([$t1, $t2]); $this->expectException(TransportException::class); $this->expectExceptionMessage('All transports failed.'); $t->send(new RawMessage('')); $this->assertTransports($t, 0, [$t1, $t2]); } public function testSendOneDead() { $t1 = $this->createMock(TransportInterface::class); $t1->expects($this->once())->method('send')->will($this->throwException(new TransportException())); $t2 = $this->createMock(TransportInterface::class); $t2->expects($this->exactly(3))->method('send'); $t = new FailoverTransport([$t1, $t2]); $t->send(new RawMessage('')); $this->assertTransports($t, 0, [$t1]); $t->send(new RawMessage('')); $this->assertTransports($t, 0, [$t1]); $t->send(new RawMessage('')); $this->assertTransports($t, 0, [$t1]); } public function testSendOneDeadAndRecoveryWithinRetryPeriod() { $t1 = $this->createMock(TransportInterface::class); $t1->method('send')->willReturnOnConsecutiveCalls($this->throwException(new TransportException())); $t2 = $this->createMock(TransportInterface::class); $t2->expects($this->exactly(4)) ->method('send') ->willReturnOnConsecutiveCalls( null, null, null, $this->throwException(new TransportException()) ); $t = new FailoverTransport([$t1, $t2], 6); $t->send(new RawMessage('')); // t1>fail - t2>sent $this->assertTransports($t, 0, [$t1]); sleep(4); $t->send(new RawMessage('')); // t2>sent $this->assertTransports($t, 0, [$t1]); sleep(4); $t->send(new RawMessage('')); // t2>sent $this->assertTransports($t, 0, [$t1]); sleep(4); $t->send(new RawMessage('')); // t2>fail - t1>sent $this->assertTransports($t, 1, [$t2]); sleep(4); $t->send(new RawMessage('')); // t1>sent $this->assertTransports($t, 1, [$t2]); } public function testSendAllDeadWithinRetryPeriod() { $t1 = $this->createMock(TransportInterface::class); $t1->method('send')->will($this->throwException(new TransportException())); $t1->expects($this->once())->method('send'); $t2 = $this->createMock(TransportInterface::class); $t2->expects($this->exactly(3)) ->method('send') ->willReturnOnConsecutiveCalls( null, null, $this->throwException(new TransportException()) ); $t = new FailoverTransport([$t1, $t2], 40); $t->send(new RawMessage('')); sleep(4); $t->send(new RawMessage('')); sleep(4); $this->expectException(TransportException::class); $this->expectExceptionMessage('All transports failed.'); $t->send(new RawMessage('')); } public function testSendOneDeadButRecover() { $t1 = $this->createMock(TransportInterface::class); $t1->method('send')->willReturnOnConsecutiveCalls($this->throwException(new TransportException())); $t2 = $this->createMock(TransportInterface::class); $t2->expects($this->exactly(3)) ->method('send')->willReturnOnConsecutiveCalls( null, null, $this->throwException(new TransportException()) ); $t = new FailoverTransport([$t1, $t2], 1); $t->send(new RawMessage('')); sleep(1); $t->send(new RawMessage('')); sleep(1); $t->send(new RawMessage('')); } private function assertTransports(RoundRobinTransport $transport, int $cursor, array $deadTransports) { $p = new \ReflectionProperty(RoundRobinTransport::class, 'cursor'); $this->assertSame($cursor, $p->getValue($transport)); $p = new \ReflectionProperty(RoundRobinTransport::class, 'deadTransports'); $this->assertSame($deadTransports, iterator_to_array($p->getValue($transport))); } }
{'content_hash': '4bf05d7c00bb7c1004818eeeab5d3c03', 'timestamp': '', 'source': 'github', 'line_count': 158, 'max_line_length': 107, 'avg_line_length': 38.91772151898734, 'alnum_prop': 0.5896893803870548, 'repo_name': 'xabbuh/symfony', 'id': 'a5c0fa3f4a973c58763932f180226e91bfa36226', 'size': '6378', 'binary': False, 'copies': '8', 'ref': 'refs/heads/master', 'path': 'src/Symfony/Component/Mailer/Tests/Transport/FailoverTransportTest.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '49777'}, {'name': 'HTML', 'bytes': '16735'}, {'name': 'Hack', 'bytes': '26'}, {'name': 'JavaScript', 'bytes': '29581'}, {'name': 'Makefile', 'bytes': '444'}, {'name': 'PHP', 'bytes': '66458543'}, {'name': 'Shell', 'bytes': '9412'}, {'name': 'Twig', 'bytes': '564253'}]}
@interface TravelViewController () - (void)closeTravel; - (void)openTravel:(BOOL)useLatestRates; - (void)sendSummaryMail; - (void)updateTableViewInsets; - (void)updateSummary; - (void)openPersonChooseOrCreatePopup; - (void)selectPerson:(ABRecordRef)abRecordRef withEmail:(NSString *)email; - (NSString *)prettyPrintListOfStrings:(NSArray *)array; - (void)initHelpBubbleForViewController:(UIViewController *)viewController; @end @implementation TravelViewController @synthesize travel=_travel, tabBarController=_tabBarController, addButton=_addButton, actionButton=_actionButton; @synthesize participantSortViewController=_participantSortViewController, entrySortViewController=_entrySortViewController, summarySortViewController=_summarySortViewController; @synthesize mailSendAlertView=_mailSendAlertView, rateRefreshAlertView=_rateRefreshAlertView; @synthesize actionSheetAddPerson=_actionSheetAddPerson, actionSheetOpenTravel=_actionSheetOpenTravel, actionSheetClosedTravel=_actionSheetClosedTravel, actionSheetOpenTravelNoCurrency=_actionSheetOpenTravelNoCurrency; - (id)initWithTravel:(Travel *) travel { [Crittercism leaveBreadcrumb:@"TravelViewController: init"]; self = [self init]; if (self) { _travel = travel; self.actionSheetClosedTravel = [[[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", @"Cancel") destructiveButtonTitle:nil otherButtonTitles:NSLocalizedString(@"Send summary e-mail", @"alert item mail"), NSLocalizedString(@"Open this trip", @"alert item open trip"), nil] autorelease]; self.actionSheetClosedTravel.actionSheetStyle = UIActionSheetStyleBlackTranslucent; self.actionSheetOpenTravel = [[[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", @"Cancel") destructiveButtonTitle:nil otherButtonTitles:NSLocalizedString(@"Send summary e-mail", @"alert item mail"), NSLocalizedString(@"Close this trip", @"alert item close trip"), NSLocalizedString(@"Update exchange rates", @"alert item update rates"), NSLocalizedString(@"Manually edit rates", @"alert title edit rate"), nil] autorelease]; self.actionSheetOpenTravel.actionSheetStyle = UIActionSheetStyleBlackTranslucent; self.actionSheetOpenTravelNoCurrency = [[[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", @"Cancel") destructiveButtonTitle:nil otherButtonTitles:NSLocalizedString(@"Send summary e-mail", @"alert item mail"), NSLocalizedString(@"Close this trip", @"alert item close trip"), nil] autorelease]; self.actionSheetOpenTravelNoCurrency.actionSheetStyle = UIActionSheetStyleBlackTranslucent; self.actionSheetAddPerson = [[[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", @"Cancel") destructiveButtonTitle:nil otherButtonTitles:NSLocalizedString(@"From Address Book", @"alert item address book"), NSLocalizedString(@"Create new person", @"alert item new person"), nil] autorelease]; self.actionSheetAddPerson.actionSheetStyle = UIActionSheetStyleBlackTranslucent; } return self; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } #pragma mark Open PopUps - (void)openAddPopup { [Crittercism leaveBreadcrumb:@"TravelViewController: openAddPopup"]; if ([[[self tabBarController] selectedViewController] isEqual:self.participantSortViewController]) { [self openPersonChooseOrCreatePopup]; } else if ([[[self tabBarController] selectedViewController] isEqual:self.entrySortViewController]) { [self openEntryAddPopup]; } } - (void)openEntryAddPopup { [Crittercism leaveBreadcrumb:@"TravelViewController: openEntryAddPopup"]; EntryEditViewController *detailViewController = [[EntryEditViewController alloc] initWithTravel:_travel]; detailViewController.editDelegate = self; UINavigationController *navController = [[ShadowNavigationController alloc] initWithRootViewController:detailViewController]; navController.delegate = detailViewController; [self presentViewController:navController animated:YES completion:NULL]; [detailViewController release]; [navController release]; } - (void)openEditEntryPopup:(Entry *)entry { [Crittercism leaveBreadcrumb:@"TravelViewController: openEditEntryPopup"]; EntryEditViewController *detailViewController = [[EntryEditViewController alloc] initWithTravel:_travel andEntry:entry]; detailViewController.editDelegate = self; UINavigationController *navController = [[ShadowNavigationController alloc] initWithRootViewController:detailViewController]; navController.delegate = detailViewController; [self presentViewController:navController animated:YES completion:NULL]; [detailViewController release]; [navController release]; } - (void)openPersonAddPopup { [Crittercism leaveBreadcrumb:@"TravelViewController: openPersonAddPopup"]; ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init]; picker.peoplePickerDelegate = self; picker.navigationBar.barStyle = UIBarStyleBlack; picker.displayedProperties = [NSArray arrayWithObject:[NSNumber numberWithInt:kABPersonEmailProperty]]; [self presentViewController:picker animated:YES completion:NULL]; [UIFactory setColorOfSearchBarInABPicker:picker color:[UIFactory defaultTintColor]]; [picker release]; } - (void)openRateEditPopup { [Crittercism leaveBreadcrumb:@"TravelViewController: openRateEditPopup"]; RateSelectViewController *rateSelectViewController = [[RateSelectViewController alloc] initWithTravel:self.travel]; rateSelectViewController.closeDelegate = self; UINavigationController *navController = [[ShadowNavigationController alloc] initWithRootViewController:rateSelectViewController]; navController.delegate = rateSelectViewController; [self.navigationController presentViewController:navController animated:YES completion:NULL]; [navController release]; [rateSelectViewController release]; } - (void)openActionPopup { [Crittercism leaveBreadcrumb:@"TravelViewController: openActionPopup"]; if ([self.travel isClosed]) { [self.actionSheetClosedTravel showInView:self.view]; } else { if ([self.travel.currencies count] == 1) { [self.actionSheetOpenTravelNoCurrency showInView:self.view]; } else { [self.actionSheetOpenTravel showInView:self.view]; } } } - (void)openPersonChooseOrCreatePopup { [Crittercism leaveBreadcrumb:@"TravelViewController: openPersonChooseOrCreatePopup"]; [self.actionSheetAddPerson showInView:self.view]; } #pragma mark Travel logic - (void)closeTravel { [Crittercism leaveBreadcrumb:@"TravelViewController: closeTravel"]; // close [self.travel close]; [ReiseabrechnungAppDelegate saveContext:[self.travel managedObjectContext]]; [self.summarySortViewController.detailViewController.tableView reloadData]; [self.entrySortViewController.detailViewController.tableView reloadData]; [self.participantSortViewController.detailViewController.tableView reloadData]; [self.participantSortViewController.detailViewController updateTravelOpenOrClosed]; [self.entrySortViewController.detailViewController updateTravelOpenOrClosed]; [self.summarySortViewController updateRateLabel:YES]; [self initHelpBubbleForViewController:self.summarySortViewController]; [self showFullScreenAd]; [ReiseabrechnungAppDelegate askForDonation:@"askDonationClose"]; } - (void)openTravel:(BOOL)useLatestRates { [Crittercism leaveBreadcrumb:@"TravelViewController: openTravel"]; // open [self.travel open:useLatestRates]; [ReiseabrechnungAppDelegate saveContext:[self.travel managedObjectContext]]; [self.summarySortViewController.detailViewController.tableView reloadData]; [self.entrySortViewController.detailViewController.tableView reloadData]; [self.participantSortViewController.detailViewController.tableView reloadData]; [self updateStateOfNavigationController:self.tabBarController.selectedViewController]; [self.participantSortViewController.detailViewController updateTravelOpenOrClosed]; [self.entrySortViewController.detailViewController updateTravelOpenOrClosed]; [self.summarySortViewController updateRateLabel:YES]; [self initHelpBubbleForViewController:self.summarySortViewController]; [UIFactory replaceHelpViewInView:@"travelClosedLabel" withView:nil toView:self.summarySortViewController.view]; } - (void)askToRefreshRatesWhenOpening { [Crittercism leaveBreadcrumb:@"TravelViewController: askToRefreshRatesWhenOpening"]; [self.rateRefreshAlertView show]; } - (void)askToSendEmail { [Crittercism leaveBreadcrumb:@"TravelViewController: askToSendEmail"]; NSMutableArray *noMailParticipants = [NSMutableArray array]; for (Participant *participant in self.travel.participants) { if (participant.email == nil || [participant.email length] == 0) { [noMailParticipants addObject:participant.name]; } } if ([noMailParticipants count] > 0) { NSString *message = nil; if ([noMailParticipants count] == 1) { message = [NSString stringWithFormat:NSLocalizedString(@"no mail address singular", @"alert no mail addresses"), [self prettyPrintListOfStrings:noMailParticipants]]; } else { message = [NSString stringWithFormat:NSLocalizedString(@"no mail address plural", @"alert no mail addresses"), [self prettyPrintListOfStrings:noMailParticipants]]; } self.mailSendAlertView.message = message; [self.mailSendAlertView show]; } else { [self sendSummaryMail]; } } - (NSString *)prettyPrintListOfStrings:(NSArray *)array { NSString *returnValue = nil; if ([array count] == 0) { returnValue = @""; } else if ([array count] == 1) { returnValue = [array objectAtIndex:0]; } else if ([array count] == 2) { returnValue = [NSString stringWithFormat:NSLocalizedString(@"%@ and %@", @"param1 'and' param2 count:2"), [array objectAtIndex:0], [array objectAtIndex:1]]; } else { for (int i=0; i < [array count]; i++) { if (i == 0) { returnValue = [array objectAtIndex:i]; } else if (i == [array count] - 1) { returnValue = [returnValue stringByAppendingFormat:NSLocalizedString(@", and %@", @"param1 'and' param2 count:>2"), [array objectAtIndex:i]]; } else { returnValue = [returnValue stringByAppendingFormat:@", %@", [array objectAtIndex:i]]; } } } return returnValue; } - (void)sendSummaryMail { [Crittercism leaveBreadcrumb:@"TravelViewController: sendSummaryMail"]; MFMailComposeViewController* controller = [[MFMailComposeViewController alloc] init]; controller.navigationBar.barStyle = UIBarStyleBlack; NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithObject:self.travel forKey:@"travel"]; NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; if ([userDefaults boolForKey:@"includeImages"]) { [dictionary setValue:@"Yes" forKey:@"includeImages"]; } if ([userDefaults boolForKey:@"includePersons"]) { [dictionary setValue:@"Yes" forKey:@"includePersons"]; } if ([userDefaults boolForKey:@"includeEntries"]) { [dictionary setValue:@"Yes" forKey:@"includeEntries"]; } if ([self.travel.name length] > 0) { [dictionary setValue:@"Yes" forKey:@"tripHasName"]; } [dictionary setValue:NSLocalizedString(@"Expenses of trip", @"mail label") forKey:@"labelExpenses"]; [dictionary setValue:NSLocalizedString(@"to", @"mail label") forKey:@"labelTo"]; [dictionary setValue:NSLocalizedString(@"Payer", @"mail label") forKey:@"labelPayer"]; [dictionary setValue:NSLocalizedString(@"Type", @"mail label") forKey:@"labelType"]; [dictionary setValue:NSLocalizedString(@"Description", @"mail label") forKey:@"labelText"]; [dictionary setValue:NSLocalizedString(@"Amount", @"mail label") forKey:@"labelAmount"]; [dictionary setValue:NSLocalizedString(@"Date", @"mail label") forKey:@"labelDate"]; [dictionary setValue:NSLocalizedString(@"Receivers", @"mail label") forKey:@"labelReceivers"]; [dictionary setValue:NSLocalizedString(@"total costs", @"mail label") forKey:@"labelTotal"]; [dictionary setValue:NSLocalizedString(@"Summary", @"mail label") forKey:@"labelSummary"]; [dictionary setValue:NSLocalizedString(@"who owes", @"mail label") forKey:@"labelWhoOwes"]; [dictionary setValue:NSLocalizedString(@"how much", @"mail label") forKey:@"labelHowMuch"]; [dictionary setValue:NSLocalizedString(@"to whom", @"mail label") forKey:@"labelToWhom"]; [dictionary setValue:NSLocalizedString(@"already paid", @"mail label") forKey:@"labelAlreadyPaid"]; [dictionary setValue:NSLocalizedString(@"Yes", @"mail label") forKey:@"labelYes"]; [dictionary setValue:NSLocalizedString(@"No", @"mail label") forKey:@"labelNo"]; [dictionary setValue:NSLocalizedString(@"Name", @"mail label") forKey:@"labelName"]; [dictionary setValue:NSLocalizedString(@"Notes", @"mail label") forKey:@"labelNotes"]; [dictionary setValue:NSLocalizedString(@"Currencies used for this trip:", @"mail label") forKey:@"labelCurrenciesUsed"]; MGTemplateEngine *engine = [[MGTemplateEngine alloc] init]; engine.matcher = [[[ICUTemplateMatcher alloc] initWithTemplateEngine:engine] autorelease]; NSString *mailBody = [engine processTemplateInFileAtPath:[[NSBundle mainBundle] pathForResource:@"mailTemplate" ofType:@"html"] withVariables:dictionary]; [engine release]; controller.mailComposeDelegate = self; NSString *subjectLine = [NSString stringWithFormat:NSLocalizedString(@"Expenses summary report for trip '%@'", @"mail subject"), self.travel.name]; if (!self.travel.name || [self.travel.name length] == 0) { subjectLine = [NSString stringWithFormat:NSLocalizedString(@"Expenses summary report for trip to %@", @"mail subject with no travel name"), self.travel.location]; } [controller setSubject:subjectLine]; [controller setMessageBody:mailBody isHTML:YES]; NSMutableArray *toArray = [NSMutableArray array]; for (Participant *p in self.travel.participants) { if (![p.yourself isEqual:[NSNumber numberWithInt:1]]) { if (p.email != nil && [p.email length] > 0) { [toArray addObject:p.email]; } } else { [controller setCcRecipients:[NSArray arrayWithObject:p.email]]; } } [controller setToRecipients:toArray]; if (controller) { [self presentViewController:controller animated:YES completion:NULL]; } [controller release]; } - (void)addOrEditEntryWithParameters:(EntryNotManaged *)nmEntry andEntry:(Entry *)entry { [Crittercism leaveBreadcrumb:@"TravelViewController: addOrEditEntryWithParameters"]; [self.entrySortViewController.detailViewController.tableView beginUpdates]; NSIndexPath *oldPath = [self.entrySortViewController.detailViewController.fetchedResultsController indexPathForObject:entry]; Entry *_entry = nil; if (!entry) { _entry = [NSEntityDescription insertNewObjectForEntityForName: @"Entry" inManagedObjectContext: [_travel managedObjectContext]]; _travel.lastParticipantUsed = nmEntry.payer; _travel.lastCurrencyUsed = nmEntry.currency; _entry.created = [NSDate date]; } else { _entry = entry; } _entry.text = nmEntry.text; _entry.amount = nmEntry.amount; if (![_entry.currency isEqual:nmEntry.currency]) { _entry.currency = nmEntry.currency; } _entry.date = nmEntry.date; _entry.notes = nmEntry.notes; if (![entry.payer isEqual:nmEntry.payer]) { _entry.payer = nmEntry.payer; } if (![_entry.type isEqual:nmEntry.type]) { _entry.type = nmEntry.type; } if (![_entry.travel isEqual:_travel]) { _entry.travel = _travel; } _entry.lastUpdated = [NSDate date]; [_entry removeReceiverWeights:_entry.receiverWeights]; for (ReceiverWeightNotManaged *recWeightNM in nmEntry.receiverWeights) { if (recWeightNM.active) { ReceiverWeight *recWeight = [NSEntityDescription insertNewObjectForEntityForName: @"ReceiverWeight" inManagedObjectContext: [_travel managedObjectContext]]; recWeight.weight = recWeightNM.weight; recWeight.participant = recWeightNM.participant; [_entry addReceiverWeightsObject:recWeight]; } } [ReiseabrechnungAppDelegate saveContext:[_travel managedObjectContext]]; NSIndexPath *newPath = [self.entrySortViewController.detailViewController.fetchedResultsController indexPathForObject:entry]; [self.entrySortViewController.detailViewController.tableView endUpdates]; [self.entrySortViewController.detailViewController.tableView reloadSections:[NSIndexSet indexSetWithIndex:oldPath.section] withRowAnimation:UITableViewRowAnimationNone]; [self.entrySortViewController.detailViewController.tableView reloadSections:[NSIndexSet indexSetWithIndex:newPath.section] withRowAnimation:UITableViewRowAnimationNone]; [self updateSummary]; [self.entrySortViewController updateTotalValue]; } - (void)selectPerson:(ABRecordRef)abRecordRef withEmail:(NSString *)email { [Crittercism leaveBreadcrumb:@"TravelViewController: selectPerson"]; Participant *newPerson = [NSEntityDescription insertNewObjectForEntityForName: @"Participant" inManagedObjectContext: [_travel managedObjectContext]]; [Participant addParticipant:newPerson toTravel:_travel withABRecord:abRecordRef andEmail:email]; [ReiseabrechnungAppDelegate saveContext:[_travel managedObjectContext]]; } - (void)entryWasDeleted:(Entry *)entry { [Crittercism leaveBreadcrumb:@"TravelViewController: entryWasDeleted"]; [self updateSummary]; NSIndexPath *path = [self.entrySortViewController.detailViewController.fetchedResultsController indexPathForObject:entry]; if (path) { [self.entrySortViewController.detailViewController.tableView reloadSections:[NSIndexSet indexSetWithIndex:path.section] withRowAnimation:UITableViewRowAnimationNone]; } [self.entrySortViewController updateTotalValue]; } - (void)updateSummary { [Crittercism leaveBreadcrumb:@"TravelViewController: updateSummary"]; // dispatch_queue_t updateQueue = dispatch_queue_create("UpdateSummary", NULL); // dispatch_async(updateQueue, ^{ // // [self.summarySortViewController.detailViewController recalculateSummary]; // // dispatch_async(dispatch_get_main_queue(), ^{ // [self.summarySortViewController.detailViewController.tableView reloadData]; // }); // }); [self.summarySortViewController.detailViewController recalculateSummary]; [self.summarySortViewController.detailViewController.tableView reloadData]; } - (void)editWasCanceled:(Entry *)entry { [Crittercism leaveBreadcrumb:@"TravelViewController: editWasCanceled"]; if (entry) { [self.entrySortViewController.detailViewController.tableView deselectRowAtIndexPath:[[self.entrySortViewController.detailViewController fetchedResultsControllerForTableView:self.entrySortViewController.detailViewController.tableView] indexPathForObject:entry] animated:YES]; } } - (void)updateStateOfNavigationController:(UIViewController *)selectedViewController { [Crittercism leaveBreadcrumb:@"TravelViewController: updateStateOfNavigationController"]; if ([selectedViewController isEqual:_summarySortViewController]) { self.navigationItem.rightBarButtonItem = self.actionButton; } else { self.navigationItem.rightBarButtonItem = self.addButton; } self.addButton.enabled = [self.travel isOpen]; } - (void)refreshExchangeRates { [Crittercism leaveBreadcrumb:@"TravelViewController: refreshExchangeRates"]; dispatch_queue_t updateQueue = dispatch_queue_create("UpdateQueue", NULL); dispatch_async(updateQueue, ^{ ReiseabrechnungAppDelegate *delegate = (ReiseabrechnungAppDelegate *) [UIApplication sharedApplication].delegate; CurrencyRefresh *currencyRefresh = [[CurrencyRefresh alloc] initInManagedContext:[delegate createNewManagedObjectContext]]; NSLog(@"Updating currencies..."); BOOL updated = [currencyRefresh refreshCurrencies]; [currencyRefresh release]; dispatch_async(dispatch_get_main_queue(), ^{ [_summarySortViewController updateRateLabel:YES]; if (updated) { [self updateSummary]; [self.entrySortViewController updateTotalValue]; } }); }); } - (void)initHelpBubbleForViewController:(UIViewController *)viewController { double navBarHeight = self.navigationController.navigationBar.frame.size.height + [[UIApplication sharedApplication] statusBarFrame].size.height; double entrySortHeight = self.entrySortViewController.detailViewController.tableView.tableHeaderView.frame.size.height; double windowWidth = self.view.frame.size.width; double windowHeight = self.view.frame.size.height; if (viewController == self.participantSortViewController && [self.travel isOpen]) { NSString *text = NSLocalizedString(@"help add people", @"help bubble add travelers"); HelpView *helpView = [[HelpView alloc] initWithFrame:CGRectMake(windowWidth - 102, navBarHeight, 100, 100) text:text arrowPosition:ARROWPOSITION_TOP_RIGHT enterStage:ENTER_STAGE_FROM_TOP uniqueIdentifier:@"traveler add"]; [UIFactory addHelpViewToView:helpView toView:viewController.view]; [helpView release]; } else if (viewController == self.entrySortViewController) { if ([self.travel isOpen]) { NSString *text = NSLocalizedString(@"help add entries", @"help bubble add expenses"); HelpView *helpView = [[HelpView alloc] initWithFrame:CGRectMake(windowWidth - 102, navBarHeight, 100, 100) text:text arrowPosition:ARROWPOSITION_TOP_RIGHT enterStage:ENTER_STAGE_FROM_TOP uniqueIdentifier:@"entry add"]; [UIFactory addHelpViewToView:helpView toView:viewController.view]; [helpView release]; } NSString *text = NSLocalizedString(@"help sort", @"help bubble sort buttons"); HelpView *helpView = [[HelpView alloc] initWithFrame:CGRectMake(10, navBarHeight + entrySortHeight - 5, 100, 100) text:text arrowPosition:ARROWPOSITION_TOP_LEFT enterStage:ENTER_STAGE_FROM_TOP uniqueIdentifier:@"sort desc asc button entry"]; [UIFactory addHelpViewToView:helpView toView:viewController.view]; [helpView release]; } else if (viewController == self.summarySortViewController) { NSString *text = NSLocalizedString(@"help action", @"help bubble action button"); HelpView *helpView = [[HelpView alloc] initWithFrame:CGRectMake(windowWidth - 102, navBarHeight, 100, 100) text:text arrowPosition:ARROWPOSITION_TOP_RIGHT enterStage:ENTER_STAGE_FROM_TOP uniqueIdentifier:@"action button"]; [UIFactory addHelpViewToView:helpView toView:viewController.view]; [helpView release]; text = NSLocalizedString(@"help rate updated", @"help bubble last updated toolbar"); HelpView *openHelpView = [[HelpView alloc] initWithFrame:CGRectMake(110, windowHeight - 190, 100, 100) text:text arrowPosition:ARROWPOSITION_BOTTOM_RIGHT enterStage:ENTER_STAGE_FROM_BOTTOM uniqueIdentifier:@"rateLabel"]; text = NSLocalizedString(@"help closed travel", @"help bubble close travel"); HelpView *closedHelpView = [[HelpView alloc] initWithFrame:CGRectMake(110, windowHeight - 190, 100, 100) text:text arrowPosition:ARROWPOSITION_BOTTOM_RIGHT enterStage:ENTER_STAGE_FROM_BOTTOM uniqueIdentifier:@"travelClosedLabel"]; if ([self.travel isOpen]) { // is open if (self.summarySortViewController.segControl.numberOfSegments > 1) { [UIFactory replaceHelpViewInView:closedHelpView.uniqueIdentifier withView:openHelpView toView:viewController.view]; } } else { [UIFactory replaceHelpViewInView:openHelpView.uniqueIdentifier withView:closedHelpView toView:viewController.view]; } [openHelpView release]; [closedHelpView release]; } } - (void)updateTableViewInsets { UIEdgeInsets insets = self.participantSortViewController.detailViewController.tableView.contentInset; insets.top = self.navigationController.navigationBar.frame.size.height + STATUSBAR_HEIGHT; self.participantSortViewController.detailViewController.tableView.contentInset = insets; self.participantSortViewController.detailViewController.tableView.scrollIndicatorInsets = self.participantSortViewController.detailViewController.tableView.contentInset; insets = self.entrySortViewController.detailViewController.tableView.contentInset; insets.top = self.navigationController.navigationBar.frame.size.height + STATUSBAR_HEIGHT; self.entrySortViewController.detailViewController.tableView.contentInset = insets; self.entrySortViewController.detailViewController.tableView.scrollIndicatorInsets = self.entrySortViewController.detailViewController.tableView.contentInset; insets = self.summarySortViewController.detailViewController.tableView.contentInset; insets.top = self.navigationController.navigationBar.frame.size.height + STATUSBAR_HEIGHT; self.summarySortViewController.detailViewController.tableView.contentInset = insets; self.summarySortViewController.detailViewController.tableView.scrollIndicatorInsets = self.summarySortViewController.detailViewController.tableView.contentInset; } #pragma mark - ParticipantViewControllerEditDelegate - (void)participantEditFinished:(Participant *)participant wasSaved:(BOOL)wasSaved cashierChanged:(BOOL)cashierChanged { [Crittercism leaveBreadcrumb:@"TravelViewController: participantEditFinished"]; [self.participantSortViewController.detailViewController.tableView deselectRowAtIndexPath:[self.participantSortViewController.detailViewController.tableView indexPathForSelectedRow] animated:YES]; [self.entrySortViewController.detailViewController.tableView reloadData]; if (cashierChanged) { [self updateSummary]; } } - (void)openParticipantPopup:(Participant *)participant { [Crittercism leaveBreadcrumb:@"TravelViewController: openParticipantPopup"]; ParticipantEditViewController *detailViewController = [[ParticipantEditViewController alloc] initInManagedObjectContext:[self.travel managedObjectContext] withTravel:self.travel withParticipant:participant]; detailViewController.editDelegate = self; UINavigationController *navController = [[ShadowNavigationController alloc] initWithRootViewController:detailViewController]; navController.delegate = detailViewController; [self presentViewController:navController animated:YES completion:NULL]; [detailViewController release]; [navController release]; } #pragma mark - ParticipantViewControllerEditDelegate - (void)participantWasDeleted:(Participant *)participant { [Crittercism leaveBreadcrumb:@"TravelViewController: participantWasDeleted"]; [self updateSummary]; } #pragma mark - UIAlertViewDelegate - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { [Crittercism leaveBreadcrumb:@"TravelViewController: alertView clickedButtonAtIndex"]; if (alertView == self.rateRefreshAlertView) { [self openTravel:(buttonIndex != [alertView cancelButtonIndex])]; } else if (alertView == self.mailSendAlertView && buttonIndex != self.mailSendAlertView.cancelButtonIndex) { [self sendSummaryMail]; } } #pragma mark - UIActionSheetDelegate - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { [Crittercism leaveBreadcrumb:@"TravelViewController: actionSheet clickedButtonAtIndex"]; if (buttonIndex != actionSheet.cancelButtonIndex) { if ([actionSheet isEqual:self.actionSheetOpenTravel] || [actionSheet isEqual:self.actionSheetOpenTravelNoCurrency] || [actionSheet isEqual:self.actionSheetClosedTravel]) { if (buttonIndex == 0) { [self askToSendEmail]; } else if (buttonIndex == 1) { if ([self.travel isClosed]) { if ([self.travel.currencies count] == 1) { [self openTravel:YES]; } else { [self askToRefreshRatesWhenOpening]; } } else { [self closeTravel]; } } else if (buttonIndex == 2) { [self refreshExchangeRates]; } else if (buttonIndex == 3) { [self openRateEditPopup]; } } else { if (buttonIndex == 0) { [self openPersonAddPopup]; } else if (buttonIndex == 1) { [self openParticipantPopup:nil]; } } } } #pragma mark - RateSelectViewControllerDelegate - (void)willDisappearWithChanges { [Crittercism leaveBreadcrumb:@"TravelViewController: willDisappearWithChanges"]; [self updateSummary]; } #pragma mark - ABPeoplePickerNavigationControllerDelegate - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person { [Crittercism leaveBreadcrumb:@"TravelViewController: peoplePickerNavigationController1"]; BOOL returnValue = YES; ABMultiValueRef *multiValue = (ABMultiValueRef *) ABRecordCopyValue(person, kABPersonEmailProperty); NSArray *emailList = (NSArray *) ABMultiValueCopyArrayOfAllValues(multiValue); if ([emailList count] <= 1) { NSString *email = nil; if ([emailList count] > 0) { email = [emailList objectAtIndex:0]; } [self selectPerson:person withEmail:email]; [[self navigationController] dismissViewControllerAnimated:YES completion:NULL]; returnValue = NO; } CFRelease(multiValue); if (emailList) { CFRelease(emailList); } return returnValue; } - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier { [Crittercism leaveBreadcrumb:@"TravelViewController: peoplePickerNavigationController2"]; ABMultiValueRef *multiValue = (ABMultiValueRef *) ABRecordCopyValue(person, property); CFIndex index = (CFIndex) ABMultiValueGetIndexForIdentifier(multiValue, identifier); NSString *email = (NSString *) ABMultiValueCopyValueAtIndex(multiValue, index); [self selectPerson:person withEmail:email]; [[self navigationController] dismissViewControllerAnimated:YES completion:NULL]; CFRelease(multiValue); CFRelease(email); return NO; } - (void)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker didSelectPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier { [self peoplePickerNavigationController:peoplePicker shouldContinueAfterSelectingPerson:person property:property identifier:identifier]; } - (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker; { [Crittercism leaveBreadcrumb:@"TravelViewController: peoplePickerNavigationControllerDidCancel"]; peoplePicker.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self dismissViewControllerAnimated:YES completion:NULL]; } #pragma mark - UITabBarControllerDelegate - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { [Crittercism leaveBreadcrumb:@"TravelViewController: tabBarController"]; [self updateStateOfNavigationController:viewController]; self.travel.selectedTab = [NSNumber numberWithInt:[tabBarController.viewControllers indexOfObject:viewController]]; [ReiseabrechnungAppDelegate saveContext:[self.travel managedObjectContext]]; if (viewController == self.entrySortViewController) { [self.entrySortViewController updateTotalValue]; } if (viewController == self.summarySortViewController) { [Appirater userDidSignificantEvent:YES]; } [self initHelpBubbleForViewController:viewController]; } - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController { return YES; } #pragma mark - MFMailComposeViewControllerDelegate - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { [Crittercism leaveBreadcrumb:@"TravelViewController: mailComposeController"]; if (result == MFMailComposeResultSent) { NSLog(@"It's away!"); } [self dismissViewControllerAnimated:YES completion:NULL]; } #pragma mark - View lifecycle - (void)loadView { [super loadView]; self.addButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(openAddPopup)] autorelease]; self.navigationItem.rightBarButtonItem = self.addButton; self.actionButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(openActionPopup)] autorelease]; self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; self.participantSortViewController = [[[ParticipantSortViewController alloc] initWithTravel:_travel] autorelease]; self.participantSortViewController.detailViewController.editDelegate = self; self.entrySortViewController = [[[EntrySortViewController alloc] initWithTravel:_travel] autorelease]; self.entrySortViewController.detailViewController.editDelegate = self; self.summarySortViewController = [[[SummarySortViewController alloc] initWithTravel:_travel] autorelease]; self.tabBarController = [[[UITabBarController alloc] init] autorelease]; self.tabBarController.delegate = self; [self.tabBarController setViewControllers:[NSArray arrayWithObjects:self.participantSortViewController, self.entrySortViewController, self.summarySortViewController, nil] animated:NO]; self.tabBarController.selectedIndex = [self.travel.selectedTab intValue]; [self updateStateOfNavigationController:self.tabBarController.selectedViewController]; [self.view addSubview:_tabBarController.view]; self.mailSendAlertView = [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Warning", @"alert title") message:nil delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", @"alert item") otherButtonTitles:NSLocalizedString(@"OK", @"alert item"), nil] autorelease]; self.rateRefreshAlertView = [UIFactory createAlterViewForRefreshingRatesOnOpeningTravel:self]; } - (void)viewDidAppear:(BOOL)animated { [self.participantSortViewController viewDidAppear:animated]; [self.entrySortViewController viewDidAppear:animated]; [self.summarySortViewController viewDidAppear:animated]; [self initHelpBubbleForViewController:self.tabBarController.selectedViewController]; } - (void)viewWillAppear:(BOOL)animated { [self updateTableViewInsets]; } - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { [self updateTableViewInsets]; } #pragma mark View lifecycle - (void)viewDidUnload { [super viewDidUnload]; self.tabBarController = nil; self.participantSortViewController = nil; self.entrySortViewController = nil; self.summarySortViewController = nil; self.addButton = nil; } #pragma mark Memory Management - (void)dealloc { self.tabBarController = nil; self.participantSortViewController = nil; self.entrySortViewController = nil; self.summarySortViewController = nil; self.addButton = nil; self.actionButton = nil; self.rateRefreshAlertView = nil; self.mailSendAlertView = nil; self.actionSheetAddPerson = nil; self.actionSheetClosedTravel = nil; self.actionSheetOpenTravel = nil; self.actionSheetOpenTravelNoCurrency = nil; [super dealloc]; } -(void)viewDidLoad { requestingAd = NO; } //Interstitial iAd -(void)showFullScreenAd { //Check if already requesting ad if (requestingAd == NO) { [ADInterstitialAd release]; interstitial = [[ADInterstitialAd alloc] init]; interstitial.delegate = self; self.interstitialPresentationPolicy = ADInterstitialPresentationPolicyManual; [self requestInterstitialAdPresentation]; NSLog(@"interstitialAdREQUEST"); requestingAd = YES; }//end if } -(void)interstitialAd:(ADInterstitialAd *)interstitialAd didFailWithError:(NSError *)error { interstitial = nil; [interstitialAd release]; [ADInterstitialAd release]; requestingAd = NO; NSLog(@"interstitialAd didFailWithERROR"); NSLog(@"%@", error); } -(void)interstitialAdDidLoad:(ADInterstitialAd *)interstitialAd { NSLog(@"interstitialAdDidLOAD"); if (interstitialAd != nil && interstitial != nil && requestingAd == YES) { _adPlaceholderView = [[UIView alloc] initWithFrame:self.view.bounds]; [self.view addSubview:_adPlaceholderView]; [interstitial presentInView:_adPlaceholderView]; NSLog(@"interstitialAdDidPRESENT"); }//end if } -(void)interstitialAdDidUnload:(ADInterstitialAd *)interstitialAd { interstitial = nil; [interstitialAd release]; [ADInterstitialAd release]; requestingAd = NO; NSLog(@"interstitialAdDidUNLOAD"); } -(void)interstitialAdActionDidFinish:(ADInterstitialAd *)interstitialAd { interstitial = nil; [interstitialAd release]; [ADInterstitialAd release]; [_adPlaceholderView removeFromSuperview]; _adPlaceholderView = nil; requestingAd = NO; NSLog(@"interstitialAdDidFINISH"); } @end
{'content_hash': '026002aca5039c584c6e4f25eb40b551', 'timestamp': '', 'source': 'github', 'line_count': 945, 'max_line_length': 363, 'avg_line_length': 43.113227513227514, 'alnum_prop': 0.7065190712287075, 'repo_name': 'tine2k/tripaccount', 'id': 'da1867d92ba8c894030a7ac801d545b268fceec6', 'size': '41652', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Sources/TravelViewController.m', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '36311'}, {'name': 'Objective-C', 'bytes': '999613'}, {'name': 'Shell', 'bytes': '4090'}]}
import os from flask import Flask from flask.ext import restful app = Flask(__name__) app.config["REDIS_HOST"] = os.environ["REDIS_HOST"] app.config["REDIS_PORT"] = os.environ["REDIS_PORT"] app.config["REDIS_HEALTH_CHECK_CHANNEL"] = os.environ["REDIS_HEALTH_CHECK_CHANNEL"] app.config["REDIS_ID"] = os.environ["REDIS_ID"] api = restful.Api(app) from .publisher import Publisher publisher = Publisher(app) from endpoints_v1 import Pipeline api.add_resource(Pipeline, "/pipeline/v1/publish/<string:channel>")
{'content_hash': '1ee945b1c85e9a9e0e0bdd3901324d2e', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 83, 'avg_line_length': 25.7, 'alnum_prop': 0.7373540856031129, 'repo_name': 'HeqetLabs/pipeline', 'id': '0559737145bdf1db2e5426a5be14f0d516c9b68e', 'size': '514', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'pipeline/__init__.py', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Python', 'bytes': '1960'}]}
<?php /* SVN FILE: $Id$ */ /** * CacheTest file * * Long description for file * * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * * @filesource * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 * @version $Revision$ * @modifiedby $LastChangedBy$ * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!class_exists('Cache')) { require LIBS . 'cache.php'; } /** * CacheTest class * * @package cake * @subpackage cake.tests.cases.libs */ class CacheTest extends CakeTestCase { /** * setUp method * * @access public * @return void */ function setUp() { $this->_cacheDisable = Configure::read('Cache.disable'); Configure::write('Cache.disable', false); $this->_defaultCacheConfig = Cache::config('default'); Cache::config('default', array('engine' => 'File', 'path' => TMP . 'tests')); Cache::engine('File', array('path' => TMP . 'tests')); } /** * tearDown method * * @access public * @return void */ function tearDown() { Configure::write('Cache.disable', $this->_cacheDisable); Cache::config('default', $this->_defaultCacheConfig['settings']); Cache::engine('File'); } /** * testConfig method * * @access public * @return void */ function testConfig() { $settings = array('engine' => 'File', 'path' => TMP . 'tests', 'prefix' => 'cake_test_'); $results = Cache::config('new', $settings); $this->assertEqual($results, Cache::config('new')); } /** * testConfigChange method * * @access public * @return void */ function testConfigChange() { $_cacheConfigSessions = Cache::config('sessions'); $_cacheConfigTests = Cache::config('tests'); $result = Cache::config('sessions', array('engine'=> 'File', 'path' => TMP . 'sessions')); $this->assertEqual($result['settings'], Cache::settings('File')); $result = Cache::config('tests', array('engine'=> 'File', 'path' => TMP . 'tests')); $this->assertEqual($result['settings'], Cache::settings('File')); Cache::config('sessions', $_cacheConfigSessions['settings']); Cache::config('tests', $_cacheConfigTests['settings']); } /** * testWritingWithConfig method * * @access public * @return void */ function testWritingWithConfig() { $_cacheConfigSessions = Cache::config('sessions'); Cache::write('test_somthing', 'this is the test data', 'tests'); $expected = array( 'path' => TMP . 'sessions', 'prefix' => 'cake_', 'lock' => false, 'serialize' => true, 'duration' => 3600, 'probability' => 100, 'engine' => 'File', 'isWindows' => DIRECTORY_SEPARATOR == '\\' ); $this->assertEqual($expected, Cache::settings('File')); Cache::config('sessions', $_cacheConfigSessions['settings']); } /** * testInitSettings method * * @access public * @return void */ function testInitSettings() { Cache::engine('File', array('path' => TMP . 'tests')); $settings = Cache::settings(); $expecting = array( 'engine' => 'File', 'duration'=> 3600, 'probability' => 100, 'path'=> TMP . 'tests', 'prefix'=> 'cake_', 'lock' => false, 'serialize'=> true, 'isWindows' => DIRECTORY_SEPARATOR == '\\' ); $this->assertEqual($settings, $expecting); Cache::engine('File'); } /** * testWriteEmptyValues method * * @access public * @return void */ function testWriteEmptyValues() { Cache::write('App.falseTest', false); $this->assertIdentical(Cache::read('App.falseTest'), false); Cache::write('App.trueTest', true); $this->assertIdentical(Cache::read('App.trueTest'), true); Cache::write('App.nullTest', null); $this->assertIdentical(Cache::read('App.nullTest'), null); Cache::write('App.zeroTest', 0); $this->assertIdentical(Cache::read('App.zeroTest'), 0); Cache::write('App.zeroTest2', '0'); $this->assertIdentical(Cache::read('App.zeroTest2'), '0'); } /** * testCacheDisable method * * Check that the "Cache.disable" configuration and a change to it * (even after a cache config has been setup) is taken into account. * * @link https://trac.cakephp.org/ticket/6236 * @access public * @return void */ function testCacheDisable() { Configure::write('Cache.disable', false); Cache::config('test_cache_disable_1', array('engine'=> 'File', 'path' => TMP . 'tests')); $this->assertTrue(Cache::write('key_1', 'hello')); $this->assertIdentical(Cache::read('key_1'), 'hello'); Configure::write('Cache.disable', true); $this->assertFalse(Cache::write('key_2', 'hello')); $this->assertFalse(Cache::read('key_2')); Configure::write('Cache.disable', false); $this->assertTrue(Cache::write('key_3', 'hello')); $this->assertIdentical(Cache::read('key_3'), 'hello'); Configure::write('Cache.disable', true); Cache::config('test_cache_disable_2', array('engine'=> 'File', 'path' => TMP . 'tests')); $this->assertFalse(Cache::write('key_4', 'hello')); $this->assertFalse(Cache::read('key_4')); Configure::write('Cache.disable', false); $this->assertTrue(Cache::write('key_5', 'hello')); $this->assertIdentical(Cache::read('key_5'), 'hello'); Configure::write('Cache.disable', true); $this->assertFalse(Cache::write('key_6', 'hello')); $this->assertFalse(Cache::read('key_6')); } /** * testSet method * * @access public * @return void */ function testSet() { $_cacheSet = Cache::set(); Cache::set(array('duration' => '+1 year')); $data = Cache::read('test_cache'); $this->assertFalse($data); $data = 'this is just a simple test of the cache system'; $write = Cache::write('test_cache', $data); $this->assertTrue($write); Cache::set(array('duration' => '+1 year')); $data = Cache::read('test_cache'); $this->assertEqual($data, 'this is just a simple test of the cache system'); Cache::delete('test_cache'); $global = Cache::settings(); Cache::set($_cacheSet); } } ?>
{'content_hash': '0f51e4f9c77581c047ee490c98a1e9be', 'timestamp': '', 'source': 'github', 'line_count': 235, 'max_line_length': 101, 'avg_line_length': 27.11063829787234, 'alnum_prop': 0.6380474022916339, 'repo_name': 'kamil-bluechip/cake-1.2.5', 'id': '37d5ec633cfd3f516c29335bec2d15a499938a48', 'size': '6371', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'tests/cases/libs/cache.test.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '326'}, {'name': 'Batchfile', 'bytes': '1128'}, {'name': 'CSS', 'bytes': '7977'}, {'name': 'PHP', 'bytes': '5185848'}, {'name': 'Shell', 'bytes': '987'}]}
class cSimplePlaceableItemHandler final: public cItemHandler { using Super = cItemHandler; public: constexpr cSimplePlaceableItemHandler(int a_ItemType, BLOCKTYPE a_BlockType) : Super(a_ItemType), m_BlockType(a_BlockType) { } virtual bool IsPlaceable(void) const override { return true; } virtual bool CommitPlacement(cPlayer & a_Player, const cItem & a_HeldItem, const Vector3i a_PlacePosition, const eBlockFace a_ClickedBlockFace, const Vector3i a_CursorPosition) const override { return a_Player.PlaceBlock(a_PlacePosition, m_BlockType, 0); } private: BLOCKTYPE m_BlockType; };
{'content_hash': '18791c8db06b08f02815b9e5103e2504', 'timestamp': '', 'source': 'github', 'line_count': 29, 'max_line_length': 192, 'avg_line_length': 21.0, 'alnum_prop': 0.7651888341543513, 'repo_name': 'mc-server/MCServer', 'id': '2bfe756af820483df7f7f670f1c478055715d497', 'size': '653', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'src/Items/SimplePlaceableItemHandler.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '3631'}, {'name': 'C', 'bytes': '6131'}, {'name': 'C++', 'bytes': '5164795'}, {'name': 'CMake', 'bytes': '76147'}, {'name': 'CSS', 'bytes': '12456'}, {'name': 'HTML', 'bytes': '65576'}, {'name': 'Java', 'bytes': '22153'}, {'name': 'JavaScript', 'bytes': '285032'}, {'name': 'Lua', 'bytes': '660057'}, {'name': 'Makefile', 'bytes': '11483'}, {'name': 'Objective-C', 'bytes': '2809'}, {'name': 'QMake', 'bytes': '2927'}, {'name': 'Shell', 'bytes': '9611'}]}
package cern.colt; import cern.colt.function.IntComparator; /** Generically sorts arbitrary shaped data (for example multiple arrays, 1,2 or 3-d matrices, and so on) using a quicksort or mergesort. This class addresses two problems, namely <ul> <li><i>Sorting multiple arrays in sync</i> <li><i>Sorting by multiple sorting criteria</i> (primary, secondary, tertiary, ...) </ul> <h4>Sorting multiple arrays in sync</h4> <p> Assume we have three arrays X, Y and Z. We want to sort all three arrays by X (or some arbitrary comparison function). For example, we have<br> <tt>X=[3, 2, 1], Y=[3.0, 2.0, 1.0], Z=[6.0, 7.0, 8.0]</tt>. The output should be <tt><br> X=[1, 2, 3], Y=[1.0, 2.0, 3.0], Z=[8.0, 7.0, 6.0]</tt>. </p> <p>How can we achive this? Here are several alternatives. We could ... </p> <ol> <li> make a list of Point3D objects, sort the list as desired using a comparison function, then copy the results back into X, Y and Z. The classic object-oriented way. </li> <li>make an index list [0,1,2,...,N-1], sort the index list using a comparison function, then reorder the elements of X,Y,Z as defined by the index list. Reordering cannot be done in-place, so we need to copy X to some temporary array, then copy in the right order back from the temporary into X. Same for Y and Z. </li> <li> use a generic quicksort or mergesort which, whenever two elements in X are swapped, also swaps the corresponding elements in Y and Z. </li> </ol> Alternatives 1 and 2 involve quite a lot of copying and allocate significant amounts of temporary memory. Alternative 3 involves more swapping, more polymorphic message dispatches, no copying and does not need any temporary memory. <p> This class implements alternative 3. It operates on arbitrary shaped data. In fact, it has no idea what kind of data it is sorting. Comparisons and swapping are delegated to user provided objects which know their data and can do the job. <p> Lets call the generic data <tt>g</tt> (it may be one array, three linked lists or whatever). This class takes a user comparison function operating on two indexes <tt>(a,b)</tt>, namely an {@link IntComparator}. The comparison function determines whether <tt>g[a]</tt> is equal, less or greater than <tt>g[b]</tt>. The sort, depending on its implementation, can decide to swap the data at index <tt>a</tt> with the data at index <tt>b</tt>. It calls a user provided {@link cern.colt.Swapper} object that knows how to swap the data of these indexes. <p>The following snippet shows how to solve the problem. <table> <td class="PRE"> <pre> final int[] x; final double[] y; final double[] z; x = new int[] {3, 2, 1 }; y = new double[] {3.0, 2.0, 1.0}; z = new double[] {6.0, 7.0, 8.0}; // this one knows how to swap two indexes (a,b) Swapper swapper = new Swapper() { &nbsp;&nbsp;&nbsp;public void swap(int a, int b) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int t1; double t2, t3; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t1 = x[a]; x[a] = x[b]; x[b] = t1; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t2 = y[a]; y[a] = y[b]; y[b] = t2; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t3 = z[a]; z[a] = z[b]; z[b] = t3; &nbsp;&nbsp;&nbsp;} }; // simple comparison: compare by X and ignore Y,Z<br> IntComparator comp = new IntComparator() { &nbsp;&nbsp;&nbsp;public int compare(int a, int b) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return x[a]==x[b] ? 0 : (x[a]&lt;x[b] ? -1 : 1); &nbsp;&nbsp;&nbsp;} }; System.out.println("before:"); System.out.println("X="+Arrays.toString(x)); System.out.println("Y="+Arrays.toString(y)); System.out.println("Z="+Arrays.toString(z)); GenericSorting.quickSort(0, X.length, comp, swapper); // GenericSorting.mergeSort(0, X.length, comp, swapper); System.out.println("after:"); System.out.println("X="+Arrays.toString(x)); System.out.println("Y="+Arrays.toString(y)); System.out.println("Z="+Arrays.toString(z)); </pre> </td> </table> <h4>Sorting by multiple sorting criterias (primary, secondary, tertiary, ...)</h4> <p>Assume again we have three arrays X, Y and Z. Now we want to sort all three arrays, primarily by Y, secondarily by Z (if Y elements are equal). For example, we have<br> <tt>X=[6, 7, 8, 9], Y=[3.0, 2.0, 1.0, 3.0], Z=[5.0, 4.0, 4.0, 1.0]</tt>. The output should be <tt><br> X=[8, 7, 9, 6], Y=[1.0, 2.0, 3.0, 3.0], Z=[4.0, 4.0, 1.0, 5.0]</tt>. </p> <p>Here is how to solve the problem. All code in the above example stays the same, except that we modify the comparison function as follows</p> <table> <td class="PRE"> <pre> //compare by Y, if that doesn't help, reside to Z IntComparator comp = new IntComparator() { &nbsp;&nbsp;&nbsp;public int compare(int a, int b) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (y[a]==y[b]) return z[a]==z[b] ? 0 : (z[a]&lt;z[b] ? -1 : 1); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return y[a]&lt;y[b] ? -1 : 1; &nbsp;&nbsp;&nbsp;} }; </pre> </td> </table> <h4>Notes</h4> <p></p> <p> Sorts involving floating point data and not involving comparators, like, for example provided in the JDK {@link java.util.Arrays} and in the Colt {@link cern.colt.Sorting} handle floating point numbers in special ways to guarantee that NaN's are swapped to the end and -0.0 comes before 0.0. Methods delegating to comparators cannot do this. They rely on the comparator. Thus, if such boundary cases are an issue for the application at hand, comparators explicitly need to implement -0.0 and NaN aware comparisons. Remember: <tt>-0.0 < 0.0 == false</tt>, <tt>(-0.0 == 0.0) == true</tt>, as well as <tt>5.0 &lt; Double.NaN == false</tt>, <tt>5.0 &gt; Double.NaN == false</tt>. Same for <tt>float</tt>. <h4>Implementation </h4> <p>The quicksort is a derivative of the JDK 1.2 V1.26 algorithms (which are, in turn, based on Bentley's and McIlroy's fine work). The mergesort is a derivative of the JAL algorithms, with optimisations taken from the JDK algorithms. Both quick and merge sort are "in-place", i.e. do not allocate temporary memory (helper arrays). Mergesort is <i>stable</i> (by definition), while quicksort is not. A stable sort is, for example, helpful, if matrices are sorted successively by multiple columns. It preserves the relative position of equal elements. @see java.util.Arrays @see cern.colt.Sorting @see cern.colt.matrix.doublealgo.Sorting @author [email protected] @version 1.0, 03-Jul-99 */ public class GenericSorting extends Object { private static final int SMALL = 7; private static final int MEDIUM = 40; /** * Makes this class non instantiable, but still let's others inherit from it. */ protected GenericSorting() {} /** * Transforms two consecutive sorted ranges into a single sorted * range. The initial ranges are <code>[first, middle)</code> * and <code>[middle, last)</code>, and the resulting range is * <code>[first, last)</code>. * Elements in the first input range will precede equal elements in the * second. */ private static void inplace_merge(int first, int middle, int last, IntComparator comp, Swapper swapper) { if (first >= middle || middle >= last) return; if (last - first == 2) { if (comp.compare(middle, first)<0) { swapper.swap(first,middle); } return; } int firstCut; int secondCut; if (middle - first > last - middle) { firstCut = first + (middle - first) / 2; secondCut = lower_bound(middle, last, firstCut, comp); } else { secondCut = middle + (last - middle) / 2; firstCut = upper_bound(first, middle, secondCut, comp); } // rotate(firstCut, middle, secondCut, swapper); // is manually inlined for speed (jitter inlining seems to work only for small call depths, even if methods are "static private") // speedup = 1.7 // begin inline int first2 = firstCut; int middle2 = middle; int last2 = secondCut; if (middle2 != first2 && middle2 != last2) { int first1 = first2; int last1 = middle2; while (first1 < --last1) swapper.swap(first1++,last1); first1 = middle2; last1 = last2; while (first1 < --last1) swapper.swap(first1++,last1); first1 = first2; last1 = last2; while (first1 < --last1) swapper.swap(first1++,last1); } // end inline middle = firstCut + (secondCut - middle); inplace_merge(first, firstCut, middle, comp, swapper); inplace_merge(middle, secondCut, last, comp, swapper); } /** * Performs a binary search on an already-sorted range: finds the first * position where an element can be inserted without violating the ordering. * Sorting is by a user-supplied comparison function. * @param array Array containing the range. * @param first Beginning of the range. * @param last One past the end of the range. * @param x Element to be searched for. * @param comp Comparison function. * @return The largest index i such that, for every j in the * range <code>[first, i)</code>, * <code>comp.apply(array[j], x)</code> is * <code>true</code>. * @see Sorting#upper_bound * @see Sorting#equal_range * @see Sorting#binary_search */ private static int lower_bound(int first, int last, int x, IntComparator comp) { //if (comp==null) throw new NullPointerException(); int len = last - first; while (len > 0) { int half = len / 2; int middle = first + half; if (comp.compare(middle, x)<0) { first = middle + 1; len -= half + 1; } else { len = half; } } return first; } /** * Returns the index of the median of the three indexed chars. */ private static int med3(int a, int b, int c, IntComparator comp) { int ab = comp.compare(a,b); int ac = comp.compare(a,c); int bc = comp.compare(b,c); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); } /** * Sorts the specified range of elements according * to the order induced by the specified comparator. All elements in the * range must be <i>mutually comparable</i> by the specified comparator * (that is, <tt>c.compare(a, b)</tt> must not throw an * exception for any indexes <tt>a</tt> and * <tt>b</tt> in the range).<p> * * This sort is guaranteed to be <i>stable</i>: equal elements will * not be reordered as a result of the sort.<p> * * The sorting algorithm is a modified mergesort (in which the merge is * omitted if the highest element in the low sublist is less than the * lowest element in the high sublist). This algorithm offers guaranteed * n*log(n) performance, and can approach linear performance on nearly * sorted lists. * * @param fromIndex the index of the first element (inclusive) to be sorted. * @param toIndex the index of the last element (exclusive) to be sorted. * @param c the comparator to determine the order of the generic data. * @param swapper an object that knows how to swap the elements at any two indexes (a,b). * * @see IntComparator * @see Swapper */ public static void mergeSort(int fromIndex, int toIndex, IntComparator c, Swapper swapper) { /* We retain the same method signature as quickSort. Given only a comparator and swapper we do not know how to copy and move elements from/to temporary arrays. Hence, in contrast to the JDK mergesorts this is an "in-place" mergesort, i.e. does not allocate any temporary arrays. A non-inplace mergesort would perhaps be faster in most cases, but would require non-intuitive delegate objects... */ int length = toIndex - fromIndex; // Insertion sort on smallest arrays if (length < SMALL) { for (int i = fromIndex; i < toIndex; i++) { for (int j = i; j > fromIndex && (c.compare(j - 1, j) > 0); j--) { swapper.swap(j, j - 1); } } return; } // Recursively sort halves int mid = (fromIndex + toIndex) / 2; mergeSort(fromIndex, mid, c, swapper); mergeSort(mid, toIndex, c, swapper); // If list is already sorted, nothing left to do. This is an // optimization that results in faster sorts for nearly ordered lists. if (c.compare(mid - 1, mid) <= 0) return; // Merge sorted halves inplace_merge(fromIndex, mid, toIndex, c, swapper); } /** * Sorts the specified range of elements according * to the order induced by the specified comparator. All elements in the * range must be <i>mutually comparable</i> by the specified comparator * (that is, <tt>c.compare(a, b)</tt> must not throw an * exception for any indexes <tt>a</tt> and * <tt>b</tt> in the range).<p> * * The sorting algorithm is a tuned quicksort, * adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a * Sort Function", Software-Practice and Experience, Vol. 23(11) * P. 1249-1265 (November 1993). This algorithm offers n*log(n) * performance on many data sets that cause other quicksorts to degrade to * quadratic performance. * * @param fromIndex the index of the first element (inclusive) to be sorted. * @param toIndex the index of the last element (exclusive) to be sorted. * @param c the comparator to determine the order of the generic data. * @param swapper an object that knows how to swap the elements at any two indexes (a,b). * * @see IntComparator * @see Swapper */ public static void quickSort(int fromIndex, int toIndex, IntComparator c, Swapper swapper) { quickSort1(fromIndex, toIndex-fromIndex, c, swapper); } /** * Sorts the specified sub-array into ascending order. */ private static void quickSort1(int off, int len, IntComparator comp, Swapper swapper) { // Insertion sort on smallest arrays if (len < SMALL) { for (int i=off; i<len+off; i++) for (int j=i; j>off && (comp.compare(j-1,j)>0); j--) { swapper.swap(j, j-1); } return; } // Choose a partition element, v int m = off + len/2; // Small arrays, middle element if (len > SMALL) { int l = off; int n = off + len - 1; if (len > MEDIUM) { // Big arrays, pseudomedian of 9 int s = len/8; l = med3(l, l+s, l+2*s, comp); m = med3(m-s, m, m+s, comp); n = med3(n-2*s, n-s, n, comp); } m = med3(l, m, n, comp); // Mid-size, med of 3 } //long v = x[m]; // Establish Invariant: v* (<v)* (>v)* v* int a = off, b = a, c = off + len - 1, d = c; while(true) { int comparison; while (b <= c && ((comparison=comp.compare(b,m))<=0)) { if (comparison == 0) { if (a==m) m = b; // moving target; DELTA to JDK !!! else if (b==m) m = a; // moving target; DELTA to JDK !!! swapper.swap(a++, b); } b++; } while (c >= b && ((comparison=comp.compare(c,m))>=0)) { if (comparison == 0) { if (c==m) m = d; // moving target; DELTA to JDK !!! else if (d==m) m = c; // moving target; DELTA to JDK !!! swapper.swap(c, d--); } c--; } if (b > c) break; if (b==m) m = d; // moving target; DELTA to JDK !!! else if (c==m) m = c; // moving target; DELTA to JDK !!! swapper.swap(b++, c--); } // Swap partition elements back to middle int s, n = off + len; s = Math.min(a-off, b-a ); vecswap(swapper, off, b-s, s); s = Math.min(d-c, n-d-1); vecswap(swapper, b, n-s, s); // Recursively sort non-partition-elements if ((s = b-a) > 1) quickSort1(off, s, comp, swapper); if ((s = d-c) > 1) quickSort1(n-s, s, comp, swapper); } /** * Reverses a sequence of elements. * @param array Array containing the sequence * @param first Beginning of the range * @param last One past the end of the range * @exception ArrayIndexOutOfBoundsException If the range * is invalid. */ private static void reverse(int first, int last, Swapper swapper) { // no more needed since manually inlined while (first < --last) { swapper.swap(first++,last); } } /** * Rotate a range in place: <code>array[middle]</code> is put in * <code>array[first]</code>, <code>array[middle+1]</code> is put in * <code>array[first+1]</code>, etc. Generally, the element in position * <code>i</code> is put into position * <code>(i + (last-middle)) % (last-first)</code>. * @param array Array containing the range * @param first Beginning of the range * @param middle Index of the element that will be put in * <code>array[first]</code> * @param last One past the end of the range */ private static void rotate(int first, int middle, int last, Swapper swapper) { // no more needed since manually inlined if (middle != first && middle != last) { reverse(first, middle, swapper); reverse(middle, last, swapper); reverse(first, last, swapper); } } /** * Performs a binary search on an already-sorted range: finds the last * position where an element can be inserted without violating the ordering. * Sorting is by a user-supplied comparison function. * @param array Array containing the range. * @param first Beginning of the range. * @param last One past the end of the range. * @param x Element to be searched for. * @param comp Comparison function. * @return The largest index i such that, for every j in the * range <code>[first, i)</code>, * <code>comp.apply(x, array[j])</code> is * <code>false</code>. * @see Sorting#lower_bound * @see Sorting#equal_range * @see Sorting#binary_search */ private static int upper_bound(int first, int last, int x, IntComparator comp) { //if (comp==null) throw new NullPointerException(); int len = last - first; while (len > 0) { int half = len / 2; int middle = first + half; if (comp.compare(x, middle)<0) { len = half; } else { first = middle + 1; len -= half + 1; } } return first; } /** * Swaps x[a .. (a+n-1)] with x[b .. (b+n-1)]. */ private static void vecswap(Swapper swapper, int a, int b, int n) { for (int i=0; i<n; i++, a++, b++) swapper.swap(a, b); } }
{'content_hash': 'a3659b54472cbe7e330e784943a0c7e3', 'timestamp': '', 'source': 'github', 'line_count': 458, 'max_line_length': 147, 'avg_line_length': 39.54585152838428, 'alnum_prop': 0.6450419611307421, 'repo_name': 'tobyclemson/msci-project', 'id': '373d3d7bf3d7b0a815d6af7e5b199fabb8584967', 'size': '18643', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'vendor/colt-1.2.0/src/cern/colt/GenericSorting.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '89867'}, {'name': 'Ruby', 'bytes': '137019'}]}
Astro.createValidator({ name: 'object', validate: _.isObject, events: { validationerror: function(e) { var fieldName = e.data.field; e.data.message = 'The "' + fieldName + '" field\'s value has to be an object'; } } });
{'content_hash': '0794c3421032c8cdd0b59dee5e22c5cb', 'timestamp': '', 'source': 'github', 'line_count': 12, 'max_line_length': 47, 'avg_line_length': 21.416666666666668, 'alnum_prop': 0.5758754863813229, 'repo_name': 'ribbedcrown/meteor-astronomy-validators', 'id': '9ad5340a68bf5214c9c46ef843f25517aa53ef08', 'size': '257', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'lib/validators/type/object.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '39518'}]}
using SimpleFramework.Xml.Strategy; using SimpleFramework.Xml.Stream; using SimpleFramework.Xml; using System; #endregion namespace SimpleFramework.Xml.Core { /// <summary> /// The <c>ElementLabel</c> represents a label that is used to /// represent an XML element in a class schema. This element can be /// used to convert an XML node into either a primitive value such as /// a string or composite object value, which is itself a schema for /// a section of XML within the XML document. /// </summary> /// <seealso> /// SimpleFramework.Xml.Element /// </seealso> class ElementLabel : Label { /// <summary> /// This is the decorator that is associated with the element. /// </summary> private Decorator decorator; /// <summary> /// The contact that this element label represents. /// </summary> private Signature detail; /// <summary> /// References the annotation that was used by the field. /// </summary> private Element label; /// <summary> /// This is the type of the class that the field references. /// </summary> private Class type; /// <summary> /// This is the name of the element for this label instance. /// </summary> private String name; /// <summary> /// Constructor for the <c>ElementLabel</c> object. This is /// used to create a label that can convert a XML node into a /// composite object or a primitive type from an XML element. /// </summary> /// <param name="contact"> /// this is the field that this label represents /// </param> /// <param name="label"> /// this is the annotation for the contact /// </param> public ElementLabel(Contact contact, Element label) { this.detail = new Signature(contact, this); this.decorator = new Qualifier(contact); this.type = contact.Type; this.name = label.name(); this.label = label; } /// <summary> /// This is used to acquire the <c>Decorator</c> for this. /// A decorator is an object that adds various details to the /// node without changing the overall structure of the node. For /// example comments and namespaces can be added to the node with /// a decorator as they do not affect the deserialization. /// </summary> /// <returns> /// this returns the decorator associated with this /// </returns> public Decorator Decorator { get { return decorator; } } //public Decorator GetDecorator() { // return decorator; //} /// Creates a converter that can be used to transform an XML node to /// an object and vice versa. The converter created will handles /// only XML elements and requires the context object to be provided. /// </summary> /// <param name="context"> /// this is the context object used for serialization /// </param> /// <returns> /// this returns a converter for serializing XML elements /// </returns> public Converter GetConverter(Context context) { Type type = Contact; if(context.isPrimitive(type)) { return new Primitive(context, type); } return new Composite(context, type); } /// <summary> /// This is used to acquire the name of the element or attribute /// that is used by the class schema. The name is determined by /// checking for an override within the annotation. If it contains /// a name then that is used, if however the annotation does not /// specify a name the the field or method name is used instead. /// </summary> /// <param name="context"> /// this is used to provide a styled name /// </param> /// <returns> /// returns the name that is used for the XML property /// </returns> public String GetName(Context context) { Style style = context.getStyle(); String name = detail.GetName(); return style.getElement(name); } /// <summary> /// This is used to provide a configured empty value used when the /// annotated value is null. This ensures that XML can be created /// with required details regardless of whether values are null or /// not. It also provides a means for sensible default values. /// </summary> /// <param name="context"> /// this is the context object for the serialization /// </param> /// <returns> /// this returns the string to use for default values /// </returns> public Object GetEmpty(Context context) { return null; } /// <summary> /// This is used to acquire the name of the element or attribute /// that is used by the class schema. The name is determined by /// checking for an override within the annotation. If it contains /// a name then that is used, if however the annotation does not /// specify a name the the field or method name is used instead. /// </summary> /// <returns> /// returns the name that is used for the XML property /// </returns> public String Name { get { return detail.GetName(); } } //public String GetName() { // return detail.GetName(); //} /// This is used to acquire the contact object for this label. The /// contact retrieved can be used to set any object or primitive that /// has been deserialized, and can also be used to acquire values to /// be serialized in the case of object persistence. All contacts /// that are retrieved from this method will be accessible. /// </summary> /// <returns> /// returns the contact that this label is representing /// </returns> public Contact Contact { get { return detail.Contact; } } //public Contact GetContact() { // return detail.Contact; //} /// This is used to acquire the name of the element or attribute /// as taken from the annotation. If the element or attribute /// explicitly specifies a name then that name is used for the /// XML element or attribute used. If however no overriding name /// is provided then the method or field is used for the name. /// </summary> /// <returns> /// returns the name of the annotation for the contact /// </returns> public String Override { get { return name; } } //public String GetOverride() { // return name; //} /// This acts as a convenience method used to determine the type of /// contact this represents. This is used when an object is written /// to XML. It determines whether a <c>class</c> attribute /// is required within the serialized XML element, that is, if the /// class returned by this is different from the actual value of the /// object to be serialized then that type needs to be remembered. /// </summary> /// <returns> /// this returns the type of the contact class /// </returns> public Class Type { get { return type; } } //public Class GetType() { // return type; //} /// This is typically used to acquire the entry value as acquired /// from the annotation. However given that the annotation this /// represents does not have a entry attribute this will always /// provide a null value for the entry string. /// </summary> /// <returns> /// this will always return null for the entry value /// </returns> public String Entry { get { return null; } } //public String GetEntry() { // return null; //} /// This is used to acquire the dependent class for this label. /// This returns null as there are no dependents to the element /// annotation as it can only hold primitives with no dependents. /// </summary> /// <returns> /// this is used to return the dependent type of null /// </returns> public Type Dependent { get { return null; } } //public Type GetDependent() { // return null; //} /// This method is used to determine if the label represents an /// attribute. This is used to style the name so that elements /// are styled as elements and attributes are styled as required. /// </summary> /// <returns> /// this is used to determine if this is an attribute /// </returns> public bool IsAttribute() { return false; } /// <summary> /// This is used to determine if the label is a collection. If the /// label represents a collection then any original assignment to /// the field or method can be written to without the need to /// create a new collection. This allows obscure collections to be /// used and also allows initial entries to be maintained. /// </summary> /// <returns> /// true if the label represents a collection value /// </returns> public bool IsCollection() { return false; } /// <summary> /// This is used to determine whether the XML element is required. /// This ensures that if an XML element is missing from a document /// that deserialization can continue. Also, in the process of /// serialization, if a value is null it does not need to be /// written to the resulting XML document. /// </summary> /// <returns> /// true if the label represents a some required data /// </returns> public bool IsRequired() { return label.required(); } /// <summary> /// This is used to determine whether the annotation requires it /// and its children to be written as a CDATA block. This is done /// when a primitive or other such element requires a text value /// and that value needs to be encapsulated within a CDATA block. /// </summary> /// <returns> /// this returns true if the element requires CDATA /// </returns> public bool IsData() { return label.data(); } /// <summary> /// This method is used by the deserialization process to check /// to see if an annotation is inline or not. If an annotation /// represents an inline XML entity then the deserialization /// and serialization process ignores overrides and special /// attributes. By default all XML elements are not inline. /// </summary> /// <returns> /// this always returns false for element labels /// </returns> public bool IsInline() { return false; } /// <summary> /// This is used to describe the annotation and method or field /// that this label represents. This is used to provide error /// messages that can be used to debug issues that occur when /// processing a method. This will provide enough information /// such that the problem can be isolated correctly. /// </summary> /// <returns> /// this returns a string representation of the label /// </returns> public String ToString() { return detail.ToString(); } } }
{'content_hash': '713d07dc3ea967e420e40a8109ebaa8b', 'timestamp': '', 'source': 'github', 'line_count': 300, 'max_line_length': 75, 'avg_line_length': 38.626666666666665, 'alnum_prop': 0.5998446668967898, 'repo_name': 'ngallagher/simplexml', 'id': '3fa204fcee8864ff9f53418cbdc530938e7600b9', 'size': '12297', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'port/src/main/Xml/Core/ElementLabel.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '2876322'}, {'name': 'Java', 'bytes': '3359734'}, {'name': 'Shell', 'bytes': '922'}]}
$(function() { var tree_null = createInfoDiv("tree_null"); var tree_close = createInfoDiv("tree_close"); initInfoDiv("tree_open_first"); initInfoDiv("tree_open_second"); var tree_other = createInfoDiv("tree_other"); var tree_first = createInfoDiv("tree_first"); var tree_second = createInfoDiv("tree_second"); initInfoDiv("tree_true_first"); initInfoDiv("tree_true_second"); var fieldset_null = new Fieldset( "fieldset_null", "初始状态为空"); fieldset_null.addElement( tree_null ); fieldset_null.width("600px"); var fieldset_close = new Fieldset( "fieldset_close", "初始状态为关闭",Fieldset.CLOSE_STATE); fieldset_close.addElement( tree_close ); var fieldset_open = new Fieldset( "fieldset_open", "初始状态为打开",Fieldset.OPEN_STATE); var fieldset_other = new Fieldset( "fieldset_other", "初始状态为其它","a"); fieldset_other.addElement( tree_other ); var fieldset_other = new Fieldset( "fieldset_two", "包含2个控件",Fieldset.OPEN_STATE); fieldset_other.addElement( tree_first ); fieldset_other.addElement( tree_second ); //var fieldset_true = new Fieldset( "fieldset_true", "fieldset元素",Fieldset.OPEN_STATE); }); function createInfoDiv(_id){ var result = $("<div>显示信息</div>"); result.attr("id",_id); return result; } function initInfoDiv(_id){ $("#" + _id).html("<div>显示信息</div>"); } function initFieldsetTree(_id){ /* var result = new PorTreeT(_id, "test", "组织机构" ); var treedw = new DataWrapper(); treedw.service("PRorgTree"); result.dataWrapper(treedw); result.init(); return result; */ };
{'content_hash': 'c4f547beca8f5940fd28e1801e055e83', 'timestamp': '', 'source': 'github', 'line_count': 46, 'max_line_length': 88, 'avg_line_length': 33.608695652173914, 'alnum_prop': 0.6811125485122898, 'repo_name': 'stserp/erp1', 'id': '376a90c60b9e054dba3237f8dd29c6357e35ef07', 'size': '1638', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'source/web/por2/demo/Fieldset/fieldset.js', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ASP', 'bytes': '44086'}, {'name': 'CSS', 'bytes': '305836'}, {'name': 'ColdFusion', 'bytes': '126937'}, {'name': 'HTML', 'bytes': '490616'}, {'name': 'Java', 'bytes': '21647120'}, {'name': 'JavaScript', 'bytes': '6599859'}, {'name': 'Lasso', 'bytes': '18060'}, {'name': 'PHP', 'bytes': '41541'}, {'name': 'Perl', 'bytes': '20182'}, {'name': 'Perl 6', 'bytes': '21700'}, {'name': 'Python', 'bytes': '39177'}, {'name': 'SourcePawn', 'bytes': '111'}, {'name': 'XSLT', 'bytes': '3404'}]}
Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Rule** | **[]string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
{'content_hash': '8932d53e62b4ba45d2784300e98ca7ff', 'timestamp': '', 'source': 'github', 'line_count': 7, 'max_line_length': 161, 'avg_line_length': 43.0, 'alnum_prop': 0.5182724252491694, 'repo_name': 'Telestream/telestream-cloud-go-sdk', 'id': '1a4a03076a414862baeb78a4ae9118f7f3d049a4', 'size': '329', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'qc/docs/As11Rules.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Go', 'bytes': '600904'}, {'name': 'Shell', 'bytes': '1664'}]}