Learnit Training
« Back to all themes

Software Development Training

Below you can find an overview of our trainings regarding the creation and development of software. Whether it concerns different parts of Java, Oracle or learning programming in PHP or C++: Learnit offers all these trainings tailor-made and both individually and for large groups (also Incompany).

Classical

Course nameDuration
































E-Learning

Course nameDuration





Link

Webscraping with Python: data at your fingertips

Iedereen maakt er wel eens gebruik van: websites waarbij je verschillende producten of diensten met elkaar kan vergelijken. Wil je een hotel boeken? Klik de aankomstdatum aan en vul de bestemming in op een site als expedia.nl die verschillende hotels en prijzen van aanbieders met elkaar vergelijkt. Op zoek naar nieuwe sneakers? Typ sneakers in op beslist.nl en vul bijvoorbeeld in welke maat je hebt en naar wat voor kleur sneakers je op zoek bent. Op deze manier ben jij in staat om jouw perfecte sneakers te vinden. Handig toch! De techniek die het mogelijk maakt om op deze snelle manier te zoeken, wordt ook wel webscraping genoemd.

What is webscraping?

Webscraping stelt mensen in staat om belangrijke gegevens van een site te halen of maakt het mogelijk om te zoeken naar bepaalde kenmerken op een website. Naar keuze kunnen gegevens automatisch en periodiek opgehaald of opgeslagen worden. Websitebeheerders kunnen gebruik maken van verschillende programmeertalen om webscraping mogelijk te maken, waaronder Python. De module ‘Beautiful Soup’ is erg handig voor webscraping, en ‘numphy’ en ‘pandas’ maken het analyseren een stuk gemakkelijker. Webscraping zorgt ervoor dat bezoekers van bijvoorbeeld een vergelijkingswebsite gemakkelijk en snel de informatie kunnen vinden die zij nodig hebben. Handig dus voor websites als expedia.nl, die eigenlijk gewoon slim gebruik weten te maken van de gegevens en informatie van andere websites. Expedia trekt als het ware klanten doordat het bedrijf in staat is om gegevens van andere websites op een slimme manier te bundelen en zo te weergeven dat de pagina aantrekkelijk is voor consumenten die op zoek zijn naar een hotel.

Advantages webscraping

The most important advantages of webscraping at a glance:

  • Automatically retrieve important data from a website
  • Eenvoudige manier om meer inzichten te krijgen in door middel van data-analyse
  • Easily and quickly store usable data

In short: webscraping is useful for anyone who wants to learn how to get the most out of processing data from your own website!

Webinar en Training Python

Ben jij geïnteresseerd in webscraping en wil jij hier een korte introductie webinar over volgen? Klik dan hier om het afgelopen webinar van expert-trainer André terug te kijken via ons YouTube kanaal. Wist je dat Learnit naast webinars ook diverse trainingen in Python aanbiedt op verschillende niveaus? Wanneer je nog geen tot weinig ervaring hebt met Python is onze training Python programmeren basis echt iets voor jou. In deze driedaagse training maak je kennis met de basisbegrippen en functies in Python. Heb je al ervaring met programmeren in Python? Dan is de training Python programmeren vervolg iets voor jou! Om ons volledige overzicht met trainingen met betrekking tot Python te bekijken, klik hier.

Link

What exactly does the RET method involve?

Vaak zijn het niet de gebeurtenissen zelf die ons van streek maken, maar de manier waarop we over deze gebeurtenissen nadenken en de manier waarop we daarmee omgaan. De RET-methodiek van psycholoog Albert Ellis is speciaal gericht op het leren omgaan met deze belemmerende gedachten over gebeurtenissen. De gedachte achter deze methodiek is dat iedereen met behulp van het zogenoemde ABC-schema en met een stappenplan, zelfverzekerder in zijn schoenen komt te staan, met als gevolg dat je flexibeler met gebeurtenissen om weet te gaan en dat je besluitvaardiger op weet te treden wanneer dit nodig is. Merk je zelf dat je vaak aan het piekeren bent of uren wakker kunt liggen als er een belangrijk besluit zit aan te komen? Lees dan deze blog en kom erachter of de RET-methode zinvol kan zijn voor jou!

What does RET stand for?

