text:
<!doctype html>

    <title>Code coverage report for ol/coordinate.js</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../prettify.css" />
    <link rel="stylesheet" href="../base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">

      all files / ol/ coordinate.js

        100%
        Statements
        84/84

        90.91%
        Branches
        20/22

        100%
        Functions
        15/15

        100%
        Lines
        84/84

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356	1×
1×
1×

1×
1×

1×

1×

1×
3×
3×
3×

1×
35×
35×
35×
35×
35×
35×
35×
35×
35×
35×
35×

35×
35×
11×
11×
24×
18×
18×

6×
6×

35×

1×
2×

2×

1×
2×
2×
2×

1×
9×
8×

1×

1×
41×
41×
56×
26×
26×

41×

1×
2×
2×
2×
2×
2×
2×
2×

1×
2×
2×
2×

1×
2×
2×
2×

1×
64×
64×
64×

1×
22×

1×
2×
1×

1×

1×
4×

1×
6×
6×
2×

4×

goog.provide('ol.Coordinate');
goog.provide('ol.CoordinateFormatType');
goog.provide('ol.coordinate');

goog.require('goog.math');
goog.require('goog.string');

/**
 * A function that takes a {@link ol.Coordinate} and transforms it into a
 * `{string}`.
 *
 * @typedef {function((ol.Coordinate|undefined)): string}
 * @api stable
 */
ol.CoordinateFormatType;

/**
 * An array of numbers representing an xy coordinate. Example: `[16, 48]`.
 * @typedef {Array.<number>} ol.Coordinate
 * @api stable
 */
ol.Coordinate;

/**
 * Add `delta` to `coordinate`. `coordinate` is modified in place and returned
 * by the function.
 *
 * Example:
 *
 *     var coord = [7.85, 47.983333];
 *     ol.coordinate.add(coord, [-2, 4]);
 *     // coord is now [5.85, 51.983333]
 *
 * @param {ol.Coordinate} coordinate Coordinate.
 * @param {ol.Coordinate} delta Delta.
 * @return {ol.Coordinate} The input coordinate adjusted by the given delta.
 * @api stable
 */
ol.coordinate.add = function(coordinate, delta) {
  coordinate[0] += delta[0];
  coordinate[1] += delta[1];
  return coordinate;
};

/**
 * Calculates the point closest to the passed coordinate on the passed segment.
 * This is the foot of the perpendicular of the coordinate to the segment when
 * the foot is on the segment, or the closest segment coordinate when the foot
 * is outside the segment.
 *
 * @param {ol.Coordinate} coordinate The coordinate.
 * @param {Array.<ol.Coordinate>} segment The two coordinates of the segment.
 * @return {ol.Coordinate} The foot of the perpendicular of the coordinate to
 *     the segment.
 */
ol.coordinate.closestOnSegment = function(coordinate, segment) {
  var x0 = coordinate[0];
  var y0 = coordinate[1];
  var start = segment[0];
  var end = segment[1];
  var x1 = start[0];
  var y1 = start[1];
  var x2 = end[0];
  var y2 = end[1];
  var dx = x2 - x1;
  var dy = y2 - y1;
  var along = (dx === 0 && dy === 0) ? 0 :
      ((dx * (x0 - x1)) + (dy * (y0 - y1))) / ((dx * dx + dy * dy) || 0);
  var x, y;
  if (along <= 0) {
    x = x1;
    y = y1;
  } else if (along >= 1) {
    x = x2;
    y = y2;
  } else {
    x = x1 + along * dx;
    y = y1 + along * dy;
  }
  return [x, y];
};

/**
 * Returns a {@link ol.CoordinateFormatType} function that can be used to format
 * a {ol.Coordinate} to a string.
 *
 * Example without specifying the fractional digits:
 *
 *     var coord = [7.85, 47.983333];
 *     var stringifyFunc = ol.coordinate.createStringXY();
 *     var out = stringifyFunc(coord);
 *     // out is now '8, 48'
 *
 * Example with explicitly specifying 2 fractional digits:
 *
 *     var coord = [7.85, 47.983333];
 *     var stringifyFunc = ol.coordinate.createStringXY(2);
 *     var out = stringifyFunc(coord);
 *     // out is now '7.85, 47.98'
 *
 * @param {number=} opt_fractionDigits The number of digits to include
 *    after the decimal point. Default is `0`.
 * @return {ol.CoordinateFormatType} Coordinate format.
 * @api stable
 */
ol.coordinate.createStringXY = function(opt_fractionDigits) {
  return (
      /**
       * @param {ol.Coordinate|undefined} coordinate Coordinate.
       * @return {string} String XY.
       */
      function(coordinate) {
        return ol.coordinate.toStringXY(coordinate, opt_fractionDigits);
      });
};

/**
 * @private
 * @param {number} degrees Degrees.
 * @param {string} hemispheres Hemispheres.
 * @return {string} String.
 */
ol.coordinate.degreesToStringHDMS_ = function(degrees, hemispheres) {
  var normalizedDegrees = goog.math.modulo(degrees + 180, 360) - 180;
  var x = Math.abs(Math.round(3600 * normalizedDegrees));
  return Math.floor(x / 3600) + '\u00b0 ' +
      goog.string.padNumber(Math.floor((x / 60) % 60), 2) + '\u2032 ' +
      goog.string.padNumber(Math.floor(x % 60), 2) + '\u2033 ' +
      hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0);
};

/**
 * Transforms the given {@link ol.Coordinate} to a string using the given string
 * template. The strings `{x}` and `{y}` in the template will be replaced with
 * the first and second coordinate values respectively.
 *
 * Example without specifying the fractional digits:
 *
 *     var coord = [7.85, 47.983333];
 *     var template = 'Coordinate is ({x}|{y}).';
 *     var out = ol.coordinate.format(coord, template);
 *     // out is now 'Coordinate is (8|48).'
 *
 * Example explicitly specifying the fractional digits:
 *
 *     var coord = [7.85, 47.983333];
 *     var template = 'Coordinate is ({x}|{y}).';
 *     var out = ol.coordinate.format(coord, template, 2);
 *     // out is now 'Coordinate is (7.85|47.98).'
 *
 * @param {ol.Coordinate|undefined} coordinate Coordinate.
 * @param {string} template A template string with `{x}` and `{y}` placeholders
 *     that will be replaced by first and second coordinate values.
 * @param {number=} opt_fractionDigits The number of digits to include
 *    after the decimal point. Default is `0`.
 * @return {string} Formatted coordinate.
 * @api stable
 */
ol.coordinate.format = function(coordinate, template, opt_fractionDigits) {
  if (coordinate) {
    return template
      .replace('{x}', coordinate[0].toFixed(opt_fractionDigits))
      .replace('{y}', coordinate[1].toFixed(opt_fractionDigits));
  } else {
    return '';
  }
};

/**
 * @param {ol.Coordinate} coordinate1 First coordinate.
 * @param {ol.Coordinate} coordinate2 Second coordinate.
 * @return {boolean} Whether the passed coordinates are equal.
 */
ol.coordinate.equals = function(coordinate1, coordinate2) {
  var equals = true;
  for (var i = coordinate1.length - 1; i >= 0; --i) {
    if (coordinate1[i] != coordinate2[i]) {
      equals = false;
      break;
    }
  }
  return equals;
};

/**
 * Rotate `coordinate` by `angle`. `coordinate` is modified in place and
 * returned by the function.
 *
 * Example:
 *
 *     var coord = [7.85, 47.983333];
 *     var rotateRadians = Math.PI / 2; // 90 degrees
 *     ol.coordinate.rotate(coord, rotateRadians);
 *     // coord is now [-47.983333, 7.85]
 *
 * @param {ol.Coordinate} coordinate Coordinate.
 * @param {number} angle Angle in radian.
 * @return {ol.Coordinate} Coordinate.
 * @api stable
 */
ol.coordinate.rotate = function(coordinate, angle) {
  var cosAngle = Math.cos(angle);
  var sinAngle = Math.sin(angle);
  var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;
  var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;
  coordinate[0] = x;
  coordinate[1] = y;
  return coordinate;
};

/**
 * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned
 * by the function.
 *
 * Example:
 *
 *     var coord = [7.85, 47.983333];
 *     var scale = 1.2;
 *     ol.coordinate.scale(coord, scale);
 *     // coord is now [9.42, 57.5799996]
 *
 * @param {ol.Coordinate} coordinate Coordinate.
 * @param {number} scale Scale factor.
 * @return {ol.Coordinate} Coordinate.
 */
ol.coordinate.scale = function(coordinate, scale) {
  coordinate[0] *= scale;
  coordinate[1] *= scale;
  return coordinate;
};

/**
 * Subtract `delta` to `coordinate`. `coordinate` is modified in place and
 * returned by the function.
 *
 * @param {ol.Coordinate} coordinate Coordinate.
 * @param {ol.Coordinate} delta Delta.
 * @return {ol.Coordinate} Coordinate.
 */
ol.coordinate.sub = function(coordinate, delta) {
  coordinate[0] -= delta[0];
  coordinate[1] -= delta[1];
  return coordinate;
};

/**
 * @param {ol.Coordinate} coord1 First coordinate.
 * @param {ol.Coordinate} coord2 Second coordinate.
 * @return {number} Squared distance between coord1 and coord2.
 */
