Categories
Library News

C# Tutorial For Beginners – Learn C# Basics in 1 Hour


Hi! Thank you for taking my C# tutorial for beginners. Let me quickly give you an overview of what you’re going to learn and how I’ve structured this tutorial. In the first section, I’m going to talk about fundamentals of C# and .NET.

one of the questions that a lot of beginners ask is what is the difference between C# and .NET so I’m going to cover that I’m also going to talk about CLR assemblies namespaces IL code and stuff like that then over the next two sections I’m going to talk about types I’m going to talk about primitive and non primitive types now at this point you still cannot write any C# programs but I have designed a number of quizzes to help you reinforce what you’re going to learn then from Section four where I talk about control flow you’re going to start writing simple C# programs and from that section onwards in every section you’re going to learn something new about C# and you’re going to write more interesting programs and finally I’m going to conclude this course with a section on debugging so I’m going to show you some of the tools we have so when you have bugs in your code you know how to find them and get rid of them I’m also going to talk about some good program practices that help you write better and more reliable code so we have a lot to cover and let’s get started okay so this is the very first section of this course in this section I’m going to start by teaching you the very basics of C# one of the questions that a lot of beginners ask is what is the difference between C# and net so that’s the first thing I’m going to answer here next I’m going to talk about CLR or common language runtime which is the runtime environment for .NET applications next I’m going to talk about the architecture of .NET applications and as part of this I’m going to introduce you to concepts such as classes namespaces and assemblies and finally I will show you all these concepts in action I’m going to introduce you to the very basics of visual studio and write a very simple C# application so you can see classes namespaces and methods in action I hope you enjoyed this section and let’s get started okay what is darknet framework and how is it different from C# some developers who are absolutely new to C# don’t know the difference so in this lecture I’m going to talk a little bit about C# and .NET framework C# is a programming language .

NET is a framework for building applications on the windows .NET framework is not limited to C# there are different languages that can target that framework and build applications using that framework examples are F sharp or vb.net okay now but what exactly is .NET framework Dartmouth framework consists of two components one is called CLR or common language runtime and the other is a class library for building applications in the next lecture we’ll talk about CLR in more detail okay before we understand what CLR is and why we need it let me explain a little bit about the history of C# before C# we had two languages in the C family the C language and C++ with either of these languages when we compiled our application the compiler translated our code into the native code for the machine on which it was running which means if I wrote an application in C++ on a Windows machine with 8086 processor architecture the compiler would translate my code into the native code for that machine that is a Windows machine with an 8086 processor now we only have different hardware’s and we have different operating systems so if I took the application that compile the application on the computer with a different architecture that would not run so when Microsoft was designing the C# language and the .NET framework they came up with an idea that they borrowed from the Java community in Java when you compile your code it’s not translated directly into the machine code it’s translated into an intermediate language called bytecode and we have the exact same concept in C# so when you compile your C# code the result is what we call IL or intermediate language code is independent of the computer on which it’s running now we need something that would translate that il code into the native code or the machine that is running the application and that is the job of CLR or common language runtime so CLR is essentially an application that is sitting in the memory whose job is to translate the il code into the machine code and this process is called just-in-time compilation or JIT so with this architecture you can write an application in C# and you don’t have to worry about compiling that into the native code for different machines as long as a machine has CLR that can run your application okay now let’s learn about the architecture of .

NET applications at a very high level when you build an application with C# your application consists of building blocks called classes these classes collaborate with each other at runtime and as a result the application provides some functionality now what is a class a class is a container that has some data which is also called attributes and functions which is also called methods functions or methods have behavior they execute code they do things for us data represents the state of the application let me use an example think of a car the car has some attributes like its make its model its color these are the attributes of a car a car also has some functions we can start it or we can move it so you can think of a car as a class in a real world application we have tens hundreds or even thousands of classes each class responsible for a piece of functionality an example of that is classes that are responsible for getting the data from the user process the data and display something to the user now as the number of classes in an application grows we need a way to organize these classes that’s where we use a namespace so a namespace is a container for related classes for example in .NET framework we have namespaces each containing tens of related classes we have namespaces for working with data like databases we also have namespaces for working with graphics and images we have namespaces for working with security now in real world application as these namespaces grow we need a different way of partitioning an application and that’s where we use an assembly and assembly is a container for related namespaces physically it’s a file on the disk which can either be an executable or a DLL which stands for dynamically linked library so when you compile an application the compiler builds one or more assemblies depending on how you partition your code in the next lecture we’re going to write a very simple structure application and you’re going to see all these concepts in action okay in this video we’re going to have a quick tour of visual studio and build a very simple C# application so here I’ve got Visual Studio open let’s go to file new project okay in this dialogue on the left side we’ve got a section called templates and here you see the kind of applications we can build with C# so as you see in the list we can build desktop applications web applications apps for cloud mobile services workflows and various kind of things but in this course and the subsequent parts of this course we’re just going to focus on console applications a console application is a very simple application that does not have a graphical user interface and it’s a great learning tool for learning a new language so we’re not going to be distracted by various complexities of larger applications so on the left side select windows and on the right side select console application then give a name to your project so let’s call it hello world which is a common tradition when learning a new language and specify a location you can put it wherever you want I know this concept of solution in Visual Studio we have this concept of solution which can have one or more projects with a very simple application you have only one solution and one project but as your application grows you add more projects each responsible for something different but now we don’t have to worry about it now click OK alright let’s see what’s happening here some developers get a little bit intimidated the first time they open visual studio and that’s very enough because there are so many menus and panels here that is a bit confusing but let me tell you something 90% of the time you’re going to use only 10% of these or even less so don’t worry about all these menus here you don’t need to use all of them at all times 90% of the time all you need is the code editor here sometimes you need the solution Explorer in fact I personally hardly ever use solution Explorer because I do everything with my keyboard and if you watch my course double your coding speed you will see that everything is possible with keyboard so you don’t need these panels here you don’t need to grab your mouse and navigate around you don’t really need this stuff also none of the stuff on the toolbar are ever required don’t worry about it everything you can do with your keyboard alright now let’s take a look at this first to char program so we created a console application and on the right side you see the solution Explorer panel in case you don’t see that go to view and select solution Explorer top you see we have a solution which has only one project under that we’ve got the project called hello world look at these four items here properties expand that we have a file here called assembly info this is the identification or the assembly that will be produced as a result of compiling this application so when we compile the console application we’re going to get an executable and that’s an assembly that assembly has an identification look at these attributes here like the title description which is currently not set company product copyright trademark culture a grade you know various kind of things like even version so these are all part of assembly identification or assembly manifest in most cases you don’t have to worry about it but if you want to create an assembly and you want to distribute it send to other people then you may want to come here and give you the proper name and a proper version so for now we don’t have to worry about it on the references you see any assemblies that this project is referencing to do its job when you create a project with visual studio by default it as a reference to a bunch of assemblies that you’ll see here these are all part of .NET framework so at a minimum Visual Studio assumes you’re going to use classes in system assembly or system the data to work with databases and so on you may not necessarily use all these assemblies in your project but that’s just part of the template config’ is an XML where we store the configuration for this application sometimes you may want to store connection strings to the database or you may want to have some settings about your application all of them will end up here and finally you see program dot C s which is where we are going to start writing code all right let’s see what’s happening here so in this file program that C S on the top you see a bunch of using statements what is this all about well our project is called hello world so by default Visual Studio creates a namespace called hello world when we write code in this namespace we have access to any classes defined in this namespace so if you want to use a class that is defined in a different namespace we need to import it in our code file and that’s why we use the using statement so by default Visual Studio as these five using statements system is a namespace in .NET framework and that’s where we have all these basic utility classes and primitive types there system that collections that generic is used to work with lists collections and so on system that link is used to work with data and it’s a comprehensive topic that I have covered in my C# Advanced Course system the text is used to work with tags and coding and stuff like that and finally system the threading is used to build multi-threaded applications in this video we’re going to create a very simple application and we’re not going to use any of these for namespaces here so we’re just going to use system for now I’ll leave them there and then I will show you how to clean them up all right so here’s our namespace and insight namespace by default we have a class called program so every console application you create with Visual Studio has a class called program inside program by default we have a method or a function called main and that’s the entry point to the application so when you run your application CLR execute the code inside main method and that’s where everything kicks off this method is declared as static and that’s something I’m going to cover later in the next section methods have input and output so what goes inside parenthesis is the input to the method which we call parameter or argument note that parameters are optional but in this case in the default template the main method has a parameter called args which is of type string array we’re going to learn about string array in the next section what you see before the method name is the return type or the output of the method void in C# means nothing that means this method does not return any value it just contains some code that’s it also note that C# is a case sensitive language so this main has to be with capital M otherwise CLR is not going to find this method as the entry point of the application okay and one last thing is note these curly braces so where we have a block of code we need to surround it with curly braces so that is applicable for methods for classes and for namespaces alright now let’s write a very simple C# program so let’s go here we have a class called console which is used to read data from console or write data to it it has a bunch of methods access this method using the dot notation and here you see various members of this class methods are indicated by a purple cube so beep is used to play a beep sound or clear is used to clear the console we’re going to use the right line method this method can optionally take a parameter so I’m going to pass a string here hello world just that I note that statements in C# terminate with a semicolon as you see here now take a look at using system on the top do you see that it’s highlighted whereas the others are grayed out the reason for that is in this file we are using a class called console which is defined in the system namespace that’s why that using statement is active we are not using any classes defined in other namespaces and that’s why they’re grayed out so we can get rid of them to make our code cleaner we can either delete each one by ctrl X like that or if you’re using resharper you can get rid of all of them by pressing Alt + Enter here and selecting the first option which is remove unused directives in file so it’s faster now let’s run the application with ctrl + f5 so this window that you see here this black window is what we call console and that’s why this kind of project is called console application you okay that’s it for this lecture from this point in every lecture we’re going to learn something new about C# and we can write more interesting and more complex programs I hope you enjoyed this lecture and thank you for watching well hello it’s mush here your C# instructor I just wanted to quickly let you know that this video you’ve been watching is actually part of my C# basics course on udemy in this course I walk you through all the core concepts of C# in a step-by-step fashion plus you get access to exercises cheat sheets and a discussion board to ask your questions in case you’re interested you can get this course with a discount using the link in the video description and if not that’s perfectly fine continue watching as the next section is coming up okay this section is going to be the first step in your journey to learn C# so I’m going to introduce you to variables and constants I’m going to talk about various data types and type conversion I’m going to talk about scope and overflowing and finally I’m going to talk about various operators we have in C# so let’s get started okay we are going to start our journey by learning about variables and constants a variable is a name that we give to a storage location in memory where we can store a value any constant in an immutable value that is a value that we know at compile time and that value cannot change throughout the life of the application why do we use constants the reason for that is to create safety in our application imagine you’re creating an application that involves some mathematical computation around circles we have this number called P which is 3.14 and we use that to calculate the area of a circle that number should always be the same we don’t want to accidentally change that in our program if you accidently change that everything is going to blow up in terms of the results the program produces so we declare that number as a constant and this way we create safety in our application in C# to declare a variable we start with the type followed by an identifier and finally semicolon here ain’t represent integer which is a number between minus 2 billion and plus 2 billion later in this video I will show you all the primitive types that you need to know also note that C# is a case sensitive language which means in this case these two identifiers are different one has lowercase n and 1 has uppercase n when declaring a variable we can optionally assign it the value like what you see here you don’t have to but there is one thing you need to know about variables and that is you cannot use a variable unless you initialize it so let’s say if I declare this int number here and I decide to display it on the console my application will not become part I have to assign it a value before I can use it before I can read it I will show you that later when we jump to coding to declare constant we start with the keyword cunt next we have the datatype and an identifier and here we have to initialize it with some value we cannot define a constant without setting its value there are a few things you need to know about identifiers first one is that an identifier cannot start with a number so you cannot have an identifier like the one you see here instead you need to replace one with the word one so an identifier cannot include whitespace so you cannot have an identifier like first space name it has to be one word an identifier cannot be a reserved keyword like int that you saw earlier if you are desperate to use a word that coincidentally clashes with one of the C# keywords you can perfect that with the add sign and finally as a recommendation always use meaningful names for example avoid a name like f n instead use first name this way your code will be more readable or maintainable and cleaner and everybody will understand that in terms of naming convention here are three popular naming conventions that have been around in the C language family we’ve got camelcase Pascal case and Hungarian notation with camelcase as you see I have bolded here the first letter of the first word is lowercase and the first letter of every word after has to be uppercase with Pascal case the first letter of every word has to be uppercase with Hungarian notation we prefix the name of a variable with the datatype it uses so here str represents a string Hungarian notation is not used in C# and I have noticed programmers coming from C or C++ background use that in their code if you’re one of them I highly recommend you not to use Hungarian notation because C# developers are not used to that and they don’t like to see Hungarian notation in the code it makes your code look a little bit ugly so in C# to name your local variables use camel case so as you see here the first letter of the first word is lowercase and if we had more words here in the identifier the first letter of every word had to be uppercase four constants use Pascal case so here you see I’ve got a constant here constant integer and the first letter of every word is uppercase here is the list of most commonly used primitive types in C# in fact the actual list is slightly bigger than this but I deliberately decided not to include those data types because they’re hardly ever used in fact they are there for interoperability with other languages I personally over the past 12 years of me coding in C# I’ve hardly ever used them in fact never so I decided not to confuse you with too much details that you don’t need in the next slide I’ve got a link here in case you want to learn about the other primitive types so let’s take a look at the table here on the left side I have divided these datatypes into four categories integral numbers real numbers character and boolean this column shows the C# data times and these are C# keywords note that C# keywords are always lowercase each of these C# keywords or C sharp types maps to a type in .

