15,909,566 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by A. B. Dinshaa (Top 43 by date)
A. B. Dinshaa
23-Nov-21 4:10am
View
can you give the URL please
A. B. Dinshaa
23-Nov-21 4:08am
View
How to contact the owner??
A. B. Dinshaa
22-Nov-21 4:54am
View
Getting only todays date and I am selecting other dates which can be any other than todays date
A. B. Dinshaa
22-Nov-21 4:16am
View
besides get() I tried get_date(), selection_get(), selection_own_get() by seeing from tkcalendar's DateEntry function's documentation nothing worked. how to check what is returned at that point and what and where is the point?
A. B. Dinshaa
2-Nov-21 3:07am
View
How to add a picture in this conversation and in a question?
A. B. Dinshaa
26-Oct-21 14:23pm
View
def continue_window():
top = Toplevel()
top.title('Book Bank')
top.geometry("700x400")
head = Label(top, text='GIVE DETAILS', font=('bold', 10))
head.place(relx=0.5, rely=0.2, anchor=CENTER)
b_name = Label(top, text='BOOK NAME', font=('bold', 10))
b_name.place(relx=0.1, rely=0.3, anchor=W)
global e_bname
e_bname = Entry(top)
e_bname.place(relx=0.6, rely=0.3, anchor=E)
e_bname.config(width=30)
A. B. Dinshaa
26-Oct-21 1:53am
View
You want the file as an attachment??
A. B. Dinshaa
23-Aug-20 2:46am
View
I am not searching for the exact piece of pre-writeen code, I am searching for the mathematical relation and related description so that I can confirm whether the answer is correct or not of "worst-case complexity, best-case complexity and loop invariant" of the divide by 2 algorithm on the internet from there I am going to make my own.
A. B. Dinshaa
23-Aug-20 2:41am
View
in the subject of Algorithms you are going to find "worst-case complexity"
A. B. Dinshaa
13-Jun-20 12:08pm
View
when I changed 'tod' to 'to' its giving:
near "to": syntax error
means its a key word and cannot be used this way.
A. B. Dinshaa
13-Jun-20 11:44am
View
I want jupyter notebook to automatically detect the ‘marks.db’ file in the folder so that wherever I place the folder containing the program it keeps on working. How to do it?
Right now the jupyter notebook catches the database file by the line stated below:
database = r"C:\Users\DaBroths\Desktop\abc\marks.db"
In order to create the connection I have to write in a separate connection file:
create_new_connection(r"C:\Users\DaBroths\Desktop\abc\marks.db")
This I also want to replace so that where ever I place the folder on the computer the program keeps on working, no need to change this folder path every time.
A. B. Dinshaa
13-Jun-20 11:24am
View
'to' is keyword of sql thats why not using. I tried but the jupyter notebook gives error.
I have defined the flight no as 'flno' instead of 'fino' and the destination as 'tod' instead of 'to' in the create table statement. If you want me to change I can change. What do you mean by 'typos'?
A. B. Dinshaa
13-Jun-20 3:55am
View
In my jupyter notebook program I have used SQLite database whose abc.db file’s saving is disabled because the file abc.db is not UTF-8 encoded. I followed the procedure written below to make it UTF-8 encoded which is making it UTF-8 encoded just once and that is only when the abc.db is new once the file is used one or two times it starts giving errors which I am discussing for long. Once saving is disabled it cannot be enabled even temporarily. How to make saving enabled once again and permanently?
1. Open cmd and change encoding (chcp 65001)
2. Run sqlite3.exe from current windows
3. Change encoding (PRAGMA encoding="UTF-8";)
4. Create correct UTF-8 script.
The database file is not getting permanently in UTF-8 format permanently.
A. B. Dinshaa
13-Jun-20 3:45am
View
As 'to' is a keyword in sql I wrote 'tod' in which d means destination
A. B. Dinshaa
13-Jun-20 3:01am
View
In jupyter notebook when error comes by the compiler there is no line number given in the cell of the jupyter notebook to trace exactly where the error is.
How to trace in jupyter notebook on which line the error is?
A. B. Dinshaa
12-Jun-20 14:37pm
View
Primary key are the first column of the table by default if they are not declared thats why I have not defined any primary key. You want to see the create table statement?
Foreign key I have declared in one table.
There is one table that contains only composite keys but right now I am stuck in foreign keys table.
A. B. Dinshaa
12-Jun-20 13:30pm
View
Are these two the same as what you wanted to see??
A. B. Dinshaa
12-Jun-20 13:29pm
View
Flights(fino: integer, from: string, to: string, distance: integer, departs: time, arrives: time, price: integer)
Aircraft(aid: integer, aname: string, cruisingrange: integer)
A. B. Dinshaa
10-Jun-20 8:59am
View
I also found from the various sources including books and tutorials posted on your website, I wanted to see what you people say about this.
A. B. Dinshaa
6-Jun-20 7:54am
View
why . operator does not work in sql over here? what is wrong in the statement below?
INSERT INTO CAST(ACTOR.aid, MOVIE.mid, role) VALUES (ACTOR[0], MOVIE[2], "role310");
ACTOR and MOVIES are both foreign keys over here. The data of the first row from ACTOR then first column ACTOR'S aid and then MOVIES third row's first column mid is to be inserted at these locations i.e the first row of this table.
INSERT INTO MOVIE_DIRECTOR (DIRECTOR.did, MOVIE.mid) VALUES (DIRECTOR[0].did, MOVIE[1].mid);
did and mid are both foreign key over here from director and movie tables calling those values in director and movie table over here
A. B. Dinshaa
6-Jun-20 2:52am
View
The error below is not leaving from the past two three days and where is the repitition? Haris Memon is not in other solutions thats why posting in his solutions also
---------------------------------------------------------------------------
IntegrityError Traceback (most recent call last)
<ipython-input-4-c34c20bb3abd> in <module>
483
484 if __name__ == '__main__':
--> 485 main()
<ipython-input-4-c34c20bb3abd> in main()
353 ACTOR_5 = (5, 'fname5', 'lname5', 'male')
354 # insert_ACTOR
--> 355 insert_ACTOR(conn, ACTOR_1)
356 insert_ACTOR(conn, ACTOR_2)
357 insert_ACTOR(conn, ACTOR_3)
<ipython-input-4-c34c20bb3abd> in insert_ACTOR(conn, ACTOR)
43 VALUES(?,?,?,?) '''
44 cur = conn.cursor()
---> 45 cur.execute(sql, ACTOR)
46 return cur.lastrowid
47
IntegrityError: UNIQUE constraint failed: ACTOR.aid
A. B. Dinshaa
6-Jun-20 1:48am
View
The error below is not leaving from the past two three days and where is the repitition?
---------------------------------------------------------------------------
IntegrityError Traceback (most recent call last)
<ipython-input-4-c34c20bb3abd> in <module>
483
484 if __name__ == '__main__':
--> 485 main()
<ipython-input-4-c34c20bb3abd> in main()
353 ACTOR_5 = (5, 'fname5', 'lname5', 'male')
354 # insert_ACTOR
--> 355 insert_ACTOR(conn, ACTOR_1)
356 insert_ACTOR(conn, ACTOR_2)
357 insert_ACTOR(conn, ACTOR_3)
<ipython-input-4-c34c20bb3abd> in insert_ACTOR(conn, ACTOR)
43 VALUES(?,?,?,?) '''
44 cur = conn.cursor()
---> 45 cur.execute(sql, ACTOR)
46 return cur.lastrowid
47
IntegrityError: UNIQUE constraint failed: ACTOR.aid
A. B. Dinshaa
6-Jun-20 1:44am
View
what about #3? it is: Find all actors who acted only in films before 1960
is it?
SELECT name FROM ACTOR WHERE year>1960
but the years table is is movies not in actor
A. B. Dinshaa
5-Jun-20 10:01am
View
For #1: SELECT * from DIRECTOR WHERE did in
(SELECT did from MOVIE_DIRECTOR and MOVIE WHERE MOVIE.year/4 = 0)
As leap year is one that when divided by 4 result is 0
A. B. Dinshaa
4-Jun-20 3:50am
View
Such errors were coming on spyder IDE not on jupyter notebook so I stopped using spyder IDE the only problem is jupyter is not giving any output at all which I am trying to figure out and if I require I am going to disturb you later for the above mentioned purpose.
Secondly jupyter is considered as better and latest as it is browser based and what I know is everything is getting browser based fast.
A. B. Dinshaa
4-Jun-20 3:47am
View
This error was coming on spyder IDE not on jupyter notebook so I stopped using spyder IDE the only problem is jupyter is giving any output at all which I am trying to figure out and if I required I am going to disturb you later for the above mentioned purpose.
Secondly jupyter is considered as better and latest as it is browser based and everything is getting browser based fast.
A. B. Dinshaa
1-Jun-20 4:07am
View
Indentation is also involved everywhere
# create a database connection
conn = create_connection(database)
# create tables
if conn is not None:
# create ACTOR table
create_table(conn, sql_create_ACTOR_table)
# create MOVIE table
create_table(conn, sql_create_MOVIE_table)
When I add one table the program is giving no error. When I add two tables the program is giving following error
near ")": syntax error
How to correct this syntax error?
Are the people answering are bots or humans?
A. B. Dinshaa
1-Jun-20 2:47am
View
Do you mean we have to write SQL command in these """ quotes?
Eg: """SQL command"""
This way no table is getting generated in db file. What to do with it?
A. B. Dinshaa
1-Jun-20 2:32am
View
File "<ipython-input-21-16e265b393f1>", line 37
sql_create_projects_table = CREATE TABLE IF NOT EXISTS ACTOR {
^
SyntaxError: invalid syntax
The ^ symbole is on TABLE not in the start
A. B. Dinshaa
30-May-20 11:21am
View
> python3 install.py --sys-prefix
Above statement gives no output no error nothing when I write it in anaconda command prompt (cmd.exe). Do installer mean anaconda command prompt (cmd.exe)?
What do I need to write in place of - -sys-prefix
A. B. Dinshaa
30-May-20 2:47am
View
I have seen the documentation of jupyter also. I am sorry I am still not able to figure out where is the installer located? The statement "Run the installer with the same python command used to install jupyter" is still stuck. Can you please elaborate.
This error comes a lot while submitting comments: "We have tried to add your comment undefined times without success. Our servers are just a little overworked. Sorry." Is it from my side or has to do with codeprojects website?
A. B. Dinshaa
30-May-20 2:45am
View
I have seen the documentation of jupyter also. I am sorry I am still not able to figure out where is the installer located? The statement "Run the installer with the same python command used to install jupyter" is still stuck.
A. B. Dinshaa
29-May-20 14:11pm
View
In #3 its written "Run the installer with the same python command used to install jupyter" what is this installer? where is the installer located and what to write in that installer?
A. B. Dinshaa
11-Nov-19 9:43am
View
You want to say if I am able to give the output given above I may be able to give all the outputs its only depends on use which is going to improve the skill. Right?????
A. B. Dinshaa
11-Nov-19 9:41am
View
ok
A. B. Dinshaa
11-Nov-19 9:41am
View
I hope that I can give the result you have specified. Using a list to display the answer and taking the input from a list written in the code are two different things that's why I mentioned dictionary. Displaying the output which you have specified from my question is easy and can be displayed by writing the list in the code. List is easy but from dictionary may take time.
A. B. Dinshaa
6-Nov-19 14:51pm
View
I am going to learn the debugging related to python and anaconda from any website you know any? All this requires time and I don't have time.
A. B. Dinshaa
6-Nov-19 10:41am
View
For below i.e brute force algorithm for cow transportation, my friend suggested the code below but this also has the same problem as the bigger one:
cows = {"Jesse": 6, "Maybel": 3, "Callie": 2, "Maggie": 5}
def weight(sub):
sum = 0
for e in sub:
sum += cows[e]
return sum
valid_trips = []
for part in list(get_partitions(cows)):
if all(weight(sub) <= limit for sub in part):
valid_trips.append(part)
min(valid_trips, key=len)
print(weight(cows))
A. B. Dinshaa
6-Nov-19 10:28am
View
You were saying something about dictionary. After what I have posted below I need to do the same with a txt file or dictionary then compare both. In comparison need to display the number of trips returned by each method, and how long each method takes to run in seconds. What python methods to use???????????????????
A. B. Dinshaa
4-Nov-19 12:35pm
View
Ok thankyou got it. Need to learn how to use debugger in order to trace errors.
A. B. Dinshaa
4-Nov-19 11:54am
View
You mean the dictionary file? or the text file on which I want to do implement the code?
A. B. Dinshaa
4-Nov-19 11:34am
View
I want the second output not the first output which the code is already giving. You have any idea what changes to make? Do you have anything other than the debugger to reach the required output as debugger will take a lot of time to understand....
A. B. Dinshaa
30-Oct-19 10:32am
View
Firstly the Fibonacci series is 1,2,3 not 5,8,2 the second display to check is not getting corrected. Secondly the correct power set is not getting generated. In the last is I want to generate two Fibonacci series of n and m (they can be same) and generate the power set of two sets of Fibonacci series n and m. They can be same as doing with two different sets of numbers will get too tedious.
n = [0,1,2]
n[0] = 1
n[1] = 2
def powerSet(items):
N = len(items)
# enumerate the 2**N possible combinations
for i in range(2**N):
combo = []
for j in range(N):
# test bit jth of integer i
if (i >> j) % 2 == 1:
combo.append(items[j])
else:
yield combo
nterms = 3
count = 0
i = 0
if nterms <= 0:
print("Please enter a positive integer")
elif nterms == 1:
print("Fibonacci sequence upto",nterms,":")
print(n[0])
else:
print("Fibonacci sequence upto",nterms,"terms:")
while count < nterms:
print(n[i],end=' , ')
nth = n[i] + n[i+1]
# update values
n[i] = n[i+1]
n[i+1] = nth
count += 1
i=0
for i in range(len(n)):
print("\n",n[i], sep = ", ")
i+=1
#powerSet(n)
for k in powerSet(n):
print(n)
Show More