iTech
iTech
KPCKevin Powell - Community
Created by iTech on 3/5/2024 in #back-end
PGJDBC Issue
Hello, I'm trying to setup PostgreSQL JDBC Driver with my Java project. I'm not using Maven, don't want to. I haven't been able to figure it out... Please, I need help. This happens when I run the program (after setting CLASSPATH to the path of my driver, which is in the same folder as MyClass):
java MyClass
Error: Could not find or load main class MyClass
java MyClass
Error: Could not find or load main class MyClass
But when I do the following, it executes. Though, the driver isn't found? I specified the CLASSPATH and it's in the same folder as the code.
java
java -cp . MyClass
Exception in thread "main" java.lang.ClassNotFoundException: org.postgresql.Driver
java
java -cp . MyClass
Exception in thread "main" java.lang.ClassNotFoundException: org.postgresql.Driver
The file structure is Project ---Postgres.jar (driver) ---MyClass.java ---MyClass.class I have no idea what I'm doing wrong here...
1 replies
KPCKevin Powell - Community
Created by iTech on 2/6/2023 in #back-end
Puppeteer (nodejs package): need help understanding page.evaluate & elementHandle.evaluate
Hello, Learning nodejs' puppeteer package for webscraping right now. Please, correct me, if I'm wrong: I believe evaluate, takes in a pageFunction, runs it against the calling object. The point of having those functions in those classes is that we can access members of that object in our callback and perform work with it (e.g. . Am I right on all of that ? I checked out their docs (https://devdocs.io/puppeteer/), again and again, and I'm wondering, is there a difference between the two: page.evaluate and elementHandle.evaluate ? I do know that Page represents a page on a browser, and an elementHandle represents an in-page DOM element. But do they just both have the same implementation of evaluate? On different data structures? Thank you
1 replies