Speed of "play tone" block - bbc-microbit

While playing around with the bbc microbit and the Microsoft Block Editor, I noticed a strange behavior with the "play tone" block. If I use the block in the web based editor, the speed is reasonable. But as soon as I send it to my device, it is way to fast.
Is this a bug or am I doing something wrong?

Related

Camera in Roblox Studio (testing and building) is not working correctly

There are actually two camera problems.
The first is that sometimes the RMB to control the camera angle in Studio doesn't work. Sometimes using the LMB or movement keys helps, other times (like right now) it doesn't do anything. The hand cursor appears to shake in the direction I want to pan the camera but nothing happens. I did have an Advanced Camera plugin.
When I'm testing my game in Studio, I have NO camera control via RMB and zooming is nonfunctional. This is to say that I can turn using my mouse, but RMB doesn't change how mouseview works. Probably unrelated, but I cannot get scripts from the toolbox for run, crouch, zoom, etc. to work, either, even when I place them where instructed.
I get these errors in my game:
 16:36:47.313 ▼ ActivateCameraController did not select a module. (x3) - Client - CameraModule:362
     16:36:47.314    ActivateCameraController did not select a module.
     16:36:47.314    ActivateCameraController did not select a module.
I've been having trouble with Studio eating up too much bandwidth when NOT in use during actual gameplay in Roblox (exe), so I removed all the Studio plugins, thinking one of them might be the culprit (deliberate or accidental), and also hoping it might fix the camera issues. No such luck.
Probably unrelated, but I found a couple of apparently simple viruses (Vaccine and Fire) using clone() and spread() to reproduce within the confines that their simple scripts dictated. I removed all instances, as well as a presumably fake Antivirus. The first two were very basic scripts designed to spread the script and didn't do any damage (although the latter would damage players).
#Kylaaa came up with the answers, but there's no way for me to mark them as answers.
The problems did not occur in a new game until I copied all the stuff I'd added into it (from the troubled game).
Regarding RMB not working in the Studio:
Sometimes, if the Workspace Camera gets set to Scriptable, all mouse inputs stop working. You could try checking if switching the CameraType to Fixed or anything else fixes your problem. It should be in the Properties window when you select the Camera in the Workspace.
What I did: I changed the mode and the problem stopped. I suspect that the Advanced Camera plug-in that I had removed had something to do with the problem.
Regarding the camera not zooming and RMB not working during testing:
you have a malicious script somewhere in your Workspace. You can search/filter the workspace for Script and it will show all of the objects with scripts in them. I would recommend removing or Disabling the each of the scripts until you find which one is causing the errors
When you click on a Script in the Explorer, look in the Properties widget. There should be a checkbox titled Disabled. When you select that, it will prevent the script from running when the game starts
What I did: I deleted a bunch of stuff my son had added, and then disabled ALL scripts, then started enabling them one unique instance at a time (i.e. duplicates were enabled simultaneously). The camera problem didn't come back except when I edited a script during testing. I never located the problem script, despite going through and triggering all scripts.

Google Colab: What does a spinning play button with broken line mean?

Recently, I have seen the play button (the one to execute the cell) will have a spinning state with broken line as border and staying like this for a long time. But eventually, the line will turn solid and the thing will execute relatively fast after that. I would like to understand what the "broken" boundary mean? It seems to me it just hangs there waiting for something before actually running any code.
See image attach on that play button.
The spinning dashed line means the execution of the cell is queued behind an earlier execution.
(If you haven't yet executed a cell, it's likely that the backend is blocked by attempting to generate a completion or objection inspection. These should finish within a few seconds.)

The code flow jumps without getting into any of the if-block

I edited this question, as now it seems it's not a coding issue. Might be something with IDE or something else.
I am using Flash Develop 4.5.2 right now.
I added a small check in the class, to test equality. But it's showing strange result.
A 1 min video on Youtube about the problem => http://youtu.be/wHXs7nwyhow
![The flow jumps without getting any of the if-block][1]
[1]: http://i.stack.imgur.com/aD3YM.png
Might be some special characters issue. So, pasted it on notepad, and saved it back as ".as", but still that part is skipped by debugger. No matter, whatever i write there. ( See video )
Vishwas
Seems like a bug. I checked OFF "Omit trace actions" in Flash IDE ( So as to receive the trace statements in the trace window now ). And it's working fine now. ( It seems like Flash Develop debugger, tries ignoring those pieces of code, that are related with trace() in such case.

Problems with SurfaceImageSource for a custom control under WinRt

I am creating an app for Window 8 using the 'Windows Runtime'.
I have a custom control which does it's own painting. To accomplish this, I am using a Rectangle control and setting it's 'Fill' property to an ImageBrush derived from a SurfaceImageSource and then using an ID2D1RenderTarget to do the painting. For painting bitmaps I am using ID2D1RenderTarget::CreateBitmapFromWicBitmap and am saving the ID2D1Bitmap that is returned. The control is animated and I create and all of the bitmaps that I need and then continuously paint the scene.
This all works well for the most part. However I am finding that on a random basis, suddenly all of the ID2D1Bitmaps that I have squirreled away stop painting anything. I can trace through the code, and there seems to be nothing wrong, but when I call ID2D1RenderTarget::DrawBitmap, nothing happens. I find, however, that if I force the ID2D1Bitmap to be recreated from the file, it then works fine again. It is almost as if the bitmap has been invalidated or something.
This loss of the bitmaps happens very infrequently and appears to be random, but I can pretty much guarantee that it will fail within an hour or so of playing. I am pretty sure that it is not a memory leak because I can run the app for hours at a time without any increase in memory used. Also, if I force the bitmaps to reload, I can then continue on as if nothing had happened.
Can anyone give me a clue as to what might be going on here?
Thanks.
After much trial and error (not helped by the fact that it was VERY difficult to reproduce the problem), I discovered that the root of the problem was that the call to ID2DRenderTarget::BeginDraw was returning DXGI_ERROR_DEVICE_REMOVED. In the example code upon which I based my code, it showed that in response to this error, I needed to re-create the context, which I was doing. However I was not deleting all of the cached bitmaps associated with the old context, and those bitmaps would not work with the new context. I fixed that and now my app recovers from this error.
Although this solves the problem, I am still not sure I understand why I am getting the 'Device Removed' errors at random times while playing. Also, needless to say, that reloading all of the graphics in the middle of playing shows up as a nasty delay glitch. Fortunately it happens rarely, so I guess I will have to live with it.

How do I find out what's slowing down in my app?

I have put NSLog points throughout the launch stuff of my app, including delegate methods. The last one I can find that gets hit, gets hit about 2 seconds before viewDidAppear. How can I find out where my app is slowing down?
You can use the Time Profiler tool on Instruments for determining how long each call takes.
In xcode you can use Instruments tools. It's really useful when looking for memoryleaks, performance issues etc.
Trigger the problem while using the tools.
See the Apple link for getting started with Apple Developer tools.
Apple Developer Tools
Best,
In your question, you note that you're using NSLog statements, which can be useful, but at the same time setting breakpoints can be even easier and provide more insight to your problems. Try adding a breakpoint in the tray on the left side of your code. You can also set conditional breakpoints to analyze the code that is being stopped on.
Combining the use of breakpoints with Instruments can greatly help you understand your apps performance and possible problems. You can find the Instruments application in Xcode 4 under the Xcode menu. Click Xcode -> Developer Tools -> Instruments. You can also Profile your app with instruments by clicking and holding on the Run button and then selecting Profile:
You should then see a screen like this:
Select Time Profiler to determine how long each call takes. Then click Profile