I spent yesterday walking around the city, I got some cool bus and truck photos, also injured one of my toes in the process .
I have been having some keyboard related programming fun today. Basic premise: Different countries use different keyboard layouts. I am making a game, in the settings menu I want to allow for key remapping. The character corresponding to the key must be listed for player reference. You'd think it would be simple right?... I am using SFML as the basis for my game engine, its built in keyboard handling system is in fact pretty competent. However, its internal names for each keyboard key are based entirely on the presumption that a US layout keyboard is being used. It also does not provide a way to get a string or char (or any form of text) for the corresponding key that has been pressed (within the context of using the keyboard as an input method for games, it does allow for typing, but that has key repeat's etc). Solution: SFML is always used internally for detecting key presses, since it does a good job of that for video games, and windows does not. However, for the string representation I now have a system in place where the game will chose between my own SFML based lookup table and the OS's typing input, based upon which is most likely to be correct. I still doubt this system will work perfectly in all cases, but it should be 'good enough'. Are you pressing a number pad key? SFML it is then, since as far as windows is concerned, 8 is 8, regardless of which '8' key on your keyboard it came from, which could be confusing if you have them both mapped to doing different things. Are you pressing a letter key? Well SFML has no idea what keyboard layout you are using, so hopefully your OS does, that gets used instead. I swear, there are some parts of computing that are handled in such a dumb way. Sadly though, there is no way around that, because history exists*. *And no country wants to re-learn how to type, and replace their keyboards. Especially when society can hand the burden of the problem to developers to fix silently without themselves knowing the pain that this sort of stuff causes xD Of course, I'm not about to give up my UK layout keyboard. So... Uhmmm... Screw you my fellow programmers, its your problem now
I remember a long time ago when BASIC still was used the keys where all mapped to a string number, for instance CHR$(13) was related to the enter key Speaking of programming would you perhaps want to take a look at my thread in the programming section ?
Typically they are still mapped to numbers. However, it is quite common to refer to those numbers using an enum, which makes the syntax much nicer and more flexible. You can see an example here: https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Keyboard.php So 'A'=0, 'B'=1 etc... They work just like numbers, you can do maths with them and so on. Perhaps the nicest thing is that providing you don't rely on a value correlating with a specific number, you can add more "stuff" into the middle of the enum, and even though the numbers will change, your code will still run like before, since the names were used instead. --- Post updated --- Jalkku has some stuff: https://www.youtube.com/user/zali94/featured
Rebuild PC, now with Corsair H100i Pro as I was running out of room for VRM cooling, had to do some case modding as water cooling support was not quite compatible with VRM heatsinks. There is cutout back of motherboard in my case, but from some reason it is 5mm too small, so backplate screws are blocked just enough to not get them opened without removing motherboard, but that was not an issue as motherboard was out already. Not much improvement on cooling, but lower noise levels than air cooler for same temps. I just hope there is not going to be leaks.
Very interesting; I’m out near Chandalar myself, and supposed to be in Bethel in a month or so for the season. I’m a gold miner, most of the time I spend in AK is fairly remote.
A gold miner, huh? Nothing so glamorous for me. I'm in retail data collection. Usually field intelligence, but I need all the hours I can get and don't really have anything going on at the moment, so when one of the reset team people needed more reps for Dillingham my boss passed my name along and I bit. They asked if I'd go to Barrow before I even finished that one, and I'll probably be going to Emonak or however you spell it at some point too.
Nice! There really isn’t a lot of glamour in mining, mostly just knee deep in mud and misery until you fly home. I hope to be out of the industry soon. Barrow is horrible (the whole north slope is), never been to Emmonak myself, sounds like another coastal village; tiny, wet, and expensive with really amazing scenery. Enjoy your time in Alaska, check out everything you can, it’s a very unique place.
Indeed it is, and I once wanted to spend my life here. Now? I wish they'd stop derping around with the PFD refunds and just get that over with so I could escape before 2023. I'm so tired of snow, you wouldn't believe it. Not sure where I'd go though.
On Thursday I didn't know how to render stuff with blender. So I made these: Quick and pointless stuff, but at least it's easier than drawing!
I went to the porsche museum yesterday i still have mixed feelings about it firstly driving in stuttgart is hell secondly the porsche museum itself is way to expensive 20 euros for parking and tickets (the audi museum cost 4 euros and parking was free) and then there arent that many cars in there (yes porsche doesnt have that many cars but only 6 911's and not even every gen?). But i atleast saw my favourite porsches the 928 and i noticed my octavia has a way to small fuel tank with only 45litres but it makes 234kph on the autobahn without giving full throttle
I remember when those 928 were super cheap to buy, probably has gone up in prices now, but at one point there were enough cheap to be cannibalized for motorsport builds.
Here in germany theyre really rare and somewhat expensive also they usually have loads of kilometers on them like 300k but still with theyr first engine
So over here theyre planning to do a additional tax on things that emmit co2 petrol will cost 1.90 per litre but we wont get more money. So to the point any ideas where to move thats like a eu country but not in the eu?
I wouldn't have a clue. Most of the time the countries that don't do this kind of garbage are the "not very nice" ones.