The abbreviation RET stands for Rational Emotive Therapy. Central to the RET method is the relationship between thinking and emotions. The ultimate goal of applying this method is to make people more resilient to stressful situations. For example, the method focuses on converting ineffective thoughts and feelings into thoughts and feelings that actually work in a situation that could normally cause stress. To achieve this it is important that you gain insight into how your body and mind work, so you can better understand your own behaviour. Of course this sounds great, but how do you get it done?

The ABC scheme of RET

The ABC scheme of RET involves an event or trigger for a particular situation (A) about which you have thoughts (B) and these thoughts then have consequences for your own behaviour (C). Note that it is important to realise that the RET method assumes that the thoughts (B) are the cause of your behaviour (C) and therefore not that a certain event (A) is the cause of your ultimate behaviour (C). In other words, C is explained by B. Using the ABC-scheme you can then focus on changing your own behaviour with the help of eight different steps. Are you curious about these steps? Then take a look at our training RET: stop worrying, in which these steps are extensively discussed.

For whom is the RET method useful?

Do you doubt whether the RET method can be useful for you? Then take a look at the character sketches below to find out if this method is for you:

  • The perfectionist. Thoughts that often come to mind for a perfectionist are: "I'm not allowed to make mistakes", or, "I'm failing because I could have done better".
  • The Disaster Deranger. Disaster people are people who often have the idea and sometimes even express the idea that they won't succeed or that they won't finish something in time.
  • The love addict. This type of person always wants to be liked by everyone and everything and therefore finds it hard to set boundaries.
  • The spoiled brat. This refers to people who are used to everything going well. When this does not turn out to be the case, they get stressed out.

Do you not recognise yourself in the character sketches above? Then the RET method may also be valuable to you! Watch the training below to find out more about this method.

RET Training

Do you think, after reading this blog, that the RET method might be a solution for your own stress and fretting? Then take a look at our training RET: stop worrying. This training will not only provide you with knowledge about the RET method, but you will also immediately start practising cases. This will enable you to be more self-assured, flexible and decisive after the training! Click here to read more about the training or to register directly. link]

Top 10 most popular programming languages

Late last year, a list of the most popular programming languages of 2020 was announced. Not entirely surprisingly, C as ultimate favorite was still on top of TIOBE's index. This year, Python did manage to surprise us: for the first time in history, Python overtook Java and we find Python on place 2 and Java on place 3 in the top 10. Besides Python, also R, Perl and Go are gaining popularity. R even ended on a surprising 9th place in the top 10 list; TIOBE therefore appointed R as 'programming language of the year 2020'.

Why is Python gaining popularity?

The CEO of TIOBE's INDEX Paul Jansen said about Python catching up with Java: "Some time ago I had a flat tire and called the road patrol to help me out. The mechanic asked about my living and when I used the word 'software' in my answer, he smiled and started talking very enthusiastically about his own passion: programming in Python. From that moment on, I knew Python would become ubiquitous." Whereas ten years ago it was mainly software engineers who were concerned with the various programming languages, nowadays you see that more and more people in the workplace have programming skills. This has everything to do with the fact that there is a shortage of classical programmers. Moreover, a programming language such as Python is relatively easy to use when you want to work with large amounts of data. Do you want to work with data yourself, but do you have little or no knowledge of a programming language? Then take a look at our courses Python programming basics or Python for data analysis. Do you already have a fair knowledge of Python? Then the course Python programming continuation course is really something for you!

Why is "R" gaining popularity?

Big data is a term that most people will have heard before. Programs such as R are ideal for converting these so-called big data into useful information for organisations, and R is also a lot easier to use than a language such as 'C'. For example, did you know that R is one of the programming languages that was used to find a COVID-19 vaccine? In addition, you can see that universities and colleges are increasingly exchanging static programs such as Stata, SAS and SPSS for static programming languages like R. Professional groups in which static analyses occur are also increasingly using R. Think for example of data analysts, mathematicians, econometricians but also marketers. The advantage of a program like R is that it costs nothing: it is an open source project that anyone can use and improve. In addition, R is known for the fact that you can easily visualise data with packages such as 'ggplot2', with which you can make a graph, for example.

Link

That's how you give good advice!