ol.coordinate.squaredDistance = function(coord1, coord2) {
  var dx = coord1[0] - coord2[0];
  var dy = coord1[1] - coord2[1];
  return dx * dx + dy * dy;
};

/**
 * Calculate the squared distance from a coordinate to a line segment.
 *
 * @param {ol.Coordinate} coordinate Coordinate of the point.
 * @param {Array.<ol.Coordinate>} segment Line segment (2 coordinates).
 * @return {number} Squared distance from the point to the line segment.
 */
ol.coordinate.squaredDistanceToSegment = function(coordinate, segment) {
  return ol.coordinate.squaredDistance(coordinate,
      ol.coordinate.closestOnSegment(coordinate, segment));
};

/**
 * Format a geographic coordinate with the hemisphere, degrees, minutes, and
 * seconds.
 *
 * Example:
 *
 *     var coord = [7.85, 47.983333];
 *     var out = ol.coordinate.toStringHDMS(coord);
 *     // out is now '47° 59′ 0″ N 7° 51′ 0″ E'
 *
 * @param {ol.Coordinate|undefined} coordinate Coordinate.
 * @return {string} Hemisphere, degrees, minutes and seconds.
 * @api stable
 */
ol.coordinate.toStringHDMS = function(coordinate) {
  if (coordinate) {
    return ol.coordinate.degreesToStringHDMS_(coordinate[1], 'NS') + ' ' +
        ol.coordinate.degreesToStringHDMS_(coordinate[0], 'EW');
  } else {
    return '';
  }
};

/**
 * Format a coordinate as a comma delimited string.
 *
 * Example without specifying fractional digits:
 *
 *     var coord = [7.85, 47.983333];
 *     var out = ol.coordinate.toStringXY(coord);
 *     // out is now '8, 48'
 *
 * Example explicitly specifying 1 fractional digit:
 *
 *     var coord = [7.85, 47.983333];
 *     var out = ol.coordinate.toStringXY(coord, 1);
 *     // out is now '7.8, 48.0'
 *
 * @param {ol.Coordinate|undefined} coordinate Coordinate.
 * @param {number=} opt_fractionDigits The number of digits to include
 *    after the decimal point. Default is `0`.
 * @return {string} XY.
 * @api stable
 */
ol.coordinate.toStringXY = function(coordinate, opt_fractionDigits) {
  return ol.coordinate.format(coordinate, '{x}, {y}', opt_fractionDigits);
};

/**
 * Create an ol.Coordinate from an Array and take into account axis order.
 *
 * Examples:
 *
 *     var northCoord = ol.coordinate.fromProjectedArray([1, 2], 'n');
 *     // northCoord is now [2, 1]
 *
 *     var eastCoord = ol.coordinate.fromProjectedArray([1, 2], 'e');
 *     // eastCoord is now [1, 2]
 *
 * @param {Array} array The array with coordinates.
 * @param {string} axis the axis info.
 * @return {ol.Coordinate} The coordinate created.
 */
ol.coordinate.fromProjectedArray = function(array, axis) {
  var firstAxis = axis.charAt(0);
  if (firstAxis === 'n' || firstAxis === 's') {
    return [array[1], array[0]];
  } else {
    return array;
  }
};

  Code coverage
  generated by istanbul at Fri Nov 06 2015 19:36:11 GMT+0100 (CET)


text:
package speedy.utility;

import speedy.SpeedyConstants;
import speedy.model.algebra.operators.GenerateTupleFromTuplePair;
import speedy.persistence.Types;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.nfunk.jep.Variable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import speedy.model.database.AttributeRef;
import speedy.model.database.Cell;
import speedy.model.database.IValue;
import speedy.model.database.Tuple;
import speedy.utility.comparator.StringComparator;

@SuppressWarnings("unchecked")
public class AlgebraUtility {

    private static Logger logger = LoggerFactory.getLogger(AlgebraUtility.class);
    private static GenerateTupleFromTuplePair tupleMerger = new GenerateTupleFromTuplePair();

    public static void addIfNotContained(List list, Object object) {
        SpeedyUtility.addIfNotContained(list, object);
    }

    public static IValue getCellValue(Tuple tuple, AttributeRef attributeRef) {
        for (Cell cell : tuple.getCells()) {
            if (cell.getAttributeRef().equals(attributeRef)) {
                return cell.getValue();
            }
        }
        throw new IllegalArgumentException("Unable to find attribute " + attributeRef + " in tuple " + tuple.toStringWithOIDAndAlias());
    }

    public static boolean contains(Tuple tuple, AttributeRef attributeRef) {
        for (Cell cell : tuple.getCells()) {
            if (cell.getAttributeRef().equals(attributeRef)) {
                return true;
            }
        }
        return false;
    }

    public static List<Object> getTupleValuesExceptOIDs(Tuple tuple) {
        List<Object> values = new ArrayList<Object>();
        for (Cell cell : tuple.getCells()) {
            if (cell.getAttribute().equals(SpeedyConstants.OID)) {
                continue;
            }
            IValue attributeValue = cell.getValue();
            values.add(attributeValue.getPrimitiveValue().toString());
        }
        return values;
    }

    public static List<Object> getNonOidTupleValues(Tuple tuple) {
        List<Object> values = new ArrayList<Object>();
        for (Cell cell : tuple.getCells()) {
            if (cell.getAttribute().equals(SpeedyConstants.OID)) {
                continue;
            }
            IValue attributeValue = cell.getValue();
            values.add(attributeValue.getPrimitiveValue());
        }
        return values;
    }

    @SuppressWarnings("unchecked")
    public static boolean equalLists(List list1, List list2) {
        return (list1.containsAll(list2) && list2.containsAll(list1));
    }

    public static boolean areEqualExcludingOIDs(Tuple t1, Tuple t2) {
        if (t1 == null || t2 == null) {
            return false;
        }
        return equalLists(getTupleValuesExceptOIDs(t1), getTupleValuesExceptOIDs(t2));
    }

    public static void removeDuplicates(List result) {
        if (result.isEmpty()) {
            return;
        }
        Collections.sort(result, new StringComparator());
        Iterator tupleIterator = result.iterator();
        String prevValues = tupleIterator.next().toString();
        while (tupleIterator.hasNext()) {
            Object currentTuple = tupleIterator.next();
            String currentValues = currentTuple.toString();
            if (prevValues.equals(currentValues)) {
                tupleIterator.remove();
            } else {
                prevValues = currentValues;
            }
        }
    }

    public static boolean isPlaceholder(Variable jepVariable) {
        return jepVariable.getDescription().toString().startsWith("$$");
//        return jepVariable.getDescription().toString().startsWith("$$") &&
//                jepVariable.getDescription().toString().endsWith("#");
    }

    private static Comparable getTypedValue(IValue value, String type) {
        if (type.equals(Types.LONG) || type.equals(Types.REAL) || type.equals(Types.INTEGER)) {
            return Double.parseDouble(value.toString());
        }
        return value.toString();
    }

    private static boolean areNotCompatible(String firstType, String secondType) {
        return !firstType.equals(secondType);
    }

}

redpajama_set_name: RedPajamaGithub


text:
define(['jquery', 'src/header/components/default', 'src/util/versioning'], function($, Default, Versioning, Button, Util) {

	var Element = function() {};
	$.extend(Element.prototype, Default, {

		initImpl: function() {
			this.viewHandler = Versioning.getViewHandler();
		},

		_onClick: function() { // Overwrite usual onclick which loads a list / loads views/datas

			if(this._open) {
				this.open();
			} else {
				this.close();
			}
		},

		open: function() {

			var self = this;
			self.$_dom.css({ color: '' });

			self.viewHandler.serverPush(Versioning.getView()).then(function() {
				self.$_dom.css({ color: '#357535' });
			}, function() {
				self.$_dom.css({ color: '#872A2A' });
			});
		},

		close: function() {
			window.clearTimeout(this.interval);
			this.$_dom.css({ color: '' });
			//this.$_dom.removeClass('toggledOn');
		}
	});

	return Element;
});


text:
- clone repo
- navigate to project folder in terminal
- run `pip install -t telegram-list-bot/lib -r requirements.txt`
- deploy on GAE (more details to come)


