windowing

how to close a window from a different process

谁都会走 提交于 2019-12-23 10:19:09
问题 I have a c# application which I want to instruct to shutdown nicely, from a different process. I also want to be able to ask it to open its main window. I have a reference to its main window handle. I know I can do it using elaborate schemes such as remoting or WCF. the question is can I do it using simpler mechanisms such as window messages, or the OnClose event handlers of the window in the c# application 回答1: Pinvoke SendMessage() to send the WM_CLOSE message to the app's main window.

Having an equivalent to HOP_START inside an aggregation primitive in Flink

让人想犯罪 __ 提交于 2019-12-14 03:09:00
问题 I'm trying to do an exponentially decaying moving average over a hopping window in Flink SQL. I need the have access to one of the borders of the window, the HOP_START in the following: SELECT lb_index one_key, -- I have access to this one: HOP_START(proctime, INTERVAL '0.05' SECOND, INTERVAL '5' SECOND) start_time, -- Aggregation primitive: SUM( Y * EXP(TIMESTAMPDIFF( SECOND, proctime, -- This one throws: HOP_START(proctime, INTERVAL '0.05' SECOND, INTERVAL '5' SECOND) ))) FROM write

KISS FFT output with or without windowing

孤街醉人 提交于 2019-12-10 15:50:31
问题 I am currently trying to implement fft into avr32 micro controllers for signal processing purposes using kiss fft. And having a strange problem with my output. Basically, I am passing ADC samples (testing with function generator) into fft (real input, 256 n size) and retrieved output makes sense to me. However, if I apply Hamming window to ADC samples and then pass these to FFT, the frequency bin of the peak magnitude is wrong (and different from previous result without windowing). ADC

How to unit test a kafka stream application that uses session window

时光毁灭记忆、已成空白 提交于 2019-12-07 03:35:41
问题 I am working with Kafka Stream 2.1 I am trying to write some test for a stream application that aggregates some events by their key (i.e by a correlation ID) using a session window with an inactivity gap of 300ms. Here is the aggregation implementation represented by a method : private static final int INACTIVITY_GAP = 300; public KStream<String, AggregatedCustomObject> aggregate(KStream<String, CustomObject> source) { return source // group by key (i.e by correlation ID) .groupByKey(Grouped

Mel Frequency Cepstral Coefficients (MFCC) in C/C++

霸气de小男生 提交于 2019-12-07 03:13:16
问题 Is there any implementation of MFCC available in C/C++? Any source codes or libraries? I've already found http://code.google.com/p/libmfcc/ which seem to be good. 回答1: A recap in 2016: libmfcc is simple, MIT license, unsupported since 2010. YAAFE provides MFCCs and other features, LGPLv3, unsupported since 2011. Kaldi is overkill, but it can be used just for the MFCC. Apache License v2.0, and still supported. PocketSphinx is the CMU toolkit for speech recognition, CMU license (BSD-style), and

Is there any difference with the X11 atoms XA_WM_NAME and “_NET_WM_NAME”?

心已入冬 提交于 2019-12-06 04:14:48
问题 Is there any difference with the atom defined in XA_WM_NAME defined in Xatom.h and the one got using XInternAtom(display, "_NET_WM_NAME", False) ? Edit: I made a little program which prints the integer value of both and I got: _NET_WM_NAME: 312, XA_WM_NAME: 39 , so, they represent different atoms. What are the differences? Thanks. 回答1: They are different atoms, but they both represent the title of the window. _NET_WM_NAME is part of the newer XDG/freedesktop.org window manager spec. Like

How to unit test a kafka stream application that uses session window

喜你入骨 提交于 2019-12-05 07:56:16
I am working with Kafka Stream 2.1 I am trying to write some test for a stream application that aggregates some events by their key (i.e by a correlation ID) using a session window with an inactivity gap of 300ms. Here is the aggregation implementation represented by a method : private static final int INACTIVITY_GAP = 300; public KStream<String, AggregatedCustomObject> aggregate(KStream<String, CustomObject> source) { return source // group by key (i.e by correlation ID) .groupByKey(Grouped.with(Serdes.String(), new CustomSerde())) // Define a session window with an inactivity gap of 300 ms

Python: High Pass FIR Filter by Windowing

你离开我真会死。 提交于 2019-12-02 04:27:15
问题 I'd like to create a basic High Pass FIR Filter by Windowing within Python. My code is below and is intentionally idiomatic - I'm aware you can (most likely) complete this with a single line of code in Python but I'm learning. I have used a basic a sinc function with a rectangular window: My output works for signals that are additive (f1+f2) but not multiplicative (f1*f2), where f1=25kHz and f2=1MHz. My questions are: Have I misunderstood something fundamental or is my code wrong? In summary,

Apache beam windowing: consider late data but emit only one pane

£可爱£侵袭症+ 提交于 2019-11-28 09:44:43
问题 I would like to emit a single pane when the watermark reaches x minutes past the end of the window. This let's me ensure I handle some late data, but still only emit one pane. I am currently working in java. At the moment I can't find proper solutions to this problem. I could emit a single pane when the watermark reaches the end of the window, but then any late data is dropped. I could emit the pane at the end of the window and then again when I receive late data, however in this case I am

R - Faster Way to Calculate Rolling Statistics Over a Variable Interval

試著忘記壹切 提交于 2019-11-27 12:56:07
I'm curious if anyone out there can come up with a (faster) way to calculate rolling statistics (rolling mean, median, percentiles, etc.) over a variable interval of time (windowing). That is, suppose one is given randomly timed observations (i.e. not daily, or weekly data, observations just have a time stamp, as in ticks data), and suppose you'd like to look at center and dispersion statistics that you are able to widen and tighten the interval of time over which these statistics are calculated. I made a simple for loop that does this. But it obviously runs very slow (In fact I think my loop