NET framework which is displayed in this column so these types are part of the.net framework and when you compile your application the compiler internally would translate the C# keyword you use here two equivalent .NET type the third column here shows the number of bytes each data type uses and I have listed these data types from the smallest to the largest in each category so in the category of integral numbers you see byte is the smallest it takes only one byte whereas long is the largest and it takes 8 bytes the more bytes we have the more storage we have and we can store larger numbers you don’t really have to memorize the range of each data type but remember white can store a value between 0 to 255 short can store a value between minus 32,000 to plus 32,000 integer can store a value between minus 2 billion to Plus 2 billion and long is even bigger than that in terms of real numbers we have three data types float double and decimal float maps to the single type in that framework and it takes four bytes and as you see it can store a very large number double is twice as big so it uses eight bytes and decimal uses sixteen bytes the more precision you need the bigger data type you use we also have character which is represented by char keyword and it’s two bytes so characters in C# are unicode and finally we have bull which represents boolean which can be either true or false in case you want to learn more about the other data types that I told you they’re not really used you can simply go to Google and search for C# built-in types and the first page is the MSDN page that lists all the primitive types in C# and most of these data types are pretty straightforward but there is something tricky about real numbers in this table I have listed the data types we have for real numbers load double and decimal I’ve highlighted double because that’s the default data type used by a C# compiler when you’re using real numbers so if you want to declare a float you need to explicitly tell the compiler to treat the number you have as a float here is an example I’ve declared a float call it number as I need one point two here I have added the suffix F and that is to tell the compiler to trade this number as a float if I didn’t have this F here compiler would think one point two is a double because double is the default data type for real numbers and of course I cannot assign a double number into a float so the program would not compile same applies to decimals so if you want to declare a decimal you need to add the suffix M at the end of the number in C# we also have a few other types which are not considered primitive types and they are string array enum and class we’ll learn more about them throughout this course okay that’s it for this lecture in the next lecture we’re going to talk about the concept of overflowing I hope you enjoyed this lecture and thank you for watching okay now let’s talk about the concept of overflowing here I’ve declared a variable of type byte cut the number and assign it to 255 as I told you earlier in the slide 255 is the largest value you can store in a byte now in the next line I’m increasing the value of number by one and trying to store 256 in the number but if you compile the application and display number on the console you will see zero and this is what we call overflowing so we have exceeded the boundary of the byte data type in C# by default we don’t have overflow checking which means we can modify the value of a variable at runtime and if we go beyond the boundary of its underlying data type we will get overflow now sometimes this is not desirable in your application you want to stop overflowing if that’s the case you need to use the check keyword so here is how it works we have the checked keyword followed by curly braces which indicate the code block and inside that block we have the variable declaration and any kind of arithmetic operations with this code overflow will not happen at runtime instead an exception will be thrown and the program will crash unless you handle the exception the topic of exceptions is an advanced topic and I have covered it in my C# advanced course for now all I want you to know is that if you use the check keyword overflow will not happen and instead the program will throw an exception now do we really need that in reality honestly I have never ever ever came across this situation because if I was concerned that in this case my number variable would overflow I would just simply use the short data type instead of byte but I decided to include the concept of overflowing because I wanted my sous-chef course to be comprehensive so just be aware of that in case you hear about overflowing somewhere but you’re probably not going to use that in the real world in the next lecture we’re going to talk about the concept of scope okay let’s talk about the concept of scope what is the scope scope is where a variable or a constant as meaning and is accessible take a look at this block of code here as you know a block is indicated by curly braces here we have three blocks of code here’s one here is another and here is the last one inside the first block I’ve got a variable called a an a is accessible anywhere inside this block or any of these child blocks if I go out of this block and try to access a the program will not compile the same rule applies to other variables so let’s take a look at this block here B is meaningful anywhere inside this block or any of its children if I go outside this block and try to access B I’m going to get a compile time error okay I think that’s enough theory for now let’s open up visual studio and do some coding okay let’s start by declaring a variable of type byte and call it number now we want to display it on the console so as you remember from the last lecture we type console dot write line and put the variable here note that as I was typing console dot write line my resharper plugin automatically added this using statement on the top system is a namespace and console is a class that is defined in the system namespace so in order to use the console class we need that declaration here on the top if you’re not using resharper you have to go here and manually type using system semicolon okay now take a look at this number here it has a red underline and if we put the mouse cursor here it says local variable number might not be initialized before accessing if you remember from the slides I told you in C# before you can access a variable you need to set it you need to initialize it and that’s the reason here we have the red underline we cannot display the number on the console before initializing that so if I try to compile the application we’re going to get an error to compile an application you press ctrl shift + B and here is the error list use of unassigned local variable number we can solve this problem by initializing number like setting it to 2 for example and you see the red underline is gone we can compile again control-shift be build succeeded take a look here okay now we can run the application by pressing ctrl + f5 okay so we got two on the console now let’s extend this example and declare a few more variables define an integer int count equals 10 and a float float say total price equals 20 $95 now note this red underlined here let’s find out what’s happening here so I put the mouse cursor here it says cannot convert source type double to target type float if you remember from the slides I told you by default the sea-shore compiler traits real numbers like this one here as double whereas we are declaring a float so here we need to explicitly tell the C# compiler to treat this real number as a float and we can do that by appending an F at the end so the error is gone let’s take your character so char character equals a note that in C# we enclose characters by single quote like here we can also declare a string string is not one of the primitive types and have covered it in a separate lecture in this course but for now let me show you how to declare a string which is type string give it a name first name equals mosh note that with strings we enclose them in double quote so that’s one of the differences between strings and characters and finally let’s declare a bull bull is working equals true so with bulls we can either set them to true or false both true and false our keywords as you can see they’re indicated by the blue color here and they’re lowercase so everything you see here that is blue is a keyword like static void string class name space and all these data types here now let’s display these variables on the console so let me show you a trick instead of writing constant the right line we can do a shortcut this is what we call a code snippet so we type CW that is short for console.writeline and then press tab and Visual Studio automatically converts that to console the right line there are various code snippets that help you write code faster and I will try to point them out throughout this course so let’s display count now another one totalprice and note that i can just type t oh and here is what we call intellisense it’s visual studios auto completion mechanism you don’t have to type the full name of a type or a variable as long as the intellisense detects tab and is highlighted here like total price you can simply press tab and there you go visual studio automatically completes that for us let’s display the character same here I just press tab again I type only a few characters it can press tab or enter and finally is working we run the application by ctrl + f5 so we got all these values on the console okay now let me show you something else in C# we have a keyword called var which makes variable declarations easier for example here instead of explicitly specifying the datatype for each of these here I can simply type var and I let the C# compiler detect the datatype for this variable here so let me replace all of this with var okay now if we hover the mouse over the VAR keyword we can see the underlying data type in this case is system that boolean which is the data type which maps to C# pull keyword how about this one that’s a string and this one is a character and this one is system that single which maps to float in C# and in the case of count it’s in 32 which is integer and same for a number so the tricky thing here is by default C# treats integral numbers as integer and when you use the VAR keyword it assumes that it’s an integer if you really want to go for a byte then you have to explicitly specify it as byte here but tell you from experience it’s safe to use integer in most cases in fact if you look at the classes in the.net framework in most cases integer is the data type used for representing integral numbers okay I revert this back now I show you something else so let’s take a look at this one here so it’s a char which is a character I can put the mouse cursor here and press control and then click that opens the object browser window take a look here it’s object browser and it’s a way to look at the various classes in your project or in the.

net framework in this case because I did a ctrl click on the char or VAR keyword this is what we got here so char is highlighted in the object browser on the right side you see all the members of the chart type so these purple ones are functions or methods if you scroll down here you see two fields here min value and Max value we’ll explore them shortly and note that here is the Declaration of Char Char is a structure we will cover structures later in this course and note that it’s a member of system namespace it can click system and that shows the system namespace as well as all the types defined in the system namespace so these are part of the.net framework ok let’s close this for now let’s explore another example so I’m going to get rid of all the code here we can simply press control X on each line and that deletes all these lines here ok let’s do a console the right line so CW tab this time I pass a string here I specify two placeholders and finally supply a couple of arguments okay let’s see what’s going on here so here what we have is called a format string it’s a kind of string that can be used as some kind of template so at runtime what we have here indicated by curly braces and 0 as the argument will be replaced by the value we pass here so 0 represents the first argument after this format string and 1 represents the second argument after this format string in this case bited max value so let’s run this application we got 0 and 255 and that’s the range that you can store in a byte we can do the same with a float so CW tap a format string float mean value float Max value run the application so this is the range we can store with a float it’s a huge number that is displayed using the scientific notation okay now let’s take a look at constants so I get rid of these two lines here control X control X we define a constant with the Const keyword Const float P 3.14 and we have to put F at the end because it’s a float now because we declared P as a constant here I cannot change it in my program so I cannot go here and say P equals 1 the compiler is not happy and that’s why we see that red underline here if you hover the mouse here it says read only local constant cannot be used as an assignment target it’s a little weird expression to understand but basically the intention of using constants is to have some kind of safety in your program so if there are values that should not be changed throughout your program you define them as constant and this way you want to accidentally modify their values well if you made it this far you seem to be very enthusiastic about learning C# and I highly recommend you to take my C sharp basics course using the link in the video description this way you can learn all the core concepts in a structured way and you don’t have to waste time jumping from one free tutorial to another you can see that currently this course has over 5,000 students with over 400 five-star reviews plus it comes with a 30-day money-back guarantee so if you’re not satisfied you can ask udemy for a full refund within 30 days and you get all your money back no questions asked again you can get this course using the link in the video description I hope to see you in the course in this video I’m going to talk about various kinds of type conversion in C# we have implicit type conversion explicit type conversion which is also called casting and we also have conversion between non compatible types here is an example of implicit type conversion a blight as you know takes only one byte of memory and an integer takes four bytes so we can easily copy a byte to an integer what happens at runtime is let’s take a look at this slide so here’s the binary representation of our B variable here so one is represented as seven bits of zero and one bit of one when we copy a byte to an integer what the runtime does is it prefixes that value with a bunch of zeros to fill the four bytes there is no data loss in situations like that when the compiler is 100% sure that the types are compatible and no data loss will happen values can be converted to a different type implicitly here is another example of implicit type conversion so we have an integer set it to one and we copy that to a float again in this example no data loss will happen but let’s take a look at this one here we have declared an integer and we’re trying to copy that to a byte and integer is four bytes so when we convert that to a byte three bytes out of four bytes will be gone and there is a chance for data loss now data loss doesn’t always happen it only happens if the value restored in the integer is beyond the capacity of a byte in this example one can be stored in a byte so no data loss will happen but if we had let’s say 300 here we cannot store 300 in a byte so as a result of that conversion data will be lost when the compiler knows that there is a chance for data loss it doesn’t allow implicit type conversion and you need to explicitly tell the compiler that you’re aware of the data loss and you still want to go ahead with the conversion in situations like that what we do is we prefix the variable with the target type so here I’m trying to convert I to a byte this is what we call as casting here is another example so we have a float set to 1.0 and if we try to convert that to an integer the compiler would complain I will show you that later in the coding demo so we need to tell the compiler that we are aware of the data loss and we still want to convert F which is a float to an integer so we cast it like here sometimes we are working with types that are not compatible but you still need to convert them for example we might have a number represented as a string as you see here and we need to convert it to an integer in situations like that because string and int are not compatible they cannot use explicit casting so we need a different mechanism for converting a string to a number in situations like that we need to use the convert class or use the parse method so convert class is part of .NET framework and is defined in the system namespace of methods for converting various types to other types and they all start with two in this case we’re trying to convert s which is a string to an int 32 in 32 as you know is a .

