So I used this micro:bit for a while and it never had a problem but for some reason one day I started it and it refused to respond to my A+B button presses even though I did not change the code in any way. Both pressing A and B work but not both of them together. I also have a sparkfun moto:bit attachment board as well though I don't think it has any problems with it.
Hardware:
Did you touch the boards front/backside? If you did the inner connection is damaged and the microbit is done this can be even when the buttons work separately.
Or there is maybe some connection issues in the board try to blow on it or just look if there are scratches
Or dust on the connection ports on your sparkfun.
That could block the connection
(you can try to blow on the connection ports to get of the dust)
Software:
I am less good in this but it could be that they put an software update to make things faster, better, etc. And encoded it differently
End:
From my experience I think it’s wear and tear because even a scratch on the wrong location could ruin a whole board
Maby try an enclosure like thisthe left one
That saved my life
Related
I'm working on a server whereas a fun thing for late December I want to make the whole world darker. The Minecraft sun usually has a light level of 15. Is there any way to lower the sun's light level to something like 8 so mobs can spawn on any block not under sunlight?
Any solution like datapacks, commands, or server plugins would work, but I wouldn't be able to use any mods (it could be super simple if I could use mods, but others would have to download it).
Thanks.
So I found this plugin online, which basically allows you to change light levels for things at will, and might solve your problem. If it doesn't, I also found this forum post, which may also help(but it is a bit more complex). It suggests decompiling Bukkit.jar(or whatever server software you use, Spigot, Paper, etc.), then editing the code for which mobs can spawn in.
I'd suggest looking into ProtocolLib plugin to send packets to players. I don't know which packet lighting would be in but if you use a tool called "pakkit" (https://github.com/Heath123/pakkit) you can watch Minecraft packets and that might help you see what causes light changes (example: place a torch in front of you and see what packet is sent). Then if you know what packets are sent you can modify packets as they are sent to include custom lighting data.
I run a critical application with lots of output under screen. Eventually it blocks. Investigation showed that the cause is screen which unblock scrolling with with Ctrl-A q or other tricks, ublocking the application at the same time. Is there way to prevent screen from blocking an application no matter how much it outputs?
This sounds weird - for me, screen (on widely different hosts, different OS versions, different screen versions and so on) never blocks its applications, no matter how much they output. Eventually, when the scrollback buffer is full, old lines are cleared out, but the output keeps comming.
If you mention ctrl-a q, maybe take a look into the flow control settings, you can make screen ignore XON/XOFF (ctrl-s, ctrl-q) altogether...
EDIT: regarding your comment, I do believe that what you describe actually happens. I just wish to point out that it may not be screen that's causing it, or maybe it's because a weird combination with something else. I just now have while true ; do date ; done running in a screen - causing maximum spam. So far, many many thousands of lines have been written, and no blocking whatsoever. This is on a fresh, unmodified install of screen with default settings in a relatively fresh Debian 9.4 installation.
I have also tried the command you mentioned (ssh -t user#host screen) followed by the endless loop, and the same is true - no blocking after a long time.
Note that ssh has timeout features on keyboard (console) inactivity; maybe those are to blame?
As soon as you hit "Play" what happens in the background of the software? The code is already compiled and ready at this point. So when I press "Play" the code gets executed. What other things occur along with this?
I have this question as an assignment and would really like to know. Thanks. :)
Actually everything is loaded by script. This graph explains the process. Also the links below can be useful for you to understand all the background process.
Execution Order of Event Functions
Overview: Script compilation
Asking what happens when you press Play is like asking Coke to reveal the drink recipe. This is what they sell. You got that as assignment, fact is you can say anything and your teacher would lie to tell you wrong, since he does not know either (except if he works for a company that bought the source code of the engine).
What you can say, is that the OpenGl/DirectX API is initialised, registration of all event to the OS like Input, application data and so on, then all the Engine functioning, registering of the needed classes in memory, init of the physics, parsing of the opening scene YAML file, creation of the content and placement in space, for each item, if a MonoBehaviour, registration of all callbacks, all the debug code related to profiler and stack tracing, crash reports and many more...
Those are the obvious ones and I cannot have any clue of what is going on without using a tool to decompose the code. Problem, it is against the EULA and then illegal.
From what experience I have programming whenever a program has a problem it crashes, whether it is from an unhanded exception or a piece of code that should have been checked for errors, but was not and threw one. What would cause a program to completely freeze a system to the point of requiring a restart.
Edit: Thanks for the answers. As for the language and OS this question was inspired by me playing Fallout and the game freezing twice in an hour causing me to have to restart the xbox, so I am guessing c++.
A million different things. The most common that come to mind are:
Spawning too many threads or processes, which drowns the OS scheduler.
Gobbling too much RAM, which puts the memory manager into page-fault hell.
In a Dotnet/Java type environment its quite difficult to seize a system up, because the Runtime keeps you code at a distance from the OS.
Closer to the metal say C or C++, Assembly etc you have to play fair with the rest of the system - If you dont have it already grab a copy of Petzold and observe/experiment yourself with the amount of 'boilerplate' code to get a single Window running...
Even closer, down at the driver level all sorts of things can happen...
There are number of reasons, being internal or external that leads to deadlocked application, more general case is when something is being asked for by a program but is not given that leads to infinite waiting, the practical example to this is, a program writes some text to a file, but when it is about to open a file for writing, same file is opened by any other application, so the requesting app will wait (freeze in some cases if not coded properly) until it gets exclusive control of the file.
And a critical freeze that leads to restarting the system is when the file which is asked for is something which very important for the OS. However, you may not need to restart the system in order to get it back to normal, unless the program which was frozen is written in a language that produces native binary, i.e. C/C++ to be precise. So if application is written in a language which works with the concept of managed code, like any .NET language, it will not need a system restart to get things back to normal.
page faults, trying to access inaccessible data or memory(acces violation), incompatible data types etc.
Good news, my c64 ist still running after lots of years spending time on my attic..
But what I always wanted to know is:
How can I automatically load & run a program from a floppy disk that is already inserted
when I switch on the c64?
Some auto-running command like load "*",8,1 would be adequate...
Regards
MoC
You write that a command that you type in, like LOAD"*",8,1 would be adequate. Can I assume, then, that the only problem with that particular command is that it only loads, but doesn't automatically run, the program? If so, you have a number of solutions:
If it's a machine language program, then you should type LOAD"<FILENAME>",8,1: and then (without pressing <RETURN>) press <SHIFT>+<RUN/STOP>.
If it's a BASIC program, type LOAD"<FILENAME>",8: and then (without pressing <RETURN>) press <SHIFT>+<RUN/STOP>.
It is possible to write a BASIC program such that it automatically runs when you load it with LOAD"<FILENAME>",8,1. To do so, first add the following line to the beginning of your program:
0 POKE770,131:POKE771,164
Then issue the following commands to save the program:
PRINT"{CLR}":POKE770,113:POKE771,168:POKE43,0;POKE44,3:POKE157,0:SAVE"<FILENAME>",8
This is not possible without some custom cartridge.
One way to fix this would be getting the Retro Replay cartridge and hacking your own code for it.
I doubt there is a way to do it; you would need a cartridge which handles this case and I don't think one like that exists.
A better and more suitable solution is EasyFlash actually. Retro Replay is commonly used with its own ROM. Since it is a very useful cartridge by default ROM, I would never flash another ROM to it. Also it is more expensive than EasyFlash if you don't have any of those cartridges.
At the moment, I have Prince Of Persia (!) ROM written to my EasyFlash and when I open my c64, it autoruns just like you asked for.
Not 100% relevant, but C128 can autoboot disks in C128 mode. For example Ultima V (which has musics on C128 but not on C64 or C128 in C64 mode) autoboots.
As for cartridges, I'd recommend 1541 Ultimate 2. It can also run games from module rom images (although Prince of Persia doesn't work for me for some reason, perhaps software issue?), but you also get rather good floppy emulator (which also makes it easier to transfer stuff to real disks), REU, tape interface (if you order it) etc.
If you are working with a ML program, there are several methods. If you aren't worried about ever returning to normal READY prompt without a RESET, you can have a small loader that loads into the stack ($0100-$01FF) The loader would just load the next section of code, then jump to it. It would start at $0102 and needs to be as small as possible. Many times, the next piece to load is only 2 characters, so the file name can be placed at $0100 & $0101. Then all you need to do is set LFS, SETNAM, LOAD, then JMP to it. Fill the rest of the stack area with $01. It is also rather safe to only save $0100-$010d so that the entire program will fit on a single disk block.
One issue with this, is that it clears out past stack entries (so, your program will need to reset the stack pointer back to the top.) If your program tries to do a normal RTS out of itself, random things can occur. If you want to exit the program, you'll need to jmp to the reset vector ($FFFC by default,) to do so.