Git Product home page Git Product logo

source-code-from-tutorials's Introduction

Source Code from thenewboston Tutorials

We are in the process of adding the source code from all of the tutorials to a public GitHub repository. If anyone would like to contribute, please feel free!

thenewboston Videos and Tutorials

Linux: https://docs.google.com/document/d/1FgMqlHYDva5--sJuR1fc-wbidpvHMFKEvK4RHqD4px0/edit?usp=sharing

DigitalOcean: https://docs.google.com/document/d/1xOllgXRN10fWz1TsURh0OYI60TAVz0snD8HOzga5CCA/edit?usp=sharing


How to Submit Source Code

1 - Download GitHub for Windows or GitHub for Mac

2 - On the top right of this page, click "Fork". This will create a copy for you.

3 - Once your copy has been created, click “Clone in Desktop” to download and save it on your computer.

4 - From here you can make changes, add folders, add source code files, etc...

5 - When you are finished with your changes, open GitHub for Windows (or Mac)

6 - Add a commit message and click "Commit to master"

7 - Click "Sync" on the top right to save the changes to your GitHub account.

8 - On your GitHub page for that repo, you will now see a “Pull Request” link. Click it.

9 - On this page, click the “Create pull request” button.

10 - Add a comment and click “create pull request” again button to submit.

source-code-from-tutorials's People

Contributors

arslanaybars avatar buckyroberts avatar chetvishal avatar cloudydino avatar collin5 avatar deepakchawla avatar gavendanoc avatar glwhitney avatar hhaslam11 avatar jamesmcnee avatar keatinge avatar nak1b avatar nehuend avatar nodetails avatar pendula95 avatar publicarray avatar sfolje0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

source-code-from-tutorials's Issues

I am unable to code for the Challenge 1 in C language

First of all I would like to thank you for providing a great tutorial for C language. U helped me get a confidence that even I can code.
The issue is that I tried the code for the challenge 1 in C language.
The question was : To create a code to check whether the password has a alphabet, a number and a $ sign.

The code I entered is :
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

int main()
{
char password[50];
printf("please set a password with '$' sign: \n");
scanf(" %s", password);

( password == (isalpha(password)) && (isdigit(password)) && ('$') ) ? printf("Ur password is OK and u r good to go\n") : printf("Try a new password as per the terms and condition\n");

return 0;

}

I even tried with a normal If and Else loop but I am unable to get the answer. The above code runs without any error but directly jumps into the Else part.
I tried to refer ur website but the website isn't opening. Kindly help me to know the mistake done in this code.
Output obtained for the above mentioned code:

WhatsApp Image 2019-04-23 at 18 37 54

Using If and Else method :

WhatsApp Image 2019-04-23 at 19 19 16

PYTHON

hi bucky,
I did not understood the topic return values. could you please help me to explain with another example.

Reply soon

Need to manage database on server for mobile app

Please provide sample for android app interacting with database on server.

Your tutorials tell about creating sqlite database on phone itself, I need to create central repository for that data.

im making a Reverse Shell. and in the server.py file i got this error. i has trying in de socket_bind() s.bind((host, port))

My code:

def socket_bind():
try:
global host
global port
global s
print("Binding socket to port: " + str(port))
s.bind((host, port))
s.listen(5)
except socket.error as msg:
print("Socket binding error: " + str(msg) + "\n" + "retrying...")
socket_bind()

my error:

Binding socket to port: 90
Traceback (most recent call last):
File "c:/ReverseShell/server.py", line 50, in
main()
File "c:/ReverseShell/server.py", line 47, in main
socket_bind()
File "c:/ReverseShell/server.py", line 21, in socket_bind
s.bind((host, port))
TypeError: an integer is required (got type str)
error

Python tutorial video 24 issue

Hey Bucky, I am receiving tremendous amount of knowledge through your python tutorials. So thank you for that. Since this is my first time using and learning python, I am facing an issue that I don't really understand. Maybe it has to do with the connection to the internet or packages not being installed.
The same issue occurred while learning the 'downloading image' tutorial as well. Could you please help me address what the issue is? Thank you again!
Error: (This occurs in my run window)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 704, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/vineetovhal/PycharmProjects/YouTube/First.py", line 16, in
download_stock_data(goog_url)
File "/Users/vineetovhal/PycharmProjects/YouTube/First.py", line 6, in download_stock_data
response = request.urlopen(csv_url)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1346, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>

Source Code for HTML5

Dear , if possible please upload the source of HTML course.

What Happened to thenewboston.com, it's down since 3 months now.

switching betweeen scenes

public void start(Stage primaryStage) {
    window = primaryStage;

    //Button 1
    Label label1 = new Label("Welcome to the first scene!");
    Button button1 = new Button("Create Account");
    button1.setOnAction(e -> window.setScene(scene2));

    //Layout 1 - children laid out in vertical column
    VBox layout1 = new VBox(30);
    layout1.getChildren().addAll(label1, button1);
    scene1 = new Scene(layout1, 200, 200);

    GridPane grid = new GridPane();
    grid.setPadding(new Insets(10, 10, 10, 10));
    grid.setVgap(8);
    grid.setHgap(10);

    //Name Label - constrains use (child, column, row)
    Label nameLabel = new Label("Username:");
    GridPane.setConstraints(nameLabel, 0, 0);

    //Name Input
    TextField nameInput = new TextField("Bucky");
    GridPane.setConstraints(nameInput, 1, 0);

    //Password Label
    Label passLabel = new Label("Password:");
    GridPane.setConstraints(passLabel, 0, 1);

    //Password Input
    TextField passInput = new TextField();
    passInput.setPromptText("password");
    GridPane.setConstraints(passInput, 1, 1);

    //Login
    Button loginButton = new Button("Log In");
    GridPane.setConstraints(loginButton, 1, 2);

    //Add everything to grid
    grid.getChildren().addAll(nameLabel, nameInput, passLabel, passInput, loginButton);

    Scene scene2 = new Scene(grid, 300, 200);

    

    //Display scene 1 at first
    window.setScene(scene1);
    window.setTitle("Project");
    window.show();
}