NET framework type which maps to a sushar p– integer type remember a blight is one byte short is two bytes and integer is 4 bytes and long is eight bytes you probably know that each byte has 8 bits so an integer which has four bytes times eight bits ends up being 32 bits that’s why it’s called two in 32 and in 16 which represents 16 bits equals to short which is 2 bytes we also have this parse method here all the primitive types that I explained in the last lecture like integer long float boolean they all have this parse method and the parsh method takes a string and tries to convert that to the target type in this case an integer here are some of the methods that you can find in the convert class to byte which converts the given value to a byte 2 in 16 to convert the given value to a short 2 in 32 to convert the given value to an integer and to n64 to convert the given value to a long okay in a theory let’s jump into code and see all this concept in action okay let’s say implicit type conversion in action first I declare a bite call it B and set it to 1 now I declare an integer and set it to be again to recap a byte is only one byte and an integer is 4 bytes so we can copy b2i without data loss and as you see there is no compile time error here let’s put on the console so console dot write line and we pass I here note that as I typed consult the right line my resharper plugin automatically added this using system statement on the top again if you don’t have resharper you need to go manually add this statement here we run the application by ctrl + f5 so we got on the console now let’s reverse this and see what happens so I’m going to get rid of this code here control X control X control X first I declare an integer set it to one then I declare a byte and try to copy I to B we immediately got this red underline here if you hover the mouse here the tooltip says cannot convert source type int to target type byte sometimes this error might be in a different file which is not open in Visual Studio here so you may see the error when compiling the application let’s simulate that so I compile this application by ctrl shift and B which stands for build so here’s the error cannot implicitly convert type int to byte an explicit conversion exists are you missing a caste so now you understand the concept of implicit versus explicit type conversion so what we need to do here is to do a cast so we casted integer to a byte now in this case no data loss will happen because the value is small enough to be stored in one bite let’s put B on the console console by right line B we run the application so everything is good but let’s see what happens if we said I – let’s say thousand we cannot store the number thousand in a byte the maximum we can store in a byte is 255 so if you run the application now we got to 32 because some of the bits were lost and this is the reason that C# compiler knows that there is a chance for data loss and it enforces you to explicitly specify the cast sometimes you know that despite the differences in data types there is no chance of data loss like in the last example where I was set to 1 in those cases we can safely apply a cast okay now let’s take a look at non compatible types so let’s clean up this code I start by declaring a string let’s call it number and set it to one two three four recapping from the last lecture note that here I could declare this with the VAR keyword and since our compiler automatically detects that this is a string so number will be defined as a string and we can see that by hovering the mouse here it says system that string now let’s say we want to convert that to a number if I declare an integer like I I cannot cast that number to an integer because they’re not compatible let’s take a look at the error cannot cast expression of type string to type int so if you see that error that’s the time when you need to use the convert class so we type in convert dot take a look at this method here – bite – char – in 16 in 32 and many other methods here so let’s convert that to an integer which is int 32 and pass number as an argument here now let’s print out the I on the console run application so I is 1 2 3 4 all good but let’s see what happens if instead I declare this as a byte and here we need to use convert dot 2 byte and here we display B on the console a byte does not have enough storage to store the value of 1234 so when we run the application now the application crashed the cancel is here and here is the exception exception is Dartmouth frameworks error reporting mechanism it’s an advanced topic and I have covered it in detail in my C# Advanced Course but in this video I will briefly show you how to handle exceptions so here it says unhandled exception the type of exception is system that overflow exception which means we try to store a value that was too large or too small for a byte so each exception or error as a type in this case overflow exception and has a message value was either too large or too small for an unsigned byte sometimes the exception messages are friendly enough that are easy to understand sometimes they’re a little bit tricky and the best way to work out what is going wrong is to jump on Google and search for the error and there’s pretty much always a Stack Overflow page that explains that now let’s describe that let’s see how to handle the exception here happened during conversion of that string to bite what we need to do here is to wrap these few statements with a try-catch block let’s see how it works so I just typed try and press the enter and visual studio automatically generated this block for me again this is what we call a code snippet let me undo this I’ll show you one more time so try see this try here in the intellisense and this icon represents a code snippet so if I press enter or tab you automatically get this code block so what I’m going to do now is to move this code enter a try block and the catch block gets an exception by default visual studio as this throw here don’t worry about it just delete it again I will explain it in detail in my sushar Advanced Course for now let’s see what’s going on here so the code that you put inside the try block will be somehow monitored and if an exception happens this block will be executed this prevents your application from crashing the reason our application crashed earlier was because we did not handle the exception so if you don’t handle exception the exception will be propagated to the .NET runtime and that the run times mechanism is to stop your application and display the error here we can handle the exception and that would prevent the exception from being propagated to .NET runtime so instead we can display a friendly message to the user saying for example console.writeline the number could not be converted to a byte now let’s run the application again see we got the firmly message and the application didn’t crash so what I want you to take away from this lecture is this we’re class works pretty well in most cases but in cases where the source type cannot be converted to the target type there is a chance for exception and you need to be aware of that and what you need to do is to wrap this block of code with try-catch let’s take a look at one more example before we finish this lecture let’s remove this and instead – drink call it STR and set it to true we can use the convert class to convert that value to a boolean so bull P equals convert that to boolean and we pass that STR here again in this example string and bull are not compatible and that’s why we cannot use explicit casting so here we are using the convert class we can display B on the console application so the true string was successfully converted to a boolean value that’s pretty much it for this lecture before I finish I just need to emphasize something here that throughout this course during early lectures you may see me using some short variable names like P or STR here that’s purely for demonstration and keeping things simple and in building real-world applications we should really avoid naming our variables ABC STR it’s not really a good practice the only exception is when we get to loops which you will see later in this course in for loops we use counter variables and we call them I or J it’s a common convention now here we are just starting to learn C# and it’s really impossible for me to demonstrate building a real world application because you’re just covering their basics or alphabets I hope you enjoyed this lecture and thank you for watching okay we got two operators in C# we have five types of operators arithmetic comparison assignment logical and bitwise let’s take a closer look at each of these operators we use arithmetic operators in computations where we are working with numbers so as you see in this slide we have add subtract multiply divide and remainder of division we also have two arithmetic operators called increment and decrement which are a shortcut for adding one or subtracting one from a variable so a plus plus is equivalent to a equals any plus one now with this increment and decrement operator there are two ways you can apply them you can use them as a postfix so in this example a is 1 and when we apply the postfix increment operator first the value of a is assigned to B so B is going to be 1 and then a is incremented by 1 so in this example after the second line is executed a is going to be 2 and B is going to be 1 now let’s take a look at a different way of applying increment operator as a prefix so in this example in the second line first a is incremented by 1 and then it’s assigned to B so after the second line both a and B are going to be 2 so be aware of this difference ok next comparison operators so we got equal which is indicated by double equal sign not equal greater than greater than or equal to less than and less than or equal to now what I want you to pay attention to in this list is that the testing for equality is accomplished by double equal sign and that’s different from a single equal which is the assignment operator next assignment operators so the most commonly used is the one with a seen the equal sign so here we set a 2/1 pretty basic now look at the next four types of assignment operators addition assignment subtraction assignment multiplication assignment and division assignment let’s see how they work for example addition assignment a plus equal 3 means add 3 to a so it’s equivalent to writing a equals a plus 3 and the same rule applies to other 4 assignment operators logical operators are used in boolean expressions which are often used in conditional statements will get two conditional statements later in this course so a real-world example is where you have a condition and you want to make sure that condition and another condition both are true or maybe one of them is true so that’s where you use a logical operator in C# the logical end is indicated by double ampersand and the logical or is implemented by double vertical line we also have the not operator which is indicated by an exclamation mark and finally in here we’ve got the bitwise operators bitwise operators are often used in low-level programming like when working with windows api or in sockets or encryption explanation of these is beyond the scope of this course but if you are interested let me know and I write a blog post for you now what I want you to take away here is that the bitwise End is indicated by a single ampersand whereas the logical end which we use in conditional statements is indicated by double ampersand same for bitwise or and logical or so remember the difference ok enough theory let’s flip over to visual studio and see all these concepts in action okay let’s start with the arithmetic operators first so I define two variables a equals 10 B equals 3 let’s add them together and display the results in the console that’s pretty easy right run the application so the result is 13 now let’s take a look at division so I replace the ad operator with division you the result is three the interesting thing here is because both a and B are integers the result of the division ends up being an integer if you like a floating-point number as the result of the division you need to cast both these numbers to a float so like this now if you’re on the application the result is a floating-point number now let’s look at a more tricky example let’s say C’s 3 B’s 2 and a is 1 I want to show you the concept of operator precedence so if I type a plus B times C what do you expect the result to be from a mathematical perspective B should be multiplied by C first which means two times three equals six and then it should be added to one so the result should be seven let’s run the application so C# behaves exactly as what we expected so multiply or division operators have higher precedence than add or subtract if you’d like to change the precedence you can do so by using parentheses so in this case if you would like to have a and B added together first and then multiply it by C this is how we would achieve that in this case the result will be 9 there you go okay now let’s take a look at comparison operators so let’s get rid of C here and instead see if a is greater than B very simple example right the result is false so what I want you to know here is the result of the comparison expression is always a boolean value which is true or false we can test for equality so double equal sign in this case a is not equal to B so the result should be false now let’s see the not equal operator so simply have an exclamation mark here followed by an equal sign in this case because a is not equal to B the result should be true okay now let me show you a more tricky example what do you expect here well first this is the not operator which is applied on boolean values or boolean expressions in this case this is a boolean expression and as you saw earlier it was true because a is not equal to B so we apply the not operator to that and the result ends up being false let’s run the application so we got files here but this code is not easy to understand or easy to read because here we have two negatives one negative and two negative and for us humans to negative is hard to comprehend two negatives always equal to one positive so in your program if you end up in situations where you have two negatives make sure to always inverse them with one positive so in that case I can get rid of the first negative and convert the second negative to a positive like that and we will get the same result which is false now let’s take a look at logical operators so I create another variable here VAR c equals 3 I’m going to change that to C greater than B and C greater than a what do you expect here as the result well C is greater than B so the result of that expression is true also C is greater than a so the result of that expression is true as well and here we have the end operator so true and true equals to true let’s run the application there you go now let’s make a tiny change here so this time because we know C is not equal to a this expression evaluates to false true and false results in false let’s run the application so we got false now let’s see the effect of the or operator so I’m going to replace the end with or which is double vertical line in this case that is true or false the result ends up being true and of course we can apply not operator here as you saw earlier which changes the true to false now this expression doesn’t really look easy to understand it’s just purely for demonstration of how we can combine different operators and make up more complicated expressions okay that’s it for this lecture I hope you enjoyed it and thank you for watching okay so we got to comment a comment is text that we put in our code to improve its readability and maintainability in C# we have two ways to write comments if your comment is only a single line you can prefix the comment with double slash but if your comment is longer and it’s multiple lines you need to start it with slash star and then finish it with star slash this type of comment is more like the comments we used to write in C and C++ code these days it’s more conventional to write either single line or multi-line comments prefixing with double slash so in this example we can rewrite this multi-line comment with double slash style like this now as a rule of thumb keep your comments to minimum use comments only win required and that’s when explaining wise house constraints and things like that do not explain what the code is doing your code should be so clean and straightforward that it doesn’t need comment if a comment explains just what the code is doing is redundant and the problem with redundant comments is we change the code but not everyone is very consistent in changing the comments so after a while these comments become outdated and because they don’t get compiled like the code there is no way to validate them and after a while they become useless so again keep them to minimum and explain wise house and constraints that you had at the time you wrote the code so the next person who is reading your code knows the reason why you wrote the code that way in this section you learn that C# is a statically typed language which means once you ticular a variable you need to specify its type and that type cannot change during the lifetime of that variable you also learn about the primitive types in C# such as integer character boolean and so on now in the next section I’m going to introduce you to non primitive types in C# such as classes or structures arrays strings and in ohms so I’ll see you the next section

Read More: Hector Alcazar | Uncharted 4 A Thief’s End Part 2 | PS5 Playthrough Gameplay Reactions 4K

Categories
Library

WordPress Tutorial: Build Your Affiliate Marketing Sales Funnel

