segment

how to divide an audio file (mp3 or wav) into smaller ones at silent segments

僤鯓⒐⒋嵵緔 提交于 2019-12-12 02:39:32
问题 I have mp3 and wav audio files. I want to divide them into smaller files programmatically. Is there any easy-to-use Java library I can use to process the audio file, seek the silent segments, and divide the file somewhere in a silent segment? 回答1: This page: http://www.labbookpages.co.uk/audio/javaWavFiles.html has WavFile class you can use to read wave files (the download link to WavFile.tar.gz is in the top right corner - WavFile.tar.gz). Seeking the silent segments can be done by scanning

Updating variable that lives in the data segment from the stack and its segment

ⅰ亾dé卋堺 提交于 2019-12-12 02:18:19
问题 I currently have three segments of memory, my main data segment, stack segment and the segment where my API lives. The following instructions are executed from the data segment, they push the address of cursorRow and welcomeMsg then do a far call to the function in my API segment. The cursorRow variable lives in the main data segment that is calling the API function. The call looks like this: push cursorRow push welcomeMsg call API_SEGMENT:API_printString How can I alter cursorRow, inside of

How to generate a list of segments from a list of random self-intercepting lines (psp in R)?

拜拜、爱过 提交于 2019-12-11 15:03:56
问题 I'm using X=rpoisline(4) to generate lines and plot them with plot(X) . With X$ends I have their coordinates and their intersection points with selfcrossing.psp(X) (In R with spatstat : library(spatstat) ). I need to get a list of segments and their coordinates and be able to manipulate them (change their orientation, position, intersection...). Those segments have to be defined by the intersection of a line with an other line and with the window. So, am I missing a simple way to convert a

implement 2d range tree c++

倖福魔咒の 提交于 2019-12-11 13:52:17
问题 I have been trying to understand range tree for some time, but i still can't understand it. Can someone explain it to me with an implementation, because i want to use it to solve 2D RMQ, i know segment tree, and my teacher tell me range tree is similar to 2d segment tree, but i just can't think how the space complexity can be less than n^2 like 2d segment tree. I'm not sure about this, but is it true that, it's like merge sort, so the memory will be less than n^2 using vector void merge

How can I find the first point along a heading that is a specified distance away from a line segment?

孤者浪人 提交于 2019-12-11 08:25:55
问题 Given a starting point, a heading, a distance, and a line segment, find the first point along this heading that is the specified distance away from this line segment. I covered two cases, but I haven't been able to cover the last one. First case: heading away from the line. Ignore it even if the starting point is within the specified distance. Second case: It intersects the line. I solved it using trig and triangles. Initially didn't consider the next case. Third case: It is heading towards

segment object(leaf) which is on the white paper using image processing

这一生的挚爱 提交于 2019-12-11 08:19:09
问题 I want to get only leaf from an image. The background is a normal white paper(A4) and there is some shadow. I apply some method (structure element,edge detection using filter) but I cannot find the general way which can apply all the image. these are examples. Are there better methods for this problem?? thank you another example. and the result I got is By using hsv_I = rgb2hsv(I); Is = hsv_I(:,:,2); Is_d = imdilate(Is,strel('diamond',4)); Is_e = imerode(Is,strel('diamond',2)); Is_de =

How to build message from tcp segments

只谈情不闲聊 提交于 2019-12-11 06:52:52
问题 working in C#, I use SharpPCap to get segments from a winpcap trace. I need to rebuild all the messages sent and received in that trace. In my situation, the client's and server's IP will never be the same. Client's port does not necessarily change. The protocol used by the message could be HTTP or something custom that I don't know. That's how I currently do it : if (ipPacket.Protocol == IPProtocolType.TCP) { TcpPacket tcpPacket = (TcpPacket)ipPacket.PayloadPacket; Packet dataPacket =

震惊了!原来这才是kafka!

北城以北 提交于 2019-12-11 06:49:57
简介 kafka是一个分布式消息队列。具有高性能、持久化、多副本备份、横向扩展能力。生产者往队列里写消息,消费者从队列里取消息进行业务逻辑。一般在架构设计中起到解耦、削峰、异步处理的作用。 kafka对外使用topic的概念,生产者往topic里写消息,消费者从读消息。为了做到水平扩展,一个topic实际是由多个partition组成的,遇到瓶颈时,可以通过增加partition的数量来进行横向扩容。单个parition内是保证消息有序。 每新写一条消息,kafka就是在对应的文件append写,所以性能非常高。 kafka的总体数据流是这样的: kafka data flow 大概用法就是,Producers往Brokers里面的指定Topic中写消息,Consumers从Brokers里面拉去指定Topic的消息,然后进行业务处理。 图中有两个topic,topic 0有两个partition,topic 1有一个partition,三副本备份。可以看到consumer gourp 1中的consumer 2没有分到partition处理,这是有可能出现的,下面会讲到。 关于broker、topics、partitions的一些元信息用zk来存,监控和路由啥的也都会用到zk。 生产 基本流程是这样的: kafka sdk product flow.png 创建一条记录

why must we initialize DS And ES registers in MS-DOS? [duplicate]

泄露秘密 提交于 2019-12-11 04:03:55
问题 This question already has answers here : Why doesn't MS-DOS initialize the DS and ES registers? (2 answers) Closed 5 years ago . in MS-DOS ,Why the initialization of the DS and ES registers must be done manually by the programmer, although it's operating system responsibility to initialize these registers. why mustn't we do this for CS and SS registers ? Which feature of MS-dos Leads into this? 回答1: It's just a choice of the OS designer. DOS is a minimal OS, so it does the minimum possible.

Tensorflow unsorted_segment_sum dimension

时间秒杀一切 提交于 2019-12-10 06:51:12
问题 I'm using the tf.unsorted_segment_sum method of TensorFlow and it works fine when the tensor i give as data have only one line. For example: tf.unsorted_segment_sum(tf.constant([0.2, 0.1, 0.5, 0.7, 0.8]), tf.constant([0, 0, 1, 2, 2]), 3) Gives the right result: array([ 0.3, 0.5 , 1.5 ], dtype=float32) The question is, if i use a tensor with several lines, how can I get the results for each line? For instance, if I try a tensor with two lines: tf.unsorted_segment_sum(tf.constant([[0.2, 0.1, 0