Do I want to (i)fft by gnuradio-companion? - fft

To dark blue input ,Arrow becomes red.
Hi, everyone!
I use gnuradio-companion 3.7.11 with ubuntu 18.04.2 lts,
I want to do (I)FFT, but when both input and output specify complex,
Even if the complex is dark blue and complex is light blue,
It becomes an error when it becomes a red arrow.
I checked it myself, but I can not find the dark blue connector.
Please let us know if you know.
Thanks.

It's not quite clear what you're describing, but I think you're forgetting that the FFT expects a vector of samples as input, but you're providing it with single samples.
"Stream to vector" is the block that can remedy that.

Related

How to change `acrylicOpacity` action in Windows Terminal Preview so it depends on the background colour under a terminal window?

I know that I can modify my Terminal Preview json with acrylicOpacity, but when I have some stuff that is white/bright on the background, then it's hard to see console output.
I wonder, is it possible to somehow create the relation of the amount of transparency from acrylicOpacity based on the "background situation"?
Now it looks like this (you can see the dark background of the Stack Overflow):
but (here, you can see the white background of notepad++):
I'd like to have a feature to make the background of Windows Terminal Preview dark when a window under the WTP window is bright/white. In other words: I want to see the similar darkness on WTP (like on the picture n. one) with a lower layer which is bright/white.
Is there any easy way to do it?
Last thing: I like the level of transparency on the "dark surfaces", so it's not a matter of lower of transparency - it's not my point.
You can not make the terminal detect when things behind it are bright and adapt at all.
You can add a dark background image with its own transparency so that when things are bright they aren't super bright.
Or pick a background colour or a different colour scheme that improves visibility in bright areas without taking away from how it looks in the dark.
There aren't really any options that can help you.
If you are asking for a feature you are probably better off opening an issue on Github and discussing it there.

What is a flag? What is the pygame.SRCALPHA flag used for (I came across that in the example aacircle.py)?

I know almost nothing about pygame, and I'm trying to learn by messing with the examples. Also I'm reading the documentation and might try some tutorials.
I'm coming from a background of javascript with processing.js which I learned on khan academy's computer science section.
Anyways in the documentation for surface objects (page 4 of the pdf I downloaded) it says "For a plain software surface, 0 can be used for the flag." So as one of my first experiments I changed pygame.SRCALPHA in the example aacircle.py to a zero and tested it out. The screen went from bliting a red background with a black circle, to just solid black. Why?
I recommend you check out the pygame documentation on surfaces:
The pixel format can be controlled by passing the bit depth or an
existing Surface. The flags argument is a bitmask of additional
features for the surface. You can pass any combination of these flags:
HWSURFACE, creates the image in video memory
SRCALPHA, the pixel format will include a per-pixel alpha

AS3 Fisheye Effect

I'm having trouble understand how DisplacementMapFilter works. Basically, I'm trying to create a revolving planet through a combination of fisheye/masking.
Also, how do I go about doing this via timeline? I'm not too familiar with coding within it, but this is more of an animation project than anything else, so classes are out of the question. Sorry for the lack of code -- I'm simply stuck.
As noted in the comments above, this probably only answers half the problem;
Generating a displacement map image isn't too difficult with the right tools. I'll assume you're using Photoshop, GIMP, Fireworks, or similar.
It's probably best to work on a 128x128 image or smaller with this method. Some editors have more specialised tools which let you work on pretty much any size of image, but this is a generic process that needs no special tools. You can always enlarge the end result, but the quality will begin to go down.
Start with a gradient fill. It should go from pure black on the left to dark red on the right (specifically 128,0,0). Add a vertical fill from black at the top to dark green at the bottom (specifically 0,128,0), and combine them with a LIGHTEN or ADD filter. You should now have an image which has black, red, green and yellow corners. Flatten it.
Copy this image to another layer / whatever the term-of-choice is for your editor. Apply whatever displacement filter you want to it (maybe a fish eye, maybe a manual smudge, maybe a perspective transform, anything)
Add a third layer between the two. Flood-fill it with dark yellow (128,128,0) and set it to ADD / ADDITION blend mode. Set the top layer to SUBTRACT / SUBTRACTION blend mode.
That's it. You should get a mostly yellow image which will function as a displacement map.
Update:
To use this in the example program (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filters/DisplacementMapFilter.html#includeExamplesSummary), replace the createBitmapData function with this:
private function createBitmapData():BitmapData {
return myBitmapObject.bitmapData;
}
where myBitmapObject is the instance name (I think) of your displacement Bitmap. There are tidier ways of setting that up, but this is the easiest.

idea for morphing captcha

I've been thinking of a dynamic way of creating a CAPTCHA that uses morphing shapes or dynamic colors.
My first idea is to have a graphic, flash or something, that gradually changes from, say a square into a sphere. The user will be required to click the button when it becomes spherical enough.
Second idea is to have an area of color that slowly changes from, say, red to blue and the user will be required to press a button when it becomes blue enough.
Third idea is a combination of both methods.
I'd say the difficulty will be to match the clicks with the transitions. But it should be hard for automated code to detect shades or shapes.
Can people please offer some comments on my idea.
edit -
Thanks for the feedback. I'm now considering using a flash based video playback of a server fed video feed of a few colored shapes that morph into other colored shapes. The user will be required to pause the feed when the colors and shapes match some canned questions: such as : click on the video when you see two green squares turn into 3 blue triangles. The shapes will be amongst over overlapping and moving morphing shapes. Fun for the whole family!
Color is a bad idea as (a) its very easy for a computer to detect; (b) very hard for some humans — the color blind — to detect. Even if you're OK with denying access to the disabled, you'd have to worry about different monitors, systems, lighting conditions, etc. giving rise to different color perceptions.
How hard do you think it is for a computer to compare the red component and blue component in a pixel (or averaged over several pixels)? Trivial. So this isn't a problem for a computer.
Similarly, it isn't that hard to program the difference between a square and a circle. One has strait lines, one doesn't!
Good idea, you could also do it so that the shapes keep turning or moving.
I don't know if it would be safer than a regular letter capcha tho.
I'm not sure why you think color would be any harder to detect than text. Shapes possibly, but they would have to be more complex than n-sided polygons. The gradual animation is a good idea however. But if you can code it to show, someone can code something that watches it.
The real test is to prove humanness by identifying semantic meanings, rather than syntactic meanings.
For instance show pictures of animals and make the user click when a bird shows up. Or just say "click on the thing that can fly." And show some pictures of animals. This would be rather unbeatable by a machine until all images had been cataloged. The trouble with CAPTCHA of course is trying to make semantics with syntax. Therefore defeating itself from the onset.
You're on the right track, and I'm sure your proof of concepts are interesting. But remember: made by a computer: solved by a computer.
Although these ideas will almost certainly work, it's a security-through-obscurity effect. Classic CAPTCHA images are "one-way" in that the correct answer can't (theoretically) be deduced by a computer. The problem with saying "click here when the image turns blue" is that a computer could easily do this, if somebody considered the stakes to be worth developing a program for.
Additionally, unusual captchas will force your users to think. Depending on your audience this may mean losing some users.
I did a fair bit of research when developing a CAPTCHA system, and the classic method of printing text to an image seems to be the most effective. The trick is not in having lots of "background noise" behind the text, or different colours. It's about the following two things:
1) Random text kerning, with most or all letters slightly overlapping each other.
2) Random distortion, translation and rotation of the text.
If you have a look at Google's CAPTCHA, they pretty well only have those two features: https://www.google.com/accounts/NewAccount?service=mail