Hi Kevin Barham now and in this shorttutorial I’m gonna show you how to build an affiliate marketing auctions move inWordPress and of course at the same time save money on those subscription-basedfunnel makes. So we’re gonna create a front-end landing page – then we’re goingto embed an autoresponder email captivate form then we’ll body-build out a connect pagebefore sending the lead on to the affiliate offer that we’re promoting. So the first step would be to install Thrive Architect is awordpress plugin that will literally changes your website into the perfectlanding page builder. Available for a one-time fee … a lifetime fee. So if welook in plugins we’ll see that I’ve already installed Thrive Architect’slatest form and so now we’re going to build out that first page – so we’ll go topages> add new. We’re going to give the page a title, call it that and then we’llsave draft and you’ll see that whatever title you put in here is used to make upthe permalink or the URL, the actual web page address that you’re going to sendpeople to and this one’s quite long so you can edit that and you can just saylet’s call this online business I’ll just take out the chips I don’t want thenI’ll click OK and our save sketch again Now I would recommend that you installYoast SEO so that you can set up how this would appear when shared on socialmedia and so on if that’s what you intend to do with itbut I’ll leave that for another tutorial so we’re done here – everything’s savedand we now click Launch Thrive Architect It will open in a new tab and there wego it’s just built it inside the standard template but that’s not aproblem so you come to the cloud and “youre seeing” all of the different landingpage lists that you have to choose from it reallyis quite a collection these ones at the top are called smart because if I clickon one and create it in it allows us to change the complexions in one location so youcan see here you’ve got this form body appears to allow us so if I click on ityou can see the default value hues and everything and we are able to literally justchange it like that it’s extraordinary but let’s go back towhat I was doing which was I’m going to revert this back to theme which will putus back to how we were and then I’m just going to go and select a blank one ofthe blank names and I’ll go for the boxed one but pick template and now we gowe’re ready for the off we’re going to lay in our direct our deed on the pageso I’ve got something ready for this I’m just gonna paste this in there we goThat’s obviously too big so I’m just going to scale it back down a bit andI’m gonna Center it and then what I’m gonna do is alter the extent of the textbox that we’re displaying there so we’ll commit a peak extent time lag this downa bit as I want it to go like that and then I’ll Center that andso we’ve got our chief there let’s say I want the free video bit to be in adifferent accent color so I like that and having to come and I’ll drop that inthere so that’s done that and now I’m gonna drop in my next chip of text whichis get rid of this chip we’re gonna drop in a content box in below the verse thereand I’m just gonna Walter the diameter of that form that smaller if you’ve gotexact pixel facets you can positioned that in if you crave or you can change it topercentages Pro flexible but we’ll do something like that and Center it andI’m gonna give this a slightly different color background so we’ll go to thebackground style come here and we’ll just make it a very light gray clickapply and perhaps I want to give it some rounded recess and so I can come in andliterally really drag those up a little and maybe give it a cease pall sothat it pops off the sheet somewhat and in this box we’re gonna drop our webform but I demand some text time above that which will say where should I sendyour free video and then we’re going to get an opt-in form and rather thanscrolling down and looking at all the different elements that you’ve got herewhich is a great selection you can precisely start typing up here so if I demand aautoresponder word and result contemporary species I’m gonna click and lag that andjust waver and drop it below that text and there’s our constitute ready to go I wantto change the color of this button so I can come in here edit the formelements and then I can change these colourings I’m going to framed this to thecolor that I pick just now and instantly you are eligible to when you’ve selected acolor I was putting it in the wrong box when you’ve selected a complexion you canthen save it to your shades down here so that’s that I’ve got the button thereand so then the button verse I want to change so I just come in double-click inthe textbook and then paste in my textbook and then I’m going to employed another little bitof text down below the button and I just wanted to producing that up close up to the buttonso I can exactly adjust the margin like that and there we go it’s looking goodand then the next thing of course I want to do is drop on a rejection so we’regonna wreaking a text box in below this material carton and let gopaste that in and again I want to make this text a little smaller so I’llselect everything there is and accompanying that typeface size down a little I also want toincrease the chink here so I can do that like so and then I want to add anothertext chest which will be the another renunciation about the video so I’ll dropanother verse chest and paste that in there I’m just going to go back to this one toreference the typeface width so I articulated that is something that 13 as well and I shall increase thespace between these and that looks like that so I’m just gonna save that as I golast thing I’ll do is I’m going to put down the bottom now the terms andconditions and copyright so I shall go into this andpaste these in and add a return there now you’d clearly going to go and linkthese up to your terms and conditions and Privacy Policy but I’m not gonna dothat for now I’m just gonna save that now that’s our opt-in page done in termsof visual and the next thing that I’m going to show you is the we’re gonnasave these elements so precisely by clicking on it and coming to this icon I’m goingto save this and I should just call it rejection and I’ll do the same withthis one we call it about video and the above reasons I’m doing this is I want to usethese on the next sheet on the connection page that we’re going to build and Ishall do the same for this I really call it t and C there “theres going” so we’ve builtout our first sheet and now we need to set up this form but of course we need aURL for the Thank You page so I’m just gonna hop back and develop if we go toall sheets we’ll look these are just the ones that come as default with WordPressand this is the one I’ve just built and so now we’re gonna supplement a new one andhere we’re gonna call it congratulations and then tab out of that subject and itwill create this URL I’m going to edit this and I’m gonna call this Thank Youbridge page – and then some random numerals and the reason I’m doing that isquite simply I don’t want parties precisely to stumble across this and another reasonif I had Yoast SEO I could explicitly tell WordPress to lay in the robots.txtfile not to index this page tell Google not to index yeah but that came foranother video so we’ve deepened the URL and we’ll click ok and we’ll click Savedraft so that’s how Thank You page ready we’re gonna goback to the opt-in page we’ll click on the opt-in form go to the main optionsand now we’re going to add a connection using an API you could contribute an HTML formif you if that’s how you want to do it but I’m gonna do it apply the API butbefore we can add a linkage we need to add the integration and if we go backto go to the Thrive dashboard you’ll see if we scroll down we’ve got APIconnection so let me add my a weber here don’t lend a new communication if they don’thave your service in here you can request it from here but let’s justclick and select a weber and if we then only clink connect this is now asking meto login to my aweber detail and there we go the connection is ready so nowwe’ll go back to our post and because we’ve already go this page open what weshould do is refresh this so save the work to make sure you have them became inthese changes before we do this and simply refresh the entire page and that willthen look our API associates again so I’ll click on the organize I’ll go to addconnection and now it sees that we’ve got a connection to choose from willchoose Aweber and then we can choose the list that we want to add to so I’m goingto select this one down now because that’s the furnish that I’m doinglegendary purveyor I can employ any verse in here if I’m promoting it on Facebook Imight want to tag it be mentioned that I’m doing their or whatever just somethingto help me know where these pass are coming from so I’ll click apply to thatnow we’re going to positioned our redirect URL in here so there we go I’ve pasted thatin there and then I only click off of it that’ssaved if you click on it you’ll see it’s still in there and that’s it doneso we’ll click Save we can go back to the backend Oh in fact there’s a newoption up here now where we can publish it from within here so I’ll precisely clickpublish there we go it’s publishedI can click preview down here it will open in a brand-new tab and show me what itlooks like also down at the bottom here I can see what it looks like in a tabletand I can see what it looks like on a mobile phone and if there was anythinghere that you didn’t like say you thought this was a little bit too closehere you could actually click on here and adjust it just for mobile withouthaving any impact on how it appears on the desktop so that’s very good so wehave our opt-in page now we’re going to build out our connection sheet so back herego to sheets we already developed it as a sketch so we’re now going to edit this inthrive first step is go to the cloud to download the space boxed so that we cankeep it the same and there we go and let me exactly get my verse ready to copy so nowI’m gonna add my chief on this page I situated congratulations or CenturiI don’t want to call it that large-scale do that down I also want it to be adifferent color so there we go remember I said we could have added thatcolor there as a favorite which would make it easy to hand-picked it again if weneed to so we’ll carry on and I’m gonna add another piece of textbook now send toit a slight chink just now I’m gonna add in a video so I’mgonna come here and again you can either scroll for or really start typing V forvideo and you can drag that in below the textbook so here we’ve got a video and clickon main options and this is where we’re going to adhesive YouTube video url justpop that straight in there sound out of it it gapes it up now that’s a bit big onthe page so I can come to the layout and situate and go for the diameter and justbring that down a bit so that it glances a bit more balanced so we’ve got that inthere and just see if there’s any other creates that I want to consider so youcan start it and then did it so I started at a different era if you wantto skip an intro of a video you’ve also got different forms that you can applyto it I don’t bother to be honest with you but they’re there if you want tosome of the shadows look who it is perhaps neat but I live it with no styleso that’s that next thing we’ll do is I’m just gonna framed my figure below so I’mgoing to add a textbook chest below the video paste my honour in there so we’re include areturn there and core and I shall frame my name in bold italics and I shall makeIreland slightly smaller like so so there we gocarry on next thing is that I want to of course leant a button here now so up hereselect a button it’s going in below that verse there it is and we can come over tothe left here and we can choose what we want our button to look like thosedifferent options now I’m gonna give this one and apply that then I’m goingto change the lord shade to my color click apply and I might say that I wantit to be a large button or a medium button or an extra-large and so onI’ll leave it a medium I’m gonna get some verse to put on that button now yesshow me the video now and I’m going to come over and deepen that typeface to opensans so there’s our button and if you want to mess with the flit of this youabsolutely can when you’ve got and adopted come up here and go to hoverand so I might actually get rid of that preferably heavy pall that’s on it and youmight want to change the coloring and the font hue and so on but I wouldn’t gocrazy it’s normally simply a slight variant just like that I mean exactly toshadow disappearing and the emblazon change somewhat I mean that works your choiceand then the next thing with the button selected come back to the main optionsand we want to put in our target URL now in this instance I’m going to save forthe moment in this instance our target URL is our affiliate link but I don’tperhaps want to send people straight to the affiliate link perhaps I want to beable to track the people that are going to it so let’s quickly hop-skip back to thedashboard and come down to plugins and compute new and we’re going to search forpretty link it’s pretty connects and there it is it’s his first one short-lived associations bypretty connects sounds install now I would suggest that if you’re doing anythinglike this on a live site before you install any plugins make sure you take abackup and if you haven’t got any backup software on your WordPress website makethat national priorities and you can find there’s one updraft in the WordPress repositorywhich is where we are at the moment updraft which is a free they’ve got apro form but you can use the free one when you’re starting out but only makesure you take backups before you convert any plugins contribute anyplugins do any revises merely be certain you’ve got your backups because it won’tbother you until the day you need it and I’ve been caught out many a time so I’mgoing to activate this plugin there we go there’s pretty connections you can read allabout it but mostly if we come here to pretty relates on the left it renders usthe option to add in our affiliate connect and have it moved so in this instancerather than me sending out a long affiliate link which I speculate I’ve caughtsomewhere let me just deliver that right so I’ve got my affiliate associate the targetURL you can click on these if you need more but that’s where we want to sendour congestion to from our bridge sheet so I’m gonna paste in my affiliate relation inthere and then I’m gonna change the moderately relation I might set legendarybecause that is what I’m promoting solely mythical challenge becauseI am strengthening the 15 epoch business make challenge so that gives us alink now I can imitate it from there imitate to the clipboard and be sure to ofcourse save it by clicking on update that’s grammarly that excludes sounding upand there’s our tie-in and you can come back and you can get your link fromthere and “youre seeing” by linger over the target you can see the target thatit’s going to so that’s all good so now I’m going to hop back into thispage onto this button and that’s the link now that I want to send it to on mysite which will redirect to the affiliate link and of course you cancreate multiple fairly joins so if you’re promoting on Facebook and you’repromoting on Pinterest or somewhere else you can create multiple jolly linksthat all point to the same affiliate link but what happens is of course aspeople click these so you will be seeing account of it in here so regardless that’sthat so we’ve got our button in there I’m gonna click Save again because I’vemade a change and now I’m just going to add a bit more copy below this will bemuch quicker we will be finished very shortly I predict you so then I drag ina text box below the button and paste in my textbook andquickly format it so Barack and I’m putting a return there putting a returnthere and then these ones put in returns there I crave this to be in bold I canjust do ensure B and I want to drop an portrait in so I’m gonna click here go toimage and lag and I’m just gonna for the moment drop it above this box andselect an image so like that I was usually fill in the alt textbook that’shelps Google reading and promotions with indexing so I would add that in there Iwouldn’t bother with the caption unless you just wanted to but I could compute the captionhim while in here if I choose to so for example there is if I said the caption Icould then have my specify below it but I don’t want that so we’ll turn that offwhat I do want is I want to separate this verse up and the simplest way to doit is to drag the likenes and drop it below that first bit of textbook so nowthat’s separated it and now I’m going to make it to the left of this verse you’llsee what it looks like in just a moment and this is automatically set up columnsfor us so now we’re going to drag this across a bit because I want it to looklike that and perhaps I require a bit more of a crack there but it’s all visual yousee so anyone could enjoy building a web page and well that’s a webpage we’redoing a connection sheet here but you could build an entire website like this itreally is a prodigious implement I use it on every website I built and on all mylanding sheets and moves so regardless carrying on the last thing we need to dois popping the button in so rather than recreate that I’m just going to clickhere and replication it and then drag this one down and you see as I poise it letsme tells me where it’s going to drop it I require it below the article gave which isjust there and perhaps I require it a little wider so I can come intoand width and here we are able to make it a little wider if that’s what we want todo and then you’ll remember I’m saving this I croak you’ll remember that I savedit the rejection and the about so we go to plus again and get two templates andsymbols drag that below the button and there is our templates that we save soI’m going to click on you have to do this one at a time regrettably butI’ll click on disclaimer and it will fell the disclaimer in then I shallbring in another one drop it below that and click on about video there is and Ishall do the same with the final just down now footer T and C and in thisinstance I’m just gonna click in here highlight it and Center and then I’mgoing to get rid of this one that was on now and I’m gonna decline this into thatbackground section only to keep it all nice and tidy so there you go we’ve nowgot our connect sheet develop sound Save and again we can look and verify what itlooks like on a tablet ogles lovely on portable glances utterly astonishing exceptfor that so you would come into that and you would adjust that font down likethat again didn’t alter the other ones which is awesome so there we gowe’ve got it done and ready now you might want this to be your not this butyour opt-in page this you might want this to be your home page you give outyour domain name.com and this appears so let me show you howto do that so again in the backend dashboard we’re going to come down tothe situates and reading and here you have the option your home page displaysnow currently if I proceed look at the front end of the site that’s what it lookslike and nobody would see anything of the disembark page that we’ve just builtand so I can say a static sheet and I can select let’s start you andonline business the reasonable incidentally we’re not realize the thankyou sheets that I haven’t published it yet it’s still in draft form so this isthe one that we want we’ll select that and we’ll clink Save and then quicklyI’m going to go back to now click on this setting cog go to visibility andclick publish publish there we go so that’s done so I’ll close out of that orclose out of that I’m gonna go back to sheets here and then we’re going to goand preview this if I mastery click on this it will open in a brand-new invoice and thereis our opt-in form I’m going to settled my honour in and my I’m gonna kept an emailaddress that I haven’t put-upon I know I’m gonna clink get instant access and let’ssee what happens there we go we’ve dissolved up on the aqueduct page so nowthey will hopefully watch the video and then and speak if they choose toand then they will click on show me the video now and this will then make themthrough to the affiliate offer that I’m promoting.So there you have it. If you’vegot any questions at all don’t hesitate to let me know and I’ll try and answerthem for you. I hope it was helpful Take care – Talk Soon – bye bye.

For more info click here

Categories
Library

Python OOP Tutorial 1: Classes and Instances

