Posted on

Continuing with our Meteor/React Project

Click here to subscribe for more videos like this!

So in Components, let’s create a new file. Let’s call this Header.jsx and I’m going to open it up by typing Header=React.createClass open up that up as usual. And in the render function here, I’m just going to return a bit of bootstrap and so, div class, actually, I’m just going to wrap up that in the div first. So in this render function you can’t just type div class= you know whatever, because class is use to java script so we actually need to type class name. And then we can get the class so I’m just going to call it Navbar Navbar-default and close that. And I’m just going to div class name=container put up a bootstrap container in there and then div className=navbar-brand. Actually this shouldn’t be an A element. And it’s just going to say My Site Name, like that. So if we save that, the header is now created. So now, I’m going to create the Footer. And the same thing would go for the Footer. But I’m not going to put anything in here. I’m just going to have a return a div, so, Footer=React.createClass I’m going to open that up. Going to open the render function and return div. Like that. So now we need to create the Home component. And the reason why is we’ve referenced Home, header and footer we’ve got footer and header created we still need this component which we’re passing in as Home. So we need to create the Home component. So I’m going to create a new directory here to keep things organized, I’m going to call it Home. And in that directory I’m going to create a file called Home.jsx snd I’m going to do the same thing I’m going to name the component Home=React.createClass Right now, I’m just going to render return div, actually h1 I’m just going to say Hello World and hit Save. So to come back here and refresh this page we’re going to start to see it take shape. Because we’ve created all the components that we’re referencing. And so, the first thing I’d like to draw your attention to is that it…we open this up. So in the, where was it, the main layout, I console.log(this.props.LogThis) which I passed into this class as a property. So that’s basically what’s happening we’re passing in components to the main layout components. So, I would reference header, content and footer in the very same way. Except, what we could do is if you want to render the content of a property, you put it in single curly brackets. So it’s like blaze except you’re not using two curly brackets, you’re just using one and you just type it. So let’s type this.props.header this.props. home or content rather we’re referencing that here, we’re setting it, the property is content, so we’re going to reference it like that. And then the footer is so, this,props.footer We’re going to save thisand this is our main layout. So the header, if I for instance made a route called FlowRouter.route/page and open up curly brackets here, let’s name it a Page and the action is going to be renderView and let’s say I had a component named ThisPage I would do that and it would render that component into the main layout with the header that component and then the footer enrolls in passing this just as a proof content. We’re not going to do that. So now, we’ve got this. But bootstrap does not appear to be working and I think maybe, I’ve forgotten to add bootstrap here. I don’t think I got added. Maybe in the last video I know I added it. Maybe I canceled that a bit for some reason, so. Let’s go ahead and get that added, so, control C here, meteor add twbs:bootstrap and hit Enter. Alright. I’m going to run Meteor again. And the page refreshes automatically because it’s Meteor.

Posted on

How to use FlowRouter in your next Meteor Project

Click here to subscribe for more videos like this!

So the first thing we need to do is set up the router to be able to actually route to a certain files and routes. So to do this, we’re going to create a first route, which we’re going to type FlowRouter.route. This is the path that we are creating a route for in a new pass as a second parameter an object. And that with semi-colon. And you can name the route, since it’s going to be named Home. Then put a comma and the action function. Take params as its argument and we open that up. And I’m going to reference here a function that we haven’t yet actually created but we’re about to. So, the function name is going to be renderView. And then in here, I’m going to create the objects. So this is going to be Home and this is the React component that we are going to create. So, basically we have a function here that we need to create called renderView and we pass that as a component. So, here we are going to create function_renderView and we are going to reference that object here as component. And then we open it up. Basically, all you have to do is type React, sorry ReactLayout.render MainLayout and we are going to pass it a few parameters, so. Header is going to be header component that we need to create. Content is going to be the component were passing into it. And then footer is going to be a footer component that we need to create. And then hit Save. And this is all we need to do. This betacode is going to render a header, a component and a footer. So let’s get started with the the main layout. So we’re telling it here to render this React component. And pass these as parameters so we can actually reference these components inside the main layout component by typing this .props. header, content, and footer. And we’ll see these in action here in just a moment. So in Client, I’m going to in components, I’m going to create a new React class called MainLayout.jsx And here, basically we are going to get started with how to create React components. So, the first thing you need to do is name the component. Mine is going to be called MainLayout and we see that’s equal to React.createClass and we open that up with brackets and curly brackets. So, all we really need here is to render function and that’s all we are going to do at this point, so. Type in render and then in the render function, you’re going to put return. And you’re going to open up just regular brackets. And this is a bit odd, I know, but this is how it’s done, so. Here we can actually print html and it’s going to, it’s going to render what we tell it to. So we always need wrap all elements under a parent container. So I wouldn’t be able to say return two divs like this, two siblings, it wouldn’t work. So we do need to wrap it. So here, we are going to to reference the props that came in, land so as an example, I’m going to add another prop here called LogThis and it’s just going to be a string. This is a property and I’m going to save that. So in the render function, you can access that by typing console.log and then this.props.logThis and save that. And I’m going to go the app here and I’m going to refresh it. And you are going to see two things happening. The First, is that Home is not defined. And that’s because we haven’t created a component yet. So we still need to do a little bit of work. In order for this to work.

Posted on

How to use React with your next Meteor Project

Click here to subscribe for more videos like this!

