/commonlibrary/ets_utils/js_util_module/container/linkedlist/ |
D | js_linkedlist.ts | 35 let index: number = Number.parseInt(prop); 37 if (Number.isInteger(index)) { 38 errorUtil.checkRangeError('index', index, 0, length - 1); 39 return obj.get(index); 52 let index: number = Number.parseInt(prop); 53 if (Number.isInteger(index)) { 55 errorUtil.checkRangeError('index', index, 0, length); 56 obj.set(index, value); 62 let index: number = Number.parseInt(prop); 63 if (Number.isInteger(index)) { [all …]
|
/commonlibrary/ets_utils/js_util_module/container/vector/ |
D | js_vector.ts | 30 let index: number = Number.parseInt(prop); 31 if (Number.isInteger(index)) { 32 if (index < 0 || index >= obj.length) { 49 let index: number = Number.parseInt(prop); 50 if (Number.isInteger(index)) { 51 if (index < 0 || index > obj.length) { 54 obj[index] = value; 62 let index: number = Number.parseInt(prop); 63 if (index >= 0 && index < obj.length && Number.isInteger(index)) { 64 obj.removeByIndex(index); [all …]
|
/commonlibrary/ets_utils/js_util_module/container/list/ |
D | js_list.ts | 35 let index: number = Number.parseInt(prop); 36 if (Number.isInteger(index)) { 37 errorUtil.checkRangeError('index', index, 0, obj.length - 1); 38 return obj.get(index); 50 let index: number = Number.parseInt(prop); 51 if (Number.isInteger(index)) { 52 errorUtil.checkRangeError('index', index, 0, obj.length); 53 obj.set(index, value); 59 let index: number = Number.parseInt(prop); 60 if (Number.isInteger(index)) { [all …]
|
/commonlibrary/ets_utils/js_util_module/container/plainarray/ |
D | js_plainarray.ts | 93 let index: number = 0; variable 94 index = this.binarySearchAtPlain(key); 95 return this.members.values[index]; 112 getKeyAt(index: number): number { 114 errorUtil.checkTypeError('index', 'Integer', index); 115 return this.members.keys[index]; 121 let index: number = 0; variable 122 index = this.binarySearchAtPlain(key); 123 if (index < 0) { 126 return this.deletemember(index); [all …]
|
/commonlibrary/ets_utils/js_util_module/container/arraylist/ |
D | js_arraylist.ts | 32 let index: number = Number.parseInt(prop); 33 if (Number.isInteger(index)) { 34 errorUtil.checkRangeError('index', index, 0, obj.length - 1); 49 let index: number = Number.parseInt(prop); 50 if (Number.isInteger(index)) { 51 errorUtil.checkRangeError('index', index, 0, obj.length); 52 obj[index] = value; 59 let index: number = Number.parseInt(prop); 60 if (index >= 0 && index < obj.length && Number.isInteger(index)) { 61 obj.removeByIndex(index); [all …]
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/mpsc/ |
D | queue.rs | 89 index: usize, field 94 index: AtomicUsize, field 114 index: 0, in new() 118 index: AtomicUsize::new(0), in new() 125 let mut tail = self.tail.index.load(Acquire); in send() 132 let index = (tail >> INDEX_SHIFT) % (CAPACITY + 1); in send() localVariable 133 if index == CAPACITY { in send() 134 tail = self.tail.index.load(Acquire); in send() 139 if index + 1 == CAPACITY && new_block.is_none() { in send() 142 match self.tail.index.compare_exchange_weak( in send() [all …]
|
D | array.rs | 35 index: AtomicUsize, field 63 index: AtomicUsize::new(i), in new() 83 let index = (tail >> INDEX_SHIFT) % self.capacity; in prepare_send() localVariable 84 let node = self.data.get(index).unwrap(); in prepare_send() 85 let node_index = node.index.load(Acquire); in prepare_send() 97 return SendPosition::Pos(index); in prepare_send() 109 pub(crate) fn write(&self, index: usize, value: T) { in write() 110 let node = self.data.get(index).unwrap(); in write() 114 node.index.fetch_sub(1, Release); in write() 124 SendPosition::Pos(index) => { in try_send() [all …]
|
/commonlibrary/ets_utils/js_util_module/container/lightweightmap/ |
D | js_lightweightmap.ts | 111 let index: number = 0; variable 112 index = this.getIndexByKey(key); 113 return this.members.values[index]; 127 getKeyAt(index: number): K { 129 errorUtil.checkTypeError('index', 'Integer', index); 130 errorUtil.checkRangeError('index', index, 0, this.length - 1); 131 return this.members.keys[index]; 174 removeAt(index: number): boolean { 176 errorUtil.checkTypeError('index', 'Integer', index); 177 if (index > this.memberNumber--) { [all …]
|
/commonlibrary/ets_utils/js_util_module/container/queue/ |
D | js_queue.ts | 32 let index: number = Number.parseInt(prop); 33 if (Number.isInteger(index)) { 34 errorUtil.checkRangeError('index', index, 0, obj.length); 50 let index: number = Number(prop); 51 if (index >= 0 && index <= obj.length && Number.isInteger(index)) { 52 obj[index] = value; 69 let index: number = Number.parseInt(prop); 70 if (index >= 0 && index < obj.length && Number.isInteger(index)) { 125 forEach(callbackfn: (value: T, index?: number, queue?: Queue<T>) => void,
|
/commonlibrary/ets_utils/js_util_module/container/stack/ |
D | js_stack.ts | 32 let index: number = Number.parseInt(prop); 33 if (Number.isInteger(index)) { 34 errorUtil.checkRangeError('index', index, 0, obj.length - 1); 50 let index: number = Number.parseInt(prop); 51 if (index >= 0 && index < obj.length && Number.isInteger(index)) { 52 obj[index] = value; 70 let index: number = Number.parseInt(prop); 71 if (index >= 0 && index < obj.length && Number.isInteger(index)) { 134 forEach(callbackfn: (value: T, index?: number, stack?: Stack<T>) => void,
|
/commonlibrary/ets_utils/js_api_module/buffer/ |
D | converter.cpp | 213 unsigned int index = 0; in Base64Decode() local 221 charArray4[index] = encodedStr[cursor]; in Base64Decode() 222 index++; in Base64Decode() 224 if (index == 4) { // 4 : after 4 chars is assigned to charArray4 in Base64Decode() 226 for (index = 0; index < 4; index++) { in Base64Decode() 227 charArray4[index] = base64Table.find(charArray4[index]) & LOWER_8_BITS_MASK; in Base64Decode() 239 for (index = 0; index < 3; index++) { in Base64Decode() 240 ret += charArray3[index]; in Base64Decode() 242 index = 0; in Base64Decode() 249 if (index != 0) { in Base64Decode() [all …]
|
/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/ |
D | table.rs | 29 pub(crate) fn search_header_name(&self, index: usize) -> Option<Header> { in search_header_name() 30 if index <= 61 { in search_header_name() 31 StaticTable::header_name(index) in search_header_name() 33 self.dynamic.header_name(index - 62) in search_header_name() 38 pub(crate) fn search_header(&self, index: usize) -> Option<(Header, String)> { in search_header() 39 if index <= 61 { in search_header() 40 StaticTable::header(index) in search_header() 42 self.dynamic.header(index - 62) in search_header() 47 pub(crate) fn index(&self, header: &Header, value: &str) -> Option<TableIndex> { in index() method 49 StaticTable::index(header, value), in index() [all …]
|
D | integer.rs | 47 index: usize, field 56 let index = byte & mask; in first_byte() localVariable 57 match index.cmp(&mask) { in first_byte() 58 Ordering::Less => Ok(index as usize), in first_byte() 60 index: index as usize, in first_byte() 70 self.index = 1usize in next_byte() 73 .and_then(|res| res.checked_add(self.index)) in next_byte() 77 true => Ok(Some(self.index)), in next_byte()
|
/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/common/ |
D | mix.rs | 28 Owned { bytes: Vec<u8>, index: usize }, 30 Slice { bytes: &'a [u8], index: usize }, 42 index: 0, in new() 49 index: 0, in new_as_bytes() 55 MixFrom::Owned { bytes, index: _ } => bytes.is_empty(), in is_empty() 56 MixFrom::Slice { bytes, index: _ } => bytes.is_empty(), in is_empty() 62 *self = MixFrom::Owned { bytes, index: 0 }; in set_owned() 66 *self = MixFrom::Slice { bytes, index: 0 }; in set_bytes() 84 if let MixFrom::Owned { bytes, index } = self { in owned_encode() 85 match data_copy(bytes, index, dst)? { in owned_encode() [all …]
|
/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/representation/ |
D | encoder.rs | 90 let result = match searcher.index(&h, &v) { in encode() 91 Some(TableIndex::Header(index)) => Indexed::new(index).encode(&mut dst[cur..]), in encode() 92 Some(TableIndex::HeaderName(index)) => { in encode() 95 Indexing::new(index, v.into_bytes(), false).encode(&mut dst[cur..]) in encode() 236 index: Integer, field 239 fn from(index: Integer) -> Self { in from() 240 Self { index } in from() 243 fn new(index: usize) -> Self { in new() 245 index: Integer::index(index, PrefixIndexMask::INDEXED.0, 0x80), in new() 250 self.index in encode() [all …]
|
/commonlibrary/ets_utils/js_util_module/container/struct/ |
D | js_struct.ts | 31 function insert<T>(a: Array<T>, index: number, value: T): void { 32 for (let i: number = a.length; i > index; i--) { 35 a[index] = value; 125 let index: number = 0; 126 index = this.binarySearchAtPlain(key); 127 if (index >= 0) { 128 this.members.keys[index] = key; 129 this.members.values[index] = value; 131 index = ~index; 132 insert(this.members.keys, index, key); [all …]
|
/commonlibrary/ets_utils/js_util_module/container/deque/ |
D | js_deque.ts | 32 let index: number = Number.parseInt(prop); 33 if (Number.isInteger(index)) { 34 errorUtil.checkRangeError('index', index, 0); 49 let index: number = Number(prop); 50 if (Number.isInteger(index)) { 51 errorUtil.checkRangeError('index', index, 0); 52 obj[index] = value; 72 let index: number = Number.parseInt(prop); 73 if (index >= 0 && Number.isInteger(index)) { 164 forEach(callbackfn: (value: T, index?: number, deque?: Deque<T>) => void,
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/ |
D | slots.rs | 31 for (index, key) in keys.iter().enumerate() { in sdv_slots_huge_data_push_back() 32 assert_eq!(slots[*key], index); in sdv_slots_huge_data_push_back() 84 for index in 0..10 { in sdv_slots_remove_and_pop() 86 let res = slots.remove(index); in sdv_slots_remove_and_pop() 100 for index in 20..100 { in sdv_slots_remove_and_pop() 101 assert_eq!(slots.pop_front(), Some(index)); in sdv_slots_remove_and_pop()
|
/commonlibrary/c_utils/base/include/ |
D | sorted_vector.h | 153 inline const TYPE& operator[](size_t index) const { return vec_[index]; } 183 const TYPE& MirrorItemAt(ssize_t index) const in MirrorItemAt() argument 185 if (index < 0) { in MirrorItemAt() 186 return *(vec_.end() + index); in MirrorItemAt() 188 return *(vec_.begin() + index); in MirrorItemAt() 208 TYPE& EditItemAt(size_t index) in EditItemAt() argument 210 return vec_[index]; in EditItemAt() 236 iterator Erase(size_t index) in Erase() argument 238 if (index >= vec_.size()) { in Erase() 241 return vec_.erase(vec_.begin() + index); in Erase() [all …]
|
/commonlibrary/ets_utils/js_util_module/container/lightweightset/ |
D | js_lightweightset.ts | 135 removeAt(index: number): boolean { 137 errorUtil.checkTypeError('index', 'Integer', index); 138 if (index > this.memberNumber--) { 141 this.members.hashs.splice(index, 1); 142 this.members.values.splice(index, 1); 143 this.members.keys.splice(index, 1); 192 getValueAt(index: number): T { 194 errorUtil.checkTypeError('index', 'Integer', index); 195 return this.members.keys[index];
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/metrics/ |
D | runtime.rs | 278 pub fn worker_task_len(&self, index: u8) -> Option<usize> { in worker_task_len() 282 AsyncHandle::MultiThread(spawner) => match spawner.get_worker(index) { in worker_task_len() 309 pub fn worker_total_task_count(&self, index: u8) -> Option<usize> { in worker_total_task_count() 313 AsyncHandle::MultiThread(spawner) => match spawner.get_worker(index) { in worker_total_task_count() 339 pub fn worker_poll_count(&self, index: u8) -> Option<usize> { in worker_poll_count() 343 AsyncHandle::MultiThread(spawner) => match spawner.get_worker(index) { in worker_poll_count() 391 pub fn worker_get_task_from_global_count(&self, index: u8) -> Option<usize> { in worker_get_task_from_global_count() 395 AsyncHandle::MultiThread(spawner) => match spawner.get_worker(index) { in worker_get_task_from_global_count() 422 pub fn worker_push_task_to_global_count(&self, index: u8) -> Option<usize> { in worker_push_task_to_global_count() 426 AsyncHandle::MultiThread(spawner) => match spawner.get_worker(index) { in worker_push_task_to_global_count()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/util/ |
D | slots.rs | 424 fn index(&self, index: usize) -> &Self::Output { in index() method 425 match self.entries.get(index) { in index() 436 fn index_mut(&mut self, index: usize) -> &mut Self::Output { in index_mut() 437 match self.entries.get_mut(index) { in index_mut() 583 for index in 0..50 { in ut_slots_push_back() 584 let res = slots.remove(index); in ut_slots_push_back() 591 for index in 0..50 { in ut_slots_push_back() 592 assert_eq!(*slots.get(index).unwrap(), cnt); in ut_slots_push_back() 603 for index in 0..50 { in ut_slots_push_back() 604 let res = slots.remove(index); in ut_slots_push_back() [all …]
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/c_openssl/ |
D | stack.rs | 82 index: Range<c_int>, field 90 self.index in next() 97 self.index.size_hint() in size_hint() 120 index: 0..self.len() as c_int, in iter() 150 index: Range<c_int>, field 158 self.index in next() 181 index: 0..self.len() as c_int, in into_iter()
|
/commonlibrary/c_utils/docs/zh-cn/ |
D | c-utils-guide-sortedVector.md | 25 | TYPE& | **EditItemAt**(size_t index)<br>返回vector的`index`对应的元素值。 | 28 | iterator | **Erase**(size_t index)<br>如果`index`小于vector的size,就删除`index`处的元素。 | 34 | const TYPE& | **MirrorItemAt**(ssize_t index) const<br>返回vector的元素值。 | 37 | const TYPE& | **operator[]**(size_t index) const<br>根据输入的索引去访问vector的元素。 |
|
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/ |
D | events.rs | 85 index: 0, in iter() 117 index: usize, field 123 if self.index < self.iter.len() { in next() 124 self.index += 1; in next() 125 Some(&self.iter[self.index - 1]) in next()
|