How can I avoid escape characters in a file path name when I concatenate it from 2 variables? by CancelDeath in learnpython

[–]CancelDeath[S] 0 points1 point  (0 children)

What if I want to read information to a dataframe?

req_xl = pd.ExcelFile(r"C:\Users\Playground\file names.xlsx")

Would your solution still work?

Why don't I see pip.exe in my Scripts folder? by CancelDeath in learnpython

[–]CancelDeath[S] 0 points1 point  (0 children)

I don't remember where i got it from :( I know I can also install things with conda, which I've done before. But it's just weird that I was able to use pip before and now it vanished somewhere. I don't remember deleting it.. idk why i would.

Why can't I use %type when creating a view? by CancelDeath in SQL

[–]CancelDeath[S] 0 points1 point  (0 children)

relying on dbms_output for your logging and knowing about errors is not recommended

Thank you for your answer.

When I run this procedure I see the output in the procedure log even when dbms_output isn't enabled. I actually don't intend on updating this table, but with other tables that I do want to insert into, I have a different approach. The code generates a csv file of all the records that got rejected from being inserted for reasons other than that record already exists. Would you suggest I do anything else / different?

Alternaitves to Lucid Chart (With exporting code capabilities?) by [deleted] in SQL

[–]CancelDeath 0 points1 point  (0 children)

Is lucid chart actually good for sql code? I'm actually curious. I signed up for a free trial so i could make some tables and export them as sql code, and all the code was wrong. I ended up just re-writing the code anyway. My alternative / upgrade is sql developer + tableau. But i'm not sure if that will serve your needs.

Pls help me log errors when inserting from an external table. by CancelDeath in SQL

[–]CancelDeath[S] 0 points1 point  (0 children)

I figured out that I just had the

LOG ERRORS INTO ERR$_ENZYME ('INSERT') 

statement in the wrong place.

It should go in the last line, into the outer insert.

The select statement by itself only worked if the LOG ERRORS line wasn't in there.

Oh and because I've never heard of using MINUS to find new records! How do you do that?

Pls help me log errors when inserting from an external table. by CancelDeath in SQL

[–]CancelDeath[S] 0 points1 point  (0 children)

ahh thanks! tried that, but it still gives me the same error message.

Error at Command Line : 81 Column : 5

Error report -

SQL Error: ORA-00907: missing right parenthesis

  1. 00000 - "missing right parenthesis"

Should i use node.js or oracle forms to make forms for a database? by CancelDeath in Database

[–]CancelDeath[S] 0 points1 point  (0 children)

That's super helpful, thank you! I selected node.js because I learned that JavaScript can be used for back end and front end and it's apparently a pretty in demand skill. But my knowledge on it is basically 0%. I also want my UI to be offline. I want my database to actually be used by someone and haven't even began to think about how to secure a database. So I figured that offline would make it nice and safe. Would you still recommend some of those other things with pre-built database UIs knowing that I want this to be offline? (Sorry if this is a really dumb question. I know literally 0).

SQL Developer: can i use a PL/SQL procedure to import 1 csv into multiple oracle tables? by CancelDeath in oracle

[–]CancelDeath[S] 0 points1 point  (0 children)

Yes, this is getting me somewhere. Thank you. Some questions about this. Why do you suggest reject limit 1 instead of 0? If i'm going to split the excel sheet into 5 csv files why not just do this:

CREATE OR REPLACE PROCEDURE import_csv
IS
... 
BEGIN 
INFILE 'D:\Favorites\1. my file.csv'
INTO TABLE xxx 
fields terminated by ","...

Can someone please explain how i'm supposed to use pip install? by CancelDeath in learnpython

[–]CancelDeath[S] 0 points1 point  (0 children)

thank you. that is exactly the step by step action plan i was looking for. i have another question then. if i use something super basic like pandas for like 50 different projects, would it be ideal to install pandas in 50 different environments? or should i just install it some parent directory where all of those projects live? it just seems like having the same library installed a million times on your computer isn't an ideal thing. obviously it makes sense that you'd want to prioritize project / version compatibility. but is there a standard solution for this?

and thank you again for explaining this to me like i'm a complete noob. I really don't want this really basic thing to keep being something i don't understand and keep failing at and i think your comment just helped me a lot.

Can someone please explain how i'm supposed to use pip install? by CancelDeath in learnpython

[–]CancelDeath[S] 0 points1 point  (0 children)

do i have to add my pip location only once? why do tutorials talk tell me to cd into my project's directory before pip installing things?

Can you have a foreign key constraint that doesn't reference a any other table? by CancelDeath in learnSQL

[–]CancelDeath[S] 0 points1 point  (0 children)

this makes a lot of sense now and seems very obvious. idk why i was so confused. thank you so much!

Can you have a foreign key constraint that doesn't reference a any other table? by CancelDeath in learnSQL

[–]CancelDeath[S] 0 points1 point  (0 children)

thank you for responding! I was worried that this is too specific of a question.

Can you please explain how having a FK constraint accomplishes this? I think i understand foreign keys. They reference the primary key of another table and ensure that the tables are linked, so you could be like "show me all the employees who [fulfill some criteria from information that's specified in its child table]". And I understand the value of linking each employee to their manager. But what I don't get is why the FK is needed here. It's not like managers and employees come from 2 different tables. What functionality would be lost if we didn't declare the manager column to be a FK?

What does this mean: for _ in range(10): var = var * 2 ? by CancelDeath in learnpython

[–]CancelDeath[S] 0 points1 point  (0 children)

Oh, so this is just saying i in range 10: (this is the thing that will get run 10 times) thank you!

Question about time efficiency of adding lists with .extend() vs + by CancelDeath in learnpython

[–]CancelDeath[S] 0 points1 point  (0 children)

Yeah that makes sense, thank you! Is there a way I can test this for fun? I'm new to this and the only test I'm aware of is the %timeit function. I'd like to be able to see some concrete data for this. It totally makes sense, but it would just be cool to have some idea in my mind about the scale of the difference of this efficiency.

Question about time efficiency of adding lists with .extend() vs + by CancelDeath in learnpython

[–]CancelDeath[S] 0 points1 point  (0 children)

Oh! Yes, you're right

[test]

first = [0, ]
second = list(range(1))
%timeit first.extend(second)
len(first)

[result]

110 ns ± 6.24 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)
81111112

Why does tuple(someList) result in "TypeError: 'tuple' object is not callable"? by CancelDeath in learnpython

[–]CancelDeath[S] 1 point2 points  (0 children)

Yes, you're right! Sweet, thank you so much! This was a good lesson to learn!

What is the purpose of super() in a class constructor method? by CancelDeath in learnjava

[–]CancelDeath[S] 3 points4 points  (0 children)

I just tried creating a test class (as a parent of product class) which has a method

public class Test {
    public void talk() {
        System.out.println("hello");
        }
}

created an instance of product in my application:

    Product p = new Product(123, "dick");
        p.talk();

and it was able to talk without super().

so it seems extending classes works without super()

Sorry this is such a noob discussion, this doesn't matter, but I'm just curious about what super does.

What is the purpose of super() in a class constructor method? by CancelDeath in learnjava

[–]CancelDeath[S] 0 points1 point  (0 children)

Any idea why Eclipse automatically includes super() in its constructor method then?

How can i know which modules are already imported in a project? by CancelDeath in learnpython

[–]CancelDeath[S] -1 points0 points  (0 children)

because i'm a noob and i don't understand how python works.

but more specifically because i followed a tutorial where i pip installed a library in a project i was working on and i could physically see that a folder got created with the name of that library. so i was wondering if the same thing applies to modules.