Equalizer control for displaying microphone record input - windows-phone-8

I want to record from the microphone and while recoring, I'd like to display the current voice level like an equalizer or a wave form. It should look like a vertical progressbar which goes up and down.
Is there an existing control for this or does someone have an idea how to do this?

There is no control per-se, but you could implement your own. You have access to the byte array for the recorded content. Given that you have the sample rate and the total content length, you can get the volume and transform it into a visual element.

Related

How can I get the height of auto-grown text box before Print event in an MS Access 2016 Report?

I want to get the final height of a multi-line text box in an Access report so that I can align vertically smaller, one-line boxes, to that expanded one.
So that they end up looking like this:
It seems the only way to know the expanded size is in the Print event, and it's too late there because one can't move already drawn boxes. And yes, I've tried the Format event, but there the height is the one given before growing, at design time.
Does anyone know of an alternative? Maybe an add-on textbox control with this capability? Or an add-on function to get the Textbox.Height just before the Print event occurs?

How do I get the user's input from a .html file to a .c file?

I'm trying to get the input from my html webpage, which has a text box and submit button. How can I get the user's input in a separate .c file, so that I can change what happens in my html file depending on the input?
Here is the problem for my assignment:
If the player input the word NORTH, SOUTH, EAST, or WEST, the program will programmatically generate a webpage that hyperlinks to another room. Do printf() to the browser.
You will need to do something like this:
printf(“< a href=\”http://URL\”>Press HERE to go North< /a>”);
The above printf() will display on the browser a hyperlink. The player will simply click on the word Press HERE to go North with their mouse to cause the browser to change to another webpage. The HTML tag to link to another webpage is:
< a href=”URL”>TEXT TO CLICK< /a>.
You will need to do this for each direction: NORTH, SOUTH, EAST and WEST. If the player input the word GOLD, the program will programmatically generate a webpage that displays the amount of gold pieces the player currently owns and a hyperlink to return the player back to the current room.
Might need a little bit more clarification on what exactly it is you're trying to achieve, but if you do actually want the HTML file to change based on the user's input, depending on whether you want that change to be permanent or based on the individual user, you have a couple of options:
1) If you want the user's input to permanently change the HTML file, have it posted to another server-side page on your website (PHP for example) -- then take the user's input and you can use PHP to write actual changes to the HTML file stored on the server which is delivered to your end users. I would advise being very careful with this and make sure you sanitise the input properly to avoid security issues.
2) Alternatively if you want the user's input to change the page they're viewing in some way in real-time and only for that user, you probably want to make use of JavaScript and set the innerHTML of elements based on the user's input.
If you clarify a little more in the comments for this answer what exactly you're trying to achieve, I can give more specific help.

How to find same logos, UI elements using sikulix

I am new to sikuli.
I am using it for functional test automation of my java spring standalone application. I am having the same set of images(logos) at multiple locations on the screen. and they are generated dynamically as per the application data. In that case how can I find and click on certain buttons/elements in the UI.
Example: like, share, comment text/image will be there several times in facebook page. in that how to we click on particular buttons out of all.(facebook is just an example) i want the similar solution for my application.
I think what you're asking is- given a case where the same image or UI element is present multiple times on the same page, how can I specify one of these elements in one location versus the same element in another?
The quick and easy way to do this would be to capture a larger picture, like as much of the window as you can, and click the image in parentheses after the click action; this opens a window reading file, matching preview, and target offset. Click target offset, use the mouse wheel to zoom in, and click on the exact point of the picture that you'd like to click.
It's possible to click in multiple places on a captured image, provided you use different click() commands, and you can set the target offset for each click() command without needing a new picture.
With just this one image, you can potentially click every square on the board provided you take the time to set the offset for each of the 64 click() commands it'd take to do so. http://files.chesscomfiles.com/images_users/tiny_mce/cigoL/Chessboard.png
The more difficult solution would be setting up regions, and searching those regions for the matching pictures, but for what you're looking for this should- for more about regions and setting it up check links below. Cheers!
http://sikulix-2014.readthedocs.io/en/latest/index.html
Based on your FB example you could use setROI() to focus on the top post on the page (imagine a rectangle that covers a complete post on the news feed) from there I would loop:
if exists(profile pic):
click(like button)
elif exists(profile pic 2): # If you are testing more than one user
click(like button)
else : type(Key.DOWN) #repeat as needed
Getting the next post into the ROI may be tricky but using WHEEL_DOWN may help if you can adjust your lines traveled with each wheel click on your system.

How do I create a number pad as a control?

Pretty new to windows phone development...
I'm trying to create an input view that contains a number pad for inputting a sales amount. I know that if you were inputting a number into a text box, you can set the input scope to numeric and then when you click in the text box, a number pad will come up but that's not what I'm trying to do.
I quite literally want the lower half of this screen to be just a number pad that is always up. There is no text box. Rather, as the user is punching in numbers, it'll be displayed in a textblock (a lot like you'd see in a calculator app). I'm not seeing a control for this and google just keeps bringing me back posts about InputScope. I was even thinking of maybe a hack-around where there's an invisible textbox that always has focus, causing the numberpad to always be up, but I don't even know how to cause that behavior either.
Is there a control or technique for this or am I going to have to roll a new user control? Can anyone point me in the right direction?
I would recommend creating your own custom control. That would be the best solution for your condition. There is no inbuilt solution for this situation. I was stuck in the same condition and created a new control with a custom keyboard and a textblock.
And for the hack you mentioned. You can register the LostFocus event of the textbox control and focus the control again using Focus() method of Textbox everytime is loses focus.

SpinnerList control and monitor wheel movement

Does anyone know how programatically:
1- Stop the SpinnerList from spinning;
2- Check in which item the spinner currently is while spinning;
The SpinnerList I am using comes from the mobile.swc components. It is a Spark component (using Flex 4.6). What I could take from the documentation is basically that I could control the SpinnerList and stop it when the user triggers a mouseDown event by manipulating the scoller used in the SpinnerList. That leads to another question how do I control the scroller. Do I need to set the scrollPolicy on/off? Isn't there a better way?
Second point I still have no idea how to do it. Even reading carefully the documentation. My dataProvider is sorted alphabetically and I would like to smoothly pop a letter showing in which letter group the Spinner entered while spinning. Sort of a first letter displayer that dynamically changes while scrolling. Something like the caret_index would be cool but it only updates once the Caret is selected.
Thanks!