count-based vs. tumbling window - stream

In Stream Processing, what's the difference between a count-based (aka tuple-based) window and a tumbling window?
From my perspective, they are the same:
The tumbling window sets its new (start,end)-pointers, each time a certain number of elements has arrived (it is a sliding window with size=slide). And this is also what the count-based window does.
can someone explain the difference to me?

A count window is sized by the number of event that are inside of it. A count window does not have any specific amount of time that it is going to be valid.
A tumbling window has fixed timespan and will create a new windows of data based on the timespan it is configured with. Any events that fall into that timespan will be used in the aggregates functions of the window.
Using Event Windows
It takes a little digging to find this link but it paints a very clear picture of the window types with graphical timelines to illustrate how data behaves inside each.
Windows in StreamInsight: The Basics
This page has a solid graphical example of what it means to be a tumbling window.

Related

How do I record and display the output of an EXE Window into another EXE Window

So for example let's say I have a game running, I want to grab the image output of the game and display it onto another window I have, so I would have two identical looking windows, one with the game itself, and one with the output of it. I want this to be done with LUA.
You can try wxwidgets library (with wxlua wrapper), as it provides access to the screen device context to read its pixels. See for example this takeScreenshot function that saves a section of the display into a PNG file.

Before diving in, is this possible with Awesome WM?

I've been trying different tiling WM's to see which one best fits my needs. Every time I try a new one, it looks good but I find other things that don't quite work the way I like. My requirements have evolved as I go. Initially, I didn't want to get into Awesome because having to learn Lua is not on my wish list but maybe I should give it a try IF it can do what I want better than the other tiling WM's out there.
I'm going to as specific as I can about what I want. I am running a 3440x1440 monitor. I want to use as much vertical space as possible (meaning, a full width, persistent but mostly empty status bar is not an option, but I do like the notification area and a date/time).
I understand it may not do everything exactly the way I want, which is oke. If it does more or less most of what I want I can weigh my options between Awesome and other tiling WM's (actually, only i3 which is what I'm using now but I'm open to better suggestions). I would very much appreciate it if people don't just say no to something it can't do, but say "no, but it can do ...". In other words, feel free to suggest alternatives that might be helpful as well.
Divide the screen in 3 columns, initially 30/45/25, with the right column split horizontally; Fully adjustable and resizable as needed during my work session;
Persistent layout; when closing the last application in a tile, I don't want that tile to disappear and the remaining tiles to resize. Just show an empty space and leave all tiles as they are.
tabbed tiles, so I see which applications are running in a tile (similar to i3).
Resizable tiles with the keyboard into 1 direction; When making the middle column/tile wider, I want that into a specific direction into another tile and leave the other side alone.
Certain applications I want to always launch into a specific tile. For instance, terminals always go into the right-most column top/bottom, browser/spotify always into the middle, atom/IDE always into the left. Some applications should always be floating. Obviously I want to be able to send them to a different tile after launch.
I don't want a 100% width status bar. It will be mostly empty which is a waste of screen estate. Preferably, I'd like a statusbar part of a tile, for example in the right-most tile, resizing with it. Otherwise I'd like it to be fixed to 30% and allow tiles which are not beneath it to use the full height of the screen. My reason for a statusbar is mute; I actually only want a notification area and a date time permanently visible. I don't need a "start menu", dmenu or similar is perfect, which I believe it has integrated.
Many thanks in advance!
The general answer is "Awesome configuration is code and it can do whatever you want". But there is a catch. Can Awesome be configured like you describe? Yes, totally. There is at least 2 distributions coming close enough (mine[1] and worron[2]) (at least for the tiling workflow, not the look).
The "catch" is that the workflow you describe isn't really the "Awesome way". Awesome is usually used as an automatic tiler. You have layouts that describe a workflow (code, web, internet) and manage the clients according to their programming. Manual tile management is rarely necessary once you have proper layouts. That doesn't mean you can't, I did, but it might be worth thinking outside the box and see if you can automate your workflow a bit further.
Also, the default layout system isn't very modern and makes it hard to implement the features you requested. My layout system (see link below) can be used as a module or as a branch and supports all features described above. Awesome is extremely configurable and it's components can be replaced by modules.
https://github.com/awesomeWM/awesome/pull/644
The layout "serialization" documentation is here:
https://elv13.github.io/libraries/awful.layout.html#awful.layout.suit.dynamic.manual
It is similar to i3 but has more layouts and containers. As for the "leaving blank space" part, it is configured using the fill_strategy:
https://awesomewm.org/doc/api/classes/wibox.layout.ratio.html#wibox.layout.ratio.inner_fill_strategy
As a word of conclusion, I would note that what you ask is "work exactly like i3". If you want such thing, well, use i3. Awesome is a window manager framework. Its goal and purpose is to create a customized desktop shell / WM. If it's what you want, then go ahead and learn it, nothing else can come close to the possibility and the level of control you can get out of it. However it takes time and effort to get to the point where you have "your own perfect desktop". Our users perfect desktops:
https://github.com/awesomeWM/awesome/issues/1395
[1] https://gfycat.com/SmallTerribleAdamsstaghornedbeetle
[2] https://www.youtube.com/watch?v=-yNALqST1-Y
The WM your are looking for is herbstluftwm (hlwm). Its a manual tiling window manager. The tiles which you are talking about are called frames in hlwm. Each frame can contain multiple windows. A frame can also be empty. Only if you kill a frame the other frames will automatically resize. You can add new frames vertically and horizontally and resize them. Each frame can also have a different layout to organize the windows inside. The layout you are looking for is max. This will stack the windows inside a frame on each other. It doesn't show you tabs like i3 however. hlwm allows you to create rules to open certain applications always in certain frames and workspaces. hlwm doesn't have a statusbar buildin. I personally like to use tint2. It can be used as a replacement for your requirement to see running applications as tabs.