Hey, everybody. How’s[ it] going in this streaks of videos? We’ll be learning how to create and use categorizes within python and how object-oriented concepts are applied within the language now There’s a lot to cover when working with classifies, so I’m going to break these up into several different videos We’ll cover the basics of creating and instantiating categories will learn about endowment class and instance variables static methods and class methods and Several other topics So smashing these up in several videos will allow us to focus on specific topics in each video so in this video We’ll be learning the basics of creating and instantiating simple classes, but first Why should be used even use courses now this isn’t just specific to Python you can see first-class being used throughout most modern programming languages, and there’s a good reason for that they allow us to Logically group our data and functions in a way that’s easy to[ reuse] and also easy to build upon if need be Now exactly a speedy place note when I say data and functions that are associated with a specific class We call those attributes and methods, and you’ll hear me use those periods a lot throughout these videos, so when I say techniques I signify a function that is associated with a class[ so] let’s go ahead and get started so say we had an application for our firm And we wanted to[ represent] our employees and our python system now This would be a great use case for a class because each individual employee is going to have specific Attributes and methods so for example each employee is going to have a name and email address[ a] remunerate and likewise War that they can perform so it’d be nice if we had a class That we could use as a blueprint to create each employee so that we didn’t have to do this manually each time from scratch So let’s go ahead and create a simple employee class and recognize what that would look like so to create a class It’s just as easy as saying class hire now I’m going to leave this empty for now, and if we just left it like this and we get an error so if you ever have a class or government functions[ that] you want to leave empty for the time being then you can simply put In a past announcement and python will know that you exactly want to skip that for now So now we have a simple employee class with no attributes or approaches And I wanted to stop here because I wanted to explain the difference between a class and an instance of a class So our class is basically a blueprint for creating Instance and each unique hire that we generate working our work class will be an instance of that class so for example if I said hire 1 equals work and EmPLoyee 2 Equals employee then each of these are[ proceeding] to be their own unique instances of the employee class so for example if I go ahead and publish both of these out and Copy and glue that There and you can see that both of these are employee objects, and they’re both unique They both have different locations here in memory now This is an important distinction because you’ll hear me talk a lot about speciman variables and class variables and it’s important to know the difference between those and I’ll vanish more in depth into class variables in the next video but for this video We’re going to be looking at instance variables so instance variables contain Data that is unique to each instance Now we could manually create instance variables for all the employees by doing something like this So let’s say we wanted employee 1 to have a first name and a last name so I could just do employee 1 not first Equals Corey and then I could do hire last is equal to Schaefer and I has the potential to commit it an email address, so I’ll do work 1 dot email equals and I’ll just do the given name with the last name at Company comm and lastly let’s go ahead and add a wage[ onto] there too, so I’ll do employee 1 not pay and we’ll just do 50,000 there now let’s pay hire to Some of these same qualities so for this one.I’ll simply do test User and then I’ll do measure User and I will conclude that 60,000 ok so now each of these instances have attributes that are unique to them so if I reproduce it out, let’s say I could engrave out government employees[ 1] dot mail and Likewise print out the employee to email On it looks like whenever I afforded these the instance variables I forgot to make this employee to now so now let’s run that so now you can see that that email Was created for each employee?[ let’s] say that we wanted to set all of the information collected for each employee When they’re initiated rather than doing all of this manually like we did here So we wouldn’t want to have to Manually set these variables every time you can see it’s a lot of code and it’s also prone to misstep Just like I did whenever I forgot to change the[ to] hire,[ very] So we don’t get much welfare of the utilization of castes if we did it this practice, so to stimulate these Set up automatically when we create the employee we’re going to use a special init method So now inside of our work class I’m going to create this special init method Now you can think of this method as initialize and if you’re coming from another language Then you can think of this as the constructor now when we create techniques within a class they[ receive] the speciman as the first dispute Automatically and by convention.We should call the instance self now. You can call it Whatever you miss But it’s a good idea to stick to convention now and really use self So after self we can specify what other controversies that we want to Accept so let’s go ahead and accept the first name the[ last] refer and the pay and I know that we had email, more But we can create the email use the given name and the last name so now within our and Knit method We’re going to set all of these instance variables So let’s do self scatter first equals firstly and now I’m just going to do this for the rest of them as well So[ I’m] going to do now self fleck pay or self flecked last and self dot settle and for the email I can do self dot email equals firstly plus and then we’ll employ a fleck between those and then last and then we’ll add on to the end at companionship comm Okay, so whenever I say that self is the instance what I represent by[ that] is that when we self dot firstly? equals[ two] first here It’s going to be the same thing as us saying down now that hire one fleck first equals[ Korey] except now instead of doing this manually It’ll be done automatically when we create our hire objectives Now these don’t need to be the same as our reasons so for example.I could make this Self fleck f list equals firstly, but I usually like to keep these same if possible So I’m going to go ahead and name that back[ to] self dot first equals firstly, okay? So now when we create our the case of an our employee class right here now we can pass in the values that we specified in our anit method now our net approach makes the speciman which we call itself and the first name last name and Pay as arguments, but when we create our work down now the speciman is surpassed automatically So we can leave off self we only need to provide the specifies and the wage so we could create these by Passing in first and we have to do this in order So I will pass in all of the same information that we did manually down there and for the second one I’ll do[ exam] and User and I speculate I had that at[ sixty][ thousand] okay so what would happen on this strand when we create this work the anit technique will[ be] led automatically, so Employee one will be overstepped in as ego and then it will specify all[ of] these attributes So it’ll pitch employee one scatter first is similar to first which we extended in as prey Employee one that last equals what we extended in is last and so on so now that we have that an it method in place We can go[ ahead] and delete these manual works that we induced down here And you can see by deleting that that we got rid of a lot of code So I’m going to go ahead and comment out those indications[ we’re] engraving[ the] employees, and I’m just going[ to] go ahead and print out the email So if I race that then you can see that that still directs, okay? So everything that we have so far[ like] the appoints and email and the remuneration are all attributes of our class now Let’s say that we wanted the ability to perform some kind of action not to do that We can add some means to our class So let’s say[ that] I missed the ability to display the full figure of an employee now This is an action that you’d likely need to do a good deal with a class like this So we can do this manually outside the class if I was to come down here and do Print and I could get the full mention precisely by position in two placeholders there and doing a format and saying hire one fleck first and Employee one fleck last and if I go ahead and print this out And you can see that we got the full identify there But that’s a lot to character in each time that you want to display the employees full list,[ so] instead Let’s create a method within our class that allows us to put this functionality in one place, so within our class now I’m going to create a method called full mention and we can do that with merely doing a death of Full mention now[ like] I said here each programme within a class Automatically makes the instance as the first arguing and We’re going to always announce[ that] soul and the speciman is the only argument that we’ll need in order to get the full specify So within this method now I’m just going[ to] go the same logic “that weve got” down here and cut that out and I’m just going to go ahead and return that but we have to be careful now because now instead of printing Employee[ 1][ first-name] and[ lastname ],[ I’m] going to use self so that it will work[ with] all instances So I’m going to do self dot first and soul speck last-place So now that we created that programme instead of printing like we did before now I can just come down[ here] and do employee 1 dot full honour and Print that out And if I pass that then you can see that we got the same[ thing] and notice that we need the parentheses now Because this is a method instead of an facet So if I left the parentheses off and etched this then you can see that it publications the method instead[ of] the return quality of the method so we’re going to have to make those parentheses on in order to run that properly so now we have full advantage of Code scrutinizes here, so instead of typing this out for each full figure that I want to print now I can merely use that approach so now if I want to get etch employee two’s full reputation It’s just as easy as replacing hire one with work two and guiding that and we get the chastise answer Okay, and one more quick thing that I wanted[ to] point out here Now one common mistake that I see when creating techniques is forgetting the self assertion for the instance So let’s take a quick look at what that would look like if we left that off so now before I run this if I time remark it out this publish of full identify down here and Ran this then you can see I’m actually going to remove these print statements now as well Now[ you] can see that this runs without any corrects But if I was to try to run this method that we inadvertently left self off of then Run this and you can see that we get an error and the error that we got was a type error full-name makes zero positional proofs But one was given now this can be confusing because it doesn’t look like we’re passing any contentions here into full reputation But the instance which in this case is hire two is getting overtook automatically So we have to expect that speciman statement in our method, and that’s why we contributed self so I’m going to come back up[ now] to full appoint and Put self back in and now operating this you can see that[ it] runs Properly now we can also moved these methods working the class epithet Itself which manufactures it a bit more obvious of what’s going on in the background because when we are do that, so I’ll do employee Dot full honour now[ when] we run it from the class we have to manually pass in the instance as an controversy So in this case I’ll pass in employee one so you can see how these are similar, but not exactly the same So I’m going to introduced these side-by-side just so that we can compare them here So these two rows now do the exact[ same] thing, but now when I do employee one Which is a instance and I call the method.I don’t need to pass in self It does it automatically and when we call the method on the class And it doesn’t know what? speciman that we want to run that programme with so we do have to pass in the speciman and that comes progressed in as soul and if I croak[ onward] and Print this out and run it then you can see that it undertakings Just like if we wish to reproduce out the employee one fleck full refer And I wanted to show you that because that’s actually what’s going on in the background when we run employee one speck full refer it gets transformed into this here employee dot full specify and Passes in employee one as soul and that’s why we have self for these methods, so I hope that moves feel to you That’s not extremely important to know when we’re just getting started with working with first-class But we need to understand that[ in] last-minute videos formerly we start inheriting from other classes and things like that So I figured it would be a good thing to go ahead, and substantiate you that now okay? So I think that’s going to make love for this video in this video We learned how to create simple classifies the difference between a class and an instance of that class and we likewise learned how to initialize class attributes and organize procedures now We still have a lot to cover in future videos, and we’ll be going over more advanced topics, so in the next video We’ll learn about class variables, and how they differ from instance variables that we heard now But if you do have any[ questions] with what we covered in this video Then feel free to ask in the comment section[ below] and I’ll do my best to answer those If you experience these tutorials and would like to support them then there are several ways you can do that The easiest channel is to simply like the video and dedicate it a thumbs up and also it’s a huge help to share these videos with Anyone who you[ visualize] got to find them useful and if “youve had” the means you can contribute through patreon And there’s a link to that page in[ its] scription section below be sure to subscribe for future videos and thank you all for[ watching]

For more info click here

Categories
Library

JavaScript Tutorial For Beginners 19 – Practical Example using Loops

Yo, what’s going on people? You’re watching JavaScript for beginners task 19 and in this video I just wanted to go through a practical precedent of willing to use a loop in JavaScript. All privilege, then guys. So, as “youre seeing”, I’m back in the index folder right here and I’ve got some associations numbered from 0 to 5 there. Now I’ve started at 0 because usually javascript is a zero based usage, meaning that when we use arrays or index variables, as we’ve seen in curves, we often start at 0. So I thought it reaches smell to start at 0 for these associates. As well so what I want to do is show you an example of how loops in JavaScript can cycle through parts on your webpage and change them in HTML all right. So let’s climb over to this test file, which is our a tie-up table, and I don’t need to pay too much attention to the code that are right here. I’m just demonstrate you how loop can work with a web page. We’re going to cover all of this additional code later in this playlist. So let’s is the beginning with a variable announced associations, and this is going to be array which is going to hold all of the linchpin labels on the page. So we’ll use the get element by label list to do that and we’re going to go up to our 8x. So now it’s going to accumulate all the anti connects in an regalium for us and again don’t worry about arrays. More I’m going to cover those last-minute now. We’ll time our for loop and the components we need remember are the initializer the index variable and we’ll establish that to be I equals 0. Then we want the loop to continue for as long as I is less than relations portion. So that meant that, for as long as I is less than the number of links on the page, we’ll continue to do this. So then it will catch. All of the links and then finally we want to increment I by 1 each time around. Alright, so let’s do the code last-minute so, each time around, we have I as a specific number, if that’s off 0, then 1 and 2 and 3. Now we can use that numeral to grab all of a specific link in this array, so that’s what we’re going to do. So we’ll, say associates which is the array, and then we want the eighth number of that last-minute array. So we’ll start at zero. That would first time round be zero, placed era, rounded one then two etc. So, each time I is going at one and that’s going to get us the first and the second largest, then the third link etc, and each time we iterate through this curve. We want to do something to those joins or that link, and we’re going to give it a class call each time. So we’re going to give the class word to be linked. Then we’re going to concatenate whatever I is so that will be linked 0, then relation 1, then relate etc. Going through and again don’t worry too much about this code here in this code. Here I’m going to show you all of this later in the playlist. This is just an example of how we can use loops-the-loops okay, so let’s save that off and refresh over here and, as you can see now it’s looped through each tie-up in a HTML document and it’s given one each sorry. Each anchor call a class of connect 0, then attach 1, then link to, and that’s this bit right here. So we’ve achieved what we set out to do so that’s how we can use loops-the-loops to cycle through points on a sheet and do things with them, and this is just one of many different things we can do with those things. If “were trying to”, we could animate those connections or conversion the mode qualities. Whatever you want to do, you can do that, so I hope this has induced smell. I just wanted to give you an example of where we’d use loops-the-loops and if you have any questions about this whatsoever, feel free to remark down below I’ll answer all of those. Otherwise, if you experience these videos, delight like share subscribe, and I’ll see you guys in the next one . .

For more info click here

Categories
Library