text:
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
 xmlns:o="urn:schemas-microsoft-com:office:office"
 xmlns:x="urn:schemas-microsoft-com:office:excel"
 xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
 xmlns:html="http://www.w3.org/TR/REC-html40">
 <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
  <Author>Михаил Евграфов</Author>
  <LastAuthor>Михаил Михайлов</LastAuthor>
  <Created>2020-07-07T11:51:09Z</Created>
  <Version>16.00</Version>
 </DocumentProperties>
 <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
  <AllowPNG/>
 </OfficeDocumentSettings>
 <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
  <WindowHeight>7020</WindowHeight>
  <WindowWidth>20490</WindowWidth>
  <WindowTopX>0</WindowTopX>
  <WindowTopY>0</WindowTopY>
  <ProtectStructure>False</ProtectStructure>
  <ProtectWindows>False</ProtectWindows>
 </ExcelWorkbook>
 <Styles>
  <Style ss:ID="Default" ss:Name="Normal">
   <Alignment ss:Vertical="Bottom"/>
   <Borders/>
   <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
   <Interior/>
   <NumberFormat/>
   <Protection/>
  </Style>
 </Styles>
 <Worksheet ss:Name="document">
  <Table ss:ExpandedColumnCount="6" ss:ExpandedRowCount="16" x:FullColumns="1"
   x:FullRows="1" ss:DefaultRowHeight="15">
   <Row>
    <Cell><Data ss:Type="String">Employee</Data></Cell>
    <Cell><Data ss:Type="String">Quarter</Data></Cell>
    <Cell><Data ss:Type="String">Product</Data></Cell>
    <Cell><Data ss:Type="String">Continent</Data></Cell>
    <Cell><Data ss:Type="String">Country</Data></Cell>
    <Cell><Data ss:Type="String">Sale</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">David</Data></Cell>
    <Cell><Data ss:Type="Number">1</Data></Cell>
    <Cell><Data ss:Type="String">Maxilaku</Data></Cell>
    <Cell><Data ss:Type="String">Asia</Data></Cell>
    <Cell><Data ss:Type="String">China</Data></Cell>
    <Cell><Data ss:Type="Number">2000</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">David</Data></Cell>
    <Cell><Data ss:Type="Number">2</Data></Cell>
    <Cell><Data ss:Type="String">Maxilaku</Data></Cell>
    <Cell><Data ss:Type="String">Asia</Data></Cell>
    <Cell><Data ss:Type="String">India</Data></Cell>
    <Cell><Data ss:Type="Number">500</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">David</Data></Cell>
    <Cell><Data ss:Type="Number">3</Data></Cell>
    <Cell><Data ss:Type="String">Chai</Data></Cell>
    <Cell><Data ss:Type="String">Asia</Data></Cell>
    <Cell><Data ss:Type="String">Korea</Data></Cell>
    <Cell><Data ss:Type="Number">1200</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">David</Data></Cell>
    <Cell><Data ss:Type="Number">4</Data></Cell>
    <Cell><Data ss:Type="String">Maxilaku</Data></Cell>
    <Cell><Data ss:Type="String">Asia</Data></Cell>
    <Cell><Data ss:Type="String">India</Data></Cell>
    <Cell><Data ss:Type="Number">1500</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">James</Data></Cell>
    <Cell><Data ss:Type="Number">1</Data></Cell>
    <Cell><Data ss:Type="String">Chang</Data></Cell>
    <Cell><Data ss:Type="String">Europe</Data></Cell>
    <Cell><Data ss:Type="String">France</Data></Cell>
    <Cell><Data ss:Type="Number">500</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">James</Data></Cell>
    <Cell><Data ss:Type="Number">2</Data></Cell>
    <Cell><Data ss:Type="String">Chang</Data></Cell>
    <Cell><Data ss:Type="String">Europe</Data></Cell>
    <Cell><Data ss:Type="String">France</Data></Cell>
    <Cell><Data ss:Type="Number">1500</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">James</Data></Cell>
    <Cell><Data ss:Type="Number">3</Data></Cell>
    <Cell><Data ss:Type="String">Chang</Data></Cell>
    <Cell><Data ss:Type="String">Europe</Data></Cell>
    <Cell><Data ss:Type="String">Germany</Data></Cell>
    <Cell><Data ss:Type="Number">800</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">James</Data></Cell>
    <Cell><Data ss:Type="Number">4</Data></Cell>
    <Cell><Data ss:Type="String">Chang</Data></Cell>
    <Cell><Data ss:Type="String">Europe</Data></Cell>
    <Cell><Data ss:Type="String">Italy</Data></Cell>
    <Cell><Data ss:Type="Number">900</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">James</Data></Cell>
    <Cell><Data ss:Type="Number">4</Data></Cell>
    <Cell><Data ss:Type="String">Chang</Data></Cell>
    <Cell><Data ss:Type="String">Europe</Data></Cell>
    <Cell><Data ss:Type="String">France</Data></Cell>
    <Cell><Data ss:Type="Number">500</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">Miya</Data></Cell>
    <Cell><Data ss:Type="Number">1</Data></Cell>
    <Cell><Data ss:Type="String">Geitost</Data></Cell>
    <Cell><Data ss:Type="String">America</Data></Cell>
    <Cell><Data ss:Type="String">U.S.</Data></Cell>
    <Cell><Data ss:Type="Number">1600</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">Miya</Data></Cell>
    <Cell><Data ss:Type="Number">1</Data></Cell>
    <Cell><Data ss:Type="String">Chai</Data></Cell>
    <Cell><Data ss:Type="String">America</Data></Cell>
    <Cell><Data ss:Type="String">U.S.</Data></Cell>
    <Cell><Data ss:Type="Number">600</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">Miya</Data></Cell>
    <Cell><Data ss:Type="Number">2</Data></Cell>
    <Cell><Data ss:Type="String">Geitost</Data></Cell>
    <Cell><Data ss:Type="String">America</Data></Cell>
    <Cell><Data ss:Type="String">Brazil</Data></Cell>
    <Cell><Data ss:Type="Number">2000</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">Miya</Data></Cell>
    <Cell><Data ss:Type="Number">2</Data></Cell>
    <Cell><Data ss:Type="String">Geitost</Data></Cell>
    <Cell><Data ss:Type="String">America</Data></Cell>
    <Cell><Data ss:Type="String">U.S.</Data></Cell>
    <Cell><Data ss:Type="Number">500</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">Miya</Data></Cell>
    <Cell><Data ss:Type="Number">2</Data></Cell>
    <Cell><Data ss:Type="String">Geitost</Data></Cell>
    <Cell><Data ss:Type="String">America</Data></Cell>
    <Cell><Data ss:Type="String">U.S.</Data></Cell>
    <Cell><Data ss:Type="Number">900</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">Total</Data></Cell>
    <Cell><Data ss:Type="Error">#VALUE!</Data></Cell>
    <Cell ss:Index="6"><Data ss:Type="Error">#VALUE!</Data></Cell>
   </Row>
  </Table>
  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <PageSetup>
    <Header x:Margin="0.3"/>
    <Footer x:Margin="0.3"/>
    <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
   </PageSetup>
   <Selected/>
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
 </Worksheet>
</Workbook>


text:
#ifndef LIBSIMDPP_SIMDPP_TYPES_FLOAT32_H
#define LIBSIMDPP_SIMDPP_TYPES_FLOAT32_H

#ifndef LIBSIMDPP_SIMD_H
    #error "This file must be included through simd.h"
#endif

#include <simdpp/setup_arch.h>
#include <simdpp/types/any.h>
#include <simdpp/types/fwd.h>
#include <simdpp/core/cast.h>
#include <simdpp/detail/array.h>
#include <simdpp/detail/construct_eval.h>

namespace simdpp {
namespace SIMDPP_ARCH_NAMESPACE {

/** Class representing a @a float32 vector of arbitrary length. The vector
    always contains at least one native vector.
*/
template<unsigned N>
class float32<N, void> : public any_float32<N, float32<N,void>> {
public:
    static const unsigned type_tag = SIMDPP_TAG_FLOAT;
    using expr_type = void;
    using element_type = float;
    using base_vector_type = float32v;

    SIMDPP_INL float32<N>() = default;
    SIMDPP_INL float32<N>(const float32<N>&) = default;
    SIMDPP_INL float32<N>& operator=(const float32<N>&) = default;

    template<class E> SIMDPP_INL float32<N>(const float32<N,E>& d) { *this = d.eval(); }
    template<class V> SIMDPP_INL explicit float32<N>(const any_vec<N*4,V>& d)
    {
        *this = bit_cast<float32<N>>(d.wrapped().eval());
    }
    template<class V> SIMDPP_INL float32<N>& operator=(const any_vec<N*4,V>& d)
    {
        *this = bit_cast<float32<N>>(d.wrapped().eval()); return *this;
    }

    template<class E> SIMDPP_INL float32<N>(const expr_vec_construct<E>& e)
    {
        detail::construct_eval_wrapper(*this, e.expr());
    }
    template<class E> SIMDPP_INL float32<N>& operator=(const expr_vec_construct<E>& e)
    {
        detail::construct_eval_wrapper(*this, e.expr()); return *this;
    }

    SIMDPP_INL const float32v& vec(unsigned i) const { return d_[i]; }
    SIMDPP_INL float32v& vec(unsigned i)             { return d_[i]; }

    SIMDPP_INL float32<N> eval() const { return *this; }

private:
    /** Creates a float vector from a native vector

        @code
        r0 = v0
        ...
        rN = v0
        @endcode
    */
    static SIMDPP_INL float32<N> set_vec(const float32v& v0)
    {
        float32<N> r;
        for (unsigned i = 0; i < r.vec_length; i++) r.vec(i) = v0;
        return r;
    }

    detail::vararray<float32v, float32::vec_length> d_;
};

/// Class representing a mask for 32-bit floating-point vector of arbitrary
/// length.
template<unsigned N>
class mask_float32<N, void> : public any_float32<N, mask_float32<N,void>> {
public:
    static const unsigned type_tag = SIMDPP_TAG_MASK_FLOAT;
    using base_vector_type = mask_float32v;
    using expr_type = void;

    SIMDPP_INL mask_float32<N>() = default;
    SIMDPP_INL mask_float32<N>(const mask_float32<N> &) = default;
    SIMDPP_INL mask_float32<N> &operator=(const mask_float32<N> &) = default;