The extent to which your advice is understood, accepted and used depends to a large extent on how you yourself deliver the advice. As an advisor you are undoubtedly the specialist in your field, but how do you convince other people of your knowledge and skills? With the tips in this blog you can take your consulting skills to the next level!

  • Timing. Try to empathize with the person(s) for whom your advice is intended. Think about the place and time when you give the advice. Do you happen to know that someone has a busy week and that they are stressed? Maybe then it would be a better idea to wait with your advice.

  • Organizational ability. Don't forget that you are the specialist and try to radiate this as well. If you want to appear professional, it is best to make sure that your affairs are always in order. Make sure you don't arrive too late and don't forget any important appointments or documents.
  • Ability to analyze. Good advice can only be given after you have collected and analyzed all the necessary information. That is why you should always talk to the client first. Listen to the client but also ask specific questions. It is important to be aware of the situation so that you can give specific advice.
  • Think ahead. Advice is changeable. If you want to become or remain a good advisor, it is important to keep your eyes and ears open. Does something change within your field of expertise? Are there things that need to be taken into account in the future? As an advisor it is important that you are aware of the new trends and developments in your field.
  • Communicate. The way of communicating plays a major role if you want your advice to be taken to heart. Therefore, pay close attention to what kind of person or organisation you are dealing with, and try to attune your way of communicating to this. Also make sure that the client for whom the advice is intended feels comfortable with you. For example, ask whether that person would like to raise something for the counselling interview, or offer something to drink during the interview.
  • Do you want to improve your own consulting skills? Then take a look at our three-day training Consultancy skills and learn to communicate your advice as convincingly as possible, with results! In addition, develop your own personal advice style with the help of a Learnit trainer.

    Link

    Practical examples of the Python programming language

    In his previous blog trainer André showed that the Python programming language is used all around us. From the photos taken by telescopes to Netflix and Dropbox, Python often plays an important role. In this blog André will show by means of examples how you can use Python in practice.

    Excel

    Modify data in an excel file, add new columns, detect a trend in a series of data, extract errors from data and fill in missing data. You can do all this very easily and quickly with a Python program. In addition, you can save the settings so you can easily reuse it in the same way.

    Python packages

    Millions of people around the world use Python, a free language with many packages. For fast and efficient data editing, the packages numpy, pandas and pyplot are important. With numpy you can quickly edit data, pandas is very suitable for editing tables and with pyplot you can create graphs of the data.

    Imagine that a long list of numbers has to be multiplied by a number. You do that in numpy as shown below.

    You don't have to multiply every number by 20. It happens all at once.

    As you can see below, you can also easily add up lists of numbers.

    With pandas you can extract data from an excel file, edit it and write it back again. Let's take as an example a small excel file with profit and loss points in a competition.

    We read this data with pandas.

    Then we add up the points with pandas.

    After this we can write data back to the excel file.

    The file looks like this now.

    In the last example you can see that it is also easy to make a graph of the table.

    The conclusion we can draw from these examples is that you can use Python in many ways to make your work a lot easier. The examples are of course only a small part of the different possibilities Python offers.

    Has this blog aroused your interest? Then take a look back at the free webinar of 16 January. André discussed in half an hour how easy it is to use Python in practice. Look him back here!

    Link

    Python is everywhere

    In his previous blog trainer André showed that in Python you can quickly create a program that does useful things: read and analyse a file, edit data and then make a graph of it. In this blog the trainer shows where Python is used.

    Black hole

    The picture above shows a black hole. The image was created by eight telescopes – scattered throughout the world during seventh days in 2017. The telescopes received data from a black hole that was removed from us at 55 million light years.

    In the processing of those dates, Python came to look around the corner. Freely accessible and available modules of the programming language, such as Numpy and pandas helped to display the black hole. Click here for more information.

    Netflix

    Also streaming service Netflix uses Python. The company uses the programming language to improve the streaming of videos. Python captures which network equipment is active. As a result, the language registers changes in the network, to analyse whether a device is functioning properly.

    Furthermore, the streaming service uses Python to ensure that the geographical storage of content is organized in such a way that a video is available to a user as quickly as possible. In this techblog about Netflix you will find more applications for which Python is used.

    Dropbox

    The popular Dropbox tool uses Python for almost all its features: storage, sharing, Synchronisiatie, permission management and more. The company bought in 2012 Guido van Rossum, creator of Python, away at Google. As a result, Dropbox has since been the best conceivable support in the field of Python.

    Frameworks

    For Python, several webframeworks have been written. One of the most popular is Django. This framework, originally written for a well-known American newspaper, has become a universally applicable framework.

    With Django you simply create a website. Python makes it easy to write code rules and Django will make sure you get structure without much effort. This allows you to maintain your website and expand it for example.

    Screenshot of www.nationalgeographic.com, a website built with Django.

    A very eye-catching application of Python is the contribution that the programming language has to artificial intelligence (AI). Google is very active in the field of AI and uses Python to control the AI network.

    The Python package developed by the company is called Pytorch. Setting up an AI network is not easy. Many other ways of setting up such a network make it necessary to pre-record a large amount of data. Pytorch allows you to set up the network while creating the AI.

    In short: More and more companies and organizations use Python, because the language is easy to learn and because there are many modules for Python available to do what they consider important. So if you're interested in your own future, you'll be immersed in Python.

    Free webinar

    André gave a webinar on Python on 16 July 2019. "I'm going to show how easy Python is to use," said the trainer. Look at him back here.

    Link

    Python: The language for everyone

    Python is een programmeertaal waarin iedereen snel kan leren programmeren. Met deze taal kun je relatief simpel een klein programmaatje te maken, een website ontwikkelen, of een applicatie maken. Python wordt ook veel gebruikt voor kunstmatige intelligentie, of voor het analyseren van data. Kortom Python is overal.

    It makes sense to know that Python was conceived in 1989 by a Dutchman, Guido van Rossum. Van Rossum worked at the Centre for Mathematics and Informatics in Amsterdam and wanted to write programs in a simple way for a project that was carried out at the Institute.

    Growing interest

    Although the language was initially only used by a handful of people, the interest increased rapidly. By the expert guidance of Van Rossum the use was only increased. The Dutch polder mentality has ensured that the Python user group is friendly and open, for anyone who wants to work with Python.

    Currently, there are thousands of Python files, called modules, that allow the user to write the software he needs. So it's easy in Python to open a text file, to count what words appear in it and how often. Then, in a few Python phrases, the user can extract the most common words and create a chart of them.

    Analyzing with Python

    Also downloading data from a website can be done in a few Python rules. Python is widely used for data analysis. For example, a company wants to make an analysis of the usefulness of the ads it places on different local media.

    To do this, a link must be made between the area where the media appears and the sales in the shops there on the spot. Also now Python can help. In a few lines there is an analysis, and if you want also graphs. If it is useful to put the data in an EXCEL spreadsheet, it costs only one Python rules.

    Also for scientific arithmetic and artificial intelligence much use is made of Python. All artificial intelligence platforms are designed to be used by Python and because the language is so easy to learn, many scientists and engineers use it.

    The company Tiobe keeps track of which language is widely used. In This ranking, Python is in third place. Most likely Python is going to rise even further.

    De conclusie is dat wanneer je programmeren nodig hebt in je baan, Python de taal is om te leren. In een paar dagen tijd kun je al kleine, maar nuttige programma's schrijven om bijvoorbeeld website data te analyseren of om het gebruik van netwerk apparatuur te monitoren. [link]

    You can learn programming!

    Visit any vacancy site and you will see it immediately: there is an unprecedented demand for programmers. If you are looking for a paid job with excellent perspectives for the future, learning programming is a must. Even for jobs in which you don't directly program yourself, a programming language is an excellent addition to your CV. However, there are numerous programming languages, so where can you start best now? And which languages are interesting for the future? We made an overview of the 10 most important programming languages. Languages where you can also directly follow a training course: let those jobs come!

    Java

    Java was for years the most-requested programming language for employers. Although this has recently been outpaced by SQL, it is still very popular. Java is the standard for many enterprise software, is used by more than 9 million developers and is used to control more than 7 billion (!) devices worldwide. Its popularity owes the programming language mainly to the simplicity and readability of the code, which makes it a good starting point for novice programmers. Also, one of the basics of Java is the compatibility that ensures that older applications continue to work.

    SQL

    You'll find SQL everywhere. Database technologies like MySQL, PostgreSQL and Microsoft SQL Keep banks, universities, hospitals, small and large companies running. It is not exaggerated to say that every computer and person with access to technology somehow comes into contact with SQL. For example, iOS and Android devices have access to SQLite, a SQL database, and numerous mobile applications that use SQL directly.

    C

    C originates from the early years 70, when it was developed as a generic, general programming language. As one of the oldest programming languages available, C gives us the building blocks for other popular languages such as C++, Java, JavaScript and Python. C itself is mainly used for operating systems and industrial applications.

    C++

    C is an object-oriented programming language based on C. Since the language in the years 80 was developed it has been used to develop Adobe and Microsoft applications, MongoDB databases and large portions of Mac OS/X operating system. It is considered by many to be the best programming language to learn for applications where performance is of great importance, such as games or audio/videobewerking.

    iOS/Objective C/Swift

    Until 2014, objective C was the programming language used by the Apple operating system. It plays a role in Apple's OS X, iOS and its Apis. For a long time it was the language in which you had to write iPhone applications as a programmer, until Apple came up with its own programming language a few years ago: Swift. Swift seems to be very much like C++ and its predecessor objective C, but it is easier for most programmers to learn.

    Javascript

    JavaScript – not to be confused with Java – is widely used to add interactivity to websites and is supported by all larger internet browsers. Not only can it be used for simple functionality like popups or simple games, it also forms the basis for Node. JS – A server technology that is widely used in real-time communication.

    PHP

    PHP was in fact never meant as a programming language. The Danish-Canadian programmer Rasmus Lerdorf developed PHP in 1994 as a series of tools that enabled him to manage his personal website (Personal homepage). Today we changed the meaning of the abbreviation to Hyper test Pre-Processor and used the language on servers to dynamically generate HTML websites. PHP is easy to learn, but in addition possesses much advanced functionality that is of great value for experienced programmers.

    HTML/CSS

    HTML forms the basis for Web pages. This does the programming language by actually setting a structure that can be extended or modified by other languages. For example, JavaScript can be used to add advanced interactivity, and CSS influences the presentation, formatting, and layout of Web pages. Although PHP can generate HTML from a server, knowledge of HTML and CSS for Web developers is an absolute must.

    Python

    Python is a server-side programming language for websites and mobile applications. It is a relatively easy language to learn, thanks to the readability and brevity of the code. In Python, it is often possible to express a concept in less rules than in many other languages. Python is used in applications such as Insta gram and Pinterest in the form of the Web-framework Django. Google, Yahoo! and NASA all make use of Python.

    Ruby

    Ruby is – like Python – a programming language that is very user-friendly for novice programmers. At the same time, the object-oriented language is very dynamic and thus popular for developing websites and mobile apps. It is the basis of the Ruby on Rails framework used by Groupon, Shopify, Scribd and GitHub.

    Fill in the list!

    Of course there are many more programming languages. We've just put a few of the most popular for you. Do you have additions? Are you missing a language that you really often use? Share your knowledge and experience with us!

    Learning A (different) programming language yourself?

    Wil je zelf een (andere) programmeertaal leren? Ontdek dan snel onze workshops en cursussen. Je leert onder begeleiding van een ervaren trainer op efficiënte wijze de basis van programmeren. Ben je al wat verder? Dan is het mogelijk om je in te schrijven voor een training voor gevorderden. Je gaat dan dieper in de op de materie. Zo’n training is niet alleen leuk, maar ze sluit ook goed aan op de praktijk. Zo weet je zeker dat je met je nieuwe kennis en vaardigheden direct wat kunt doen!

    Link

    Export SQL database to CSV

    With PHP you can easily provide information from your database to your visitors in a CSV file. CSV (Comma separated values) is a simple format that separates each value with a comma. It is open with Excel, after which you can leave data analyses on or make graphs of them.

    We will write a PHP script that retrieves results from our database and converts it into a CSV file. In our case the results of course exams.

    The first step is to retrieve the data from the database. We use PDO (5 reasons to USE PDO WITH SQL databases).

    $db_user = 'learnit';
    $db_pass = 'geheim';
    $db_name = 'uitslagen';
    $db_host = 'localhost';
    
    try {
        $db = new PDO("mysql:host=$db_host;dbname=$db_name;charset=utf8", 
                      $db_user, 
                      $db_pass, 
                      // Als een error optreed moet PDO een exception gooien
                      array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
    	$query = "SELECT id, naam, email, resultaat FROM Uitslagen";
    	$pds = $db->query($query); 
    } catch(PDOException $ex) {
        echo "An Error occured: " . $ex->getMessage(); 
    	exit();
    }	
    

    Here We use a try-catch to capture exceptions that can occur with a verbindingprobleem. The result of the query is a PDOStatement Object. Here we can take the records out, but first we have to prepare:

    Header (' Content-Type: text/csv ');
    Header (' Content-Disposition: attachment; filename = ' results. csv ');
    

    Using the header function, we adapt the HTTP header. We want the visitor to download the file directly. We do this by specifying in the header that it is a CSV file and that it is called "results. csv".

    Now opening the standard output we can write the CSV file itself:

    $fp = fopen (' php://output ', ' W ');
    Fputs ($fp, Chr (0xEF). chr (0xBB). Chr (0xBF));
    

    In The CSV file we want to use the UTF-8 encoding. To ensure that Excel recognizes that this is a UTF-8 encoding, the CSV tooth should start with 0xEF, 0xBB, 0xBF.

    Now we can add the first line to the CSV file. It contains the headings of the data:

    Fputs ($fp, "ID, name, email, resultaat\r\n");
    

    The \r\n The end of the string indicates a line break. If we did not add the following data would be pasted instead of a new line. Note: This only works in strings with double quotes.

    The next loop is repeated as long as records can be fetched. This converts the data into the CSV file.

    
    while($uitslag = $pds->fetch(PDO::FETCH_ASSOC)) {
    	fputcsv ($fp, $uitslag, ','); 
    }
    

    When writing to the file we are helped by the fputcsv() Function. This writes the array to the CSV file. The third argument of this function is the separator character. In Place of the comma (,) we could also use a different separator, for example the semicolon (;). To complete the whole, we neatly close the file:

    Fclose ($fp);
    

    The entire script:

     PDO::ERRMODE_EXCEPTION)
                      );
    	$query = "SELECT id, naam, email, resultaat FROM Uitslagen";
    	$pds = $db->query($query); 
    } catch(PDOException $ex) {
       	echo "An Error occured: " . $ex->getMessage(); 
    	exit();
    }	
    
    header('Content-Type: text/csv' );
    header('Content-Disposition: attachment; filename="uitslagen.csv"');
    
    $fp = fopen('php://output', 'w');	
    fputs($fp, chr(0xEF) . chr(0xBB) . chr(0xBF) );
    fputs($fp, "id, naam, email, resultaat\r\n");
    while($uitslag = $pds->fetch(PDO::FETCH_ASSOC)) {
    	fputcsv ($fp, $uitslag, ','); 
    }
    fclose($fp);
    ?>
    

    Training SQL Basic

    Are you interested in learning this programming language? Discover with an SQL training data that has previously been hidden from you. In our two-day SQL Basic training you will learn all the important ins and outs of SQL!

    Link

    SQL - tips for the WHERE command!

    When selecting data from a database, you often need to compose a filter. Here are 5 tips to avoid common mistakes when filtering with WHERE.

    You can also try out all the examples on sqlfiddle.com with the results database.

    Tip 1

    If you filter by text, it must be placed between some quotes. But it can, of course, occur that the searched text itself contains a quote. You can "escape" by typing two instead of one quote. The quote that is geëscaped is no longer seen as a closing, but as part of the text. The query to find all students from The The Hague looks like this:

    SELECT
    FROM Results
    WHERE place = ' ' The Hague ';
    

    Tip 2

    It remains difficult not to use the comma as a decimal separator anywhere in the world. This creates confusion for our Dutch people. The ANSI standard of SQL has been chosen for the U.S. number format. In queries, decimals must ALWAYS be quoted with a point.

    SELECT
    FROM Results
    WHERE Result > = 8.5
    

    Don't be confused if you see a comma in the result, the comma has a different meaning in a query.

    Tip 3

    It is possible to combine multiple filter conditions, for example by AND As a OR To use:

    SELECT
    FROM Results
    WHERE place = ' Amsterdam ' OR place = ' ' The Hague ' 
            AND Showing > = 8.5
    

    There is a snag here: conditions are not combined from left to right. The AND Operator binds stronger than the OR. Our sample query results in:

    • Alle studenten uit Amsterdam;
    • Alle studenten uit 's-Gravenhage met resultaat van minimaal 8,5.

    But that was not what we had in mind, we only wanted to see the students from The The Hague and Amsterdam who scored at least a 8.5. We now also see students from Amsterdam who score less than a 8.5. Fortunately this is easy to solve by using parentheses:

    SELECT
    FROM Results
    WHERE (place = ' Amsterdam ' OR place = ' ' The Hague ') 
            AND Showing > = 8.5
    

    Tip 4

    Showing all students with a digit in the range 8.5 through 9 can use the following query:

    SELECT *
    FROM Results
    WHERE result >= 8.5 AND result <=9
    

    However, a separate keyword is also available for selecting a range. The keyword BETWEEN Makes the query a little shorter. It can be used in the following way:

    SELECT
    FROM Results
    WHERE result BETWEEN 8.5 AND 9
    

    But beware, the keyword BETWEEN may cause confusion; Our Dutch BETWEEN Often translated with ' between '. However, the figures with limit values, in our example 8.5 and 9, are also shown in the result. A better translation of BETWEEN Is ' from... To '.

    Tip 5

    To make queries more compact, you can sometimes use the IN Keyword. For example, to show all students from Amsterdam, Rotterdam and The The Hague:

    SELECT
    FROM Results
    WHERE place = ' Amsterdam ' OR 
            Place = ' Rotterdam ' OR 
            Place = ' ' The Hague '
    

    This can also be the case:

    SELECT
    FROM Results
    WHERE TO Place (' Amsterdam ', ' Rotterdam ', ' ' The Hague ')
    

    The last notation is not only much shorter, but also much easier to expand.

    Training SQL Basic

    Are you interested in learning this programming language? Discover with an SQL training data that has previously been hidden from you. In our two-day SQL Basic training you will learn all the important ins and outs of SQL!

    Link

    Save visitor passwords securely with PHP? Use Hashing!

    Regelmatig lees je in de krant of op het internet dat wachtwoorden van internet gebruikers op straat liggen, en dat terwijl makers van website dit op een eenvoudige manier kunnen voorkomen. Kom erachter hoe je diefstal van wachtwoorden kan voorkomen door deze blog te lezen!

    What is the danger?

    Unlike computers, people are not really good at memorizing them. However, you have to remember passwords everywhere. As a result, many people use a single password for multiple websites. This entails a major security risk. If a password is leaked, all accounts can be accessed where this password has been reused.

    How do you prevent visitor password theft?

    The best solution to not steal passwords is simply not to keep them! Instead, we'll save the hash of the password. A hash function makes a password unrecognizable. Based on the hash, it is impossible to trace the input. A hash function always produces the same result with the same input. A strong hash function also ensures that two different texts do not result in the same hash (if this happens there is a collision). Even if the hackers manage to get a database with hashes, they don't have passwords in their hands yet.

    How do you use the hash functions of PHP?

    Since PHP 5.5 It has become very easy to hash passwords by using the function password_hash(). This function has one mandatory argument: the password. The second argument allows you to specify which hashing algorithm to use. If you do not specify this, the strong BCrypt algorithm is used by default. In addition to hashing, this function also adds a Salt which protects against Rainbow Tables. Generating the hash goes as follows:

     
      $wachtwoord = ' secret password ';
      $hash = Password_hash ($wachtwoord, PASSWORD_BCRYPT);
      Echo $hash;
    

    The generated hash is a string of 60 characters and can look like this: $2y $10 $ Se3mLsHueAYTM3G4Wd9hTuyfzPCRYtafImcOSO2U0H4290jPU. SUA. From this hash it is impossible to retrieve the password. This hash can be stored securely in your database.

    To check if someone has entered a correct password we use the function password_verify(). We give these two arguments, the password that was entered in the login and the hash that we had saved.

    
      $hash = '$2y$10$Se3mLsHueAYTM3G4Wd9hTuyfzPCRYtafImcOSO2U0H4290jPU.SGO';
      $wachtwoord = 'Onzin';
    
      if (password_verify( $wachtwoord, $hash)){
          echo 'Correct wachtwoord';
      } else {
        echo 'Incorrect wachtwoord';
      }
    

    In this case, the user password will generate a different hash than was stored in our database. This allows us to verify that the password you entered is correct, without having to save the original password. Even if a hacker gains access to our database there is no password to find.