How to choose a valid window of the signal in STFT

I have been reading a tutorial about short time fourier transfor, and i reached some lines in the text which i could not understand or figure out. the tutorial says the following
This window function is first located to the very beginning of the signal. That is, the
window function is located at t=0. Let's suppose that the width of the window is "T" s. At
this time instant (t=0), the window function will overlap with the first T/2 seconds (I
will assume that all time units are in seconds). The window function and the signal are
then multiplied. By doing this, only the first T/2 seconds of the signal is being chosen,
with the appropriate weighting of the window.
What i could not understand is: only the first T/2 seconds of the signal is being chosen,
with the appropriate weighting of the window.
my question is: why only the first T/2 seconds will be chosen? I think, since the width of the window is T, then the whole portion of the signal contained within the width of the window should be chosen, and NOT only the T/2 of the window.
Can any one please explain why T/2 of the width of thw window is chosen instead of T?
For high precission analysis of time-series one needs to apply a window like Hanning-Window or Hamming-Window to a short interval of the time-series before calculating the FFT to avoid leakage or side-lobes or whatever you may call the effect of the rectangular window which is used implicitely if no other window is applied.
For a complete analysis this window is moved by about 50% of the window length between consecutive FFTs. (The exact optimal shift depends on the window, 50% is a good value)
So with a window length of 100ms you will start the window at 200ms, 250ms, 300ms, ...
Now about the start of your time series. In order to see the very beginning of your time-series in the FFTs, you need to zero-pad the signal before it begins and start the first window at -50ms. Then you continue with 0ms, 50ms, 100ms, and so on.
You see the very first window start half a window-length before the actual time-series starts. (I guess this is meant in your text with T/2)

How to profile on iOS?

I'm using instruments to profile the CPU activity of an iOS game.
The problem I'm having is that I'm not entirely sure what the data I'm looking at represents.
Here is the screen I see after running my game for a couple of minutes,
I can expand the call tree to see exactly what methods are using the most CPU time. I'm unsure if this data represents CPU usage for the entire duration the profiler was running or is it just at that point in time.
I've tried running the slider along the timeline to see what effect that has on the numbers and it doesn't seem to have any. So that leeds me to believe the data represents CPU usage for the duration the game was running.
If this is the case then is it possible to access CPU usage at a particular point in time. There are a few spikes along the time line, I would like to see exactly what was happening at that time to see if there are any improvements I can make.
Thanks in advance for any responses.
To select a time range, use the "inspection range" buttons at the top of the window (left of the stop watch).
First select the start of the range by clicking on the graph ruler, the press the left most button to select the left edge. Then select the end of the range on the graph ruler and press the right most button to select the right edge.

How do I open a hardware accelarated DirectX window on a secondary screen

I'm looking to create a hardware accelarated DirectX (9 at the moment) window on a secondary screen. This screen is connected to the same graphics display as the primary screen (at least at the moment).
Currently, when I try to open the window on the secondary screen based on window position or by dragging it there, CPU usage jumps by about 10%, which seems to indicate that windows is switching to a software fallback rather than the hardware accelaration.
Machine is windows XP running a NVIDIA graphics card (varying cards as this runs on several machines), with the latest driver. It's also running CUDA at the same time to produce the images if that matters. Programming language is c++, manual window and message queue creation, no tookbox used at the moment to manage the GUI
Thanks
When you call CreateDevice, make sure to use the index of the monitor you are targeting. The standard D3DADAPTER_DEFAULT value is just 0, which is the primary monitor. DirectX is a bit kludgy that way, but if the window is on a different monitor than is specified in CreateDevice, then it will silently render in a framebuffer targeting the first monitor, then buffer copy to a framebuffer on the second monitor using the OS window manager.
So, the quick and dirty solution is to use CreateDevice(1, ...) instead since that is almost always be how a dual monitor setup is indexed.
A more robust solution is to use MonitorFromWindow(hwnd) to find the monitor that the window covers the most, then iterate through available d3d adapters looking for one that returns the same monitor handle using GetAdapterMonitor(). If you have a system with more than two monitors, or if you don't know in advance what monitor you want and just have an HWND, then you need the longer method.

Resources