    template<class E> SIMDPP_INL explicit mask_float32<N>(const mask_int32<N,E>& d)
    {
        *this = bit_cast<mask_float32<N>>(d.eval());
    }
    template<class E> SIMDPP_INL mask_float32<N>& operator=(const mask_int32<N,E>& d)
    {
        *this = bit_cast<mask_float32<N>>(d.eval()); return *this;
    }

    /// Access the underlying type
    SIMDPP_INL float32<N> unmask() const
    {
        float32<N> r;
        for (unsigned i = 0; i < mask_float32::vec_length; ++i) {
            r.vec(i) = d_[i].unmask();
        }
        return r;
    }

    SIMDPP_INL const mask_float32v& vec(unsigned i) const { return d_[i]; }
    SIMDPP_INL mask_float32v& vec(unsigned i)       { return d_[i]; }

    SIMDPP_INL mask_float32<N> eval() const { return *this; }

private:
    detail::vararray<mask_float32v, mask_float32::vec_length> d_;
};

} // namespace SIMDPP_ARCH_NAMESPACE
} // namespace simdpp

#endif


text:
package com.badlogic.gdx.physics.box2d;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.JointDef.JointType;
import com.badlogic.gdx.physics.box2d.joints.DistanceJoint;
import com.badlogic.gdx.physics.box2d.joints.DistanceJointDef;
import com.badlogic.gdx.physics.box2d.joints.FrictionJoint;
import com.badlogic.gdx.physics.box2d.joints.FrictionJointDef;
import com.badlogic.gdx.physics.box2d.joints.GearJoint;
import com.badlogic.gdx.physics.box2d.joints.GearJointDef;
import com.badlogic.gdx.physics.box2d.joints.LineJoint;
import com.badlogic.gdx.physics.box2d.joints.LineJointDef;
import com.badlogic.gdx.physics.box2d.joints.MouseJoint;
import com.badlogic.gdx.physics.box2d.joints.MouseJointDef;
import com.badlogic.gdx.physics.box2d.joints.PrismaticJoint;
import com.badlogic.gdx.physics.box2d.joints.PrismaticJointDef;
import com.badlogic.gdx.physics.box2d.joints.PulleyJoint;
import com.badlogic.gdx.physics.box2d.joints.PulleyJointDef;
import com.badlogic.gdx.physics.box2d.joints.RevoluteJoint;
import com.badlogic.gdx.physics.box2d.joints.RevoluteJointDef;
import com.badlogic.gdx.physics.box2d.joints.WeldJoint;
import com.badlogic.gdx.physics.box2d.joints.WeldJointDef;
import com.badlogic.gdx.utils.LongMap;

/**
 * The world class manages all physics entities, dynamic simulation, and asynchronous queries. The world also contains efficient
 * memory management facilities.
 * @author mzechner
 */
public class World {
        /** the address of the world instance **/
        private final long addr;

        /** all known bodies **/
        protected final LongMap<Body> bodies = new LongMap<Body>(100);

        /** all known fixtures **/
        protected final LongMap<Fixture> fixtures = new LongMap<Fixture>(100);

        /** all known joints **/
        protected final LongMap<Joint> joints = new LongMap<Joint>(100);

        /** Contact filter **/
        protected ContactFilter contactFilter = null;

        /** Contact listener **/
        protected ContactListener contactListener = null;

        /**
         * Ray-cast the world for all fixtures in the path of the ray.
         * The ray-cast ignores shapes that contain the starting point.
         * @param callback a user implemented callback class.
         * @param point1 the ray starting point
         * @param point2 the ray ending point
         */
        public void rayCast(RayCastCallback callback, Vector2 point1, Vector2 point2)
        {
                rayCastCallback = callback;
                jniRayCast(addr, point1.x, point1.y, point2.x, point2.y);
        }

        private RayCastCallback rayCastCallback = null;

        private native void jniRayCast (long addr, float aX, float aY, float bX, float bY);

        private Vector2 rayPoint = new Vector2();
        private Vector2 rayNormal = new Vector2();

        private float reportRayFixture (long addr, float pX, float pY, float nX, float nY, float fraction) {
                        if (rayCastCallback != null)
                                return rayCastCallback.reportRayFixture(fixtures.get(addr), rayPoint.set(pX, pY), rayNormal.set(nX, nY), fraction);
                        else
                                return 0.0f;
        }

        /**
         * Construct a world object.
         * @param gravity the world gravity vector.
         * @param doSleep improve performance by not simulating inactive bodies.
         */
        public World (Vector2 gravity, boolean doSleep) {
                addr = newWorld(gravity.x, gravity.y, doSleep);

                for (int i = 0; i < 200; i++)
                        freeContacts.add(new Contact(this, 0));
        }

        private native long newWorld (float gravityX, float gravityY, boolean doSleep);

        /**
         * Register a destruction listener. The listener is owned by you and must remain in scope.
         */
        public void setDestructionListener (DestructionListener listener) {

        }

        /**
         * Register a contact filter to provide specific control over collision. Otherwise the default filter is used
         * (b2_defaultFilter). The listener is owned by you and must remain in scope.
         */
        public void setContactFilter (ContactFilter filter) {
                this.contactFilter = filter;
        }

        /**
         * Register a contact event listener. The listener is owned by you and must remain in scope.
         */
        public void setContactListener (ContactListener listener) {
                this.contactListener = listener;
        }

        /**
         * Create a rigid body given a definition. No reference to the definition is retained.
         * @warning This function is locked during callbacks.
         */
        public Body createBody (BodyDef def) {
                Body body = new Body(this, jniCreateBody(addr, def.type.getValue(), def.position.x, def.position.y, def.angle,
                        def.linearVelocity.x, def.linearVelocity.y, def.angularVelocity, def.linearDamping, def.angularDamping, def.allowSleep,
                        def.awake, def.fixedRotation, def.bullet, def.active, def.inertiaScale));
                this.bodies.put(body.addr, body);
                return body;
        }

        private native long jniCreateBody (long addr, int type, float positionX, float positionY, float angle, float linearVelocityX,
                float linearVelocityY, float angularVelocity, float linearDamping, float angularDamping, boolean allowSleep, boolean awake,
                boolean fixedRotation, boolean bullet, boolean active, float intertiaScale);

        /**
         * Destroy a rigid body given a definition. No reference to the definition is retained. This function is locked during
         * callbacks.
         * @warning This automatically deletes all associated shapes and joints.
         * @warning This function is locked during callbacks.
         */
        public void destroyBody (Body body) {
                this.bodies.remove(body.addr);
                for (int i = 0; i < body.getFixtureList().size(); i++)
                        this.fixtures.remove(body.getFixtureList().get(i).addr);
                for (int i = 0; i < body.getJointList().size(); i++)
                        this.joints.remove(body.getJointList().get(i).joint.addr);
                jniDestroyBody(addr, body.addr);
        }

        private native void jniDestroyBody (long addr, long bodyAddr);

        /**
         * Create a joint to constrain bodies together. No reference to the definition is retained. This may cause the connected bodies
         * to cease colliding.
         * @warning This function is locked during callbacks.
         */
        public Joint createJoint (JointDef def) {
                long jointAddr = createProperJoint(def);
                Joint joint = null;
                if (def.type == JointType.DistanceJoint) joint = new DistanceJoint(this, jointAddr);
                if (def.type == JointType.FrictionJoint) joint = new FrictionJoint(this, jointAddr);
                if (def.type == JointType.GearJoint) joint = new GearJoint(this, jointAddr);
                if (def.type == JointType.LineJoint) joint = new LineJoint(this, jointAddr);
                if (def.type == JointType.MouseJoint) joint = new MouseJoint(this, jointAddr);
                if (def.type == JointType.PrismaticJoint) joint = new PrismaticJoint(this, jointAddr);
                if (def.type == JointType.PulleyJoint) joint = new PulleyJoint(this, jointAddr);
                if (def.type == JointType.RevoluteJoint) joint = new RevoluteJoint(this, jointAddr);
                if (def.type == JointType.WeldJoint) joint = new WeldJoint(this, jointAddr);
                if (joint != null) joints.put(joint.addr, joint);
                JointEdge jointEdgeA = new JointEdge(def.bodyB, joint);
                JointEdge jointEdgeB = new JointEdge(def.bodyA, joint);
                joint.jointEdgeA = jointEdgeA;
                joint.jointEdgeB = jointEdgeB;
                def.bodyA.joints.add(jointEdgeA);
                def.bodyB.joints.add(jointEdgeB);
                return joint;
        }