it does not switch to the scene where i have my textfields, what can i do?

main.css for Foundation Templates?

Can you provide the 'main.css' file for the Zurb Foundation tutorial files?
If there are any other such file missing could those be made available, as well?
Tnx

BUFFER OVERFLOW in C/09_cProgramming.c

At line 12 food is declared as an array of enough characters to store the string (including NUL terminator) "tuna".

At line 15, strcpy is instructed to store the string (including NUL terminator) "bacon" into that array, causing a buffer overflow.

node js lecture

Hey Bucky please make video lecture for node js onwards 22

Dank Meme deprecated onAttach(Activity a)

onAttach(Activity a) method is depreciated. Can you suggest how to code it with onAttach(Context c) which has replaced the method you recommend? It does work with the deprecated method but I would prefer to use the replaced context method since that will be the new standard.

MyApp has stopped

a7.zip

when I lunch my application it show an error message saying : "MyAppName has stopped" on the device monitor, when I click "open app again" it says: "MyAppName keeps stopping".
any help!

thank you Bucky!

Have learnt from you web for more that one year, so glad you share all source code here!

Thanks so much!

Question to tutorial 5 about the blocking the interaction

I have a question to the blocking interaction to the first window. I am using ubuntu with eclipse. And when i have the second window and try the click the first one, it is certainly blocked. But when i try click twice so i can get the access to the first one (but i still can't not click the button of the first window or close it). So the blocking don't work anymore. ???

project sources from Node.js Tutorial

Hi Bucky, your Node.js tutorial is awesome.

Is it possible for you to upload the last (tutorial 22) project source so we can play around it?
Thanks

Javafx TableView - Remove Griod Line

Hi

my JDK is 1.8-u102 and in want to remove all grid line (vertical & horizontal) from my JavaFX TableView , how i can do this with css ???

i found this css to remove grid line but not work :

  1. -fx-table-cell-border-color: transparent; , error -> Unknown property: "-fx-table-cell-border-color"
  2. -fx-grid-lines-visible: false; , error -> "-fx-grid-lines-visible" is not supported by the given selectors

what's wrong here ??? i use the last version of jdk (1.8-u102) !!!!!!

this is regarding the python source code tutorial 24 , seeing errors when trying trying to run the code

I am using the latest available Python 3.7, Please help me in resolving this issue and make my code run

from urllib import request

goog_url = http://real-chart.finance.yahoo.com/table.csv?s=GOOG&d=2&e=8&f=2015&g=d&a=2&b=27&c=2014&ignore=.csv

def download_stock_data(csv_url):
response = request.urlopen(csv_url)
csv = response.read()
csv_str = str(csv)
lines = csv_str.split("\n")
dest_url = r'goog.csv'
fx = open(dest_url, "w")
for line in lines:
fx.write(line + "\n")
fx.close()

download_stock_data(goog_url)

After running this above code seeing following errors
C:\Users\Pritam\PycharmProjects\Ganesha_First\venv\Scripts\python.exe C:/Users/Pritam/PycharmProjects/Ganesha_First/bucky.py
Traceback (most recent call last):
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\urllib\request.py", line 1317, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\http\client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\http\client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\http\client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\http\client.py", line 1016, in _send_output
self.send(msg)
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\http\client.py", line 956, in send
self.connect()
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\http\client.py", line 928, in connect
(self.host,self.port), self.timeout, self.source_address)
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\socket.py", line 707, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/Pritam/PycharmProjects/Ganesha_First/bucky.py", line 16, in
download_stock_data(goog_url)
File "C:/Users/Pritam/PycharmProjects/Ganesha_First/bucky.py", line 6, in download_stock_data
response = request.urlopen(csv_url)
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\urllib\request.py", line 525, in open
response = self._open(req, data)
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\urllib\request.py", line 543, in _open
'_open', req)
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\urllib\request.py", line 1345, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "C:\Users\Pritam\Desktop\Dhiraj_techdocs\lib\urllib\request.py", line 1319, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 11001] getaddrinfo failed>

Process finished with exit code 1

No TKinter Source code

The python TKinter source code has not been uploaded. Is it possible to upload the files?

regards

Steve W

primaryStage

error: cannot find symbol
primaryStage.setTitle("Title of the Window");
symbol: variable primaryStage
location: class JavaFXApplication1

it does not recognize the "primarystage" what can i do

why am I getting a question mark in terminal?

I have written the code in lesson 9 just like described, but I am getting a question mark at the end of my name.
#include <stdio.h>
#include <stdlib.h>

int main()
{

int age;
int currentYear;
int birthYear;

currentYear = 2019;
birthYear = 1989;
age = currentYear - birthYear;

printf("Razvan is %d years old \n", age);

char name[6] = "Razvan";
printf("My name is %s \n", name);

name[3] = 'w';
printf("My name is %s \n", name);

char food[] = "bacon";
printf("The best food is %s \n", food);

strcpy(food, "sarmale");
printf("But not after %s \n", food);



return 0;

}
Capture d’écran 2019-11-27 à 14 45 59

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.