How to use Calendly – Tutorial for Beginners (2020)

Air whooshing Scott: Are you wanting your users to book time with you? Are you a consultant, a freelancer, or maybe you’re, just looking for more leads and allowing people to easily and professionally book time in your calendar. Well, in today,’s, video, I’m gon na show you everything you need to know to use Calendly, Hello, everyone, Scott Friesen here at Simpletivity, helping you to get more done and enjoy less stress, And I’ve used Calendly for a while. Now It is a quick and very easy tool to allow people who are interested in my business and in my work to book time with me, So I wan na show you how to get things started. So we’re gon na get things kicked off by going into our menu into our account. Once you,’ve signed up with Calendly, And one of the first places that you’re gon na wan na go is up here to your account And we want to go to calendar connections, because really everything is based around your relationship with Calendly and your Calendar So the first thing that you’re gon na wan na do is make sure that you add one or more calendar accounts. This not only allows Calendly to book those appointments directly to your calendar, but it also allows Calendly to check other bookings that you may have going on. And what I mean by this is things beyond just Calendly appointments, but things that are happening. Perhaps in your personal life or other meetings that come up as a part of your day Down below here, you can also check for conflicts. You can use multiple calendars to check for conflicts more than just the one that you have selected up here and you can also specify which calendar to add those appointments to. So this is definitely gon na. Be your very first stop to make sure that you have your calendar connections set up correctly. Just select, add calendar account here and you can authenticate with any calendar service, including Google, Calendar and Microsoft Outlook. Next up, we wan na stay with our account settings this time. We’re gon na, go to account account settings and I just wan na encourage you to upload an image. So if this is meetings or appointments that people are going to be scheduling with you, I recommend that you put your nice profile picture here, along with your name and perhaps a welcome message just when they land on your beginning page Next step. You also wan na make a quick stop at the branding page to add your company logo or some other image that you would like to add here And lastly, we can click on the my link. Now this is probably more important than you think. In most cases, you’re gon na wan na put the name of your business, or maybe it’s your full name, But remember this is the URL that you are gon na, be sharing with users. This is what you can link from your website or your social media accounts, or you can just copy and paste this and give it to people directly so that they can land on your Calendly page All right. Once you’ve been finished with your account settings. Let’s go back to the home screen. I just wan na show you where some of those changes take place. I’m gon na click on my link here, just to show you where this shows up. So this is the initial landing page where people are gon na see my profile image, my name and that welcome message. I’ve got two events currently that people can choose from and when they click on one of those events, they are also gon na see. My branding here This is where the logo comes into play, But now let’s move on to the events themselves. And how can you set up one or more events so that it’s as easy for your prospective leads or for your clients to come in here and book time with you? So let’s go back to our menu within our account screen here, And this is really our main page here on the home screen where you can add and edit existing events. I’ve got two events that I’m using at the moment, but let’s go and create a new event from scratch. We gon na select that new event type, which is gon na open up a new screen. We’ve got two choices here. We can either create a one on one meeting or a group meeting. Now a group meeting lets multiple invitees meet with you at a single time. This may be great for a teacher or if you are providing a group webinar or something along those lines here, But in most cases the majority of people are using Calendly for one on one meeting, So let’s say create for one on one On this Screen the first thing that we need to do is give it an event. Name Now remember this is more than just your reference. This is what people are gon na, be seen when they land on your Calendly page. So I’m just gon na call this one Meeting with Scott really simple here, So I can identify oop Meeting with Scott, Let’s keep that in there. Our second step is to add a location, and you can see we can tell our users. Upfront is this an in person meeting a phone call, or is it gon na be a specific conferencing meeting such as using Google Meet Zoom GoToMeeting or maybe something custom, something that’s not even listed here? In our example, I’m gon na choose phone call in this case And in many cases, depending on the option that you choose, you may have some additional options waiting for you, For example, do I wan na choose if I will call my invitee in this Case it’s, gon na require the person who’s booking that time to list their phone number. I need to know who I’m calling or I can choose this option. My invitee should call me In this case I can add my desired phone number here, and the great thing with Calendly is that it’s not going to display this number until they have booked the appointment. So if someone is considering booking time with me, it’s not as if they’re gon na see my phone number or my dial in number right away. It’s only after they’ve booked. The time will this number be revealed, But in this case I’m gon na say I will call my invitees’cause. I’m gon na ask them to provide their phone number. I’m gon na say, update that’s gon na save that option here Down below. We can add a description which is something you don’t wan na overlook, especially if you have multiple events that you’re gon na, be offering to your users. So I’m just gon na say this is a meeting with Scott for a consulting session, something like that, just something so they can differentiate. What this event is about compared to maybe some of the other events that I have available And then just below the description. We have our event link. Now we already talked briefly about having your domain name or your business name, or maybe your full name to get them to your main Calendly page, but this is something that you can share. In addition, a separate URL, So in this case again you wan na try make it as specific as possible. So maybe I’m gon na say meeting Scott, something like that, something that’s so easy for me to identify, but also, if I just copy and paste this link, they know what they’re getting as well. And lastly, we can choose a different color. This is very helpful if you have multiple events, I’m gon na choose red in this case just so, it stands out from the other events that I’ve already created. Now, once we hit next, we’re gon na get to the nuts and bolts of our event In this menu screen called. When can people book this event? So, by opening this app, you’re gon na, see a lot of detail, and you wan na make sure not to skim over this, because this determines how long of an event it’s, gon na, be and other specific details, including how far out someone Can book you So first up is event duration, and by default it’s usually set to 30 minutes. In this case, I wan na make this 60 minutes. For my event, If you don’t see a default time here that works for you let’s say, for example, you want to set up a 90 minute meeting. We can select the custom minute option here Now. Date range is also very important Here. It says events can be scheduled over 60 calendar days, meaning they can book me out up to two months in advance. Let’s say that’s a little too much. I wan na select edit here and I’m gon na – choose this to 10 rolling days, meaning they can only schedule me within the next 10 days Now. You can also change it from rolling days to a specific date range. This can be helpful if you have a special set of office hours, maybe a two week period where you are just offering a special service. You can do so here. The third option is also to choose indefinitely. I would be very hesitant to choose this option. Basically, this means that they can book you any time in the future. So rolling days is typically the most standard option here I’m, gon na, say 10 rolling days and hit apply and the nice thing about this screen is: if you scroll down, it, can actually show you what that looks like on your calendar. So if I say show more, the things that are grayed out means that that’s past the 10 day rolling period. So this shows where people can book me as of today. So if you need to take a glance or preview that you can always scroll down and do so Now event time zone by default, it is gon na show in your time zone which you set in your account settings and your invitees will also see it in Their default or local time zone, which is typically ideal – You can edit this if you want to you, can lock the time zone, but that is really only recommended if this is gon na, be a physical meeting that you’re meeting at a specific address or Location For most of us, we are meeting via video conferencing or via phone. So you wan na keep this at local. So you don’t have to worry about making the configurations or the calculations of the time zone difference and they don’t have to either It’s, just gon na show up in their local time zone. Next, we have our preview calendar under availability, and this is really core. First off, I recommend that you select some of the specific days. This is where you’re gon na set the actual available hours that you can be booked Now before we do this. I just wan na remind you that remember this is sinking against your calendar, the calendar that you set up in your account settings, So it is never going to double book you If you have set which calendar for it to check. It is not going to double book if something already exists there, whether Calendly book, that for you or whether you have booked that or other people have booked your calendar in advance. But what we wan na do here is set. What is the time limit on specific days, Or maybe you have the same timeframe So here? If I click on this date, I can say you know what On Mondays, I don’t wan na start that early, I don’t wan na be able to be booked that early in the day. I want to be 11. 00, a m to 5 00 p m and I can say I can apply it only to this day or can I say, apply it to all Mondays, I got to say: apply it to all Mondays, but then going forward. I can change these dates as well. If nine to five works for me that’s great, I can leave it as is, or maybe I want to be available nine to seven on Tuesdays and Wednesdays. I never want to be available. So if I click on Wednesday, for example – I can say I’m unavailable, I can say, apply to all Wednesdays And now you can see that date is blocked out completely. So you can make those changes in terms of specific hours of availability, either on a specific date on a recurring day or even for the entire grouping, as you go forward, But we don’t wan na move on just yet. We wan na make sure that we click this advanced tab because there’s some other details that you don’t want to forget. First up is availability increments, meaning. How does you want this? To look to your participants, The people who are booking you? Do you want them to only be able to book you on an hourly basis, like 1 00 p, m, 2, 00, p m and 3 00 p m, Or do you want to also add 30 minute increments, such as one 1? 30, two 2, 30 et cetera? You can make that change here. Next up is event max per day, meaning for this particular event. How many do you want to be allowed to book you in a given day? So maybe I only want to allow two of these events to be booked, Even if my schedule is wide open. I only want people to book this particular consultant session two times a day. If you don’t wan na set a limit, you can just leave that blank and it will adhere to your other rules, such as the amount of available hours. Next up is minimum scheduling notice, and this is really important to pay attention to as well. The default is four hours away, meaning that someone could book me four hours from now. So if it’s 10 00, a m, my time, 2 00 p m would be the earliest that they could book me today. If I think that’s too close, if that’s too soon well, then I just need to increase this number. Maybe I stretch it out to 16 hours 18 hours – maybe I prefer 24 hours so that no one can book me within 24 hours that are always gon na be booking me for at the very least tomorrow. Maybe I need some time to prepare. I need to send them a questionnaire, Whatever the case may be, you can adjust that here And then our last option has to do with event buffers Meaning if you don’t want meetings to be scheduled back to back to back. You can add a buffer before an event, but also after an event. This is very helpful if you have a habit of having your meetings going over time, or maybe your clients push those meetings over time. If you don’t wan na bump into your next meeting, you can add a buffer for either before or after that event. We’re gon na hit, save and close, and that brings us to four additional options down below The first one is invitee questions. So when someone comes to book your event, what will they have to provide Now? Name and email is going to be mandatory? If we click this little gear icon, we can say that we, don’t want to allow them to add guests. If you don’t want them to add other email addresses or guests, you can do so. You can also change if you want both first name and last name as separate fields. I like to try and keep it nice and simple. So I just leave this as name, but you can choose what you desire. You may recall that we are requiring our guests to add their phone number, because I want to call them. They need to provide me with a number. So here this is gon na be here by default. If I didn’t need that, if I didn’t make that choice earlier, then I could choose. If I wanted to add phone number or not, And then the last one here is just an open comment field, Please share anything that will help prepare for our meeting. I can change the text. I can change the wording of this question. I can just delete it altogether if I want to – or I can add additional questions If I wan na add a few preliminary questions in advance. This can be helpful if you wan na get some more information, maybe find out what they’re after what they’re. Looking for you can add questions here. Save and close next is notifications and cancellation policy. So how do you want these events to look on their calendar and how do their email reminders or their email notifications? How do you want them to look as well? Do you want something specific in the title? Do you want a specific wording Here? In the right hand, side we can select personalize and you’ll see how it’s gon na show up to that individual. What it’s gon na look like when they receive these calendar invitations. You can always change these defaults as a part of your setup. If I close this and we select switch to email confirmations, I can select personalized, and this is how their email reminders will show up in their inbox Again. If I don’t want it to start with confirmed if I wan na change, what the event name and what it’s gon na look like, I can add links, I can italicize and add other formatting. I can do all of that right here, as well. Now down below we,’ve got some other things that we can set up, such as email reminders, in terms of when they are sent, email follow up and even text based reminders. If you wan na, send them a text reminder as well By default, these are all set to off, but you can turn them on and make adjustments as you wish. The last thing that we wan na look at here is the cancellation policy. So if you want to include something like you must notify me 24 hours in advance, or else you will be charged the full amount or something to that effect. You can include your cancellation policy here, Otherwise you can uncheck this box and not have anything show up. As a part of that cancellation policy, Next up is the confirmation page Now by default it’s, gon na show just a standard, Calendly confirmation page, but if you would like to send them somewhere specific, you can choose redirect to an external site. Maybe you want to send them back to your website or to a social media page or maybe you have a custom. Thank you page. You can include that here as a part of a custom link And then the last option that we have available to us has to do with payments. Now this isn’t gon na be applicable to every user and, yes, you must have a pro account in order to use payments, But if you want to require your users to pay you via PayPal or Stripe or some other method, you can do so here. So that they have to pay prior to confirming that event, you can make that connection here within this window. So now that we are done with this event type, let’s go back and see what it looks like on our page. So now we see we have this red meeting with Scott. This is the one that we just set up. Here is the extension right. It could be calendly com, simpletivity meetingScott, That’s, what it’s gon na look like. So if I click on this directly, it’s gon na bring me to this meeting invitation, and here you can see Monday, I’m booked the rest of the afternoon. So the reason why this is not available is because I have other bookings going on. Even though I said I wanted to start a little bit later, I’ve got nothing more available today And remember. I said I don’t wan na meet on Wednesdays, so you can’t meet me this Wednesday or next Wednesday, but I do have some availability on these dates. So if a user clicks on the ninth here, they’ll see my availability. For that day, and they can choose any one of these days, they can confirm it and continue with the process. I hope you found today’s, video helpful and if you have further questions about how to use Calendly be sure to. Let me know in the comments down below. Thank you, so much for watching and remember, being productive does not need to be difficult. In fact, it’s very simple. .

For more info click here

Categories
Library