        private long createProperJoint (JointDef def) {
                if (def.type == JointType.DistanceJoint) {
                        DistanceJointDef d = (DistanceJointDef)def;
                        return jniCreateDistanceJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.localAnchorA.x, d.localAnchorA.y,
                                d.localAnchorB.x, d.localAnchorB.y, d.length, d.frequencyHz, d.dampingRatio);
                }
                if (def.type == JointType.FrictionJoint) {
                        FrictionJointDef d = (FrictionJointDef)def;
                        return jniCreateFrictionJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.localAnchorA.x, d.localAnchorA.y,
                                d.localAnchorB.x, d.localAnchorB.y, d.maxForce, d.maxTorque);
                }
                if (def.type == JointType.GearJoint) {
                        GearJointDef d = (GearJointDef)def;
                        return jniCreateGearJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.joint1.addr, d.joint2.addr, d.ratio);
                }
                if (def.type == JointType.LineJoint) {
                        LineJointDef d = (LineJointDef)def;
                        return jniCreateLineJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.localAnchorA.x, d.localAnchorA.y,
                                d.localAnchorB.x, d.localAnchorB.y, d.localAxisA.x, d.localAxisA.y, d.enableLimit, d.lowerTranslation,
                                d.upperTranslation, d.enableMotor, d.maxMotorForce, d.motorSpeed);

                }
                if (def.type == JointType.MouseJoint) {
                        MouseJointDef d = (MouseJointDef)def;
                        return jniCreateMouseJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.target.x, d.target.y, d.maxForce,
                                d.frequencyHz, d.dampingRatio);
                }
                if (def.type == JointType.PrismaticJoint) {
                        PrismaticJointDef d = (PrismaticJointDef)def;
                        return jniCreatePrismaticJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.localAnchorA.x, d.localAnchorA.y,
                                d.localAnchorB.x, d.localAnchorB.y, d.localAxis1.x, d.localAxis1.y, d.referenceAngle, d.enableLimit,
                                d.lowerTranslation, d.upperTranslation, d.enableMotor, d.maxMotorForce, d.motorSpeed);
                }
                if (def.type == JointType.PulleyJoint) {
                        PulleyJointDef d = (PulleyJointDef)def;
                        return jniCreatePulleyJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.groundAnchorA.x, d.groundAnchorA.y,
                                d.groundAnchorB.x, d.groundAnchorB.y, d.localAnchorA.x, d.localAnchorA.y, d.localAnchorB.x, d.localAnchorB.y,
                                d.lengthA, d.maxLengthA, d.lengthB, d.maxLengthB, d.ratio);

                }
                if (def.type == JointType.RevoluteJoint) {
                        RevoluteJointDef d = (RevoluteJointDef)def;
                        return jniCreateRevoluteJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.localAnchorA.x, d.localAnchorA.y,
                                d.localAnchorB.x, d.localAnchorB.y, d.referenceAngle, d.enableLimit, d.lowerAngle, d.upperAngle, d.enableMotor,
                                d.motorSpeed, d.maxMotorTorque);
                }
                if (def.type == JointType.WeldJoint) {
                        WeldJointDef d = (WeldJointDef)def;
                        return jniCreateWeldJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.localAnchorA.x, d.localAnchorA.y,
                                d.localAnchorB.x, d.localAnchorB.y, d.referenceAngle);
                }

                return 0;
        }

        private native long jniCreateDistanceJoint (long addr, long bodyA, long bodyB, boolean collideConnected, float localAnchorAX,
                float localAnchorAY, float localAnchorBX, float localAnchorBY, float length, float frequencyHz, float dampingRatio);

        private native long jniCreateFrictionJoint (long addr, long bodyA, long bodyB, boolean collideConnected, float localAnchorAX,
                float localAnchorAY, float localAnchorBX, float localAnchorBY, float maxForce, float maxTorque);

        private native long jniCreateGearJoint (long addr, long bodyA, long bodyB, boolean collideConnected, long joint1, long joint2,
                float ratio);

        private native long jniCreateLineJoint (long addr, long bodyA, long bodyB, boolean collideConnected, float localAnchorAX,
                float localAnchorAY, float localAnchorBX, float localAnchorBY, float localAxisAX, float localAxisAY, boolean enableLimit,
                float lowerTranslation, float upperTranslation, boolean enableMotor, float maxMotorForce, float motorSpeed);

        private native long jniCreateMouseJoint (long addr, long bodyA, long bodyB, boolean collideConnected, float targetX,
                float targetY, float maxForce, float frequencyHz, float dampingRatio);

        private native long jniCreatePrismaticJoint (long addr, long bodyA, long bodyB, boolean collideConnected, float localAnchorAX,
                float localAnchorAY, float localAnchorBX, float localAnchorBY, float localAxisAX, float localAxisAY, float referenceAngle,
                boolean enableLimit, float lowerTranslation, float upperTranslation, boolean enableMotor, float maxMotorForce,
                float motorSpeed);

        private native long jniCreatePulleyJoint (long addr, long bodyA, long bodyB, boolean collideConnected, float groundAnchorAX,
                float groundAnchorAY, float groundAnchorBX, float groundAnchorBY, float localAnchorAX, float localAnchorAY,
                float localAnchorBX, float localAnchorBY, float lengthA, float maxLengthA, float lengthB, float maxLengthB, float ratio);

        private native long jniCreateRevoluteJoint (long addr, long bodyA, long bodyB, boolean collideConnected, float localAnchorAX,
                float localAnchorAY, float localAnchorBX, float localAnchorBY, float referenceAngle, boolean enableLimit, float lowerAngle,
                float upperAngle, boolean enableMotor, float motorSpeed, float maxMotorTorque);

        private native long jniCreateWeldJoint (long addr, long bodyA, long bodyB, boolean collideConnected, float localAnchorAX,
                float localAnchorAY, float localAnchorBX, float localAnchorBY, float referenceAngle);

        /**
         * Destroy a joint. This may cause the connected bodies to begin colliding.
         * @warning This function is locked during callbacks.
         */
        public void destroyJoint (Joint joint) {
                joints.remove(joint.addr);
                joint.jointEdgeA.other.joints.remove(joint.jointEdgeB);
                joint.jointEdgeB.other.joints.remove(joint.jointEdgeA);
                jniDestroyJoint(addr, joint.addr);
        }

        private native void jniDestroyJoint (long addr, long jointAddr);

        /**
         * Take a time step. This performs collision detection, integration, and constraint solution.
         * @param timeStep the amount of time to simulate, this should not vary.
         * @param velocityIterations for the velocity constraint solver.
         * @param positionIterations for the position constraint solver.
         */
        public void step (float timeStep, int velocityIterations, int positionIterations) {
                jniStep(addr, timeStep, velocityIterations, positionIterations);
        }

        private native void jniStep (long addr, float timeStep, int velocityIterations, int positionIterations);

        /**
         * Call this after you are done with time steps to clear the forces. You normally call this after each call to Step, unless you
         * are performing sub-steps. By default, forces will be automatically cleared, so you don't need to call this function. See
         * {@link #setAutoClearForces(boolean)}
         */
        public void clearForces () {
                jniClearForces(addr);
        }

        private native void jniClearForces (long addr);

        /**
         * Enable/disable warm starting. For testing.
         */
        public void setWarmStarting (boolean flag) {
                jniSetWarmStarting(addr, flag);
        }

        private native void jniSetWarmStarting (long addr, boolean flag);

        /**
         * Enable/disable continuous physics. For testing.
         */
        public void setContinuousPhysics (boolean flag) {
                jniSetContiousPhysics(addr, flag);
        }

        private native void jniSetContiousPhysics (long addr, boolean flag);

        /**
         * Get the number of broad-phase proxies.
         */
        public int getProxyCount () {
                return jniGetProxyCount(addr);
        }

        private native int jniGetProxyCount (long addr);

        /**
         * Get the number of bodies.
         */
        public int getBodyCount () {
                return jniGetBodyCount(addr);
        }

        private native int jniGetBodyCount (long addr);

        /**
         * Get the number of joints.
         */
        public int getJointCount () {
                return jniGetJointcount(addr);
        }

        private native int jniGetJointcount (long addr);

        /**
         * Get the number of contacts (each may have 0 or more contact points).
         */
        public int getContactCount () {
                return jniGetContactCount(addr);
        }

        private native int jniGetContactCount (long addr);

        /**
         * Change the global gravity vector.
         */
        public void setGravity (Vector2 gravity) {
                jniSetGravity(addr, gravity.x, gravity.y);
        }

        private native void jniSetGravity (long addr, float gravityX, float gravityY);

        /**
         * Get the global gravity vector.
         */
        final float[] tmpGravity = new float[2];
        final Vector2 gravity = new Vector2();

        public Vector2 getGravity () {
                jniGetGravity(addr, tmpGravity);
                gravity.x = tmpGravity[0];
                gravity.y = tmpGravity[1];
                return gravity;
        }

        private native void jniGetGravity (long addr, float[] gravity);

        /**
         * Is the world locked (in the middle of a time step).
         */
        public boolean isLocked () {
                return jniIsLocked(addr);
        }

        private native boolean jniIsLocked (long addr);

        /**
         * Set flag to control automatic clearing of forces after each time step.
         */
        public void setAutoClearForces (boolean flag) {
                jniSetAutoClearForces(addr, flag);
        }

        private native void jniSetAutoClearForces (long addr, boolean flag);

        /**
         * Get the flag that controls automatic clearing of forces after each time step.
         */
        public boolean getAutoClearForces () {
                return jniGetAutoClearForces(addr);
        }

        private native boolean jniGetAutoClearForces (long addr);

        /**
         * Query the world for all fixtures that potentially overlap the provided AABB.
         * @param callback a user implemented callback class.
         * @param lowerX the x coordinate of the lower left corner
         * @param lowerY the y coordinate of the lower left corner
         * @param upperX the x coordinate of the upper right corner
         * @param upperY the y coordinate of the upper right corner
         */
        public void QueryAABB (QueryCallback callback, float lowerX, float lowerY, float upperX, float upperY) {
                queryCallback = callback;
                jniQueryAABB(addr, lowerX, lowerY, upperX, upperY);
        }

        private QueryCallback queryCallback = null;;

        private native void jniQueryAABB (long addr, float lowX, float lowY, float upX, float upY);