How to design good looking reports?

i'm currently doing some reports for SSRS, and i just confirm what i already knew, i suck at this thing of color matching and making things look pretty.
Does anyone know a good site or something to help me figure out how a report should look. I need help! any website or recommendations would be highly appreciated. I tried trying to stick cool looking color pallet, it just didn't work...
PS: I know this is not a problem related with programming or stuff like that, but this lack of coolness its affecting everything i do :p
Best option: don't use colour unless you have a specific need for it. Many years ago I worked as a typesetter for a while in the jobbing commercial print industry. Most of the clients did not want to pay for a colour print job due to the set-up costs, so the jobs tended to be black and white or two spot colours.
Also, I've done any amount of documentation work where the output device was a black and white laser printer.
Unless you have a good sense for colour attempting to play amateur graphic designer is probably more trouble than it's worth. Start with black and white reports, perhaps with one or two highlight colours. If you find an overall colour scheme you like, you can use it as a standard format, but keep it simple. Otherwise, you're really just adding Chart Junk, which is a bad thing.
If you really need colour, use it sparingly, and avoid reversed out headers (light text on a dark background). Some suggestions for sparing colour use:
Light pastel shades (no darker than something equivalent to a 10-20% gray half-tone) on headers or the left-most column. Only shade the left-most column if it is relatively narrow. This sort of header with a light bar down the left side will frame a report.
Alternating bars of approx. 5 lines or so. 5 lines in a plain white background and 5 lines in a pastel shade. This should be lighter (equivalent to a 5-10% gray) than the shade you would use in headings described above. Only use this if the bars are equal size - it looks ugly if the bars are different heights.
Highlighted values (if you have numbers that are alterted if out of a certain range) in an alert colour. This might be quite useful for KPI reports.
Charts - use lighter shades rather than bright primary colours for printed charts unless you are doing line graphs, in which the lines should be relatively thin and darker colours like maroon or navy blue. Leave any borders, pips, axes and labels in black.
Avoid graphical decoration for its own sake unless you are actually a competent graphic artist. Amateur graphic design got a deservedly bad rep in the 1980's and 1990's with the advent of desktop publishing. Keep the reports looking professional, and use this term ('should look professional') if you get into any arguments with users.
This sort of approach should let you answer people's requests for colour while still maintaining a degree of professionalism (and self-respect). You can be seen to accomodate user requests without looking like an idiot.
I use Color Brewer to pick complementary color schemes for reports, charts, maps, etc.
The content is the most important element. After that, simplicity.
use a limited set of fonts and colors
use bold, italic, and underline sparingly
use lots of whitespace
base the page layout on a grid
For a few tips on layout: The Basics of Graphic Design and Typography and Page Layout
I would say that the layout of the report is more important than its color scheme.
The purpose of a good report is to organize information and present it in a manner that is concise, meaningful, and guides the eye from element to element. The snazzy paint job is optional.
I always use the default dark blue/light blue color scheme that comes when you use the report create wizard.
I've been using it for reports for over a year and have never gotten a complaint.