Python Full Course 🐍 (NEW)

hey what’s going on everybody it’s bro hope you’re doing well and in this video i’m going to help you get started with python so sit back relax and enjoy the demonstrate if you wouldn’t mind delight like remark and subscribe one like equals one devotion for the youtube algorithm i’m gonna tell you why you need to learn python it’s the easiest programming language to learn as well as being the most popular in the world right now and according to glassdoor the wage for brand-new python developers in the united states is 64 000 if any of this sounds good to you well then let’s get started if you need to download python go to python.org downloads and click this amber download python button open when done check add python 3.9 or another version to path install now and then dedicate it a little it stays here that setup was successful so let’s close out of this our next gradation is to download an ide that’s an acronym for integrated development environment think of it as software that helps us write other software one ide that i recommend is pycharm you can find it at jetbrains.com pycharm go to download if you would like to pay for a professional version you can click this download button but since i don’t like to pay for things i’m going to use the free community version at this level we just have to follow the standard installation procedure click next you can pick a end folder but i’ll keep the default next if you would like a desktop shortcut then check this i would also recommend updating the route variable next install and then give it another minute or two then after finishing i have a desktop shortcut so i can precisely click on this to run pycharm let’s create a new activity identify such projects whatever you like i’m going to name this project hello world and i recommend not creating a main dot pi welcome script right now i’ll show you how to do that manually and let’s create if you are required a python file to work with this is how to create one go to file brand-new python file and i’m going to name this central and then click python file all right ladies and gentlemen we now have an empty python script that we can use to begin coding now if you checked this box create a main.pi welcome write and then formed a new campaign then your main python file will probably look a little something like this but that’s completely punishment we are able to merely delete this i don’t know about you guys but the font is very small for me so let’s vary that we can change that by going to file deep-seateds editor typeface and you can increase the font size let’s say 25 you can also change the font more what’s a good one uh how about that then sounds apply and okay much better we can actually see something to run a python script simply click the screen participate button in the area instead you can go to the pass tab and then go to run okay so this box that appeared at the bottom this is referred to as a terminal opening this will display any yield that your planned has and this boundary at the end process finished with depart system zero that merely means that there were no faults in this program so currently this program doesn’t is everything but let’s alter that let’s magazine something let’s periodical a send so to engrave a message to the terminal opening category book and then add a start of parentheses and then you can type a message but it has to be within mentions either double repeats or single excerpts it doesn’t matter so let’s must be considered a meaning i don’t know i love pizza then let me run this and in my terminal window it says i love pizza to engrave another wrinkle just add another print statement print and then your sense within mentions it’s really good and well what do you know it etched i love pizza it’s really good so ladies and gentlemen you only wrote your first python planned by the way you can change the typeface as well as the font emblazon of your terminal opening by going to file regulates then go to editor color scheme console font and console pigments let’s change the typeface let’s say i would like whatever this typeface is then click apply let’s change the font hue very by going to console dyes for any output you can click number two and select a color let’s say i would like bright lettuce that should be decent and for anything else let’s say this will be a dark color so i can just see it so then let’s click exert and okay oh yeah that’s much better well everybody that was your very first python program i’ll post any useful associations and timestamps for this video in the comment section down below but yeah welcome to coding with python hey you yeah i’m talking to you if you learned something new then facilitate me help you in three easy gradations by demolishing that like button slip specific comments down below and subscribe if you’d like to become a friend bro[ Music] you

For more info click here

Categories
Library

Scrolling Activated CSS3 Animation Tutorial (2 of 2)

hello Gary Simon design course calm today we are going to finish up our move located css3 livings by rating out some HTML CSS and then some jQuery and constituting everything just kind of animate and taken together as you scroll down the sheet alright so as ever I check out design course comm and subscribe here on youtube if you haven’t yet alright so let’s get started here basically we want to work within the body labels and the first thing we’re going to do is come over here and I need to move something out of the way all right there we go I basically we want to get the HTML for this portion right here so mostly it’s just going to be a single div label and then this in here so let me switch over to I have like a cluster of these windows open there we go okay so div and I’m going to do one second alright so ID we’re going to call this above the fold and I’m going to use an h1 for the entitle scrolling CSS animations with J query h1 and that very simple and then the next is a container for the actual portion that’s going to hold our three likeness so div class receptacle twelve now that’s a predefined class in our eleven forty CSS and so mostly it’s just it’s not really important to know exactly what that is for this tutorial we’re going to give it an ID of move so we can reference it and then inside we’re just going to have our three images so image source equals personas reduce telephone PNG we’re going to give an ID a phone and then just take this and copy it speed that two more epoches so phone and then we have the check and tablet do these and mimic those there we go so that’s all the HTML is very simple all right so save that and now we want to go into our vogue to CSS and actually get started with our first label which is above the bend alright so above the crease and inside of it we’re going to kept a background color so let’s go to photoshop and get that specific shade reproduce that down there glue that there the stature is one quick way the owning it is just getting out the rectangular pavilion implement simulate coalesce two restraint in its obstruct 759 there is a tool for that I never truly picked that up on that though but yeah I think it said 759 somewhere around there it’s not too important text – align Center and then the color of course we want the font to be white by default it’s black alright so let’s go ahead and open this up so let me doubled click on this all right so this is what we’re working with so far alright so what we want to do is change this to the appropriate font so let’s go back to style it’s going to be oops bleep that by coincidence we’re going to set h1 damn my hands are not in the chasten plight the keyboard typeface – family is source sans Pro font heavines is 300 and the typeface immensity we want to be a little bit big so 3e m and then padding top we’ll choose something like 325 pixels so let’s go back and refresh that and there we go pretty simple all right so now let’s focus on this area we sacrificed that a the Container 12 class and ID which was scroll so we need to push things down work with that a little bit all right so scroll margin-top we’ll try 200 pixels perimeter sole 200 or you could just do a single boundary call no big deal a text-align: center we want to get this thing centered up and then this invoke the actual personas so scroll IMG and we’re going to give them plight: relative all right so let’s refresh this alright so we text align we mean be centered and they are sentiment relative so if we performed them what we’ll do when you have a position relative basically allows them to overlap one another by exerting negative boundaries so you’ll see how that works somewhat simply so right now you know you fresh it good-for-nothing happens nothing’s animate so that’s where we’re going to start it on here so let’s I go ahead and create a class here we’re going to call animate and this is going to be the confusing nonsense if you’ve never certainly shambled around with this stuff so we’re going to framed transition to s 4 seconds simplicity hasten and dash out all right now when it comes to different browsers you have to add you have to like basically replicate this these a duet occasions so oops so you mostly from Mozilla you have – Mose then you have – WebKit and that are able to only rest assured that these all will work on multiple browsers patently the older browsers it’s not going to work at all because it doesn’t buoy animation but anyhow um so that’s our first thing that we need to add and then what we want to do is add WebKit – animation – Phil – mo that’s ridiculous for commands that constructs it stay on the last enclose paste that just doing what we did up there and then one more WebKit – animation – duration 1′ s all right and so then what we want to do we want to add phone dot animate and put in transform translate 5e M comma 0 alright so basically what this wants is it’s going to move it either up or down based your wherever it’s at from its default berth before this animate class gets added with jQuery so this is I basically the horizontal left to right and then this is top or bottom so we’re not going to have it move up or down we’re going to have it move over by five all right so of course we have to do the same thing as in the top section alright and go ahead and emulate that all right so this is tablet we’re not actually having the when you have the monitor moving that’s not going to be move at all because it’s in a midst but the invoice the tablet is alright so this is going to be this going to move over by negative 10 so that intends she’s going to move left or from left from right to left so is taking this imitate that alright so still if we look at the actual site we’ll see that you know nothing enlivens more and that’s where jQuery comes in so let’s come out here and get our write j/ s out and very first thing that we have to positioned which is what I throw in every jQuery document when you start out all the code goes inside this so if it examines confusing don’t worry really mostly it impels it implement whatever coding you need for jQuery so all right so what procreates this function we’re going to applied a opening ringlet perform incident all right and we’re going to close that right here with the semicolon and we’ll go inside of it we’re going to positioned var as a variable we’re declaring a variable y equals this oops scroll top and then here’s where we supplement our actual if testimony if Y is greater than or equal to 300 then inside here is what should happen so we’ll settled oh yeah the monitor is not animating so why okay so it would be phone compute class as in CSS class animate oops all right take this paste it and make this tablet and save it so now let’s see what happens I know it’s not going to be correct but let’s just refresh this all right that’s pretty good except this is behind that so the lane you choose that is with a CSS property announced Z and X so we have to find oh yeah I don’t think we put it there so it’s just phone Z index – there we go all right so now refresh this you’ll see that they come into place and if you wanted to you know maybe start a little later then what you do is change let me get this out of now perhaps – 400 there you go pretty simple so if you crave well responsive there’s some additional drive that it is necessary to do so you’ll see if we bringing this in we have some issues all right so here’s what we need to do to fix that mostly we need to scale those images down on the various viewport width so if we go to 1140 CSS we can come over here we’ll hear these media inquiries and it’s mostly saying that if the viewport extent is within 960 by the minimum thicknes it’s 960 in the max width it wicks that thicknes is 1160 then execute this CSS alright so the one that we want to concern ourselves with the first one is down now where it’s 768 in between 959 all right so I’m going to exactly look in off-screen because I once have the CSS when I did this previously so mostly what we need to do is adjust the width the width and the height of each of those so we’ll take the check firstly and we go to photoshop and we find the monitor yeah it’s right there go to image image size it’ll let in specify percentage over here if we make this down by I guess the 60% yeah it tells you what the new dimensions are 361 by 236 so that’s what we want to put in there so we need to do that for each of the other ones so let me get that out now I’m not getting the privilege window up there it is okay and what I’m going to do is just glue that in alright I once have this typed out and so you need to do that for the the actual tablet and the phone alright so I once typed this out or and you know what it is so I’m just going to paste these in here these are these values I time repeated that process three times just seeing what they are at 60% so if you save this and now we’ll drag this in and by the way if strike ensure transformation and I it’ll bring up this little developer tools here in chrome the person Firefox has the same thing I basically move this off-screen when I move this around it tells us our thicknes right here so the viewport diameter now if we refresh this you’ll see that it’s scaled down and it not works now we have to do this one more time though which is kind of frustrating but I if we come back here well let me take this up now and well actually I’m not going to copy that actually let me yeah it’s this one right here for max extent 767 so anything that’s within that is going to get executed here so I I basically did that same process with Photoshop except instead of being 60% I moved it 30 so these are these values for that so now everything’s a lot smaller now so let me get it down to a smaller viewport diameter try like around for 12 or so and you’ll see now that these encourage properly in there like fault you know over up and down now you really notice one issue is they animate too much because it’s smaller but it’s still kind of rendering everything I based on that translation that we did so what we can do to fix that is take our yeah this one right here I am I looking at here yeah these two copy those we’ll go back up to our first yeah right here merely underneath and adhesive those and this is where you can decrease the amount that they are basically moving over so three three and then for the tablet we’ll try maybe negative six and when I did this before the it wasn’t executing this so what I had to do is add important at the end of each one of these all right and then copy this take it down adhesive it in and these values are also slightly different one one one and negative three all right and save that all right so now we’ll see that it doesn’t no longer the you know it was going in a lot further and then we’ll come down here sorry my recording work stopped because I was running out of space but mostly yeah now this works correctly I at running viewport diameter so that will work on you know like a tablet or an actual smartphone check out this over here immense alright so that is it for this tutorial now you can know how to extremely you know you can get so much more elaborate you can happen even computed keyframes I which would enable you to basically control the animation through different stages throughout the length of the actual animation and then you can also do so many different types you can manufacture these develop in sizing you can flip them it is therefore really opens up the door to experiment but of course also you want to be kind of republican you don’t want to overdo the animation it can become some telephones and inventions lagging any of your computers if you’re overdoing it too much so I yeah just something to be wary of all right so I’m Garry Simon of design direction comm check out pattern direction if you haven’t yet and subscribe here of course on YouTube alright I’ll see you tomorrow you

For more info click here

Categories
Library

WordPress Tutorial: How to Add a Custom Header Image

Hi and welcome to WordPress.com. This video will show you how to add a tradition header persona to your website or blog. To begin, propel the Customizer by clicking on the Customize buttonon the front end, or, by clicking on My Sites, Customize next to Themes, to propel your website’s editing tools. There, look for the Header Image section. If you do not see this section, this means your current theme does not support the use of a custom-built header portrait. We’ll reveal you how to find a compatible theme at the end of the video. Click on Header Image to choosebetween your own images, or a selection of suggested likeness from your current theme. To upload a custom-made header, clickAdd New and you’ll be able to choose images from your site’s Media Library, or upload an portrait from your computer.Note that merely JPG, GIF, and PNG folders can be used. Once you’ve chosen an likenes, you can crop it to your penchant, or you can skip this stair if the size of the image fits your theme’s aspects previously. Hit the Save button at the top rightto apply the changes. The image shall be included immediately. To contemplate all themes that supportcustom headers, stay the topics showcase then check the Custom Header box. For more tips-off and ruses, see the WordPress.com funding place ..

For more info click here

Categories
Library

Creating a Python command plug-in – Part 1: Undo and redo