//
// /// Ray-cast the world for all fixtures in the path of the ray. Your callback
// /// controls whether you get the closest point, any point, or n-points.
// /// The ray-cast ignores shapes that contain the starting point.
// /// @param callback a user implemented callback class.
// /// @param point1 the ray starting point
// /// @param point2 the ray ending point
// void RayCast(b2RayCastCallback* callback, const b2Vec2& point1, const b2Vec2& point2) const;
//
// /// Get the world contact list. With the returned contact, use b2Contact::GetNext to get
// /// the next contact in the world list. A NULL contact indicates the end of the list.
// /// @return the head of the world contact list.
// /// @warning contacts are
// b2Contact* GetContactList();

        private long[] contactAddrs = new long[200];
        private final ArrayList<Contact> contacts = new ArrayList<Contact>();
        private final ArrayList<Contact> freeContacts = new ArrayList<Contact>();

        public List<Contact> getContactList () {
                int numContacts = getContactCount();
                if (numContacts > contactAddrs.length) contactAddrs = new long[numContacts];
                if (numContacts > freeContacts.size()) {
                        int freeConts = freeContacts.size();
                        for (int i = 0; i < numContacts - freeConts; i++)
                                freeContacts.add(new Contact(this, 0));
                }
                jniGetContactList(addr, contactAddrs);

                contacts.clear();
                for (int i = 0; i < numContacts; i++) {
                        Contact contact = freeContacts.get(i);
                        contact.addr = contactAddrs[i];
                        contacts.add(contact);
                }

                return contacts;
        }

        /**
         * @return all bodies currently in the simulation
         */
        public Iterator<Body> getBodies () {
                return bodies.values();
        }

        /**
         * @return all joints currently in the simulation
         */
        public Iterator<Joint> getJoints () {
                return joints.values();
        }

        private native void jniGetContactList (long addr, long[] contacts);

        public void dispose () {
                jniDispose(addr);
        }

        private native void jniDispose (long addr);

        /**
         * Internal method called from JNI in case a contact happens
         * @param fixtureA
         * @param fixtureB
         * @return whether the things collided
         */
        private boolean contactFilter (long fixtureA, long fixtureB) {
                if (contactFilter != null)
                        return contactFilter.shouldCollide(fixtures.get(fixtureA), fixtures.get(fixtureB));
                else {
                        Filter filterA = fixtures.get(fixtureA).getFilterData();
                        Filter filterB = fixtures.get(fixtureB).getFilterData();

                        if (filterA.groupIndex == filterB.groupIndex && filterA.groupIndex != 0) {
                                return filterA.groupIndex > 0;
                        }

                        boolean collide = (filterA.maskBits & filterB.categoryBits) != 0 && (filterA.categoryBits & filterB.maskBits) != 0;
                        return collide;
                }
        }

        private final Contact contact = new Contact(this, 0);
        private final Manifold manifold = new Manifold(this, 0);
        private final ContactImpulse impulse = new ContactImpulse(this, 0);

        private void beginContact (long contactAddr) {
                contact.addr = contactAddr;
                if (contactListener != null) contactListener.beginContact(contact);
        }

        private void endContact (long contactAddr) {
                contact.addr = contactAddr;
                if (contactListener != null) contactListener.endContact(contact);
        }

        private void preSolve (long contactAddr, long manifoldAddr) {
                contact.addr = contactAddr;
                manifold.addr = manifoldAddr;
                if (contactListener != null) contactListener.preSolve(contact, manifold);
        }

        private void postSolve (long contactAddr, long impulseAddr) {
                contact.addr = contactAddr;
                impulse.addr = impulseAddr;
                if (contactListener != null) contactListener.postSolve(contact, impulse);
        }

        private boolean reportFixture (long addr) {
                if (queryCallback != null)
                        return queryCallback.reportFixture(fixtures.get(addr));
                else
                        return false;
        }
}


text:
<?php

namespace PHPUnit\Framework\Constraint;

use ReflectionObject;

/**
 * Constraint that asserts that the object it is evaluated for has a given
 * attribute.
 *
 * The attribute name is passed in the constructor.
 */
class ObjectHasAttribute extends ClassHasAttribute
{
    /**
     * Evaluates the constraint for parameter $other. Returns true if the
     * constraint is met, false otherwise.
     *
     * @param mixed $other Value or object to evaluate.
     *
     * @return bool
     */
    protected function matches($other)
    {
        $object = new ReflectionObject($other);

        return $object->hasProperty($this->attributeName);
    }
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Bot. Bull. Acad. Sin. ser. 2, 35:135. 1994

#### Original name
null

### Remarks
null


text:
#ifndef XSLStyleSheet_h
#define XSLStyleSheet_h

#include "core/css/StyleSheet.h"
#include "core/dom/ProcessingInstruction.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "wtf/PassRefPtr.h"
#include <libxml/tree.h>
#include <libxslt/transform.h>

namespace blink {

class ResourceFetcher;
class XSLImportRule;

class XSLStyleSheet final : public StyleSheet {
public:
    static PassRefPtrWillBeRawPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& originalURL, const KURL& finalURL)
    {
        ASSERT(RuntimeEnabledFeatures::xsltEnabled());
        return adoptRefWillBeNoop(new XSLStyleSheet(parentImport, originalURL, finalURL));
    }
    static PassRefPtrWillBeRawPtr<XSLStyleSheet> create(ProcessingInstruction* parentNode, const String& originalURL, const KURL& finalURL)
    {
        ASSERT(RuntimeEnabledFeatures::xsltEnabled());
        return adoptRefWillBeNoop(new XSLStyleSheet(parentNode, originalURL, finalURL, false));
    }
    static PassRefPtrWillBeRawPtr<XSLStyleSheet> createEmbedded(ProcessingInstruction* parentNode, const KURL& finalURL)
    {
        ASSERT(RuntimeEnabledFeatures::xsltEnabled());
        return adoptRefWillBeNoop(new XSLStyleSheet(parentNode, finalURL.string(), finalURL, true));
    }

    // Taking an arbitrary node is unsafe, because owner node pointer can become
    // stale. XSLTProcessor ensures that the stylesheet doesn't outlive its
    // parent, in part by not exposing it to JavaScript.
    static PassRefPtrWillBeRawPtr<XSLStyleSheet> createForXSLTProcessor(Document* document, Node* stylesheetRootNode, const String& originalURL, const KURL& finalURL)
    {
        ASSERT(RuntimeEnabledFeatures::xsltEnabled());
        return adoptRefWillBeNoop(new XSLStyleSheet(document, stylesheetRootNode, originalURL, finalURL, false));
    }

    virtual ~XSLStyleSheet();

    bool parseString(const String&);

    void checkLoaded();

    const KURL& finalURL() const { return m_finalURL; }

    void loadChildSheets();
    void loadChildSheet(const String& href);

    ResourceFetcher* fetcher();

    Document* ownerDocument();
    virtual XSLStyleSheet* parentStyleSheet() const override { return m_parentStyleSheet; }
    void setParentStyleSheet(XSLStyleSheet*);

    xmlDocPtr document();
    xsltStylesheetPtr compileStyleSheet();
    xmlDocPtr locateStylesheetSubResource(xmlDocPtr parentDoc, const xmlChar* uri);

    void clearDocuments();

    void markAsProcessed();
    bool processed() const { return m_processed; }

    virtual String type() const override { return "text/xml"; }
    virtual bool disabled() const override { return m_isDisabled; }
    virtual void setDisabled(bool b) override { m_isDisabled = b; }
    virtual Node* ownerNode() const override { return m_ownerNode; }
    virtual String href() const override { return m_originalURL; }
    virtual String title() const override { return emptyString(); }

    virtual void clearOwnerNode() override { m_ownerNode = nullptr; }
    virtual KURL baseURL() const override { return m_finalURL; }
    virtual bool isLoading() const override;

    virtual void trace(Visitor*) override;

private:
    XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL, bool embedded);
    XSLStyleSheet(Document* ownerDocument, Node* styleSheetRootNode, const String& originalURL, const KURL& finalURL, bool embedded);
    XSLStyleSheet(XSLImportRule* parentImport, const String& originalURL, const KURL& finalURL);

    RawPtrWillBeMember<Node> m_ownerNode;
    String m_originalURL;
    KURL m_finalURL;
    bool m_isDisabled;

    WillBeHeapVector<OwnPtrWillBeMember<XSLImportRule> > m_children;

    bool m_embedded;
    bool m_processed;

    xmlDocPtr m_stylesheetDoc;
    bool m_stylesheetDocTaken;
    bool m_compilationFailed;

    RawPtrWillBeMember<XSLStyleSheet> m_parentStyleSheet;
    RefPtrWillBeMember<Document> m_ownerDocument;
};

DEFINE_TYPE_CASTS(XSLStyleSheet, StyleSheet, sheet, !sheet->isCSSStyleSheet(), !sheet.isCSSStyleSheet());

} // namespace blink

#endif // XSLStyleSheet_h


text:
<?php

declare(strict_types=1);

namespace Codeception\Util;

use Codeception\Command\Console;
use Codeception\Lib\Console\Output;
use Codeception\Lib\PauseShell;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Question\ConfirmationQuestion;

/**
 * This class is used only when Codeception is executed in `--debug` mode.
 * In other cases method of this class won't be seen.
 */
