DavidShen2
@DavidShen2
Hi all,
Why?
I just happened to be scrolling through my repls and happened to see this repl that I worked on for a while when I was just learning C++.
C++
DynamicSquid lol what does this line do?
std::string operation; //Copyright © 2019 David Shen
how can you copyright a variable?
Also might want to use \n instead of endl since it's faster. but cool!3 years ago
This post is for the 18th weekly challenge.
I use itertools to make things easier.
How it works:
1 - Get first string
2 - Create ordered list of perm
Python
Hi all,
I have been debating if I should learn C or C++ as one of my primary languages. I have already learned the most simple basics of each and nee
DynamicSquid C and C++ have no considerable speed difference, so that doesn't matter. I would recommend C++ though since it teaches important OOP stuff and has a larger community for resources, asking questions, tutorials, etc. Also the transition to C from C++ is way easier than the transition to C++ from C. Any questiond just ask :)3 years ago
Hi all,
I am having issues with using java scanner. The first time it is used, no issues exist. However, when I call it again, the error occurs. It h
Java
mwilki7 I would either:
• use a single scanner as a global variable, no need to close it
• pass the scanner variable as arguments to functions that also need System.in
I don't know what close() does to the System.in file descriptor so I would avoid using close() on System.in (unless avoiding it causes more problems).3 years ago
SixBeeps You don't need to make a new scanner for each time you want to take an input. I also wouldn't separate signup/login into their own classes, but that shouldn't matter.
I have a hunch that when you're making a new scanner each time, it puts a \n character, which would cause it to skip over the nextLine call.3 years ago
Hi all,
I don't know if you are aware of this easter egg hidden within Python. All you need to type is "import this".
Click run for the attached rep
thenullified the 20 guiding principles of python. how interesting
this has been posted last week3 years ago
Hi all,
I signed up for Repl.it using my Google account. However, I can't change my username. How can I change my username?
Codemonkey51 Contact support they can give special links to change your name, hence why JSer has changed there name before3 years ago
Jakman If you click on your icon and click accounts you will se that the username cannot be changed.3 years ago
Hi all,
When you run my program and look through the css files, you might notice that the css styling does not match up with the actual result.
Addi
xxpertHacker Okay, okay, I looked at it. First, I was thrown off by your use of .form-inline input instead of input.form-inline, but otherwise your CSS is properly displaying. It appears that your problem is either your browser or your computer, not Repl.it.
Your server may be sending headers to cache the file, or you browser's just doing it, this may be your problem. That might be why you have to reload the whole computer, but I doubt it. Then again, I haven't checked the Python, nor do I know what browser3 years ago
DavidShen2 Also, thanks to @Codemonkey51 for attempting to solve this issue and solving several other issues previous to this post!3 years ago
Hi all,
In my program, the passlib module is acting up. I get the following:
[2020-04-12 21:39:00,947] ERROR in app: Exception on / [POST]
Traceback
Codemonkey51 The css error happens for no reason one fix I have found is clear the cookies for THE WEBSITE just yours no others. Idk why it assumes post3 years ago
Have you ever struggled to create a decent password for an account? Now, those struggles are history with this basic program I created. Just enter the
Python
ARJPEG Good program, but just saying, this isn't very practical as no one can memorize, ']Ag,.Hf$N"Zs= SoGSd5A5v{X>2:25}\Ixe%$o5g?1GisyaY t#g\4-?!??SwO7%BV[6K.A)ZeS^QhnLrTXl=D2SAMU L;zfL(c(K-"6C8/u5)n(64E"~HyM9' 4>A1NCUH6!H+P%oF!wF~Ozrp"POdAJb|5HK(W]4jQ;DL8WdYH)I70{\X0A&x2r:trrXiJH~doku{[[email protected]"N}7Lyy3;,b[e,/GyMUm~-<[email protected]%[email protected]+pUzi15%tl)bLtzkNA)&6g85N4&43|9qH;[YoOl9W2pMz:' etc...3 years ago
Viper2211 Another way to do this would be like this:
import random
letters = 'a','b','c','d' #And etc.
try: lengthofpassword = eval(input("Desired Length of you Password : ")
except:import('sys').exit()
password = ""
for x in range(desired_length):
characters = str(random.randint(0,hash(random.getrandbits(128))))
character = random.choice(characters[random.randint(0,10)],random.choice(letters))
password += character
`3 years ago
AbelMinar Can someone explain this:
Res = ‘’.join(map(chr,string))
What does the ‘’ do?
What function or what does map and chr do?
Sorry for multiple questions, I’m new to python and trying to figuring out how these codes work. I usually use C# and C++.3 years ago
Hi all,
My program keeps on giving this error:
Python 3.8.1 (default, Feb 2 2020, 08:37:37)
'Create Account' Clicked
Create Account
Account Created
Hi all.
In my program, when the user presses the "Login" button, I want it to load the "Login.html" file and run the python function "Login()" with i
Codemonkey51 Try using multi threading
To do that one
import threading
import time
2) add time.sleep(2) as the first statement under if request.form.get('Login') == "Login": ex.
if request.form.get('Login') == "Login":
time.sleep(2)
3)make replace Login() in @app.route('/') with
t1 = threading.Thread(target=Login)
t1.start()
And you should be good (make sure after Login() executes it does not do anything else)3 years ago
Why am I getting an "Internal Server Error?"
This is what I get in the console:
Repl.it: Updating package configuration
--> /usr/local/bin/python3
Momentii1107 Hey where did you get the part after the "Debug mode: off * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)" line?
2 years ago
jjdowney1980 how do you remove and delete index.php, as all I get is 500 server error in php coding. Don't know thing about repl.it can someone assist.3 years ago
Each time I try to get Tensorflow via packages, I recieve this:
Command "python setup.py egg_info" failed with error code 1 in/tmp/pip-inst
all-yb5bs
cookeydev https://replit.com/talk/ask/To-use-TensorFlow-in-Replit-run-pip-in/20684/517663
Remember that Replit RAM is very limited without hacker, so you can't do complex tasks.2 years ago
JordanRenaud I'm having the exact same issue, installation just fails after the download, using other methods to install, it states that it ran out of memory or failed to allocate enough memory3 years ago
HackermonDev Its because you are an explorer. Repl.it is experimenting with a feature that moves the project out of the directory that the package is being installed. Disabling explorer should work just fine.
image3 years ago
Hi, I have been trying to create a program where it would use the webcam on my computer to identify a certain object. I currently have an image databa
ejazhussain1 It's been five years for me to work with a python developer. It's really hard to get the right python developer for your task. I recently hired a software developer from a development agency. You can check the Company portfolio on https://techreviewer.co/. It gave me a lot of opportunities to grow my business.
1 year ago
https://repl.it/@DavidShen2/Google-Interview-Question-1
#include
#include
#include
std::string input;
int A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V
abc3354 Hi !
There are some problems in your code
The way you try to solve your problem is not clear
• void counter(std::string input, char character,int value) -> value is modified you need an &
void counter(std::string input, char character,int &value)
• counter doesn't work. std::find will find the first character. You need a loop
• if(capLetters[0]==want) You compare a character (want) and its occurrence in the input
I think you should use a map rather than an array
I hope this will help you ;4 years ago