Questions tagged [segment]

Segment is an ambiguous tag and one should refrain from using it. It has several, very different, meanings in CS. Please try and pick a more accurate tag for your post.

  • Segmentation (memory), the division of computer memory into segments
  • Image segment created in computer vision
  • String segment, the substring of a pattern delimited by two don't cares or one don't care and beginning or end of the pattern
  • Network segment, a part of a larger computer network
  • A protocol data unit of the transport layer in computing, e.g. TCP segment
625 questions
-1
votes
1 answer

Mock a const variable with Jest

I have a file with a variable declared as const: sendFunction.js const Analytics = require('analytics-node'); const writeKey = process.env.WRITE_KEY; //Call Segment service export const sendAnalytics = () => { return new…
Leon kong
  • 121
  • 1
  • 2
  • 9
-1
votes
1 answer

calculating average for segments in dataframe

In the the pic below, I have a huge dataframe. For each stroke, the machine renders penetration values then gives zeros. I want to calculate the average for each stroke. for example, the average of [0.762, 0.766] alone, and [0.66, 1.37, 2.11, 2.29]…
-1
votes
1 answer

average on dataframe segments

In the following picture, I have DataFrame that renders zero after each cycle of operation (the cycle has random length). I want to calculate the average (or perform other operations) for each patch. For example, the average of [0.762, 0.766]…
-1
votes
1 answer

How to show one tableview data in two segments in swift

I am using XLPagerTabStrip for segment i want to show one tableview data in two segment with sorted, for that i am using below code SegmentViewController code: if i add child_2.isSorted = false then error Value of type 'UIViewController' has no…
Swift
  • 1,074
  • 12
  • 46
-1
votes
1 answer

Trouble reading one segment from a .ELF file in C

I'm trying to read an ELF file to acces to the one segment it has. So far I've read the header of the file and it shows that the offset of the segment section starts 52 bytes from the beggining of the file (header.e_phoff) so I've tried using…
-1
votes
1 answer

Ffmpeg segment doesn't show file size update in real time

I'm trying to run ffmpeg mp3 stream with segmentation for each hour. Everything is working perfectly, except for one thing: when i run the command, the file size doesn't grow in real-time as i need, it only grows in packages of 256k. Is there a way…
Lucas Cardoso
  • 106
  • 1
  • 8
-1
votes
2 answers

Determining if two line segments intersect with a tolerance

I'm using this code that was posted as an answer to this question: How do you detect where two line segments intersect? It is my understanding that this function only returns an intersection point if the two line segments exactly intersect. I need…
-1
votes
1 answer

How do I find points around a partial circle intersected by line segment

I am working on an obstacle avoidance solution for my square grid pathfinding project. I begin by performing an A* search to find the "long" path. Next, I take my unit's current position and iterate the "long" path until I no longer have line of…
Jake
  • 37
  • 5
-1
votes
1 answer

python print the data for each column

I want to print the data in my excel file, segmenting it by cities names. For example I want to get all the columns for paris and put it in a new sheet, the columns for london and put it in another sheet etc. So far, i could only open the file and…
oezlem
  • 237
  • 2
  • 12
-1
votes
1 answer

is it enough to determine segment for two IP addresses with different netmasks by bitwise AND?

I read about the rules of how hosts communicate with each other. Let's say hostA and hostB. hostA gets its own network ID by bitwise-and its ip address and its mask, then gets hostB's network ID by bitwise-and hostB's ip address and hostA's mask. If…
password636
  • 981
  • 1
  • 7
  • 18
-1
votes
2 answers

Finding the largest array index with negative value

Given an array of positive elements (1 based indexing), you have to process two types of queries: (V) find the sum of numbers in the range 1:V (both inclusive) (V, X) subtract the number X to from all in the range 1:V and report the largest index…
csdteb
  • 9
  • 3
-1
votes
2 answers

Segment framework make UIAlertController to crash

I follow "https://segment.com/" to implement analytics user usage on my iOS source. But when i use UIAlertController to show alert with title is @"", my app was crash! I don't know exactly why. To solve it, i must set title of alert is nil. And this…
-1
votes
2 answers

ASM 8086 free segment

I need a free segment to save data, which segments are free to use? I am trying to save the bitmap data in the memory, the size of the bitmap data is 64K so I want to save it in a seperate segment. (I am afraid that i will override on a segment…
Amir Zak
  • 37
  • 1
  • 5
-1
votes
2 answers

If the CS register of a 8086 has the value 0xA000, what is the range of the physical addresses of the associated segment?

As the title already says, I want to know what the range of the physical addresses of the associated segment is, if the CS register of a 8086 has the value 0xA000?
JohnnyFromBF
  • 9,873
  • 10
  • 45
  • 59
-1
votes
2 answers

How to find segments of an array

I need help finding how to segment an array to find every four values and see if those values go over 10. I tried to implement .subList but I'm not sure if that would be on the right track. Below is what i currently have done so far so thanks for…
MisterEh
  • 1
  • 1
1 2 3
41
42