class Debug
{
    protected static ?Output $output = null;

    public static function setOutput(Output $output): void
    {
        self::$output = $output;
    }

    /**
     * Prints data to screen. Message can be any time of data
     */
    public static function debug(mixed $message): void
    {
        if (!self::$output) {
            return;
        }
        self::$output->debug($message);
    }

    public static function isEnabled(): bool
    {
        return (bool)self::$output;
    }

    public static function pause(array $vars = []): void
    {
        if (!self::isEnabled()) {
            return;
        }

        $pauseShell = new PauseShell();
        $psy = $pauseShell->getShell();
        $psy->setScopeVariables($vars);
        $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 3);
        foreach ($backtrace as $backtraceStep) {
            $class = $backtraceStep['class'] ?? null;
            $fn = $backtraceStep['function'] ?? null;
            if ($class === Debug::class && $fn === 'pause') {
                continue;
            }
            if ($fn === 'codecept_pause' && !$class) {
                continue;
            }
            if (!isset($backtraceStep['object'])) {
                continue;
            }
            $pauseShell->addMessage('Use $this-> to access current object');
            $psy->setBoundObject($backtraceStep['object']);
            break;
        }
        $psy->run();
    }

    public static function confirm($question)
    {
        if (!self::$output) {
            return;
        }

        $questionHelper = new QuestionHelper();
        return $questionHelper->ask(new ArgvInput(), self::$output, new ConfirmationQuestion($question));
    }
}


text:
See our website for versions of Bitcoin Core that are currently supported with
security updates: https://bitcoincore.org/en/lifecycle/#schedule

## Reporting a Vulnerability

To report security issues send an email to security@bitcoincore.org (not for support).

The following keys may be used to communicate sensitive information to developers:

| Name | Fingerprint |
|------|-------------|
| Wladimir van der Laan | 71A3 B167 3540 5025 D447  E8F2 7481 0B01 2346 C9A6 |
| Jonas Schnelli | 32EE 5C4C 3FA1 5CCA DB46  ABE5 29D4 BCB6 416F 53EC |
| Pieter Wuille | 133E AC17 9436 F14A 5CF1  B794 860F EB80 4E66 9320 |

You can import a key by running the following command with that individual's fingerprint: `gpg --recv-keys "<fingerprint>"` Ensure that you put quotes around fingerprints containing spaces.


text:
package sk.arsi.netbeans.gradle.android.maven.repository;

import sk.arsi.netbeans.gradle.android.maven.repository.Repository;
import sk.arsi.netbeans.gradle.android.maven.repository.RepositoryType;

/**
 *
 * @author arsi
 */
public class IvyRepository extends Repository {

    public IvyRepository(String url) {
        super(url, RepositoryType.IVY);
    }

}


text:
angular.module("ngAudioSprite.service", []).factory("audioSprite", ["$http", function($http) {

    var audioSprite = {

        id: "",
        muted: false,
        paused: true,
        volumeValue: 1,
        config: {},

        mute: function() {
            this.muted = true;
            notify("muted");
        },

        unmute: function() {
            this.muted = false;
            notify("muted");
        },

        volume: function(amount) {
            this.volumeValue = amount;
            notify("volumeValue");
        },

        pause: function() {
            this.paused = true;
            notify("paused");
        },

        play: function(id) {
            this.paused = false;
            this.id = id;
            notify("paused");
            notify("id");
        },

        stop: function() {
            this.pause();
            this.id = "";
            notify("id");
        },

        spritemap: function(spritemap) {
            this.config.spritemap = spritemap;
        },

        configure: function(config) {
            if (config && config.resources && config.spritemap) {
                this.config = config;
                notify("config");
            } else {
                throw "Invalid configuration object";
            }
        },

        load: function(file) {

            var self = this;

            $http.get(file).success(function(data) {
                self.config = data;
                self.config.path = getPath(file);
                notify("config");
            }).error(function() {
                throw "Failed to retrieve audio sprite configuration file: " + file;
            })
        },

        observe: observe,
        destroy: destroy

    };

    var observers = {};

    function getPath(url) {
        var parts = url.split("/");
        parts.splice(parts.length - 1, 1);
        return parts.join("/") + "/";
    }

    function notify(prop) {
        angular.forEach(observers[prop], function(observer){
            observer.callback.call(observer.scope, audioSprite[prop]);
        });
    }

    function observe(prop, callback, scope) {

        if (!observers[prop]) {
            observers[prop] = [];
        }

        observers[prop].push({
            callback: callback,
            scope: scope
        });
    }

    function destroy() {
        observers = {};
        audioSprite.id = "";
        audioSprite.muted = false;
        audioSprite.paused = true;
        audioSprite.volumeValue = 1;
        audioSprite.config = {};
    }

    return audioSprite;

}]);


text:
class AddUserRefToTerms < ActiveRecord::Migration
  def change
    add_reference :terms, :user, index: true, foreign_key: true
  end
end


text:
package base

import (
	"flag"

	"cmd/go/internal/cfg"
	"cmd/go/internal/str"
)

// A StringsFlag is a command-line flag that interprets its argument
// as a space-separated list of possibly-quoted strings.
type StringsFlag []string

func (v *StringsFlag) Set(s string) error {
	var err error
	*v, err = str.SplitQuotedFields(s)
	if *v == nil {
		*v = []string{}
	}
	return err
}

func (v *StringsFlag) String() string {
	return "<StringsFlag>"
}

// AddBuildFlagsNX adds the -n and -x build flags to the flag set.
func AddBuildFlagsNX(flags *flag.FlagSet) {
	flags.BoolVar(&cfg.BuildN, "n", false, "")
	flags.BoolVar(&cfg.BuildX, "x", false, "")
}


text:
import reverse from './reverse'

export default reverse


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using NUnit.Framework;
using UnityEngine;

namespace Mujoco {

[TestFixture]
public class MjGlobalSettingsGenerationTests {

  private MjGlobalSettings _settings;
  private XmlDocument _doc;
  private XmlElement _option;
  private XmlElement _size;

  [SetUp]
  public void SetUp() {
    _settings = new GameObject("settings").AddComponent<MjGlobalSettings>();
    _doc = new XmlDocument();
    var root = (XmlElement)_doc.AppendChild(_doc.CreateElement("root"));
    _option = (XmlElement)root.AppendChild(_doc.CreateElement("option"));
    _size = (XmlElement)root.AppendChild(_doc.CreateElement("size"));
  }

  [TearDown]
  public void TearDown() {
    UnityEngine.Object.DestroyImmediate(_settings.gameObject);
  }

  [Test]
  public void GenerateOptionAndSize() {
    _settings.GlobalOptions.ImpRatio = 1.2f;
    _settings.GlobalOptions.Magnetic = new Vector3(3.4f, 4.5f, 5.6f);
    _settings.GlobalOptions.Wind = new Vector3(6.7f, 7.8f, 8.9f);
    _settings.GlobalOptions.Density = 0.1f;
    _settings.GlobalOptions.Viscosity = 2.3f;
    _settings.GlobalOptions.OverrideMargin = 4.5f;
    _settings.GlobalOptions.Integrator = IntegratorType.RK4;
    _settings.GlobalOptions.Cone = FrictionConeType.elliptic;
    _settings.GlobalOptions.Jacobian = JacobianType.dense;
    _settings.GlobalOptions.Solver = ConstraintSolverType.PGS;
    _settings.GlobalOptions.Iterations = 12;
    _settings.GlobalOptions.Tolerance = 3.4f;
    _settings.GlobalOptions.NoSlipIterations = 5;
    _settings.GlobalOptions.NoSlipTolerance = 6.7f;
    _settings.GlobalOptions.MprIterations = 8;
    _settings.GlobalOptions.MprTolerance = 0.9f;
    _settings.GlobalSizes.Nconmax = 321;

    _settings.OptionSizeToMjcf(_option, _size);
    Assert.That(_doc.OuterXml, Does.Contain(@"impratio=""1.2"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"magnetic=""3.4 4.5 5.6"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"wind=""6.7 7.8 8.9"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"density=""0.1"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"viscosity=""2.3"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"o_margin=""4.5"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"integrator=""RK4"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"cone=""elliptic"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"collision=""all"""));  // the default value.
    Assert.That(_doc.OuterXml, Does.Contain(@"jacobian=""dense"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"o_solref="));
    Assert.That(_doc.OuterXml, Does.Contain(@"o_solimp="));
    Assert.That(_doc.OuterXml, Does.Contain(@"solver=""PGS"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"iterations=""12"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"tolerance=""3.4"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"noslip_iterations=""5"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"noslip_tolerance=""6.7"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"mpr_iterations=""8"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"mpr_tolerance=""0.9"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"nconmax=""321"""));
  }