Hey guys, welcome back! So, I’m going to be showing you guys how to use Meteor with React and Flow Router, and I find that there’s not too much information out there on this combination of tools and so it makes sense to give you guys that information. If you’re following along this course anyway you know, I think it’s quite reasonable to assume that some of you will at least are going to need this information. And even if you didn’t know you needed it, maybe you can go ahead and use Meteor in your next project. So in the last video, we created a project through terminal from Meteor. So what I’m going to do now is I’m going to open up a terminal, and I’m going to change directory to Projects, and into todo. And so, Meteor automatically creates a few files for you first. So let’s go ahead and open this up in Webstorm. I’m going to click Open, and down into Projects, to todo, hit okay, and Webstorm is going to open up the Project. And we’ve got the Project View on the left hand side. So the first thing we’re going to do is delete these files because we don’t need them. Now we’re going to start creating some directories because in Meteor, projects can get fairly large because you’re going to be working with a lot of files, and so organization is a huge benefit here. Let’s right click and create a directory called Client. I’m going to create another directory called Lib, and one more for Server. Now the Client’s directory is going to contain everything that is going to be available to the client. So this is where your templates and stuff are going to go. So in Client, I’m going to create a new directory called Components, and this is where we are going to store the React components. Now in Lib what I’m going to do is create a file called Router.jsx, and in the Router file, we’re going to be defining routes for Flow Router. So before we get to that, we actually need to add some Packages Project. So in the Directory here in terminal, just type “meteor add react kadira:react-layout and kadira:flow-router” and hit enter. There we go, so we’ve got everything added in here. I was having an issue with Jet Brains IDEs and basically it was a conflict with open JDK, and so in order to resolve those, I’ve installed Oracle Java. And basically what was happening was, when you start typing something, this auto suggestion box pops up and that was causing the program to hang. And so to resolve that, what I had to do was, add a repository to my system, and I’m just going to search “webupd8 java”, and you’re going to go to the launchpad.net page, and in here just copy this archive url there ppa:webupd8team/java, and in terminal you can run “sudo add-apt-repository and then the repository name. And you can actually start connecting multiple commands together. So sudo-apt-get update, and the way you connect commands together is by using two ampersands “&&” between the commands. Now it basically says run command one and when that’s done if it’s successful run command two, and if that’s done, run the next command, which is going to be “sudo apt-get install oracle-java8-installer”. And so you are going to run that and that should resolve the issues with Jet Brains IDEs if you’re having the same as I was. So let’s get back to in here. So let’s start making some routes.

Posted on

The Complete Ethical Hacking Course for 2016/2017 Coupon!

If you want to get started as an ethical hacker, learn how network security professionals protect their systems, or take your IT career to the next level you are going to LOVE this course! This course is a sequel to The Complete Ethical Hacking Course: Beginner to Advanced! which over 50,000 students have taken, and was at one point the most popular ethical hacking course in the world! Join us now and receive over 80 lectures & 15 hours of HD video, and 1 on 1 assistance from experienced network security professionals! Enroll now for only $25!

https://www.udemy.com/hacking-complete

We will cover the following topics in this course:

  • Introduction to ethical hacking
  • Linux installation, terminal basics, and Wireshark Setup
  • Staying anonymous online, proxy servers, and accessing the dark side of the internet using TOR
  • Aircrack-ng, HashCat, and wifi hacking
  • Defending your own networks from attacks
  • Cloning websites
  • Arduino USB keylogger that works out of the box for Windows 7, 8, 8.1, and 10
  • Windows power shell scripting

This course will receive monthly updates based on students requests, and our goal is to make this the #1 network security course online!

DISCLAIMER The attacks demonstrated in this course can cause serious damage and are only shown for educational purposes. The intent of this course is to give you the tools to defend your own networks, share skills that are valuable to companies all over the world, and help you to better understand the challenges that information security professionals face on a daily basis.

English & Spanish subtitles available.

Thank you for taking the time to read this, and we hope to see you in the course!

hacking-25

Click here to enroll in the course on Udemy!

Posted on

The Complete Python 3 Course: Beginner to Advanced Coupon!

School is now back in full gear and learning season is upon us. Whether you are a student enrolled in a university program, or a professional looking to expand their skill-set, I am happy to announce the release of my newest course Learn Python 3 from Beginner to Advanced. Python is a great language for novice programmers because of it’s simplicity and easy to read syntax. You can learn how to think like a programmer while avoiding the very steep learning curves of other coding languages such as C++. This course will teach you Python through coding examples, and give you the tools you need to write programs with real-life applications. Enroll now for only $10!

https://www.udemy.com/python-complete

If you want to get started programming in Python you are going to LOVE this course! This course is designed to fully immerse you in the Python language, so it is great for both beginners and veteran programmers! Learn Python as Nick takes you through building a calculator, creating an RPG script, doing web scraping, coding web apps, and much more! We will cover the following topics in this course:

  • Python installation and PyCharm (IDE) setup
  • Programming basics
  • Numbers, strings, Boolean operators, lists, dictionaries, variables, built-in functions, arguments, logic statements, importing modules
  • PEP guidelines, loops, classes & objects, class & instance variables, comments
  • Reading/writing files, JSON, virtual environments, PyPl
  • Requests
  • Web scraping using Beautiful Soup
  • PyMongo (MongoDB)
  • WebPy for web app development
  • Django server setup and management

This course is fully subtitled in English!

Thank you for taking the time to read this and we hope to see you in the course!

python

Click here to enroll in the course on Udemy!