Procedural content generation can reduce the amount of time it takes to create unique scenes and complex visual effects. Custom Maya commands, which you can create as Python Plug-ins, are well-suited for creating procedural content. This series will show you how to create a fully undoable and redoable command with its own flags. The new command we’ll be writing will generate a swarm of particles inside a turbulence field. In this movie, we’ll focus on how to define the undo and redo behavior of this command. In the next part, we’ll cover how to define custom flags to control the number of particles, and the dimensions of the turbulence field. Before we explain any code, let’s look at how Maya processes commands. A command plug-in can be compared to a factory which produces worker robots.These robots can perform actions, and can answer some of Maya’s questions. In our case, we’ve registered the factory using the name “swarm”. Whenever we call “cmds.swarm()” within the Script Editor, we are telling our factory to produce one robot, or in programming terms: one “command instance” When this robot is created, Maya asks it if its actions are undoable, via the isUndoable() function. If the robot returns “true”, then Maya stacks it on top of all the previously created robots whose actions are also undoable.This way, if the robot’s actions need to be undone, Maya will know where to find it on this stack. If the robot’s actions are not undoable, then Maya won’t add it to this stack. A command instance is therefore added to Maya’s undo history only if its isUndoable() function returns “True”. Any command that changes the state of a Maya scene should be implemented as an undoable command. After determining if the robot’s actions are undoable, Maya tells the robot to start working by running its doIt() function. In our case, the robot will create a swarm of particles in the scene. If Maya needs to undo this work, it will call the robot’s undoIt() function. Similarly, Maya will call the robot’s redoIt() function if its actions need to be redone. Note that Maya only calls a robot’s doIt() function once during its entire lifetime. Any following redo actions are then performed by the robot’s redoIt() function. Now that we’ve covered some basic concepts related to Maya’s undo and redo system, let’s take a closer look at the swarmCommand_part1.py plug-in.If we continue to imagine the plug-in as a robot factory, the “SwarmCommand” class definition can be viewed as a template, or a mold, used to manufacture each robot. The SwarmCommand class’ __init__() function initializes the robot’s memory. An individual robot’s memory is known in programming terms as its “instance variables”. These instance variables are accessed in the code using the “self” prefix. A robot’s memory stores specific pieces of information such as: the robot’s unique name, or “instance name”, the number of particles it needs to create, an array of points to describe the position of each particle, the X, Y, and Z dimensions of the turbulence volume it needs to create, the unique names of the particle system and the turbulence field, and a MDagModifier object, which will help in the doIt(), redoIt() and undoIt() functions.We’ll get to this in a bit. We refer to instanceId, default_numParticles, and default_dimensions as “class variables”. These variables are bound to the mold which creates each robot. Class variables are accessed in the code using the class name as a prefix. In this case, the class name is “SwarmCommand”. Once the instance name is assigned, the instanceId class variable is incremented by 1 to ensure that the next robot will also be given a unique name.The SwarmCommand’s doIt(), redoIt() and undoIt() functions make use of the self.dagModifier instance variable. The assigned MDagModifier object can be seen as a queue of smaller actions, or as the robot’s “TODO” list. The robot performs its work by following this sequence of smaller actions. In the SwarmCommand’s doIt() function, we’ll use the MDagModifier’s commandToExecute() function to queue a sequence of MEL commands. These queued instructions will be executed when the robot calls the MDagModifier’s doIt() function.When Maya calls the SwarmCommand’s undoIt() function, the robot will call its MDagModifier’s undoIt() function to reverse the queued actions. Let’s look at the SwarmCommand’s doIt() function to better understand how to create a turbulence field and a particle system. Before creating the turbulence field, let’s have our robot clear the current selection list via OpenMaya.MGlobal.clearSelectionList(). This avoids grouping the turbulence field with any currently selected items in the scene. To create a turbulence field, we’ll add the “turbulence” MEL command to our robot’s TODO list via self.dagModifier.commandToExecute(). For a complete list of available MEL commands, consult the Technical Documentation section of the Maya User Guide. You can also examine the Script Editor’s output to see which MEL commands are used as you manipulate the Maya user interface.Use the “scale” MEL command to scale the turbulence field using the self.size_x, self.size_y, and self.size_z instance variables. Use the “setAttr” MEL command to change the turbulence field’s attributes. The values we’ve chosen mimic a swarm’s motion. Next, add the “particle” MEL command into the MDagModifier. This will create an empty particle system. Setting the particle system’s “conserve” attribute to 0.75 reduces the amount of momentum carried over by each particle between each solver step. Set the particle system’s particleRenderType attribute to 6 to display streaks instead of simple points. This accentuates each particle’s motion in the scene. Add the “connectDynamic” MEL command to the robot’s TODO list to connect the turbulence field to connect the turbulence field to the particle system using their unique names. By calling the MDagModifier’s doIt() function, the queued MEL commands are executed. This creates the turbulence field and the particle system in the scene. At this point in the code, the robot hasn’t actually added any particles into the particle system.In fact, you can view this particle system as an empty container into which the robot will be adding new particles. The robot needs a reference to the particle system to properly assign these particles. This reference comes in the form of a MDagPath object, which describes the particle system’s path in the scene graph. In Maya, the scene graph is referred to as the DAG, short for Directed Acyclic Graph The robot uses the helper function self.getDagPathToObject(), which we’ve already coded, to obtain the MDagPath of the particle system based on the shape’s name. The robot constructs a particle system function set around this MDagPath object to manipulate the underlying Maya object. Now, for each particle, the robot will need to pick three random numbers between the lowest and highest values of the turbulence field’s X, Y, and Z dimensions We use the Python built-in “random” module to pick a uniformly random value between any two numbers. This uniform distribution provides an even spread of particles within the turbulence field.Now that the particle positions have been determined, the robot calls the MFnParticleSystem’s emit() function to add these particles into the scene. The robot then calls the MFnPaticleSystem’s saveInitialState() function to save the original particle positions. Recall that Maya can instruct the robot to reverse its actions by calling its undoIt() function. Here, the robot reverses its own actions on its TODO list by calling self.dagModifier.undoIt(). Note that the objects which were created by the MDagModifier are not deleted at this step, but are rather excluded from the scene. If Maya calls the robot’s redoIt() function, the robot will call self.dagModifier.doIt() to re-execute the actions queued on its TODO list. This re-integrates the previously excluded objects back into the scene. These objects had already been configured when the robot’s doIt() function was called. Therefore, the particles don’t have to be re-emitted in the particle system. It’s worth noting that simply calling self.dagModifier.undoIt() and self.dagModifier.doIt() may not be sufficient for implementations of more complex commands.For example, you may need to explicitly re-parent some objects every time the command needs to be undone or re-done. To use this command plug-in, save the swarmCommand_part1.py file in your Maya version’s plug-ins directory. Open Maya, and load the plug-in using the Plug-in Manager. Open the Script Editor, and in the Python tab, type the following lines: “import maya.cmds as cmds” and on the next line: “cmds.swarm()” Save this Python script to your current shelf, and name it “Swarm”. Click on the new “Swarm” icon on your shelf to execute the swarm command. Set the playback range’s end time to 1200 frames, and press Play to see the buzzing swarm of particles in action. Stop the animation, then open the Outliner and select both the particle system and the turbulence field. Move these objects elsewhere in the scene.Click on the swarm icon again to produce another particle system and turbulence field. In the Outliner, notice how these new objects are named differently compared to the first pair of objects created. Click anywhere in the Workspace, and press Ctrl+Z repeatedly to undo all the swarm commands. Once the swarm commands are undone, press Ctrl+Y to redo all these actions. Observe that these particle swarms disappear and re-appear in the same order and configuration as when they were created. You should now have a good idea of how to create a fully undoable and redoable Maya command plug-in with Python. In the next movie, we will refine this plug-in by defining custom flags to control the number of particles and the dimensions of the turbulence field. to control the number of particles and the dimensions of the turbulence field..

For more info click here

Categories
Library

HTML5 and CSS3 beginners tutorial 2 – creating our first web page

hey YouTube how’s it going it’s Quinton here and welcome back to tutorial number two and in this tutorial we are finally going to start writing our first web page so the first thing we have to do is actually save an HTML file so I’m going to go ahead and clink save and I’ve already got a specific place on my computer where I want to save mine but you guys can save yours where you are require okay so merely to keep everything tidy I’ve got an html5 lessons folder and I’m going to say tutorial one in there okay and because this is our first web page let’s say that this is our home page and whenever you name your home page or whenever you save your home page you need to save it as index fleck HTML okay and if you guys want to make sure that it saves accurately as an HTML file you are able to just go ahead on this drop-down list and look for HTML which is over the hypertext markup communication okay so that’s what HTML stands for is hypertext markup language so let’s go ahead and save this now and boom okay we’ve got our first network or our first HTML file now because hTML is a markup language what that means is that everything is written in these things announced labels okay and some people call them elements now a label ogles something like this so you go ahead and you type in the smaller than signaling and the greater than sign and then you type in whatever the labels called is so let’s say for instance we had a tag that was announced tag now this isn’t actually a real tag but you know just for the purposes of explaining that’s pretty much what a tag was like and we frequently have two of these labels we are therefore typically have an opening tag and then a closing label and the only difference being that a closing label has that forward slash before the label list okay and what these tags would then do is mock up some chip of textbook in between yeah so let’s say I had some textbook here then these calls would be telling the browser how to show this textbook on the screen okay so they basically mark up these calls mark up this textbook that’s what they’re there for and we also get single calls in HTML so we can also go ahead and they’d look like this like tag but then there’d be a closing slash before the end of the tag so we’ve got single tags and then we’ve got double labels which you experienced just now okay but those aren’t real calls so I’m going to go ahead and delete those and we can get started with writing some real HTML code okay and the first thing we have to do whenever we start writing a web page is start off with something called the doctype tag and what that does is declare what doctype we are using what so mostly what version of HTML we are using okay and because we’re use html5 then we go ahead and we type in ejaculation label doctype I always set mine as all uppercase but I think it toils penalize as lowercase as well and then I go ahead and I type in the word HTML okay now with previous editions with previous accounts not different versions of HTML okay we used to have to type like some genuinely long doctype components in now but with html5 all we have to do is type doctype HTML and we’re done okay so that is our doctype said and our browser now knows that is looking at a html5 document so now that we’ve got that on our sheet the next thing we have to do is actually tell the browser where our HTML starts and resolves so the mode we do that is by putting in another HTML tag so HTML and as you can see this one turns blue and most of our HTML tags are all going to turn off-color from now on okay so that is where our HTML starts and then we also have to lay in an aiming HTML tag so I’m going to go ahead and mission pit off over there okay and this is known to most people as the beginning component okay because all the other HTML code that we’re going to type in goes in between these two labels okay so you’re not going to give any HTML outside of these two labels okay and that is why it’s called the root element because everything has its root in that a in that tag so the first two labels that we’re going to put in this HTML tag actually subdivided our website or our web page into two different sections okay so the first one is called the head and we have to go ahead and dissolve that off as well and then the next place is called the body and culminating figure so if I only move my mouse so you guys can see okay now what we’ve done is we’ve split this HTML into two different sections so we’ve got our chief and then we’ve got our person okay and I like to indent my system so as you can see there’s a bit of a there’s a invoice actually a tab seat and basically that really concludes my system watch a lot tidier it’ll likewise work if you have everything pushed up against the side as well it’s not going to draw your system not work but it does search a lot more tidy to have everything neatly indented like this so I “re going to tell” exactly where my head starts and expirations and exactly where my figure starts and intent okay so now we’ve fractioned our webpage into the two different sections but we’ve done that for a reasonablenes because inside the head okay this is where all of our background information for the website is going to go so it’s stuff that maybe the user doesn’t actually insure on the website but it’s just there to help the website work it’s kind of like the abilities behind the website so the one of the things that we can put in our leader is called the title and if I can spell it right name and intention entitlement and what this does is like display the little bit of verse at the top of the browser in the top of the tab okay so let’s go ahead and just threw this is my first web page and I predict we can just leave the typos for now okay and the body that is where all of the stuff that the user is going to see has to go okay so basically if I just go ahead and I type in some textbook or actually let’s kind in this yeah let’s just type I’m in the body so I’m in the body okay and if we save this now and we run this in Firefox what we’ve done is we’ve just organized our first web page and as you can see I’m in the body is displayed in the part of the website that the user is going to be looking at and then our deed is actually up here in the invoice for Firefox and it says this is my firstly facilitate web page because of all my typos so that’s pretty much how all of that works but there’s one last-place thing I want to mention to you guys and that is inside of our front we also have to include another call which is a major tag and you guys might not understand all of this just yet but it’ll probably make sense to you guys later on in the line so just go ahead and kind this for now and I’m going to go ahead and nature the word char cause equals utf-8 okay I’m going to end that off with a trounce because this is going to be a single tag now like I said you guys might not understand what all of this does just yet but it’s mostly there to include any additional references that aren’t on our normal keyboard so most of us are going to be using a ordinary keyboard where we’re going to only have words like from the normal alphabet but this will include like extra epitomizes that actually like they’re not even on your keyboard so the majority of members of us probably won’t even use that but you guys time have to have this otherwise this is not going to be a valid HTML document so like I said it doesn’t matter make sense but you need to include it on every single page so so that’s all I have for you guys in this tutorial and as ever don’t forget to subscribe please feel free to leave a comment give the video a thumbs up or share the video it’s really going to help my channel proliferate so thank you very much and I’ll see you guys next time

For more info click here