  [Test]
  public void GenerateFlag() {
    _settings.GlobalOptions.Flag.Gravity = EnableDisableFlag.disable;
    _settings.OptionSizeToMjcf(_option, _size);
    Assert.That(_doc.OuterXml, Does.Contain(@"gravity=""disable"""));
    Assert.That(_doc.OuterXml, Does.Contain(@"constraint="));
    Assert.That(_doc.OuterXml, Does.Contain(@"equality="));
    Assert.That(_doc.OuterXml, Does.Contain(@"frictionloss="));
    Assert.That(_doc.OuterXml, Does.Contain(@"limit="));
    Assert.That(_doc.OuterXml, Does.Contain(@"contact="));
    Assert.That(_doc.OuterXml, Does.Contain(@"passive="));
    Assert.That(_doc.OuterXml, Does.Contain(@"clampctrl="));
    Assert.That(_doc.OuterXml, Does.Contain(@"warmstart="));
    Assert.That(_doc.OuterXml, Does.Contain(@"filterparent="));
    Assert.That(_doc.OuterXml, Does.Contain(@"actuation="));
    Assert.That(_doc.OuterXml, Does.Contain(@"refsafe="));
    Assert.That(_doc.OuterXml, Does.Contain(@"override="));
    Assert.That(_doc.OuterXml, Does.Contain(@"energy="));
    Assert.That(_doc.OuterXml, Does.Contain(@"fwdinv="));
    Assert.That(_doc.OuterXml, Does.Contain(@"sensornoise="));
  }
}

[TestFixture]
public class MjGlobalSettingsParsingTests {

  private MjGlobalSettings _settings;
  private XmlElement _option;
  private XmlElement _size;
  private XmlElement _flag;

  [SetUp]
  public void SetUp() {
    _settings = new GameObject("settings").AddComponent<MjGlobalSettings>();
    var doc = new XmlDocument();
    var root = (XmlElement)doc.AppendChild(doc.CreateElement("root"));
    _option = (XmlElement)root.AppendChild(doc.CreateElement("option"));
    _size = (XmlElement)root.AppendChild(doc.CreateElement("size"));
    _flag = (XmlElement)_option.AppendChild(doc.CreateElement("flag"));
  }

  [TearDown]
  public void TearDown() {
    UnityEngine.Object.DestroyImmediate(_settings.gameObject);
  }

  [Test]
  public void ParseSizeOptionAndFlag() {
    _option.SetAttribute("impratio", "1.2");
    _option.SetAttribute("magnetic", "3.4 4.5 5.6");
    _option.SetAttribute("wind", "6.7 7.8 8.9");
    _option.SetAttribute("density", "0.1");
    _option.SetAttribute("viscosity", "2.3");
    _option.SetAttribute("o_margin", "4.5");
    _option.SetAttribute("integrator", "RK4");
    _option.SetAttribute("cone", "elliptic");
    _option.SetAttribute("collisionchecktype", "all");
    _option.SetAttribute("jacobian", "dense");
    _option.SetAttribute("solver", "PGS");
    _option.SetAttribute("iterations", "12");
    _option.SetAttribute("tolerance", "3.4");
    _option.SetAttribute("noslip_iterations", "5");
    _option.SetAttribute("noslip_tolerance", "6.7");
    _option.SetAttribute("mpr_iterations", "8");
    _option.SetAttribute("mpr_tolerance", "0.9");

    _flag.SetAttribute("gravity", "disable");

    _size.SetAttribute("nconmax", "432");

    _settings.ParseOptionSizeMjcf(_option, _size);
    Assert.That(_settings.GlobalOptions.ImpRatio, Is.EqualTo(1.2f));
    Assert.That(_settings.GlobalOptions.Magnetic, Is.EqualTo(new Vector3(3.4f, 4.5f, 5.6f)));
    Assert.That(_settings.GlobalOptions.Wind, Is.EqualTo(new Vector3(6.7f, 7.8f, 8.9f)));
    Assert.That(_settings.GlobalOptions.Density, Is.EqualTo(0.1f));
    Assert.That(_settings.GlobalOptions.Viscosity, Is.EqualTo(2.3f));
    Assert.That(_settings.GlobalOptions.OverrideMargin, Is.EqualTo(4.5f));
    Assert.That(_settings.GlobalOptions.Integrator, Is.EqualTo(IntegratorType.RK4));
    Assert.That(_settings.GlobalOptions.Cone, Is.EqualTo(FrictionConeType.elliptic));
    Assert.That(_settings.GlobalOptions.Jacobian, Is.EqualTo(JacobianType.dense));
    Assert.That(_settings.GlobalOptions.Solver, Is.EqualTo(ConstraintSolverType.PGS));
    Assert.That(_settings.GlobalOptions.Iterations, Is.EqualTo(12));
    Assert.That(_settings.GlobalOptions.Tolerance, Is.EqualTo(3.4f));
    Assert.That(_settings.GlobalOptions.NoSlipIterations, Is.EqualTo(5));
    Assert.That(_settings.GlobalOptions.NoSlipTolerance, Is.EqualTo(6.7f));
    Assert.That(_settings.GlobalOptions.MprIterations, Is.EqualTo(8));
    Assert.That(_settings.GlobalOptions.MprTolerance, Is.EqualTo(0.9f));

    Assert.That(_settings.GlobalOptions.Flag.Gravity, Is.EqualTo(EnableDisableFlag.disable));

    Assert.That(_settings.GlobalSizes.Nconmax, Is.EqualTo(432));
    // these statements shouldn't fail:
    _settings.ParseOptionSizeMjcf(_option, null);
    _settings.ParseOptionSizeMjcf(null, _size);
  }

  [Test]
  public void AvoidMultipleFlagClauses() {
    var doubleFlagXML = @"<option>
      <flag/> <flag/>
      </option>";
    var doc = new XmlDocument();
    doc.LoadXml(doubleFlagXML);
    Assert.That(
        () => { _settings.ParseOptionSizeMjcf(doc.DocumentElement, null); },
        Throws.ArgumentException);
  }
}
}


text:
namespace syncer {
class SyncErrorFactory;
}

namespace value_store {
class ValueStoreFactory;
}

namespace extensions {

class SettingsSyncProcessor;
class SyncableSettingsStorage;

// Manages ValueStore objects for extensions, including routing
// changes from sync to them.
// Lives entirely on the FILE thread.
class SyncStorageBackend : public syncer::SyncableService {
 public:
  // |storage_factory| is use to create leveldb storage areas.
  // |observers| is the list of observers to settings changes.
  SyncStorageBackend(
      scoped_refptr<value_store::ValueStoreFactory> storage_factory,
      const SettingsStorageQuotaEnforcer::Limits& quota,
      scoped_refptr<SettingsObserverList> observers,
      syncer::ModelType sync_type,
      const syncer::SyncableService::StartSyncFlare& flare);

  SyncStorageBackend(const SyncStorageBackend&) = delete;
  SyncStorageBackend& operator=(const SyncStorageBackend&) = delete;

  ~SyncStorageBackend() override;

  virtual value_store::ValueStore* GetStorage(const std::string& extension_id);
  virtual void DeleteStorage(const std::string& extension_id);

  // syncer::SyncableService implementation.
  void WaitUntilReadyToSync(base::OnceClosure done) override;
  syncer::SyncDataList GetAllSyncDataForTesting(syncer::ModelType type) const;
  absl::optional<syncer::ModelError> MergeDataAndStartSyncing(
      syncer::ModelType type,
      const syncer::SyncDataList& initial_sync_data,
      std::unique_ptr<syncer::SyncChangeProcessor> sync_processor,
      std::unique_ptr<syncer::SyncErrorFactory> sync_error_factory) override;
  absl::optional<syncer::ModelError> ProcessSyncChanges(
      const base::Location& from_here,
      const syncer::SyncChangeList& change_list) override;
  void StopSyncing(syncer::ModelType type) override;

 private:
  // Gets a weak reference to the storage area for a given extension,
  // initializing sync with some initial data if sync enabled.
  SyncableSettingsStorage* GetOrCreateStorageWithSyncData(
      const std::string& extension_id,
      std::unique_ptr<base::DictionaryValue> sync_data) const;

  // Creates a new SettingsSyncProcessor for an extension.
  std::unique_ptr<SettingsSyncProcessor> CreateSettingsSyncProcessor(
      const std::string& extension_id) const;

  // The Factory to use for creating new ValueStores.
  const scoped_refptr<value_store::ValueStoreFactory> storage_factory_;

  // Quota limits (see SettingsStorageQuotaEnforcer).
  const SettingsStorageQuotaEnforcer::Limits quota_;

  // The list of observers to settings changes.
  const scoped_refptr<SettingsObserverList> observers_;

  // A cache of ValueStore objects that have already been created.
  // Ensure that there is only ever one created per extension.
  using StorageObjMap =
      std::map<std::string, std::unique_ptr<SyncableSettingsStorage>>;
  mutable StorageObjMap storage_objs_;

  // Current sync model type. Either EXTENSION_SETTINGS or APP_SETTINGS.
  syncer::ModelType sync_type_;

  // Current sync processor, if any.
  std::unique_ptr<syncer::SyncChangeProcessor> sync_processor_;

  // Current sync error handler if any.
  std::unique_ptr<syncer::SyncErrorFactory> sync_error_factory_;

  syncer::SyncableService::StartSyncFlare flare_;
};

}  // namespace extensions

#endif  // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_STORAGE_BACKEND_H_


text:
"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 core_1 = require("@angular/core");
var UserProfileService = (function () {
    function UserProfileService() {
        this.isLoggedIn = false;
    }
    return UserProfileService;
}());
UserProfileService = __decorate([
    core_1.Injectable()
], UserProfileService);
exports.UserProfileService = UserProfileService;
//# sourceMappingURL=user-profile.service.js.map


text:
require 'test_helper'

class CoachTest < ActiveSupport::TestCase

end