<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniel Karanja</title>
    <description>The latest articles on DEV Community by Daniel Karanja (@daniel-karanja).</description>
    <link>https://dev.to/daniel-karanja</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1055298%2Ffb7242af-7d7c-4508-b8a4-5c2761e47816.png</url>
      <title>DEV Community: Daniel Karanja</title>
      <link>https://dev.to/daniel-karanja</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/daniel-karanja"/>
    <language>en</language>
    <item>
      <title>strings in Python</title>
      <dc:creator>Daniel Karanja</dc:creator>
      <pubDate>Sat, 27 May 2023 13:22:04 +0000</pubDate>
      <link>https://dev.to/daniel-karanja/strings-in-python-3nd5</link>
      <guid>https://dev.to/daniel-karanja/strings-in-python-3nd5</guid>
      <description>&lt;p&gt;In Python, strings are a fundamental data type used to represent and manipulate text data. They are sequences of characters enclosed within single quotes (' '), double quotes (" "), or triple quotes (""" """).&lt;/p&gt;

&lt;p&gt;Creating a String:&lt;br&gt;
To create a string, simply assign a sequence of characters to a variable. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;message = "Hello, World!"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, the variable message holds the string "Hello, World!".&lt;/p&gt;

&lt;h2&gt;
  
  
  String Manipulation:
&lt;/h2&gt;

&lt;p&gt;Python provides a wide range of built-in functions and methods to manipulate strings. Here are some commonly used operations:&lt;/p&gt;

&lt;p&gt;Accessing Characters:&lt;br&gt;
You can access individual characters within a string using indexing. Python uses 0-based indexing, where the first character is at index 0. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;message = "Hello, World!"
print(message[0])  # Output: 'H'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  String Length:
&lt;/h2&gt;

&lt;p&gt;To determine the length of a string, you can use the len() function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;message = "Hello, World!"
print(len(message))  # Output: 13
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  String Concatenation:
&lt;/h2&gt;

&lt;p&gt;To combine or concatenate strings, you can use the + operator:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;greeting = "Hello"
name = "Alice"
message = greeting + ", " + name
print(message)  # Output: "Hello, Alice"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  String Slicing:
&lt;/h2&gt;

&lt;p&gt;You can extract a portion of a string using slicing. Slicing allows you to specify a range of indices to extract a substring. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;message = "Hello, World!"
print(message[7:12])  # Output: "World"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  String Methods:
&lt;/h2&gt;

&lt;p&gt;Python provides several useful string methods for various operations. Some common methods include:&lt;br&gt;
lower(): Converts a string to lowercase.&lt;br&gt;
upper(): Converts a string to uppercase.&lt;br&gt;
strip(): Removes leading and trailing whitespace from a string.&lt;br&gt;
replace(): Replaces occurrences of a substring with another substring.&lt;br&gt;
split(): Splits a string into a list of substrings based on a delimiter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
Strings are a versatile and powerful data type in Python that allow you to manipulate and process textual data. By leveraging the various built-in functions and methods available, you can perform a wide range of operations on strings, such as accessing characters, concatenating, slicing, and applying transformations &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Basic Introduction to SQL</title>
      <dc:creator>Daniel Karanja</dc:creator>
      <pubDate>Fri, 26 May 2023 21:01:42 +0000</pubDate>
      <link>https://dev.to/daniel-karanja/basic-introduction-to-sql-nfe</link>
      <guid>https://dev.to/daniel-karanja/basic-introduction-to-sql-nfe</guid>
      <description>&lt;p&gt;MySQL is a widely recognized, freely available, and open-source database application that is highly regarded for its exceptional performance, user-friendly interface, and robust data security measures. As a result, it has become a preferred choice for many seeking a reliable database solution.&lt;br&gt;
This comprehensive guide will walk you through the process of creating tables in MySQL, as well as inserting data into them. Additionally, you will learn about various techniques for querying the data stored within these tables.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Step 1:Creating a database *&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Create a database using the CREATE statement:
  CREATE DATABASE movies;
2. To verify that the database was created use the SHOW statement;
  SHOW DATABASES;
3. Select the database to make changes to it by using the USE statement:
 USE movies;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Step 3: Create a Table
We’ll create a table containing information about movies:
CREATE TABLE movies(title VARCHAR(50) NOT NULL,genre VARCHAR(30) NOT NULL,director VARCHAR(60) NOT NULL,release_year INT NOT NULL,PRIMARY KEY(title));

- Verify that the table is created using the DESCRIBE command:
DESCRIBE movies;

Insert movie information in column order – title, genre, director, and release year. Use the INSERT command:
INSERT INTO movies VALUE ("Fast and furious X", "action", "Justin Lin", 2023);

- Use the SELECT command to display the table:
   SELECT * FROM movies;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Create a view&lt;/strong&gt;&lt;br&gt;
Views are SQL queries that display data based on defined parameters.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a view named minimum_release_year to display movie titles whose release year is after 1990. Use the CREATE VIEW command and define query parameters:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;CREATE VIEW minimum_release_year AS SELECT title FROM movies WHERE release_year &amp;gt; 2002;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Display the view using the SELECT command:
SELECT * FROM minimum_release_year;
The output displays movies released after the year 2002.&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>New journey begins......</title>
      <dc:creator>Daniel Karanja</dc:creator>
      <pubDate>Mon, 24 Apr 2023 13:00:40 +0000</pubDate>
      <link>https://dev.to/daniel-karanja/new-journey-begins-4l4f</link>
      <guid>https://dev.to/daniel-karanja/new-journey-begins-4l4f</guid>
      <description>&lt;p&gt;I've been longing to write about how I got into the tech industry. I'm an undergraduate studying business computing, in essence. My career path was rather different because I originally intended to study mechanical engineering but decided against it in favor of a business major so that I could, as they say, "enjoy campus life." &lt;br&gt;
During my final year of college, I developed a love for technology. I even began going to tech-related events and learning for myself through w3school and codecademy.&lt;/p&gt;




&lt;p&gt;I eventually lost self-pace control and made the decision to look for a boot camp where I could genuinely collaborate with other peers.I got a partial scholarship to attend Moringa School to study the vanilla programming languages of Python and JavaScript as well as the React.js library and Flask framework. &lt;/p&gt;




&lt;p&gt;I will provide updates on my experience in addition to thorough information on the resources I believe are helping me.Follow along......&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
