github.com/PolymerLabs/arcs-live:concrete-storage/node_modules/grpc/node_modules/needle/lib/needle.js: [ master, ] |
---|
150: function Needle(method, uri, data, options, callback) {
|
2: // Needle -- HTTP Client for Node.js
|
13: debug = require('debug')('needle'),
|
26: var user_agent = 'Needle/' + version;
|
39: // these are the status codes that Needle interprets as redirects.
|
151: // if (!(this instanceof Needle)) {
|
152: // return new Needle(method, uri, data, options, callback);
|
172: Needle.prototype.setup = function(uri, options) {
|
283: Needle.prototype.start = function() {
|
378: Needle.prototype.get_request_opts = function(method, uri, config) {
|
404: Needle.prototype.should_follow = function(location, config, original) {
|
426: Needle.prototype.send_request = function(count, method, uri, config, post_data, out, callback) {
|
785: return new Needle(method, uri, null, options, callback).start();
|
791: return new Needle(method, uri, data, options, callback).start();
|
796: return new Needle(method, uri, data, opts, callback).start();
|
68: boundary : '--------------------NODENEEDLEHTTPCLIENT',
|
github.com/PolymerLabs/arcs-live:concrete-storage/node_modules/grpc/node_modules/needle/package.json: [ master, ] |
---|
30: "needle": "bin/needle"
|
2: "_from": "needle@^2.2.1",
|
3: "_id": "needle@2.3.1",
|
6: "_location": "/grpc/needle",
|
11: "raw": "needle@^2.2.1",
|
12: "name": "needle",
|
13: "escapedName": "needle",
|
21: "_resolved": "https://registry.npmjs.org/needle/-/needle-2.3.1.tgz",
|
23: "_spec": "needle@^2.2.1",
|
33: "url": "https://github.com/tomas/needle/issues"
|
57: "homepage": "https://github.com/tomas/needle#readme",
|
75: "main": "./lib/needle",
|
76: "name": "needle",
|
79: "url": "git+https://github.com/tomas/needle.git"
|
github.com/PolymerLabs/arcs-live:concrete-storage/node_modules/grpc/node_modules/needle/README.md: [ master, ] |
---|
1: Needle
|
144: ### needle(method, url[, data][, options][, callback]) `(> 2.0.x)`
|
157: ### needle.head(url[, options][, callback])
|
170: ### needle.get(url[, options][, callback])
|
178: ### needle.post(url, data[, options][, callback])
|
190: ### needle.put(url, data[, options][, callback])
|
206: ### needle.patch(url, data[, options][, callback])
|
210: ### needle.delete(url, data[, options][, callback])
|
223: ### needle.request(method, url, data[, options][, callback])
|
4: [](https://nodei.co/npm/needle/)
|
9: var needle = require('needle');
|
11: needle.get('http://www.google.com', function(error, response) {
|
17: Callbacks not floating your boat? Needle got your back.
|
25: // the callback is optional, and needle returns a `readableStream` object
|
27: needle
|
35: From version 2.0.x up, Promises are also supported. Just call `needle()` directly and you'll get a native Promise object.
|
38: needle('put', 'https://hacking.the.gibson/login', { password: 'god' }, { json: true })
|
47: With only two real dependencies, Needle supports:
|
61: This makes Needle an ideal alternative for performing quick HTTP requests in Node, either for API interaction, downlo...(144 bytes skipped)...
|
67: $ npm install needle
|
75: needle('get', 'https://server.com/posts/12')
|
84: needle.get('ifconfig.me/all.json', function(error, response, body) {
|
94: needle.get('https://google.com/images/logo.png').pipe(out).on('finish', function() {
|
99: As you can see, you can use Needle with Promises or without them. When using Promises or when a callback is passed, the response's bod...(179 bytes skipped)...
|
101: ...(19 bytes skipped)... passed, however, the buffering logic will be skipped but the response stream will still go through Needle's processing pipeline, so you get all the benefits of post-processing while keeping the streamishne...(25 bytes skipped)...
|
106: Depending on the response's Content-Type, Needle will either attempt to parse JSON or XML streams, or, if a text response was received, will ensure ...(41 bytes skipped)...
|
111: needle.get('http://stackoverflow.com/feeds', { compressed: true }, function(err, resp) {
|
126: var stream = needle.get('https://backend.server.com/everything.html', options);
|
146: Calling `needle()` directly returns a Promise. Besides `method` and `url`, all parameters are optional, although wh...(93 bytes skipped)...
|
149: needle('get', 'http://some.url.com')
|
155: Except from the above, all of Needle's request methods return a Readable stream, and both `options` and `callback` are optional. If pass...(126 bytes skipped)...
|
160: needle.head('https://my.backend.server.com', {
|
173: needle.get('google.com/search?q=syd+barrett', function(err, resp) {
|
174: // if no http:// is found, Needle will automagically prepend it.
|
185: needle.post('https://my.app.com/endpoint', 'foo=bar', options, function(err, resp) {
|
201: needle.put('https://api.app.com/v2', nested, function(err, resp) {
|
218: needle.delete('https://api.app.com/messages/123', null, options, function(err, resp) {
|
233: needle.request('get', 'forum.com/search', params, function(err, resp) {
|
239: Now, if you set pass `json: true` among the options, Needle won't set your params as a querystring but instead send a JSON representation of your data through ...(97 bytes skipped)...
|
242: needle.request('get', 'forum.com/search', params, { json: true }, function(err, resp) {
|
275: ...(74 bytes skipped)... data was consumed or an error ocurred somewhere in between. Unlike a regular stream's `end` event, Needle's `done` will be fired either on success or on failure, which is why the first argument may be an E...(28 bytes skipped)...
|
278: var resp = needle.get('something.worthy/of/being/streamed/by/needle');
|
291: Emitted when an error ocurrs. This should only happen once in the lifecycle of a Needle request.
|
302: ...(3 bytes skipped)... information about options that've changed, there's always [the changelog](https://github.com/tomas/needle/releases).
|
314: ...(182 bytes skipped)...p) errors on some servers that misbehave when receiving payloads of unknown size. Set it to `0` and Needle will get and set the stream's length for you, or leave unset for the default behaviour, which is no...(43 bytes skipped)...
|
321: ...(71 bytes skipped)...se bodies automagically. Defaults to `true`. You can also set this to 'xml' or 'json' in which case Needle will *only* parse the response if the content type matches.
|
336: - `user_agent`: Sets the 'User-Agent' HTTP header. Defaults to `Needle/{version} (Node.js {node_version})`.
|
361: - `follow_if_same_host` : When true, Needle will only follow redirects that point to the same host as the original request. `false` by default....(0 bytes skipped)...
|
362: - `follow_if_same_protocol` : When true, Needle will only follow redirects that point to the same protocol as the original request. `false` by defa...(4 bytes skipped)...
|
367: Yes sir, we have it. Needle includes a `defaults()` method, that lets you override some of the defaults for all future requests...(12 bytes skipped)...
|
370: needle.defaults({
|
376: This will override Needle's default user agent and 10-second timeout, and disable response parsing, so you don't need to pass...(38 bytes skipped)...
|
381: Since you can pass a custom HTTPAgent to Needle you can do all sorts of neat stuff. For example, if you want to use the [`tunnel`](https://github.c...(67 bytes skipped)...
|
389: needle.get('foobar.com', { agent: myAgent });
|
395: Unless you're running an old version of Node (< 0.11.4), by default Needle won't set the Connection header on requests, yielding Node's default behaviour of keeping the conne...(118 bytes skipped)...
|
397: ...(82 bytes skipped)...ime from exiting, either because of a bug or 'feature' that was changed on 0.11.4. To overcome this Needle does set the 'Connection' header to 'close' on those versions, however this also means that making ...(62 bytes skipped)...
|
407: needle.get('https://api.server.com', { username: 'you', password: 'secret' },
|
416: needle.get('https://username:password@api.server.com', function(err, resp) {
|
424: needle.get('other.server.com', { username: 'you', password: 'secret', auth: 'digest' },
|
426: // needle prepends 'http://' to your URL, if missing
|
439: needle.get('api.github.com/users/tomas', options, function(err, resp, body) {
|
448: needle.get('https://news.ycombinator.com/rss', function(err, resp, body) {
|
456: needle.get('http://upload.server.com/tux.png', { output: '/tmp/tux.png' }, function(err, resp, body) {
|
464: needle.get('http://search.npmjs.org', { proxy: 'http://localhost:1234' }, function(err, resp, body) {
|
472: var stream = needle.get('http://www.as35662.net/100.log');
|
485: var stream = needle.get('http://jsonplaceholder.typicode.com/db', { parse: true });
|
504: needle.get('http://jsonplaceholder.typicode.com/db', { parse: true })
|
519: needle.post('http://my.other.app.com', data, { multipart: true }, function(err, resp, body) {
|
520: // needle will read the file and include it in the form-data as binary
|
527: needle.put('https://api.app.com/v2', fs.createReadStream('myfile.txt'), function(err, resp, body) {
|
545: needle.post('http://somewhere.com/over/the/rainbow', data, { multipart: true }, function(err, resp, body) ...(1 bytes skipped)...
|
563: needle.post('http://test.com/', data, { timeout: 5000, multipart: true }, function(err, resp, body) {
|
582: > You can use Docker to run tests by creating a container and mounting the needle project directory on `/app`
|
583: > `docker create --name Needle -v /app -w /app -v /app/node_modules -i node:argon`
|
github.com/apache/activemq-artemis:artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/KMPNeedle.java: [ master, ] |
---|
30: private final byte[] needle;
|
27: final class KMPNeedle {
|
32: private KMPNeedle(byte[] needle) {
|
24: ...(43 bytes skipped)...ttps://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm">Knuth-Morris-Pratt</a>'s needle to be used
|
33: Objects.requireNonNull(needle);
|
34: this.needle = needle;
|
35: this.jumpTable = createJumpTable(needle);
|
38: private static int[] createJumpTable(byte[] needle) {
|
39: final int[] jumpTable = new int[needle.length + 1];
|
41: for (int i = 1; i < needle.length; i++) {
|
42: while (j > 0 && needle[j] != needle[i]) {
|
45: if (needle[j] == needle[i]) {
|
63: * the remaining haystack to be processed is < of the remaining needle to be matched.
|
71: final int needleLength = needle.length;
|
80: while (j > 0 && needle[j] != value) {
|
84: if (needle[j] == value) {
|
97: public static KMPNeedle of(byte[] needle) {
|
98: return new KMPNeedle(needle);
|
72: int remainingNeedle = needleLength;
|
75: if (remainingNeedle > remainingHayStack) {
|
82: remainingNeedle = needleLength - j;
|
86: remainingNeedle--;
|
87: assert remainingNeedle >= 0;
|
89: if (j == needleLength) {
|
90: final int startMatch = index - needleLength + 1;
|
github.com/PolymerLabs/arcs-live:concrete-storage/node_modules/grpc/node_modules/needle/examples/upload-image.js: [ master, ] |
---|
1: var needle = require('../'),
|
21: needle.post(url, params, opts, function(err, resp) {
|
31: needle.get(url, function(err, resp) {
|
github.com/PolymerLabs/arcs-live:concrete-storage/node_modules/grpc/node_modules/needle/examples/multipart-stream.js: [ master, ] |
---|
1: var needle = require('./../');
|
3: var url = 'http://posttestserver.com/post.php?dir=needle';
|
15: var resp = needle.post(url, data, { multipart: true });
|
github.com/PolymerLabs/arcs-live:concrete-storage/node_modules/grpc/node_modules/needle/examples/stream-to-file.js: [ master, ] |
---|
2: needle = require('./..'),
|
9: needle
|
github.com/kubernetes/minikube:site/package-lock.json: [ master, ] |
---|
1127: "needle": "^2.2.1",
|
1108: "needle": {
|
github.com/kubernetes/minikube:site/themes/docsy/userguide/package-lock.json: [ master, ] |
---|
1098: "needle": "^2.2.1",
|
1079: "needle": {
|
github.com/angular/material-start:package-lock.json: [ master, ] |
---|
1624: "needle": "^2.2.1",
|
1605: "needle": {
|
github.com/apache/beam:website/www/site/themes/docsy/userguide/package-lock.json: [ master, ] |
---|
1098: "needle": "^2.2.1",
|
1079: "needle": {
|
github.com/html5rocks/www.html5rocks.com:static/demos/lemdoodle/examples/lem-planes/combined.js: [ master, ] |
---|
5051: 'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
|
5102: 'needle', 'halo', 'noodles', 'neutron', 'nose'
|
13797: 'intro-finale/items-needle-thread',
|
13798: 'intro-finale/items-needle',
|
15100: 'intro-finale/items-needle-thread': { width: 68, height: 65, x: 834, y: 0 },
|
15101: 'intro-finale/items-needle': { top: 8, width: 59, height: 51, x: 904, y: 0 },
|
github.com/html5rocks/www.html5rocks.com:static/demos/lemdoodle/examples/lem-embedded/combined.js: [ master, ] |
---|
5024: 'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
|
5075: 'needle', 'halo', 'noodles', 'neutron', 'nose'
|
13843: nItems = ['needle', 'noodles'];
|
15362: 'intro-finale/items-needle-thread',
|
15363: 'intro-finale/items-needle',
|
16665: 'intro-finale/items-needle-thread': { width: 68, height: 65, x: 834, y: 0 },
|
16666: 'intro-finale/items-needle': { top: 8, width: 59, height: 51, x: 904, y: 0 },
|
github.com/GoogleCloudPlatform/training-data-analyst:blogs/microservices-demo-1/src/paymentservice/package-lock.json: [ master, ] |
---|
1058: "needle": "^2.2.0",
|
1043: "needle": {
|
github.com/GoogleCloudPlatform/training-data-analyst:blogs/microservices-demo-1/src/currencyservice/package-lock.json: [ master, ] |
---|
1036: "needle": "^2.2.0",
|
1021: "needle": {
|
github.com/kubernetes/website:themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result |
---|
github.com/llvm-mirror/clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ] |
---|
727: const DeclRefExpr *Needle;
|
723: /// a particular declaration (the needle) within any evaluated component of an
|
732: ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
|
733: : Inherited(Context), FoundReference(false), Needle(Needle) {}
|
744: if (E == Needle)
|
gerrit.googlesource.com/plugins/image-diff:package-lock.json: [ master, ] |
---|
1435: "needle": "^2.2.1",
|
1410: "needle": {
|
1412: "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.0.tgz",
|
android.googlesource.com/platform/external/rust/crates/memchr:src/iter.rs: [ master, ] |
---|
35: needle: u8,
|
73: needle1: u8,
|
74: needle2: u8,
|
120: needle1: u8,
|
121: needle2: u8,
|
122: needle3: u8,
|
43: /// Creates a new iterator that yields all positions of needle in haystack.
|
45: pub fn new(needle: u8, haystack: &[u8]) -> Memchr {
|
46: Memchr { needle: needle, haystack: haystack, position: 0 }
|
55: iter_next!(self, memchr(self.needle, self.haystack))
|
67: iter_next_back!(self, memrchr(self.needle, self.haystack))
|
82: /// Creates a new iterator that yields all positions of needle in haystack.
|
84: pub fn new(needle1: u8, needle2: u8, haystack: &[u8]) -> Memchr2 {
|
86: needle1: needle1,
|
87: needle2: needle2,
|
99: iter_next!(self, memchr2(self.needle1, self.needle2, self.haystack))
|
113: memrchr2(self.needle1, self.needle2, self.haystack)
|
133: needle1: u8,
|
134: needle2: u8,
|
135: needle3: u8,
|
139: needle1: needle1,
|
140: needle2: needle2,
|
141: needle3: needle3,
|
155: memchr3(self.needle1, self.needle2, self.needle3, self.haystack)
|
170: memrchr3(self.needle1, self.needle2, self.needle3, self.haystack)
|
github.com/apache/trafficcontrol:traffic_portal/app/src/package-lock.json: [ master, ] |
---|
1251: "needle": "^2.2.1",
|
1234: "needle": {
|
chromium.googlesource.com/native_client/nacl-llvm-project-v10:clang/lib/Sema/AnalysisBasedWarnings.cpp: [ master, ] |
---|
727: const DeclRefExpr *Needle;
|
723: /// a particular declaration (the needle) within any evaluated component of an
|
732: ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
|
733: : Inherited(Context), FoundReference(false), Needle(Needle) {}
|
744: if (E == Needle)
|
android.googlesource.com/platform/external/clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ] |
---|
591: const DeclRefExpr *Needle;
|
587: /// a particular declaration (the needle) within any evaluated component of an
|
596: ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
|
597: : Inherited(Context), FoundReference(false), Needle(Needle) {}
|
608: if (E == Needle)
|
chromium.googlesource.com/native_client/pnacl-clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ] |
---|
579: const DeclRefExpr *Needle;
|
575: /// a particular declaration (the needle) within any evaluated component of an
|
582: ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
|
584: FoundReference(false), Needle(Needle) {}
|
595: if (E == Needle)
|
github.com/google/myanmar-tools:clients/js/package-lock.json: [ master, ] |
---|
1881: "needle": "^2.2.1",
|
1860: "needle": {
|
1862: "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz",
|
android.googlesource.com/platform/external/clang_35a:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ] |
---|
577: const DeclRefExpr *Needle;
|
573: /// a particular declaration (the needle) within any evaluated component of an
|
580: ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
|
582: FoundReference(false), Needle(Needle) {}
|
593: if (E == Needle)
|
github.com/bazelbuild/rules_nodejs:tools/fine_grained_deps_npm/package-lock.json: [ master, ] |
---|
768: "needle": "^2.2.0",
|
751: "needle": {
|
github.com/googlei18n/myanmar-tools:clients/js/package-lock.json: [ master, ] Duplicate result |
---|
github.com/html5rocks/www.html5rocks.com:static/demos/lemdoodle/examples/lem-planes/lem-const.js: [ master, ] |
---|
172: 'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
|
223: 'needle', 'halo', 'noodles', 'neutron', 'nose'
|
github.com/html5rocks/www.html5rocks.com:static/demos/lemdoodle/examples/lem-embedded/lem-const.js: [ master, ] |
---|
172: 'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
|
223: 'needle', 'halo', 'noodles', 'neutron', 'nose'
|
github.com/html5rocks/www.html5rocks.com:static/demos/lemdoodle/examples/lem-standalone/lem-const.js: [ master, ] |
---|
185: 'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
|
236: 'needle', 'halo', 'noodles', 'neutron', 'nose'
|
github.com/google/kf:docs/kf.dev/themes/docsy/userguide/package-lock.json: [ master, ] |
---|
1098: "needle": "^2.2.1",
|
1079: "needle": {
|
chromium.googlesource.com/git/chromium:sync/syncable/directory.h: [ trunk, ] |
---|
536: EntryKernel needle;
|
535: // look something up in an index. Needle in haystack metaphor.
|
chromium.googlesource.com/chromium:sync/syncable/directory.h: [ trunk, ] Duplicate result |
---|
github.com/apache/hawq:src/backend/optimizer/util/clauses.c: [ master, ] |
---|
4526: Expr *needle; /* This is the expression being searched */
|
4530: * expression_matching_walker checks if the expression 'needle' in context is a sub-expression of hayStack.
|
4536: Assert(ctx->needle);
|
4543: if (equal(ctx->needle, hayStack))
|
4558: ctx.needle = expr1;
|
github.com/html5rocks/www.html5rocks.com:content/tutorials/doodles/lem/static/code/lem-const.js: [ master, ] Duplicate result |
---|
chromium.googlesource.com/devtools/devtools-frontend:node_modules/mocha/package.json: [ master, ] |
---|
131: "needle": "^2.5.0",
|
github.com/google/llvm-propeller:clang/lib/Sema/AnalysisBasedWarnings.cpp: [ plo-dev, ] Duplicate result |
---|
github.com/google/rekall:rekall-core/rekall/scan.py: [ master, ] |
---|
170: needle = None
|
171: needle_offset = None
|
540: needles = []
|
59: """Is the needle found at 'offset'?
|
63: checked for the needle.
|
173: def __init__(self, needle=None, needle_offset=0, **kwargs):
|
175: self.needle = needle
|
176: self.needle_offset = needle_offset
|
180: buffer_offset = buffer_as.get_buffer_offset(offset) + self.needle_offset
|
181: if buffer_as.data.startswith(self.needle, buffer_offset):
|
182: return self.needle
|
185: # Search the rest of the buffer for the needle.
|
186: buffer_offset = buffer_as.get_buffer_offset(offset) + self.needle_offset
|
187: dindex = buffer_as.data.find(self.needle, buffer_offset + 1)
|
532: yield ("StringCheck", dict(needle=expected_bytes,
|
533: needle_offset=rel_offset + array_offset))
|
553: needle=self.needles[0])
|
96: def __init__(self, needles=None, **kwargs):
|
100: needles: A list of strings we search for.
|
103: RuntimeError: No needles provided.
|
109: if not needles:
|
110: raise RuntimeError("No needles provided to search.")
|
114: if max([len(x) for x in needles]) > 50:
|
118: # sure all the needles are bytes too.
|
119: byte_needles = [utils.SmartStr(x) for x in needles]
|
120: tree = acora.AcoraBuilder(*byte_needles)
|
539: # Override with the needles to check for.
|
542: def __init__(self, needles=None, **kwargs):
|
544: if needles is not None:
|
545: self.needles = needles
|
550: if len(needles) == 1:
|
557: needles=self.needles)
|
587: self.needles = []
|
595: self.needles.append(tmp.obj_vm.read(0, tmp.obj_size))
|
597: # The common string between all the needles.
|
599: ("MultiStringFinderCheck", dict(needles=self.needles)),
|
github.com/kubernetes/contributor-site:themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result |
---|
github.com/GoogleCloudPlatform/appengine-php:php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c: [ master, ] |
---|
874: mbfl_wchar_device needle;
|
875: int needle_len;
|
879: int needle_pos;
|
890: if (c == (int)pc->needle.buffer[pc->needle_pos]) {
|
891: if (pc->needle_pos == 0) {
|
894: pc->needle_pos++; /* needle pointer */
|
895: if (pc->needle_pos >= pc->needle_len) {
|
897: pc->needle_pos--;
|
900: } else if (pc->needle_pos != 0) {
|
902: h = (int *)pc->needle.buffer;
|
907: m = (int *)pc->needle.buffer;
|
908: n = pc->needle_pos - 1;
|
916: pc->needle_pos = 0;
|
921: pc->needle_pos--;
|
982: mbfl_string *needle,
|
987: mbfl_string _haystack_u8, _needle_u8;
|
988: const mbfl_string *haystack_u8, *needle_u8;
|
991: if (haystack == NULL || haystack->val == NULL || needle == NULL || needle->val == NULL) {
|
1015: if (needle->no_encoding != mbfl_no_encoding_utf8) {
|
1016: mbfl_string_init(&_needle_u8);
|
1017: needle_u8 = mbfl_convert_encoding(needle, &_needle_u8, mbfl_no_encoding_utf8);
|
1018: if (needle_u8 == NULL) {
|
1023: needle_u8 = needle;
|
1026: if (needle_u8->len < 1) {
|
1032: if (haystack_u8->len < needle_u8->len) {
|
1038: unsigned int needle_u8_len = needle_u8->len;
|
1042: *needle_u8_val = needle_u8->val;
|
1044: jtbl[i] = needle_u8_len + 1;
|
1046: for (i = 0; i < needle_u8_len - 1; ++i) {
|
1047: jtbl[needle_u8_val[i]] = needle_u8_len - i;
|
1058: p += needle_u8_len;
|
1064: q = needle_u8_val + needle_u8_len;
|
1066: if (q == needle_u8_val) {
|
1089: unsigned int needle_u8_len = needle_u8->len, needle_len = 0;
|
1093: *needle_u8_val = needle_u8->val;
|
1095: jtbl[i] = needle_u8_len;
|
1097: for (i = needle_u8_len - 1; i > 0; --i) {
|
1098: unsigned char c = needle_u8_val[i];
|
1101: ++needle_len;
|
1103: ++needle_len;
|
1107: unsigned char c = needle_u8_val[0];
|
1109: ++needle_len;
|
1111: ++needle_len;
|
1116: qe = needle_u8_val + needle_u8_len;
|
1118: if (-offset > needle_len) {
|
1119: offset += needle_len;
|
1144: if (p < e + needle_u8_len) {
|
1147: p -= needle_u8_len;
|
1150: q = needle_u8_val;
|
1154: p -= needle_u8_len;
|
1180: if (needle_u8 == &_needle_u8) {
|
1181: mbfl_string_clear(&_needle_u8);
|
1193: mbfl_string *needle
|
1201: if (haystack == NULL || needle == NULL) {
|
1204: /* needle is converted into wchar */
|
1205: mbfl_wchar_device_init(&pc.needle);
|
1207: needle->no_encoding,
|
1209: mbfl_wchar_device_output, 0, &pc.needle);
|
1213: p = needle->val;
|
1214: n = needle->len;
|
1225: pc.needle_len = pc.needle.pos;
|
1226: if (pc.needle.buffer == NULL) {
|
1229: if (pc.needle_len <= 0) {
|
1230: mbfl_wchar_device_clear(&pc.needle);
|
1239: mbfl_wchar_device_clear(&pc.needle);
|
1244: pc.needle_pos = 0;
|
1260: pc.needle_pos = 0;
|
1267: mbfl_wchar_device_clear(&pc.needle);
|
github.com/google/docsy:userguide/package-lock.json: [ master, ] Duplicate result |
---|
github.com/google/virtual-authenticators-tab:package-lock.json: [ master, ] |
---|
1694: "needle": "^2.2.1",
|
1675: "needle": {
|
github.com/apache/sling-whiteboard:serverless-microsling/package-lock.json: [ master, ] |
---|
992: "needle": "^2.1.0"
|
901: "needle": {
|
903: "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz",
|
github.com/google/cyanobyte:docs/themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result |
---|
github.com/google/streetview-publish-client-libraries:client_libraries/nodejs_library/package-lock.json: [ master, ] |
---|
1140: "needle": "^2.2.1",
|
1125: "needle": {
|
github.com/yeoman/generator-angular:route/index.js: [ master, ] |
---|
63: needle: '.otherwise',
|
github.com/google/gvisor-website:themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result |
---|
github.com/apache/openwhisk-client-js:package.json: [ master, ] |
---|
53: "needle": "^2.4.0"
|
github.com/grpc/grpc.io:themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result |
---|
github.com/GNOME/libdazzle:src/search/dzl-fuzzy-index-cursor.c: [ mainline, ] |
---|
65: const gchar *needle;
|
408: lookup.needle = query;
|
github.com/google/docsy-example:themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result |
---|
github.com/googlesamples/functions-as-a-service:package-lock.json: [ master, ] |
---|
1274: "needle": "^2.2.1",
|
1255: "needle": {
|
github.com/GoogleChrome/chrome-extensions-samples:apps/samples/text-editor/lib/ace/search.js: [ master, ] |
---|
49: needle: "",
|
74: if (!this.$options.needle)
|
94: if (!options.needle)
|
204: var needle = this.$options.needle;
|
206: needle = lang.escapeRegExp(this.$options.needle);
|
210: needle = "\\b" + needle + "\\b";
|
218: var re = new RegExp(needle, modifier);
|
github.com/GoogleChrome/chrome-app-samples:apps/samples/text-editor/lib/ace/search.js: [ master, ] Duplicate result |
---|
android.googlesource.com/platform/external/libwebsockets:include/libwebsockets/lws-fts.h: [ master, ] |
---|
168: const char *needle;
|
github.com/GNOME/gnome-notes:src/bjb-controller.c: [ mainline, ] |
---|
47: gchar *needle;
|
68: PROP_NEEDLE,
|
526: bjb_controller_apply_needle (BjbController *self)
|
777: bjb_controller_set_needle (BjbController *self, const gchar *needle )
|
787: bjb_controller_get_needle (BjbController *self)
|
556: on_needle_changed (BjbController *self)
|
45: /* needle, notebook and group define what the controller shows */
|
122: g_free (self->needle);
|
147: case PROP_NEEDLE:
|
148: g_value_set_string (value, self->needle);
|
175: case PROP_NEEDLE:
|
176: self->needle = g_strdup (g_value_get_string (value));
|
193: const gchar *needle = NULL;
|
196: needle = biji_item_get_uuid (item);
|
209: if (needle && g_strcmp0 (item_path, needle) == 0)
|
213: else if (!needle && BIJI_IS_NOTE_OBJ (
|
308: if (!self->needle || g_strcmp0 (self->needle, "") == 0)
|
323: if (g_strrstr (title, self->needle) != NULL)
|
330: if (g_strrstr (content, self->needle) != NULL)
|
529: gchar *needle;
|
531: needle = self->needle;
|
536: if (needle == NULL || g_strcmp0 (needle,"") == 0)
|
552: biji_get_items_matching_async (self->manager, self->group, needle, update_controller_callback, self);
|
558: bjb_controller_apply_needle (self);
|
598: bjb_controller_apply_needle (self);
|
648: /* Apply the needle to display the relevant items.
|
656: bjb_controller_apply_needle (self);
|
738: properties[PROP_NEEDLE] = g_param_spec_string ("needle",
|
739: "Needle",
|
761: gchar *needle)
|
766: "needle", needle,
|
779: if (self->needle)
|
780: g_free (self->needle);
|
782: self->needle = g_strdup (needle);
|
783: on_needle_changed (self);
|
789: if (!self->needle)
|
792: return self->needle;
|
827: bjb_controller_apply_needle (self);
|
834: g_clear_pointer (&self->needle, g_free);
|
836: self->needle = g_strdup ("");
|
871: bjb_controller_apply_needle (self);
|
877: bjb_controller_apply_needle (self);
|
894: on_needle_changed (self);
|
github.com/GoogleChrome/chrome-extensions-samples:apps/samples/text-editor/lib/ace/mode/text.js: [ master, ] |
---|
135: needle: needle
|
117: var needle = line.substring(Math.max(startOuter, 0),
|
121: if ((startOuter >= 0 && /^[\w\d]/.test(needle)) ||
|
122: (endOuter <= lineCols && /[\w\d]$/.test(needle)))
|
125: needle = line.substring(selection.start.column, selection.end.column);
|
126: if (!/^[\w\d]+$/.test(needle))
|
github.com/GoogleChrome/chrome-app-samples:apps/samples/text-editor/lib/ace/mode/text.js: [ master, ] Duplicate result |
---|
android.googlesource.com/platform/external/qt:Windows-4.7.4/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp: [ master, ] |
---|
129: const QString needle;
|
128: inline KeywordHelper(const QString &word) : needle(word) {}
|
134: return helper.needle < QLatin1String(kw);
|
139: return QLatin1String(kw) < helper.needle;
|
github.com/tensorflow/tfjs-examples:lstm-text-generation/data.js: [ master, ] |
---|
26: needle: 'Nietzsche'
|
31: needle: 'Jules Verne'
|
36: needle: 'Shakespeare'
|
40: needle: 'TensorFlow.js Code (Compiled, 0.11.7)'
|
github.com/PolymerLabs/arcs-live:concrete-storage/node_modules/grpc/node_modules/node-pre-gyp/package.json: [ master, ] |
---|
38: "needle": "^2.2.1",
|
github.com/apache/openwhisk-catalog:packages/github/webhook.js: [ master, ] |
---|
18: const needle = require('needle');
|
72: needle.post(registrationEndpoint, body, { 'json': true, username: username, password: accessToken, user_ag...(50 bytes skipped)...
|
99: needle.get(registrationEndpoint, { 'json': true, username: username, password: accessToken, user_agent: 'w...(43 bytes skipped)...
|
116: needle.delete(body[i].url, null, { username: username, password: accessToken, user_agent: 'whisk' }, funct...(29 bytes skipped)...
|
github.com/GNOME/libdazzle:src/search/dzl-fuzzy-mutable-index.c: [ mainline, ] |
---|
79: const gchar *needle;
|
432: * @needle: (in): The needle to fuzzy search for.
|
435: * DzlFuzzyMutableIndex searches within @fuzzy for strings that fuzzy match @needle.
|
448: const gchar *needle,
|
465: g_return_val_if_fail (needle, NULL);
|
469: if (!*needle)
|
474: downcase = g_utf8_casefold (needle, -1);
|
475: needle = downcase;
|
479: lookup.n_tables = g_utf8_strlen (needle, -1);
|
482: lookup.needle = needle;
|
486: for (i = 0, tmp = needle; *tmp; tmp = g_utf8_next_char (tmp))
|
github.com/apache/openwhisk-package-alarms:action/lib/common.js: [ master, ] |
---|
18: const needle = require('needle');
|
30: // needle takes e.g. 'put' not 'PUT'
|
31: needle.request(method.toLowerCase(), url, input, options, function(error, response, body) {
|
android.googlesource.com/platform/external/qt:Mac-4.7.4/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp: [ master, ] |
---|
129: const QString needle;
|
128: inline KeywordHelper(const QString &word) : needle(word) {}
|
134: return helper.needle < QLatin1String(kw);
|
139: return QLatin1String(kw) < helper.needle;
|
github.com/googlecreativelab/pattern-radio:kubernetes/tools/classifier_clustering/package-lock.json: [ master, ] |
---|
1590: "needle": "^2.2.1",
|
1573: "needle": {
|
github.com/apache/openwhisk-catalog:packages/slack/post.js: [ master, ] |
---|
18: const needle = require('needle');
|
79: needle.post(params.url, body, function (err, res, body) {
|
github.com/apache/openwhisk-client-js:lib/client.js: [ master, ] |
---|
22: const needle = require('needle')
|
27: * This implements a request-promise-like facade over the needle
|
28: * library. There are two gaps between needle and rp that need to be
|
30: * needle's non-excepting >=400 statusCode responses into exceptions
|
50: // this situation than needle
|
53: return needle(opts.method.toLowerCase(), // needle takes e.g. 'put' not 'PUT'
|
github.com/google/syzkaller:vendor/github.com/gobwas/glob/match/contains.go: [ master, ] |
---|
9: Needle string
|
13: func NewContains(needle string, not bool) Contains {
|
14: return Contains{needle, not}
|
18: return strings.Contains(s, self.Needle) != self.Not
|
24: idx := strings.Index(s, self.Needle)
|
31: offset = idx + len(self.Needle)
|
57: return fmt.Sprintf("<contains:%s[%s]>", not, self.Needle)
|
android.googlesource.com/platform/external/angle:third_party/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] |
---|
30: const char* needle;
|
76: const char* needle_string = nullptr;
|
79: auto needlepos = after_replacing_many->find(r.needle, pos);
|
82: needle_string = r.needle;
|
87: after_replacing_many->replace(next_pos, strlen(needle_string),
|
80: if (needlepos != std::string::npos && needlepos < next_pos) {
|
81: next_pos = needlepos;
|
android.googlesource.com/platform/external/abseil-cpp:absl/strings/str_replace_benchmark.cc: [ master, ] |
---|
30: const char* needle;
|
76: const char* needle_string = nullptr;
|
79: auto needlepos = after_replacing_many->find(r.needle, pos);
|
82: needle_string = r.needle;
|
87: after_replacing_many->replace(next_pos, strlen(needle_string),
|
80: if (needlepos != std::string::npos && needlepos < next_pos) {
|
81: next_pos = needlepos;
|
chromium.googlesource.com/chromium/src/third_party/abseil-cpp:absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result |
---|
chromium.googlesource.com/chromium/src/third_party:abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result |
---|
github.com/GNOME/gnome-notes:src/bjb-search-toolbar.c: [ mainline, ] |
---|
53: gchar *needle;
|
124: bjb_controller_set_needle (BJB_CONTROLLER (self->controller),
|
161: /* Get the needle from controller */
|
162: self->needle = bjb_controller_get_needle (self->controller);
|
164: if (self->needle && g_strcmp0 (self->needle, "") != 0)
|
166: gtk_entry_set_text (GTK_ENTRY (self->entry), self->needle);
|
github.com/apache/marmotta:libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/collect/SQLProjectionFinder.java: [ master, ] |
---|
39: private String needle;
|
43: public SQLProjectionFinder(TupleExpr expr, String needle) {
|
44: this.needle = needle;
|
50: if(node.getName().equals(needle)) {
|
59: if(g.equals(needle)) {
|
68: if(node.getName().equals(needle)) {
|
77: if(elem.getSourceName().equals(needle)) {
|
chromium.googlesource.com/ios-chromium-mirror:third_party/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result |
---|
chromium.googlesource.com/chromium/src:third_party/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result |
---|
android.googlesource.com/platform/superproject:external/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result |
---|
github.com/googlecreativelab/aog-canvas-quiz:deploy/package-lock.json: [ master, ] |
---|
551: "needle": "^2.2.1",
|
536: "needle": {
|
android.googlesource.com/platform/external/libtextclassifier:abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result |
---|
github.com/apache/openwhisk-catalog:packages/weather/forecast.js: [ master, ] |
---|
18: const needle = require('needle');
|
64: needle.request('get', url, qs, { 'username': username, 'password': password, timeout: 30000 }, function (e...(23 bytes skipped)...
|
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] |
---|
30: const char* needle;
|
76: const char* needle_string = nullptr;
|
79: auto needlepos = after_replacing_many->find(r.needle, pos);
|
82: needle_string = r.needle;
|
87: after_replacing_many->replace(next_pos, strlen(needle_string),
|
80: if (needlepos != std::string::npos && needlepos < next_pos) {
|
81: next_pos = needlepos;
|
github.com/PolymerLabs/actor-boilerplate:package-lock.json: [ master, ] |
---|
868: "needle": "^2.2.0",
|
851: "needle": {
|
github.com/PolymerLabs/actor-helpers:package-lock.json: [ master, ] |
---|
1359: "needle": "^2.2.0",
|
1340: "needle": {
|
github.com/spinnaker/spinnaker.io:themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result |
---|
android.googlesource.com/platform/external/webrtc:third_party/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result |
---|
android.googlesource.com/platform/art:test/1940-ddms-ext/src-art/art/Test1940.java: [ master, ] |
---|
126: public final Predicate<Chunk> needle;
|
129: public AwaitChunkHandler(Predicate<Chunk> needle, DdmHandler chain) {
|
130: this.needle = needle;
|
136: if (needle.test(c)) {
|
github.com/google/making_with_ml:semantic_ml/package-lock.json: [ master, ] |
---|
462: "needle": "^2.2.1",
|
440: "needle": {
|
442: "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.0.tgz",
|
gerrit.googlesource.com/jgit:org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java: [ master, ] |
---|
26: private final byte[] needle;
|
24: private final String needleString;
|
42: needle = new byte[b.length];
|
44: needle[i] = lc(b[i]);
|
58: final int needleLen = needle.length;
|
59: final byte first = needle[0];
|
76: if (neq(needle[j], text[si]))
|
39: needleString = patternText;
|
63: final int maxPos = rcs.endPtr - needleLen;
|
75: for (int j = 1; j < needleLen; j++, si++) {
|
98: return needleString;
|
eclipse.googlesource.com/jgit/jgit:org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java: [ master, ] Duplicate result |
---|
gerrit.googlesource.com/gerrit:modules/jgit/org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java: [ master, ] Duplicate result |
---|
android.googlesource.com/platform/external/openscreen:third_party/abseil/src/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result |
---|
github.com/v8/v8:test/unittests/heap/cppgc/stack-unittest.cc: [ master, ] |
---|
70: int* needle() const { return container_->value.get(); }
|
82: // No check that the needle is initially not found as on some platforms it
|
85: int* volatile tmp = scanner->needle();
|
95: // No check that the needle is initially not found as on some platforms it
|
100: int* volatile tmp = scanner->needle();
|
202: void* needle = RecursivelyPassOnParameter(0, scanner->needle(), GetStack(),
|
204: EXPECT_EQ(scanner->needle(), needle);
|
210: void* needle = RecursivelyPassOnParameter(1, scanner->needle(), GetStack(),
|
212: EXPECT_EQ(scanner->needle(), needle);
|
218: void* needle = RecursivelyPassOnParameter(2, scanner->needle(), GetStack(),
|
220: EXPECT_EQ(scanner->needle(), needle);
|
226: void* needle = RecursivelyPassOnParameter(3, scanner->needle(), GetStack(),
|
228: EXPECT_EQ(scanner->needle(), needle);
|
234: void* needle = RecursivelyPassOnParameter(4, scanner->needle(), GetStack(),
|
236: EXPECT_EQ(scanner->needle(), needle);
|
242: void* needle = RecursivelyPassOnParameter(5, scanner->needle(), GetStack(),
|
244: EXPECT_EQ(scanner->needle(), needle);
|
250: void* needle = RecursivelyPassOnParameter(6, scanner->needle(), GetStack(),
|
252: EXPECT_EQ(scanner->needle(), needle);
|
258: void* needle = RecursivelyPassOnParameter(7, scanner->needle(), GetStack(),
|
260: EXPECT_EQ(scanner->needle(), needle);
|
268: void* needle = RecursivelyPassOnParameter(8, scanner->needle(), GetStack(),
|
270: EXPECT_EQ(scanner->needle(), needle);
|
312: // No check that the needle is initially not found as on some platforms it
|
325: // Moves |local_scanner->needle()| into a callee-saved register, leaving the
|
326: // callee-saved register as the only register referencing the needle.
|
331: asm("mov %0, %%" reg : : "r"(local_scanner->needle()) : reg); \
|
android.googlesource.com/platform/external/rust/crates/grpcio-sys:grpc/third_party/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result |
---|
chromium.googlesource.com/v8/v8:test/unittests/heap/cppgc/stack-unittest.cc: [ master, ] Duplicate result |
---|
github.com/google/binja-hexagon:third_party/qemu-hexagon/opcodes.c: [ main, ] |
---|
122: #define NEEDLE "IMMEXT("
|
131: p = strstr(p, NEEDLE);
|
133: p += strlen(NEEDLE);
|
github.com/GoogleCloudPlatform/pubsub:load-test-framework/node_src/package-lock.json: [ master, ] |
---|
583: "needle": "^2.2.1",
|
568: "needle": {
|
android.googlesource.com/platform/external/jetbrains/JetBrainsRuntime:test/hotspot/jtreg/compiler/intrinsics/string/TestStringIntrinsics2.java: [ master, ] |
---|
161: static String needle = "<miss>";
|
184: static int indexOf_no_match_unknown_needle(String s, String needle) {
|
190: static int indexOf_no_match_imm_needle(String s) {
|
196: static int indexOf_no_match_imm2_needle(String s) {
|
202: static int indexOf_no_match_imm1_needle(String s) {
|
221: static String indexOf_reads_past_string_unknown_needle(String s, String needle) {
|
231: static String indexOf_reads_past_string_imm_needle(String s) {
|
240: static String indexOf_reads_past_string_imm2_needle(String s) {
|
249: static String indexOf_reads_past_string_imm1_needle(String s) {
|
313: static int indexOf_match_at_end_of_string_unknown_needle(String s, String needle) {
|
319: static int indexOf_match_at_end_of_string_imm_needle(String s) {
|
325: static int indexOf_match_at_end_of_string_imm2_needle(String s) {
|
331: static int indexOf_match_at_end_of_string_imm1_needle(String s) {
|
438: static String indexOf_match_spans_end_of_string_unknown_needle(String s, String needle) {
|
447: static String indexOf_match_spans_end_of_string_imm_needle(String s) {
|
456: static String indexOf_match_spans_end_of_string_imm2_needle(String s) {
|
481: public static void test_indexOf_imm1_needle() {
|
498: static int indexOf_imm1_needle(String s) {
|
512: static int indexOf_imm1Latin1_needle(String s) {
|
517: static int indexOf_imm1UTF16_needle(String s) {
|
522: static int indexOf_immUTF16_needle(String s) {
|
71: // - The needle is exactly at the end of the string.
|
72: // - The needle spans the end of the string
|
75: // - needle is first char
|
76: // - needle is last char
|
80: // We test all these for an unknown needle, and needles known to the compiler
|
165: int res = indexOf_no_match_unknown_needle(ss[0], "<miss>");
|
166: assertEquals(res, -1, "test_indexOf_no_match_unknown_needle matched at: " + res);
|
167: res = indexOf_no_match_imm_needle(ss[0]);
|
168: assertEquals(res, -1, "test_indexOf_no_match_imm_needle matched at: " + res);
|
169: res = indexOf_no_match_imm2_needle(ss[0]);
|
170: assertEquals(res, -1, "test_indexOf_no_match_imm2_needle matched at: " + res);
|
173: res = indexOf_no_match_unknown_needle(ss2[0], "<miss>");
|
174: assertEquals(res, -1, "test_indexOf_no_match_unknown_needle matched at: " + res);
|
175: res = indexOf_no_match_imm_needle(ss2[0]);
|
176: assertEquals(res, -1, "test_indexOf_no_match_imm_needle matched at: " + res);
|
177: res = indexOf_no_match_imm2_needle(ss2[0]);
|
178: assertEquals(res, -1, "test_indexOf_no_match_imm2_needle matched at: " + res);
|
179: res = indexOf_no_match_imm1_needle(ss2[0]);
|
180: assertEquals(res, -1, "test_indexOf_no_match_imm1_needle matched at: " + res);
|
185: int index = s.indexOf(needle);
|
210: String res = indexOf_reads_past_string_unknown_needle(ss[0], "<hit>");
|
211: assertEquals(res, null, "test_indexOf_reads_past_string_unknown_needle " + res);
|
212: res = indexOf_reads_past_string_imm_needle(ss[0]);
|
213: assertEquals(res, null, "test_indexOf_reads_past_string_imm_needle " + res);
|
214: res = indexOf_reads_past_string_imm2_needle(ss[0]);
|
215: assertEquals(res, null, "test_indexOf_reads_past_string_imm2_needle " + res);
|
216: res = indexOf_reads_past_string_imm1_needle(ss[0]);
|
217: assertEquals(res, null, "test_indexOf_reads_past_string_imm1_needle " + res);
|
222: int index = s.indexOf(needle);
|
224: return "Found needle \"" + needle + "\" behind string of length " + s.length()
|
234: return "Found needle \"<hit>\" behind string of length " + s.length() + " at position " + index + ".";
|
243: return "Found needle \"<h\" behind string of length " + s.length() + " at position " + index + ".";
|
252: return "Found needle \"<h\" behind string of length " + s.length() + " at position " + index + ".";
|
275: res = indexOf_match_at_end_of_string_unknown_needle(text3, "<hit>");
|
277: res = indexOf_match_at_end_of_string_unknown_needle(text4, "<hit>");
|
279: res = indexOf_match_at_end_of_string_unknown_needle(text5, "<hit>");
|
281: res = indexOf_match_at_end_of_string_unknown_needle(text6, "<hit>");
|
284: res = indexOf_match_at_end_of_string_imm_needle(text3);
|
286: res = indexOf_match_at_end_of_string_imm_needle(text4);
|
288: res = indexOf_match_at_end_of_string_imm_needle(text5);
|
290: res = indexOf_match_at_end_of_string_imm_needle(text6);
|
293: res = indexOf_match_at_end_of_string_imm2_needle(text7);
|
295: res = indexOf_match_at_end_of_string_imm2_needle(text8);
|
297: res = indexOf_match_at_end_of_string_imm2_needle(text9);
|
299: res = indexOf_match_at_end_of_string_imm2_needle(text10);
|
302: res = indexOf_match_at_end_of_string_imm1_needle(text7);
|
304: res = indexOf_match_at_end_of_string_imm1_needle(text8);
|
306: res = indexOf_match_at_end_of_string_imm1_needle(text9);
|
308: res = indexOf_match_at_end_of_string_imm1_needle(text10);
|
314: int index = s.indexOf(needle);
|
361: res = indexOf_match_spans_end_of_string_unknown_needle(s0_1, "<hit>");
|
362: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s0_1 " + res);
|
363: res = indexOf_match_spans_end_of_string_unknown_needle(s0_2, "<hit>");
|
364: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s0_2 " + res);
|
365: res = indexOf_match_spans_end_of_string_unknown_needle(s0_3, "<hit>");
|
366: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s0_3 " + res);
|
367: res = indexOf_match_spans_end_of_string_unknown_needle(s0_4, "<hit>");
|
368: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s0_4 " + res);
|
369: res = indexOf_match_spans_end_of_string_unknown_needle(s1_1, "<hit>");
|
370: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s1_1 " + res);
|
371: res = indexOf_match_spans_end_of_string_unknown_needle(s1_2, "<hit>");
|
372: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s1_2 " + res);
|
373: res = indexOf_match_spans_end_of_string_unknown_needle(s1_3, "<hit>");
|
374: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s1_3 " + res);
|
375: res = indexOf_match_spans_end_of_string_unknown_needle(s1_4, "<hit>");
|
376: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s1_4 " + res);
|
377: res = indexOf_match_spans_end_of_string_unknown_needle(s2_1, "<hit>");
|
378: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s2_1 " + res);
|
379: res = indexOf_match_spans_end_of_string_unknown_needle(s2_2, "<hit>");
|
380: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s2_2 " + res);
|
381: res = indexOf_match_spans_end_of_string_unknown_needle(s2_3, "<hit>");
|
382: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s2_3 " + res);
|
383: res = indexOf_match_spans_end_of_string_unknown_needle(s2_4, "<hit>");
|
384: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s2_4 " + res);
|
385: res = indexOf_match_spans_end_of_string_unknown_needle(s3_1, "<hit>");
|
386: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s3_1 " + res);
|
387: res = indexOf_match_spans_end_of_string_unknown_needle(s3_2, "<hit>");
|
388: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s3_2 " + res);
|
389: res = indexOf_match_spans_end_of_string_unknown_needle(s3_3, "<hit>");
|
390: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s3_3 " + res);
|
391: res = indexOf_match_spans_end_of_string_unknown_needle(s3_4, "<hit>");
|
392: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s3_4 " + res);
|
394: res = indexOf_match_spans_end_of_string_imm_needle(s0_1);
|
395: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s0_1 " + res);
|
396: res = indexOf_match_spans_end_of_string_imm_needle(s0_2);
|
397: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s0_2 " + res);
|
398: res = indexOf_match_spans_end_of_string_imm_needle(s0_3);
|
399: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s0_3 " + res);
|
400: res = indexOf_match_spans_end_of_string_imm_needle(s0_4);
|
401: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s0_4 " + res);
|
402: res = indexOf_match_spans_end_of_string_imm_needle(s1_1);
|
403: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s1_1 " + res);
|
404: res = indexOf_match_spans_end_of_string_imm_needle(s1_2);
|
405: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s1_2 " + res);
|
406: res = indexOf_match_spans_end_of_string_imm_needle(s1_3);
|
407: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s1_3 " + res);
|
408: res = indexOf_match_spans_end_of_string_imm_needle(s1_4);
|
409: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s1_4 " + res);
|
410: res = indexOf_match_spans_end_of_string_imm_needle(s2_1);
|
411: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s2_1 " + res);
|
412: res = indexOf_match_spans_end_of_string_imm_needle(s2_2);
|
413: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s2_2 " + res);
|
414: res = indexOf_match_spans_end_of_string_imm_needle(s2_3);
|
415: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s2_3 " + res);
|
416: res = indexOf_match_spans_end_of_string_imm_needle(s2_4);
|
417: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s2_4 " + res);
|
418: res = indexOf_match_spans_end_of_string_imm_needle(s3_1);
|
419: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s3_1 " + res);
|
420: res = indexOf_match_spans_end_of_string_imm_needle(s3_2);
|
421: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s3_2 " + res);
|
422: res = indexOf_match_spans_end_of_string_imm_needle(s3_3);
|
423: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s3_3 " + res);
|
424: res = indexOf_match_spans_end_of_string_imm_needle(s3_4);
|
425: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s3_4 " + res);
|
427: res = indexOf_match_spans_end_of_string_imm2_needle(s0_1x);
|
428: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm2_needle s0_1x " + res);
|
429: res = indexOf_match_spans_end_of_string_imm2_needle(s1_1x);
|
430: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm2_needle s1_1x " + res);
|
431: res = indexOf_match_spans_end_of_string_imm2_needle(s2_1x);
|
432: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm2_needle s2_1x " + res);
|
433: res = indexOf_match_spans_end_of_string_imm2_needle(s3_1x);
|
434: assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm2_needle s3_1x " + res);
|
439: int index = s.indexOf(needle);
|
441: return "Found needle \"" + needle + "\" that is spanning the end of the string: " + s + ".";
|
450: return "Found needle \"<hit>\" that is spanning the end of the string: " + s + ".";
|
459: return "Found needle \"<h\" that is spanning the end of the string: " + s + ".";
|
482: assertEquals( -1, indexOf_imm1_needle(text16), "test_indexOf_imm1_needle no_match");
|
484: assertEquals( 0, indexOf_imm1_needle(text11), "test_indexOf_imm1_needle first_matches");
|
486: assertEquals(len12-1, indexOf_imm1_needle(text12), "test_indexOf_imm1_needle last_matches");
|
487: assertEquals(len13-1, indexOf_imm1_needle(text13), "test_indexOf_imm1_needle last_matches");
|
488: assertEquals(len14-1, indexOf_imm1_needle(text14), "test_indexOf_imm1_needle last_matches");
|
489: assertEquals(len15-1, indexOf_imm1_needle(text15), "test_indexOf_imm1_needle last_matches");
|
491: assertEquals( -1, indexOf_imm1_needle(text12_1), "test_indexOf_imm1_needle walked_past");
|
492: assertEquals( -1, indexOf_imm1_needle(text13_1), "test_indexOf_imm1_needle walked_past");
|
493: assertEquals( -1, indexOf_imm1_needle(text14_1), "test_indexOf_imm1_needle walked_past");
|
494: assertEquals( -1, indexOf_imm1_needle(text15_1), "test_indexOf_imm1_needle walked_past");
|
506: assertEquals( 3, indexOf_imm1Latin1_needle(text1UTF16), "test_indexOf_immUTF16");
|
507: assertEquals( 1, indexOf_imm1UTF16_needle(text1UTF16), "test_indexOf_immUTF16");
|
508: assertEquals( 1, indexOf_immUTF16_needle(text1UTF16), "test_indexOf_immUTF16");
|
74: // A special case are needles of length 1. For these we test:
|
github.com/GNOME/libdazzle:src/search/dzl-pattern-spec.c: [ mainline, ] |
---|
48: gchar *needle;
|
59: const gchar *needle)
|
62: g_autofree gchar *needle_folded = g_utf8_casefold (needle, -1);
|
66: pos = strstr (haystack_folded, needle_folded);
|
85: dzl_pattern_spec_new (const gchar *needle)
|
90: if (needle == NULL)
|
91: needle = "";
|
95: self->needle = g_strdup (needle);
|
96: self->parts = g_strsplit (needle, " ", 0);
|
99: for (tmp = needle; *tmp; tmp = g_utf8_next_char (tmp))
|
116: return self->needle;
|
123: g_clear_pointer (&self->needle, g_free);
|
chromium.googlesource.com/native_client/nacl-toolchain:newlib/newlib/libc/string/memmem.c: [ master, ] |
---|
58: const unsigned char *needle = (const unsigned char *) needle_start;
|
24: lengths of your haystack and needle, <<memmem>> can be much
|
49: _DEFUN (memmem, (haystack_start, haystack_len, needle_start, needle_len),
|
52: const void *needle_start _AND
|
53: size_t needle_len)
|
60: if (needle_len == 0)
|
68: while (needle_len <= haystack_len)
|
70: if (!memcmp (haystack, needle, needle_len))
|
83: if (haystack_len < needle_len)
|
90: if (needle_len < LONG_NEEDLE_THRESHOLD)
|
92: haystack = memchr (haystack, *needle, haystack_len);
|
93: if (!haystack || needle_len == 1)
|
96: if (haystack_len < needle_len)
|
98: return two_way_short_needle (haystack, haystack_len, needle, needle_len);
|
100: return two_way_long_needle (haystack, haystack_len, needle, needle_len);
|
88: coefficient. However, avoid memchr for long needles, since we
|
github.com/firebase/abseil-cpp-SwiftPM:absl/strings/str_replace_benchmark.cc: [ main, ] Duplicate result |
---|
chromium.googlesource.com/arc/arc:third_party/nacl-newlib/newlib/libc/string/memmem.c: [ master, ] Duplicate result |
---|
android.googlesource.com/platform/external/abseil-cpp:absl/strings/string_view_test.cc: [ master, ] |
---|
717: std::string needle;
|
739: SCOPED_TRACE(s.needle);
|
745: EXPECT_EQ(sp.find(s.needle, pos),
|
746: st.find(s.needle, pos));
|
747: EXPECT_EQ(sp.rfind(s.needle, pos),
|
748: st.rfind(s.needle, pos));
|
749: EXPECT_EQ(sp.find_first_of(s.needle, pos),
|
750: st.find_first_of(s.needle, pos));
|
751: EXPECT_EQ(sp.find_first_not_of(s.needle, pos),
|
752: st.find_first_not_of(s.needle, pos));
|
753: EXPECT_EQ(sp.find_last_of(s.needle, pos),
|
754: st.find_last_of(s.needle, pos));
|
755: EXPECT_EQ(sp.find_last_not_of(s.needle, pos),
|
756: st.find_last_not_of(s.needle, pos));
|
github.com/apache/openwhisk-package-alarms:action/alarmWeb_package.json: [ master, ] |
---|
7: "needle": "2.3.2",
|
chromium.googlesource.com/native_client/nacl-newlib:newlib/libc/string/memmem.c: [ master, ] Duplicate result |
---|
chromium.googlesource.com/chromium/src/third_party/abseil-cpp:absl/strings/string_view_test.cc: [ master, ] |
---|
718: std::string needle;
|
740: SCOPED_TRACE(s.needle);
|
746: EXPECT_EQ(sp.find(s.needle, pos),
|
747: st.find(s.needle, pos));
|
748: EXPECT_EQ(sp.rfind(s.needle, pos),
|
749: st.rfind(s.needle, pos));
|
750: EXPECT_EQ(sp.find_first_of(s.needle, pos),
|
751: st.find_first_of(s.needle, pos));
|
752: EXPECT_EQ(sp.find_first_not_of(s.needle, pos),
|
753: st.find_first_not_of(s.needle, pos));
|
754: EXPECT_EQ(sp.find_last_of(s.needle, pos),
|
755: st.find_last_of(s.needle, pos));
|
756: EXPECT_EQ(sp.find_last_not_of(s.needle, pos),
|
757: st.find_last_not_of(s.needle, pos));
|
github.com/GoogleCloudPlatform/cloud-foundation-toolkit:cli/vendor/github.com/gobwas/glob/match/contains.go: [ master, ] Duplicate result |
---|
github.com/apache/openwhisk-package-alarms:action/alarmFeed_package.json: [ master, ] |
---|
7: "needle": "2.3.2"
|
github.com/googlearchive/gcsbeat:vendor/github.com/gobwas/glob/match/contains.go: [ master, ] Duplicate result |
---|
github.com/firebase/abseil-cpp-SwiftPM:absl/strings/string_view_test.cc: [ main, ] |
---|
718: std::string needle;
|
740: SCOPED_TRACE(s.needle);
|
746: EXPECT_EQ(sp.find(s.needle, pos),
|
747: st.find(s.needle, pos));
|
748: EXPECT_EQ(sp.rfind(s.needle, pos),
|
749: st.rfind(s.needle, pos));
|
750: EXPECT_EQ(sp.find_first_of(s.needle, pos),
|
751: st.find_first_of(s.needle, pos));
|
752: EXPECT_EQ(sp.find_first_not_of(s.needle, pos),
|
753: st.find_first_not_of(s.needle, pos));
|
754: EXPECT_EQ(sp.find_last_of(s.needle, pos),
|
755: st.find_last_of(s.needle, pos));
|
756: EXPECT_EQ(sp.find_last_not_of(s.needle, pos),
|
757: st.find_last_not_of(s.needle, pos));
|
github.com/ampproject/remapping:test/unit/binary-search.ts: [ master, ] |
---|
29: const needle = j * 2;
|
45: const needle = j * 2 - 1;
|
64: const needle = -1;
|
79: const needle = 18;
|
94: const needle = 1;
|
103: const needle = 1;
|
123: const needle = j * 2;
|
138: const needle = j * 2;
|
153: const needle = j * 2;
|
168: const needle = j * 2;
|
183: const needle = j * 2;
|
198: const needle = j * 2;
|
217: const needle = j * 2;
|
232: const needle = j * 2;
|
247: const needle = j * 2;
|
260: const needle = j * 2;
|
281: const needle = j * 2;
|
20: function comparator(item: number, needle: number): number {
|
21: return item - needle;
|
30: const index = binarySearch(array, needle, comparator, 0, array.length - 1);
|
34: expect(array[index]).toEqual(needle);
|
46: const index = binarySearch(array, needle, comparator, 0, array.length - 1);
|
53: expect(array[negated - 1]).toBeLessThan(needle);
|
56: expect(array[negated]).toBeGreaterThan(needle);
|
62: test('needle is lower than all elements', () => {
|
68: const index = binarySearch(array, needle, comparator, 0, array.length - 1);
|
73: expect(array[negated]).toBeGreaterThan(needle);
|
77: test('needle is higher than all elements', () => {
|
83: const index = binarySearch(array, needle, comparator, 0, array.length - 1);
|
88: expect(array[negated - 1]).toBeLessThan(needle);
|
95: const index = binarySearch(array, needle, comparator, 0, array.length - 1);
|
108: array.push(needle);
|
110: const index = binarySearch(array, needle, comparator, 0, array.length - 1);
|
118: test('low equals needle index', () => {
|
124: const index = binarySearch(array, needle, comparator, j, array.length - 1);
|
128: expect(array[index]).toEqual(needle);
|
133: test('low higher than needle index', () => {
|
139: const index = binarySearch(array, needle, comparator, j + 1, array.length - 1);
|
148: test('low lower than needle index', () => {
|
154: const index = binarySearch(array, needle, comparator, j - 1, array.length - 1);
|
163: test('low equals needle index', () => {
|
169: const index = binarySearch(array, needle, comparator, j, array.length - 1);
|
173: expect(array[index]).toEqual(needle);
|
178: test('low higher than needle index', () => {
|
184: const index = binarySearch(array, needle, comparator, j + 1, array.length - 1);
|
193: test('low lower than needle index', () => {
|
199: const index = binarySearch(array, needle, comparator, j - 1, array.length - 1);
|
218: const index = binarySearch(array, needle, comparator, -1, array.length - 1);
|
227: test('high equals needle index', () => {
|
233: const index = binarySearch(array, needle, comparator, 0, j);
|
237: expect(array[index]).toEqual(needle);
|
242: test('high higher than needle index', () => {
|
248: const index = binarySearch(array, needle, comparator, 0, j + 1);
|
255: test('high lower than needle index', () => {
|
261: const index = binarySearch(array, needle, comparator, 0, j - 1);
|
282: const index = binarySearch(array, needle, comparator, 0, -1);
|
android.googlesource.com/platform/external/libtextclassifier:abseil-cpp/absl/strings/string_view_test.cc: [ master, ] |
---|
718: std::string needle;
|
740: SCOPED_TRACE(s.needle);
|
746: EXPECT_EQ(sp.find(s.needle, pos),
|
747: st.find(s.needle, pos));
|
748: EXPECT_EQ(sp.rfind(s.needle, pos),
|
749: st.rfind(s.needle, pos));
|
750: EXPECT_EQ(sp.find_first_of(s.needle, pos),
|
751: st.find_first_of(s.needle, pos));
|
752: EXPECT_EQ(sp.find_first_not_of(s.needle, pos),
|
753: st.find_first_not_of(s.needle, pos));
|
754: EXPECT_EQ(sp.find_last_of(s.needle, pos),
|
755: st.find_last_of(s.needle, pos));
|
756: EXPECT_EQ(sp.find_last_not_of(s.needle, pos),
|
757: st.find_last_not_of(s.needle, pos));
|
android.googlesource.com/platform/external/openscreen:third_party/abseil/src/absl/strings/string_view_test.cc: [ master, ] Duplicate result |
---|
github.com/v8/v8:test/mjsunit/regress/regress-1067270.js: [ master, ] |
---|
7: const needle = Array(1802).join(" +") + Array(16884).join("A");
|
10: assertEquals(string.search(needle), -1);
|
11: assertEquals(string.search(needle), -1);
|
chromium.googlesource.com/v8/v8:test/mjsunit/regress/regress-1067270.js: [ master, ] Duplicate result |
---|
github.com/apache/marmotta:libraries/ostrich/backend/3rdparty/abseil/absl/strings/string_view_test.cc: [ master, ] |
---|
699: std::string needle;
|
721: SCOPED_TRACE(s.needle);
|
727: EXPECT_EQ(sp.find(s.needle, pos),
|
728: st.find(s.needle, pos));
|
729: EXPECT_EQ(sp.rfind(s.needle, pos),
|
730: st.rfind(s.needle, pos));
|
731: EXPECT_EQ(sp.find_first_of(s.needle, pos),
|
732: st.find_first_of(s.needle, pos));
|
733: EXPECT_EQ(sp.find_first_not_of(s.needle, pos),
|
734: st.find_first_not_of(s.needle, pos));
|
735: EXPECT_EQ(sp.find_last_of(s.needle, pos),
|
736: st.find_last_of(s.needle, pos));
|
737: EXPECT_EQ(sp.find_last_not_of(s.needle, pos),
|
738: st.find_last_not_of(s.needle, pos));
|
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/abseil-cpp/absl/strings/string_view_test.cc: [ master, ] |
---|
709: std::string needle;
|
731: SCOPED_TRACE(s.needle);
|
737: EXPECT_EQ(sp.find(s.needle, pos),
|
738: st.find(s.needle, pos));
|
739: EXPECT_EQ(sp.rfind(s.needle, pos),
|
740: st.rfind(s.needle, pos));
|
741: EXPECT_EQ(sp.find_first_of(s.needle, pos),
|
742: st.find_first_of(s.needle, pos));
|
743: EXPECT_EQ(sp.find_first_not_of(s.needle, pos),
|
744: st.find_first_not_of(s.needle, pos));
|
745: EXPECT_EQ(sp.find_last_of(s.needle, pos),
|
746: st.find_last_of(s.needle, pos));
|
747: EXPECT_EQ(sp.find_last_not_of(s.needle, pos),
|
748: st.find_last_not_of(s.needle, pos));
|
android.googlesource.com/platform/external/icu:icu4c/source/test/intltest/strtest.cpp: [ master, ] |
---|
455: const char* needle;
|
479: StringPiece needle(cas.needle);
|
481: cas.expected, haystack.find(needle, 0));
|
484: std::string stdneedle(cas.needle);
|
490: static_cast<int32_t>(stdhaystack.find(stdneedle, offset)), haystack.find(needle, offset));
|
486: cas.expected, static_cast<int32_t>(stdhaystack.find(stdneedle, 0)));
|
android.googlesource.com/platform/external/webrtc:third_party/abseil-cpp/absl/strings/string_view_test.cc: [ master, ] Duplicate result |
---|
chromium.googlesource.com/chromium/src/third_party:abseil-cpp/absl/strings/string_view_test.cc: [ master, ] Duplicate result |
---|
chromium.googlesource.com/chromium/src:third_party/abseil-cpp/absl/strings/string_view_test.cc: [ master, ] Duplicate result |
---|
chromium.googlesource.com/ios-chromium-mirror:third_party/abseil-cpp/absl/strings/string_view_test.cc: [ master, ] Duplicate result |
---|
github.com/angular/protractor:testapp/package-lock.json: [ master, ] |
---|
1505: "needle": "^2.2.0",
|
1486: "needle": {
|
github.com/asciidoctor/asciidoctor-reveal.js:test/js-babel/package-lock.json: [ master, ] |
---|
578: "needle": "^2.2.1",
|
559: "needle": {
|
android.googlesource.com/platform/external/rust/crates/grpcio-sys:grpc/third_party/abseil-cpp/absl/strings/string_view_test.cc: [ master, ] Duplicate result |
---|
android.googlesource.com/platform/external/angle:third_party/abseil-cpp/absl/strings/string_view_test.cc: [ master, ] Duplicate result |
---|
github.com/apache/ranger:security-admin/src/test/javascript/package-lock.json: [ master, ] |
---|
1437: "needle": "^2.2.0",
|
1418: "needle": {
|
android.googlesource.com/platform/superproject:external/abseil-cpp/absl/strings/string_view_test.cc: [ master, ] Duplicate result |
---|
github.com/GNOME/libdazzle:tests/test-levenshtein.c: [ mainline, ] |
---|
5: const gchar *needle;
|
24: for (guint i = 0; check[i].needle != NULL; i++)
|
26: gint score = dzl_levenshtein (check[i].needle, check[i].haystack);
|
github.com/GNOME/libdazzle:tests/test-fuzzy-highlight.c: [ mainline, ] |
---|
27: const gchar *needle;
|
40: tests[i].needle,
|
github.com/GNOME/libdazzle:tests/test-pattern-spec.c: [ mainline, ] |
---|
25: const gchar *needle;
|
46: spec = dzl_pattern_spec_new (tests[i].needle);
|
skia.googlesource.com/external/github.com/unicode-org/icu:icu4c/source/test/intltest/strtest.cpp: [ master, ] |
---|
456: const char* needle;
|
480: StringPiece needle(cas.needle);
|
482: cas.expected, haystack.find(needle, 0));
|
485: std::string stdneedle(cas.needle);
|
491: static_cast<int32_t>(stdhaystack.find(stdneedle, offset)), haystack.find(needle, offset));
|
487: cas.expected, static_cast<int32_t>(stdhaystack.find(stdneedle, 0)));
|
github.com/src-d/kmcuda:src/test.R: [ develop, ] |
---|
96: needle <- "--file="
|
97: match <- grep(needle, cmdArgs)
|
99: return(normalizePath(sub(needle, "", cmdArgs[match])))
|
github.com/GoogleChrome/chrome-extensions-samples:apps/samples/text-editor/lib/ace/editor_highlight_selected_word_test.js: [ master, ] |
---|
139: needle: "Mauris"
|
194: needle: "consectetur"
|
github.com/GoogleChrome/chrome-app-samples:apps/samples/text-editor/lib/ace/editor_highlight_selected_word_test.js: [ master, ] Duplicate result |
---|
github.com/hanwen/artisjokke:needle2d/needle-inserter.hh: [ master, ] |
---|
6: #define NEEDLE_INSERTER
|
13: class Needle_inserter : public Deformation_hook
|
29: Link_array<Node> needle_;
|
36: Array<Vector2> needle_params_;
|
2: declare Needle_inserter
|
5: #ifndef NEEDLE_INSERTER
|
44: Auto_needle_insert * auto_insert_;
|
49: void dump_needle_forces (const char *);
|
54: Needle_inserter (Maubach_tree*, Deformation_state*);
|
55: void move_needle (Vector2 h, Vector2 t);
|
58: void auto_needle_insert ();
|
61: void refine_around_needle_tip (Vector2,Vector2);
|
64: void print_needle ();
|
github.com/hanwen/artisjokke:needle3d/needle-inserter3.hh: [ master, ] |
---|
2: #define NEEDLE_INSERTER3_HH
|
10: class Needle_inserter3 : public Deformation_hook, public Element_watcher
|
12: enum Needle_state {
|
19: set<Element*> needle_elements_;
|
20: map<Node*,Real> needle_node_radii_;
|
26: Real needle_radius_;
|
23: bool filter_needle_rotations_ ;
|
1: #ifndef NEEDLE_INSERTER3_HH
|
16: Needle_state state_;
|
40: void select_elements_around_needle (Element*, Vector3,Vector3);
|
42: void update_needle_elements ();
|
45: void accrue_needle_elements (Vector3, Vector3);
|
47: bool is_needle_element (Element*, Vector3 , Vector3, Real ) const;
|
50: Auto_needle_inserter3 * auto_insert_;
|
51: void auto_needle_insert ();
|
53: void refine_around_needle_tip (Vector3, Vector3);
|
55: Needle_inserter3 (Maubach_tree3*, Deformation_state*);
|
59: void move_needle (Vector3,Vector3);
|
60: set<Face*> get_needle_surface ();
|
64: extern float needle_color [];
|
github.com/hanwen/artisjokke:needle3d/needle-inserter3.cc: [ master, ] |
---|
30: Needle_inserter3::Needle_inserter3 (Maubach_tree3* tree,
|
63: Needle_inserter3::move_needle (Vector3 h, Vector3 t)
|
96: Needle_inserter3::get_needle_surface ()
|
481: Needle_inserter3::refine_around_needle_tip (Vector3 h, Vector3 t)
|
527: Needle_inserter3::is_needle_element (Element *e, Vector3 h, Vector3 t, Real entry_param) const
|
551: Needle_inserter3::accrue_needle_elements (Vector3 h, Vector3 t)
|
677: Needle_inserter3::update_needle_elements ()
|
9: #include "needle-inserter3.hh"
|
16: The needle is characterized by the set NEEDLE_ELEMENTS_.
|
18: All nodes that are constrained (boundary of the NEEDLE_ELEMENTS_
|
19: subcomplex) also have a needle radius (necessary for moving the needle.)
|
21: The needle is described by vectors (H, T), where H is the handle
|
26: Handling NEEDLE_ELEMENTS_ is not done particularly
|
38: needle_radius_ = get_number_setting ("needle-radius");
|
45: filter_needle_rotations_ = strcmp (get_string_setting ("elasticity"), "linear");
|
51: Needle_inserter3::handle () const
|
57: Needle_inserter3::tip () const
|
89: All faces of NEEDLE_ELEMENTS_ whose mates are not in
|
90: NEEDLE_ELEMENTS_.
|
98: set<Face*> needle_surf;
|
100: for (iterof (i, needle_elements_); i != needle_elements_.end(); i++)
|
107: !has_elt(needle_elements_, f->mate ()->element()))
|
109: needle_surf .insert (f);
|
113: return needle_surf;
|
121: Needle_inserter3::force_distribution (Real tip_distance, Real entry_param)
|
143: Compute the friction force for triangle PLEX, given needle
|
148: This should approximate the area of the needle relatively accurate.
|
158: Needle_inserter3::friction_force (Real * area, Simplex const &plex, Vector3 h, Vector3 t,
|
178: beyond the tip of the needle:
|
190: We could discard tris if the triangle intersects the needle line, but
|
194: if (dir1.length () < needle_radius_ / 100)
|
196: printf ("Short distance to needle, %lf\n", dir1.length());
|
207: if (xy.length () < needle_radius_/ 100)
|
209: printf ("Short distance to needle : %lf\n", xy.length ());
|
220: phi_z_coordinates[1] - phi_z_coordinates[2]).length () * 0.5 * needle_radius_ *sign;
|
227: Change the needle position: express the locations of all needle
|
228: nodes (including internal nodes of NEEDLE_ELEMENTS_) in coordinates
|
229: relative to the needle, and set their positions to by changing the
|
230: coordinate system to the new needle position.
|
233: Needle_inserter3::drag_nodes (Vector3 h, Vector3 t)
|
249: for (iterof (i, needle_elements_); i != needle_elements_.end (); i++)
|
293: ENTRY_PARAM is where the needle enters the tissue.
|
296: Needle_inserter3::get_entry_parameter (Vector3 h, Vector3 t) const
|
303: for (iterof (i, needle_elements_); i != needle_elements_.end () ; i++)
|
318: Needle_inserter3::rearrange_boundary_conditions ()
|
323: set<Face*> needle_surf = get_needle_surface ();
|
324: for (iterof (i, needle_surf); i != needle_surf.end(); i++)
|
347: for (iterof (i, needle_surf); i != needle_surf.end(); i++)
|
363: Real theoretical_area = (maxp - minp) * needle_radius_ * 2 * M_PI;
|
370: needle_surf.size(),
|
372: (100.0 * inverted )/ needle_surf.size());
|
389: assert (has_key (needle_node_radii_, n));
|
390: Real node_radius = needle_node_radii_[n];
|
407: if (filter_needle_rotations_)
|
436: Pop off elements slid off the needle.
|
439: for (iterof (i, needle_elements_); i != needle_elements_.end (); i++)
|
455: needle_elements_.erase (erase[i]);
|
457: if (!needle_elements_.size ())
|
464: Needle_inserter3::handle_tip_changes (Vector3 h, Vector3 t)
|
466: refine_around_needle_tip (h, t);
|
468: update_needle_elements ();
|
469: accrue_needle_elements (h, t);
|
473: Refine the mesh around the needle tip.
|
475: This happens in a circle perpendicular to the needle.
|
477: This assumes that the needle doesn't move a big deal between
|
499: int steps = int (needle_radius_ * 2 * M_PI / refinement_h);
|
506: Vector3 x = t + rad * needle_radius_;
|
511: Vector3 farx = t + rad * (refinement_h + needle_radius_);
|
542: return (p >= 0.0 && p <= entry_param) && (r < needle_radius_ || simp_dist < r /2 ) ;
|
547: Add elements to NEEDLE_ELEMENTS_. We start from the tip, and
|
583: if (has_elt (needle_elements_, e))
|
586: if (is_needle_element (e, last_handle_, last_tip_, entry_param))
|
588: needle_elements_.insert (e);
|
605: Find new needle surface nodes by comparing NEEDLE_ELEMENTS_ and
|
606: NEEDLE_NODE_RADII_, and set appropriate radii.
|
608: Remove node that are no longer part of the needle, junking the
|
612: Needle_inserter3::update_boundary_nodes ()
|
614: set<Face*> surf = get_needle_surface ();
|
625: if (!has_key (needle_node_radii_, *i))
|
628: needle_node_radii_[*i] = point_to_line_distance3 (y, last_handle_, last_tip_);
|
635: for (iterof (i, needle_node_radii_); i != needle_node_radii_.end (); i++)
|
645: needle_node_radii_.erase (rm[i]);
|
656: Needle_inserter3::signal_converged ()
|
667: auto_needle_insert ();
|
673: Put topological changes in the NEEDLE_ELEMENTS_ set: subdivision may
|
674: render existing elements of NEEDLE_ELEMENTS_ invalid. a
|
690: bool h = has_elt (needle_elements_, e);
|
694: needle_elements_.erase (*i);
|
701: if (is_needle_element (*j, last_handle_, last_tip_, entry_param))
|
702: needle_elements_.insert (*j);
|
707: if (is_needle_element (e, last_handle_, last_tip_, entry_param))
|
708: needle_elements_.insert (e);
|
github.com/hanwen/artisjokke:needle2d/needle-inserter.cc: [ master, ] |
---|
17: #define needle_assert(a) do { if (!a) { fprintf(stderr, "NEEDLE ASSERT FAILED: %s\n", #a); suicide(); return ; }} while (0)
|
47: Needle_inserter::Needle_inserter(Maubach_tree * tr, Deformation_state * st)
|
389: Needle_inserter::print_needle ()
|
416: Needle_inserter::move_needle (Vector2 h, Vector2 t)
|
80: Needle_inserter::refine_around_needle_tip (Vector2 handle , Vector2 tip)
|
447: Needle_inserter::dump_needle_forces (const char *fn)
|
8: #include "needle-inserter.hh"
|
42: Needle_inserter::live()const
|
61: sqrt(2), is to control the inter needle-node spacing.
|
73: Needle_inserter::suicide ()
|
88: if (needle_.size())
|
90: tip_param = ((deformed_location2 (needle_.top(), deformation ()) - tip)*dir);
|
94: init to length_threshold_ to refine in advance of the needle.
|
112: This refines in a region around the needle. Have not
|
125: if (!e && ! needle_.size())
|
147: Walk from tip to the first node that's already on the needle.
|
153: && needle_.size()
|
154: && e->opposite_node (entry) == needle_.top ())
|
169: if (needle_.find_l (newnod))
|
209: assert (!needle_.find_l (n));
|
254: needle_.push (n);
|
255: needle_params_.push (param);
|
259: TODO: add nodes to needle_
|
264: Needle_inserter::drag_fixed_nodes (Vector2 h, Vector2 t)
|
267: for (int i = 0; i < needle_.size (); i++)
|
269: Node * n = needle_[i];
|
270: Vector2 param = needle_params_[i];
|
287: Needle_inserter::rearrange_boundary_conditions ()
|
289: if (!needle_.size())
|
302: for (int i = needle_.size(); i--;)
|
304: Vector2 x = deformed_location2 (needle_[i], deformation ());
|
318: for (int i = 0; i < needle_.size(); i++)
|
320: Node * n = needle_[i];
|
341: Vector2 p = needle_params_[i];
|
343: needle_params_[i]
|
353: for (int i = needle_.size(); i--;)
|
355: Node * n = needle_[i];
|
372: needle_.del (i);
|
373: needle_params_.del(i);
|
381: if (!needle_.size())
|
391: log_message ("Needle: ");
|
392: for (int i = needle_.size(); i--;)
|
394: bool f = deformation ()->constraints_.is_fixed (needle_[i]);
|
395: bool l = deformation ()->constraints_.has_linear_movement_constraint (needle_[i]);
|
401: Needle_inserter::signal_converged ()
|
407: refine_around_needle_tip (last_handle_, last_tip_ );
|
411: auto_needle_insert ();
|
442: refine_around_needle_tip (h, t);
|
458: fprintf (f, "%d\n", needle_.size ());
|
467: for (int i =0; i < needle_.size (); i++)
|
469: Node* n = needle_[i];
|
526: Walk from tip to the first node that's already on the needle.
|
588: Needle_inserter::tip_reference_location () const
|
github.com/hanwen/artisjokke:needle2d/mesh-print.cc: [ master, ] |
---|
127: print_needle (FILE * f,
|
15: #include "needle-inserter.hh"
|
150: fprintf (f, " %lf %lf moveto %lf %lf lineto stroke %% needle \n ",
|
161: Needle_inserter * ni,
|
203: print_needle (f, top, def, tip, handle);
|
216: Needle_inserter * ni,
|
252: print_needle (f, top, def, tip, handle);
|
android.googlesource.com/platform/external/opencv3:modules/cudalegacy/src/cuda/needle_map.cu: [ master, ] |
---|
51: #define NEEDLE_MAP_SCALE 16
|
54: __global__ void NeedleMapAverageKernel(const PtrStepSzf u, const PtrStepf v, PtrStepf u_avg, PtrStepf v_avg)
|
116: void NeedleMapAverage_gpu(PtrStepSzf u, PtrStepSzf v, PtrStepSzf u_avg, PtrStepSzf v_avg)
|
127: __global__ void NeedleMapVertexKernel(const PtrStepSzf u_avg, const PtrStepf v_avg, float* vertex_data, float* color_data,...(44 bytes skipped)...
|
207: void CreateOpticalFlowNeedleMap_gpu(PtrStepSzf u_avg, PtrStepSzf v_avg, float* vertex_buffer, float* color_data, float max_flow,...(28 bytes skipped)...
|
56: __shared__ float smem[2 * NEEDLE_MAP_SCALE];
|
59: volatile float* v_col_sum = u_col_sum + NEEDLE_MAP_SCALE;
|
61: const int x = blockIdx.x * NEEDLE_MAP_SCALE + threadIdx.x;
|
62: const int y = blockIdx.y * NEEDLE_MAP_SCALE;
|
68: for(int i = 0; i < NEEDLE_MAP_SCALE; ++i)
|
106: const float coeff = 1.0f / (NEEDLE_MAP_SCALE * NEEDLE_MAP_SCALE);
|
118: const dim3 block(NEEDLE_MAP_SCALE);
|
133: const float arrow_x = x * NEEDLE_MAP_SCALE + NEEDLE_MAP_SCALE / 2.0f;
|
134: const float arrow_y = y * NEEDLE_MAP_SCALE + NEEDLE_MAP_SCALE / 2.0f;
|
121: NeedleMapAverageKernel<<<grid, block>>>(u, v, u_avg, v_avg);
|
212: NeedleMapVertexKernel<<<grid, block>>>(u_avg, v_avg, vertex_buffer, color_data, max_flow, xscale, yscale);...(0 bytes skipped)...
|
github.com/asciidoctor/jekyll-asciidoc:spec/fixtures/with_custom_private_collection/_tips/needle-in-haystack.adoc: [ master, ] |
---|
1: = Needle In Haystack
|
6: if (~haystack.indexOf(needle)) { /* present */ }
|
github.com/apache/kudu:www/epoch.0.5.2.min.css: [ master, ] |
---|
1: ...(1125 bytes skipped)....inner{stroke-width:1px;stroke:#555}.epoch .gauge .tick{stroke-width:1px;stroke:#555}.epoch .gauge .needle{fill:orange}.epoch .gauge .needle-base{fill:#666}.epoch div.ref.category1,.epoch.category10 div.ref.category1{background-color:#1f77b...(24132 bytes skipped)...
|
chromium.googlesource.com/vulkan-deps:update-commit-message.py: [ master, ] |
---|
37: INSERT_NEEDLE = 'If this roll has caused a breakage'
|
71: insert_index = old_commit_msg.rfind(INSERT_NEEDLE)
|
73: logging.exception('"%s" not found in commit message.' % INSERT_NEEDLE)
|
github.com/google/rekall:rekall-core/rekall/plugins/linux/heap_analysis.py: [ master, ] |
---|
2852: def search_vmas_for_needle(self, search_string=None, pointers=None,
|
3053: def search_chunks_for_needle(self, search_string=None, pointers=None,
|
2307: for hit in self.search_vmas_for_needle(pointers=[top_chunk.v()]):
|
2787: for hit in self.search_vmas_for_needle(pointers=mmap_pointers):
|
2789: found_pointers.add(hit['needle'])
|
2854: """Searches all vmas or only the given ones for the given needle(s).
|
2868: dict(needle=search_string))])
|
2901: temp['needle'] = pointer
|
2904: temp['needle'] = search_string
|
3055: """Searches all chunks for the given needle(s) and returns the ones
|
3070: hits = self.search_vmas_for_needle(pointers=pointers,
|
3074: hits = self.search_vmas_for_needle(search_string=search_string,
|
3085: # { needle (string or pointer): { offsets: {offsets} }, needle2: ...}
|
3099: result[chunk] = {hit['needle']: {hit['hit']}}
|
3102: if hit['needle'] not in list(result[chunk].keys()):
|
3103: result[chunk][hit['needle']] = {hit['hit']}
|
3106: result[chunk][hit['needle']].add(hit['hit'])
|
3657: hits = self.search_vmas_for_needle(
|
3661: hits = self.search_vmas_for_needle(
|
4228: hits = self.search_chunks_for_needle(
|
4233: temp_hits = self.search_chunks_for_needle(
|
4264: temp_hit['needle'] = ','.join(rule_strings)
|
4267: temp_hits = self.search_chunks_for_needle(
|
4308: temp_hits = self.search_chunks_for_needle(
|
4342: "We didn't find anything for the given needle(s).")
|
4350: for needle, data in needles.items():
|
4351: if isinstance(needle, malloc_chunk):
|
4355: "0x{:X}:\n".format(needle.v()))
|
4371: "The following needle at the given "
|
4373: renderer.write("Needle Offset(s)\n")
|
4378: (hex(needle) if isinstance(needle, int)
|
4379: else repr(needle)) + ": "
|
4386: (hex(needle) if isinstance(needle, int)
|
4387: else repr(needle)) + ": The needle "
|
4237: for chunk, needles in temp_hits.items():
|
4239: hits[chunk].update(needles)
|
4242: hits[chunk] = needles
|
4271: for chunk, needles in temp_hits.items():
|
4273: hits[chunk].update(needles)
|
4276: hits[chunk] = needles
|
4345: for chunk, needles in hits.items():
|
github.com/googleglass/gdk-compass-sample:app/src/main/java/com/google/android/glass/sample/compass/CompassView.java: [ master, ] |
---|
53: private static final float NEEDLE_WIDTH = 6;
|
54: private static final float NEEDLE_HEIGHT = 125;
|
55: private static final int NEEDLE_COLOR = Color.RED;
|
341: private void drawNeedle(Canvas canvas, boolean bottom) {
|
216: mPaint.setColor(NEEDLE_COLOR);
|
336: * Draws a needle that is centered at the top or bottom of the compass.
|
339: * @param bottom true to draw the bottom needle, or false to draw the top needle
|
346: // Flip the vertical coordinates if we're drawing the bottom needle.
|
355: float needleHalfWidth = NEEDLE_WIDTH / 2;
|
359: mPath.lineTo(centerX - needleHalfWidth, origin + sign * (NEEDLE_HEIGHT - 4));
|
360: mPath.lineTo(centerX, origin + sign * NEEDLE_HEIGHT);
|
361: mPath.lineTo(centerX + needleHalfWidth, origin + sign * (NEEDLE_HEIGHT - 4));
|
48: * marks at the half-winds. The red "needles" in the display mark the current heading.
|
217: drawNeedle(canvas, false);
|
218: drawNeedle(canvas, true);
|
358: mPath.moveTo(centerX - needleHalfWidth, origin);
|
362: mPath.lineTo(centerX + needleHalfWidth, origin);
|
github.com/google/coursebuilder-core:coursebuilder/modules/gitkit/gitkit.py: [ master, ] |
---|
150: _BAD_CRYPTO_NEEDLE = 'PKCS12 format is not supported by the PyCrypto library'
|
627: if _BAD_CRYPTO_NEEDLE in e.message:
|
github.com/GNOME/gtk:demos/gtk-demo/main.c: [ mainline, ] |
---|
21: static char **search_needle;
|
973: /* Show only if the name maches every needle */
|
974: for (i = 0; search_needle[i]; i++)
|
979: if (g_str_match_string (search_needle[i], demo->title, TRUE))
|
997: if (!search_needle || !search_needle[0] || !*search_needle[0])
|
1038: g_clear_pointer (&search_needle, g_strfreev);
|
1041: search_needle = g_strsplit (text, " ", 0);
|
github.com/google/coursebuilder-android-container-module:android/worker.py: [ master, ] |
---|
110: _ACCEPT_LICENSE_NEEDLE = 'Do you accept the license'
|
133: _GRADLEW_INSTALL_SUCCESS_NEEDLE = 'BUILD SUCCESSFUL'
|
145: _TEST_FAILURE_NEEDLE = 'FAILURES!!!\r'
|
779: return _GRADLEW_INSTALL_SUCCESS_NEEDLE not in result
|
782: return _TEST_FAILURE_NEEDLE in result
|
1111: if _ACCEPT_LICENSE_NEEDLE in line and not process.poll():
|
github.com/GoogleCloudPlatform/IoT-Icebreaker:appengine/sensordata-to-ui/public/third_party/epoch/epoch.min.css: [ master, ] |
---|
1: ...(1365 bytes skipped)....inner{stroke-width:1px;stroke:#555}.epoch .gauge .tick{stroke-width:1px;stroke:#555}.epoch .gauge .needle{fill:orange}.epoch .gauge .needle...(24288 bytes skipped)...nner{stroke:#AAA}.epoch-theme-dark .epoch .gauge .tick{stroke:#AAA}.epoch-theme-dark .epoch .gauge .needle{fill:#F3DE88}.epoch-theme-dark .epoch .gauge .needle-base{fill:#999}.epoch-theme-dark .epoch div.ref.category1,.epoch-theme-dark .epoch.category10 div.r...(32086 bytes skipped)...
|