Jump to content

AnotherMax

Member
  • Posts

    25
  • Joined

  • Last visited

Reputation Activity

  1. Like
    AnotherMax got a reaction from Wictorian in How to store a trie   
    If you want to store it in a database you can use: Neo4J which is a graph database letting you store "nodes" and "links".
     
    Alternativly and probably simpler, you can use graphviz which I use the python library (pypi) to parse graphs / construct and parse etc. These can be saved to ".dot" files and uses the "DOT Language".
  2. Informative
    AnotherMax got a reaction from mrchow19910319 in Help with Vuetify   
    So v1 has this "flat" keyword but v2 doesn't. You can see this in the v1.5.x docs:https://v15.vuetifyjs.com/en/components/buttons#flat
    I'm guessing the reason there are subtlties between v1 and v2 is simply the implementation between to the two. You could inspect the code e.g. the css output and compare them to find the differences.
     
    There is also this https://vuetifyjs.com/en/getting-started/upgrade-guide/#upgrading-from-v1-5-x-to-v2-0-x which you might find useful if you have more components to move across.
  3. Like
    AnotherMax got a reaction from Agena_ in Unity Car Movement Help   
    I assume you noticed that the `public float breakForce = 100f;` isn't actually being used on line 54. Not super familier with Unity but  you could try setting a negative motorTorque or value far exceeding "3500f". Or could be something to do with the "Slip based friction model" -> https://docs.unity3d.com/2020.1/Documentation/ScriptReference/WheelCollider.html
  4. Informative
    AnotherMax reacted to super_teabag in [Typescript] translate bluetooth DataView notifications to usable data.   
    @AnotherMaxthese are a good starting point, but I found some more resources that were more useful that are super buried on the Bluetooth documentation's website. I'll post here just in case you're curious. Bluetooth Web Tutorial from the horses mouth (it's still dated)
     
    Second, the "characteristics" in Bluetooth terminology are properties in a grouping. that grouping is called a "service" (this isn't me trying to be an asshole about terms). So, the "value" is typed as DataView since the standard has been updated and bugs have been fixed in Chrome / Edge. Again, making the "value" property as a DataView. You'll have to checkout mozilla's documentation on that if you'd like.
     
    Effectively I think I'm SOL cuz it's up to the manufacturer of the device to adhere to the standard for say "heart rate" services. then provide a way to parse the data.
    I've shot nautilus (parent company) a message about what I'm dealing with. Hopefully, they'll give me a data sheet with some more information.
     
    I can parse some of the values from the HEX information provided, but that's just it. I don't know if that's 100% where the data is.
     
     
  5. Agree
    AnotherMax reacted to super_teabag in [Typescript] translate bluetooth DataView notifications to usable data.   
    @AnotherMax It's cool duder. yeah, so... that's my last straw that I'm gonna try. There's a few portions of the data MSB (most significant bit) that keeps changing when changing what device it's paired too. Otherwise, I'm 90% certain that bytes 0-2 and 2-4 are for timing cuz they're unsigned 16 bit integers and they line up.
    If I don't have to brute force it and can ask. That's what I'm doing rn cuz work smarter not harder
  6. Informative
    AnotherMax got a reaction from vorticalbox in (Python) why does this not work?   
    You can do that sort of behaviour with sets:
     
    fruits = {"apple", "banana", "cherry"} print(fruits - {"apple"}) # or to actually remove it. fruits -= {"apple"} print(fruits)  
  7. Like
    AnotherMax got a reaction from IAmAndre in Jquery: change multiple img sources with equation   
    I don't really know any JQuery any more but if you want to programmtically add/remove something based on a boolean value it should be quite straight forward like so: This uses formated strings, so you can kinda add variables into strings using `${variable_name}` or a ternary operater which are really nice to use: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator
    function get_image_name(filename, is_checked) { // Returns the file name with 'F' attached if is_checked is true, // otherwise just the filename with '.png' appeneded. return `${filename}${(is_checked) ? 'F' : ''}.png` // Backticks allow for formatted strings } x = get_image_name("picture_1", true) // Returns --> picture_1F.png y = get_image_name("picture_1", false) // Returns --> picture_1.png You can ofcouse modify the 'F' to be what you want etc or even add it as an extra parameter.
    Though thinking about it, this may or may not work depending on how you get the 'current' filename. As if you get it from the 'src' you'd need ot strip out the 'F.png', To do that you'd want to first remove the '.png' as thats consitent could use: str.replace(".png", "") -> returns new string without '.png', then add a check to see if the magical 'F' is the last index in the string, if it is then you can replace that then you'll have the original file name without the prefix.
     
  8. Informative
    AnotherMax got a reaction from Hi P in Programming - Development Questions   
    Yeah, it seems to be whats happening, you can still get just backend dev jobs but they are just harder to find. You can however in python use templating to generate static html pages like: Jinja or check out this: https://wiki.python.org/moin/Templating
    I was hired doing just backend but started doing frontend, not that I super wanted to but it has grown on me. (we use VueJS which is picking up traction)
  9. Informative
    AnotherMax got a reaction from Hi P in Programming - Development Questions   
    At work we use Python 3 with connexion and swagger to create endpoints for our frontend tools. I'd say to mess around with that, make a few things etc put on GitHub or something. Full-stack is much more desirable to employers.
  10. Like
    AnotherMax got a reaction from MladenM in import .py project to another project   
    Assuming all '.py' files are in the same directory, and 'file_to_import.py' is simply made up of a bunch of function I'd do:
    from file_to_import import function_name_1, function_name_2 from file_to_import import * # Imports all functions from 'file_to_import' I wouldn't do the import with the ` * ` as it's a bit ambiguous.
     
    If you have a directory structure like:
    - main.py - utils \ - thingy.py If you want to import 'thingy.py' functions into the 'main.py' you can do:
    from utils.thingy import function_name_1, function_name_2
  11. Like
    AnotherMax got a reaction from Zuccers in import .py project to another project   
    Assuming all '.py' files are in the same directory, and 'file_to_import.py' is simply made up of a bunch of function I'd do:
    from file_to_import import function_name_1, function_name_2 from file_to_import import * # Imports all functions from 'file_to_import' I wouldn't do the import with the ` * ` as it's a bit ambiguous.
     
    If you have a directory structure like:
    - main.py - utils \ - thingy.py If you want to import 'thingy.py' functions into the 'main.py' you can do:
    from utils.thingy import function_name_1, function_name_2
×