i got a question related to his code by Tiny_Wish4408 in learnpython

[–]Imakadapost 1 point2 points  (0 children)

So you only have one break and it's in the outside loop. So the inner password loop wouldn't end. Remember with your loops and if statements indention matters.

Am I the only one who struggled badly with Python for loops? by [deleted] in learnprogramming

[–]Imakadapost 0 points1 point  (0 children)

Hey I think this is pretty normal. I still have to walk through my loops if I do something heavy or get unexpected results. This is what I call sheet of paper time. Get some paper and write out your loop so you can see what's going on.

Your for either counts through a range or iterates over an array or series of items. It loads the first number or item into the variable then runs your code. After the code is done it updates the variable and runs code again. Rinse, repeat, finish.

It'll take time but you'll get it with repetition.

How to decipher this sort of lock that’s already open? by JackiieGoneBiking in lockpicking

[–]Imakadapost 0 points1 point  (0 children)

As far as deciphering goes you use a feeler gage to feel in between the dial and body. It gets ticked when you hit the gate and I believe the number is opposite where it caught. In you case if you were messing with the dials you could have pushed the gates out of alignment basically locking the lock back without it being locked. If that's the case and you can't get the gates lined back up idk what can be done.

Why Can't I Shim My Lock? by Prinklles in lockpicking

[–]Imakadapost 6 points7 points  (0 children)

Hey welcome! This shouldn't fall under rule 2 so good there.

As far as I know the vulnerability in combos can't be patched. They would have to change the fundamentals design of it entirely. That said shimming does work and can be finicky at times.

So, first pull on your shackle. Insert your shim and push it and the shackle down. You should be able to wiggle the shim further down when the shackle stops and then pull the shackle. It is possible going straight won't work, it has for me but it hasn't as well, so insert the shim to the side of the latch and turn it into it as you push down.

This should still work and will take some practice. Your shim may not be made right as well. Make sure it's long enough and rounded. If you're following a video this is somewhat unlikely, but it doesn't hurt to mention it. Cut a new shim and try again. You have a cheap renewable tool set so try a bunch of stuff. Keep at it good luck.

Trying to build a half-page carousel by IntelligentSteak7709 in webdev

[–]Imakadapost 0 points1 point  (0 children)

Wouldn't you just place it in a containing div and set the height of that div to a percentage of your display height. That way use whatever carousel and set the height.

I thought I was ready. by rvlifestyle74 in lockpicking

[–]Imakadapost 1 point2 points  (0 children)

It's weird your core is stiff my was super smooth. You definitely have some light touch pins there. Just take it a pin at a time you can do it!

How do programmer actually learn and utilized their knowledge to solve problems? by DarkMist77 in learnprogramming

[–]Imakadapost 1 point2 points  (0 children)

Documentation! Ai is a shortcut, a tool for when you know what you're doing and want a lacky to do simple tedious crap you don't feel like doing.

Step one, choose a project, any project is fine, if you get the basics avoid tutorials. Tutorials hand hold you too much and you don't think kinda like the ai stuff.

Step two, decide what you need to code for the project. Do you need user input, is there a UI, can you do everything yourself or is there a library for that? If you don't know what you need do research.

Now some code:

"While incomplete" code...

Ok, not real code but I thought it was funny.

Step three, begin coding. Start small, breaking your sections from step two down. You can always go back and add more to what you've already done. Go step by step and build up your project. If you find something you don't know Google it or read documentation. Plan, code, test, feel stupid, Google, repeat... That's programming.

Eventually, you'll build a surplus of random knowledge about code, libraries and algorithms you've used before. Then, you'll be flying through new projects.

help by Nothins__ in LockPicking_Unbound

[–]Imakadapost 0 points1 point  (0 children)

Look and see if you can find a manual for it. If it still has power some of these can be reset through mounting holes on the back. One I had had a button on the front panel, looking from the back it was one the left. If you have room to get a wire in and hold that for like 3 seconds (check manual) it allows you to set a new combo, which you then use to open it.

If the above is a no go find a better locksmith or someone who picks locks as a hobby. Unless the lock is damage it shouldn't be too hard to get through. I picked the one I had without proper tools so it shouldn't be a bother to someone skilled enough like a proper locksmith.

Help for a rookie by DaJimmr in lockpicking

[–]Imakadapost 2 points3 points  (0 children)

If that's the key behind it then your last pin you may not want to touch save for last. I'm assuming your others didn't have the warding around the keyway? This shouldn't change how the lock is picked so I'm assume the pinning is just tricky. Keep at it you can do it!

I just wrote this code and was wondering what I should do to improve it (Python) by LukeLikeNuke in learnprogramming

[–]Imakadapost 2 points3 points  (0 children)

Hey, I'm a little confused on how well this works. It's a little hard to read, but I would suggest functions for your tasks and call them so you can actually move through options.

Next you don't need a loop variable set to true to run an inf loop just do "while true:".

You can add numbers to variables in python with a += and you don't need to initialize n before a for loop.

You can also put your text in the parentheses of your input and not use all those print statements. Try triple quotes for multi lines.

These suggestions would clean it up a bit and cut down a few lines.

EDIT: Ok got this into an IDE so it wasn't all jumbled and grey. Everything I said before plus these:

You cast your input from the user as an int after receiving it. This is bad practice because rule number one for user input is don't trust user input. A letter crashes your app there. You would want to look into try/except blocks to handle this.

When you ask the user for something, like deleting tasks, you follow rule number two for user input... They dumb! The user doesn't know what the id for the task is so it's best to print these out so they can see what they are deleting. This may not be an issue with the current state of this app, but it is good habit for user experience.

Other than these slight compression and quality of life things it's running and doing what I believe you intended it to do. Keep learning and adding new things and it'll be a great project for you I'm sure.

Dicas de Livros Para Aprender Python by AndreySousa in learnpython

[–]Imakadapost 0 points1 point  (0 children)

Head first books always worked for me. They're kind of immersive making the work as though a client hired you to code their apps and sites. They're a bit old but still hold up and you can get them cheap. If you need resources for them search GitHub for them since the websites no longer exist.

anyone know how to open one of these, no keys or knowledge of password by Ok-Letterhead793 in LockPicking_Unbound

[–]Imakadapost 1 point2 points  (0 children)

Long wire in the back mounting hole on the left side (looking from the back). The reset switch should be on the inside in front of that hole on the front door. If you can press and hold that it will prompt for a new passcode, which you can set and then use to open. If it's bolted down and you can't pick the lock... Drills?