CS50 Pset7 Finance - cs50

I have question for my CS50 Pset7 finance project. I don't know where to ask this question, so I seek help here. I just finished the register part, however, when I try to test the website, I registered successfully, however, when I try to log in, I got a strange error which I think is because of my way of using hash is not correct. So I got the error TypeError: invalid method '' for security.py", line 186, in _hash_internal, and I can see my hash value like $6$rounds=656000$OiBqI/lX2GqhI8be$G. I found in the API that the schema support has been removed. I'm wondering how should I use hash method other than pwd_context.hash(request.form.get("password")). Any advice will be appreciated.

Use generate_password_hash() to replace hash() will work. Don't forget to remove or update the existing entries inside your db since the old hash will cause error.

Related

Sendy.co generating errors and filling up hard drive

I am using sendy.co and although I purchased the script directly from sendy.co website I am noticing a ton of errors in my error log each time I send an email blast that says
Undefined array key "license" in /includes/functions.php eval()'d code on 270
Also
Undefined array key "userID" in /includes/functions.php eval()'d code on 150
Unfortunately, functions.php is an encrypted file and I don't want to try to reverse-engineer it. Wondering if anyone ever had this issue and how it might of been resolved.
I sent an email to the hello#sendy.co but as i wait for an answer was hoping maybe someone else came across this issue and resolved it

Length issue in Python3

I am taking an Ethical Hacking class, and my lab for the week is trying to crack passwords created by our professor. For this specific challenge, I used a 64 bit decoder to translate his string in his code, and have found the way to solve the problem.
The issue is when I run the equation found in the code, I run into an error in Python. I'll attach an image for clarification. I do know that length is typically found using len() but I don't know how to use that in this context. The part giving me issues is the [chunk2.length-1].
I was informed to add the errors I am receiving so here it is:
you = chunk1[2+1]+d[1+1]+h[3]+chunk2[chunk2.length-1] AttributeError: 'str'
object has no attribute 'length'
Any help provided would be great, thank you guys.
I changed chunk2[chunk2.length-1] to chunk2[-1] and that solved my issue.

node-adodb returns empty set from Access DB, but mdb-sql works

I have a Microsoft Access database, which mdb-ver says is version 'JET4'.
Using the mdb-sql tool, I can query the database. But executing the same SQL query using the node-adodb package returns no data.
Any thoughts on this issue would be much appreciated. Thank you!
[EDIT] -- Thanks for the responses. Sorry for the omission. But the query is really very basic:
SELECT id, dob FROM patients WHERE FirstName='x' AND LastName='y'
My bad! Completely!
The [npm package page][1] showed a number of examples, and I glanced over them without understanding that the "query" method had to be explicitly used to get any results back. I used "execute" instead.

ReactJS: Locate "Each child in a list should have a unique 'key' prop"

I have a special question when working with ReactJS.
As already marked in the subject, I have an error called:
"Each child in a list should have a unique 'key' prop"
I already know the problem and I know how to fix it.
The only thing what I want to know is how can I locate this error?
I want to know in which file and which line is that error.
I getting some error logs in the console, but it points not to my local files.
I already tested a lot with source maps, but I didnĀ“t have success.
for example is here my error:
errorImage
and when I click on the following line:
at PermissionTable (webpack-internal:///./src/PermissionTable.js:13:26)
I will forward to the following screen:
debugScreen
Is it possible to get somehow the direct location?
Thank you for your support
Greets
Daniel
I don't think there is a quick or direct way to find it
From the error message, you would go back to your IDE (VSCode), and search for PermissionTable component
Then search for any map() function that doesn't return an element with a key in it.

Issue with basic AS3 workers classes

I have followed Lee Brimelow's tutorials (part 1, part 2), but somehow my project doesn't work as expected.
Currently, publishing "src/Secondary.as" to "www/assets/swf/secondary.swf" works properly, however when trying to run "src/Main.as", an error shows up:
Exception fault: TypeError: Error #1007: Instantiation attempted on a non-constructor.
at Main/init()[/Volumes/DOCUMENTS/Tests/AS3/test-workers/src/Main.as:52]
at Main()[/Volumes/DOCUMENTS/Tests/AS3/test-workers/src/Main.as:32]
If anybody has time, you can look at my code on Github and maybe see where I screwed up? Thanks a bunch!
As your error message says: the problem raised in Line 52 in your Main.init()method. What you try to do there is to create a new instance of SecondarySWF. I would say that your embedment of Secondary class into SecondarySWF doesn't work properly, so it is not available in your init-method. You should set a breakpoint at the first line of your init-method and when the debugger reaches this point check what's in SecondarySWF. I expect that there's nothing in that variable, so what your new SecondarySWF() then means actually is new null().
Because you embed your secondary.swf with a MIME-type specified the Flex compiler ignores it because it is unable to detect the actual type of data in the loaded file. I found this post on Adobe's cookbook page that explains what you have to do in addition to adding the file using [Embed]. Hope this will fit your needs.

Resources