<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>ZK Punk</title>
		<link>https://www.ZKPunk.dev/</link>
		<description>Recent content on ZK Punk</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
		
			<lastBuildDate>Sun, 05 Feb 2023 12:03:15 +0530</lastBuildDate>
		
			<atom:link href="https://www.ZKPunk.dev/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Interval picker in SwiftUI</title>
				<link>https://www.ZKPunk.dev/tips/interval_picker_swiftui/</link>
				<pubDate>Sun, 05 Feb 2023 12:03:15 +0530</pubDate>
				<guid>https://www.ZKPunk.dev/tips/interval_picker_swiftui/</guid>
				<description>&lt;p&gt;Last run on Xcode 14.2, iOS 16.2, and Swift 5.7.2&lt;/p&gt;&#xA;&lt;h3 id=&#34;picker-view-for-time-durations&#34;&gt;&#xA;  Picker View for Time Durations&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#picker-view-for-time-durations&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;In my Timer app, I needed a Picker View for taking the timer interval from the user. Sadly, at this moment SwiftUI does not come with a built in View that I needed for my use case. However, SwiftUI does provide the building blocks to create such a view.&lt;/p&gt;</description>
			</item>
			<item>
				<title></title>
				<link>https://www.ZKPunk.dev/privacy/</link>
				<pubDate>Wed, 01 Feb 2023 10:01:08 -0800</pubDate>
				<guid>https://www.ZKPunk.dev/privacy/</guid>
				<description>&lt;p&gt;&lt;strong&gt;Privacy Policy&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Apurva Mehta built the Pixel Edit Lite app as a Commercial app. This SERVICE is provided by Apurva Mehta and is intended for use as is.&lt;/p&gt;&#xA;&lt;p&gt;This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.&lt;/p&gt;&#xA;&lt;p&gt;If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Change Back Button Icon in Navigation Bar</title>
				<link>https://www.ZKPunk.dev/tips/change_back_button_icon_navigation/</link>
				<pubDate>Tue, 31 Jan 2023 07:27:15 +0530</pubDate>
				<guid>https://www.ZKPunk.dev/tips/change_back_button_icon_navigation/</guid>
				<description>&lt;p&gt;Last Run on XCODE 14.2 / iOS 16.2 / Swift 5.7.2&lt;/p&gt;&#xA;&lt;h3 id=&#34;change-the-back-buttons-icon&#34;&gt;&#xA;  Change the Back Button&amp;rsquo;s Icon&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#change-the-back-buttons-icon&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;If you have used the default Settings App that comes with iOS, you are most likely to be familar with the back button with the &amp;ldquo;less than&amp;rdquo; symbol &amp;ldquo;&lt;em&gt;&amp;lt; Back&lt;/em&gt;&amp;rdquo; on the top left of your iOS devices screen (in the navigation bar). It&amp;rsquo;s something we have gotten very used to, thanks to it being implemented in not only the first party apps by Apple, but also the innumerous 3rd party apps that use the &lt;a href=&#34;https://developer.apple.com/documentation/swiftui/navigationstack&#34;&gt;NavigationStack&lt;/a&gt; and related API&amp;rsquo;s.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Flood Fill: Recursion versus Iterative Solution</title>
				<link>https://www.ZKPunk.dev/posts/recursion_vs_iterative/</link>
				<pubDate>Wed, 25 Jan 2023 20:09:10 +0530</pubDate>
				<guid>https://www.ZKPunk.dev/posts/recursion_vs_iterative/</guid>
				<description>&lt;p&gt;Last Run on Python 3.11.1&lt;/p&gt;&#xA;&lt;h3 id=&#34;intro&#34;&gt;&#xA;  Intro&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#intro&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;I have been working on a SwiftUI app to develop a Pixel Editor inspired by the simplicty of the &lt;a href=&#34;https://www.lexaloffle.com/pico-8.php&#34;&gt;pico8&lt;/a&gt; fantasy game console. One of the most common feature in a drawing application apart from the pencil tool &amp;hellip; doh =P, is the bucket tool. The bucket tool performs a &lt;a href=&#34;https://en.wikipedia.org/wiki/Flood_fill&#34;&gt;flood fill&lt;/a&gt; operation, which basically as the name suggests floods the screen and/or a region in the canvas with the selected color.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Dynamic Buttons to handle different app behvaior in SwiftUI</title>
				<link>https://www.ZKPunk.dev/tips/toggling-button-based-on-app-state/</link>
				<pubDate>Sat, 21 Jan 2023 12:42:15 +0530</pubDate>
				<guid>https://www.ZKPunk.dev/tips/toggling-button-based-on-app-state/</guid>
				<description>&lt;p&gt;Last Run on XCODE 14.2 / iOS 16.2 / Swift 5.7.2&lt;/p&gt;&#xA;&lt;h3 id=&#34;making-a-dynamic-button&#34;&gt;&#xA;  Making a Dynamic Button&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#making-a-dynamic-button&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;If you have noticed, the play button on most media players changes to pause once the media starts playing and vice versa. This is a behavior, I also needed in one of my apps that I was building.&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s a functionality pretty staright forward to achieive in SwiftUI.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Hello 2023</title>
				<link>https://www.ZKPunk.dev/posts/hello-2023/</link>
				<pubDate>Tue, 17 Jan 2023 16:25:02 +0530</pubDate>
				<guid>https://www.ZKPunk.dev/posts/hello-2023/</guid>
				<description>&lt;h1 id=&#34;is-2023-the-year-i-blog-more-frequently&#34;&gt;&#xA;  Is 2023 the year I blog more frequently?&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#is-2023-the-year-i-blog-more-frequently&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;I have been blogging on/off for the past decade. This is another attempt at rekindling the fire. The motivation this time is that I would like to maintain a central repository of all the various projects/ideas I have worked on &amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;In the last few years I have done some side projects like building a webapp to generate Alexa Skills with no code. A few iOS games using SpriteKit, mobile/web games in love2d, pico8, webapps in React, web3 apps for EVM chains like Ethereum, Polygon, Avalanche and generative art in Processing.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Making a Progress View Ring</title>
				<link>https://www.ZKPunk.dev/tips/making-a-progress-view-ring/</link>
				<pubDate>Tue, 17 Jan 2023 13:48:35 +0530</pubDate>
				<guid>https://www.ZKPunk.dev/tips/making-a-progress-view-ring/</guid>
				<description>&lt;p&gt;Last Run on XCODE 14.2 / iOS 16.2 / Swift 5.7.2&lt;/p&gt;&#xA;&lt;h3 id=&#34;progress-view-ring&#34;&gt;&#xA;  Progress View Ring&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#progress-view-ring&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;I was building a Timer app and needed a visual indicator to display the the amount of time left while the countdown was running. A circular progress bar similar to the fitness/activity rings of Apple Watch made the most sense. Sadly, Apple currently doesn&amp;rsquo;t provide a good API to use such a view in your own apps. However, building such a View in SwiftUI is pretty simple.&lt;/p&gt;</description>
			</item>
			<item>
				<title>About</title>
				<link>https://www.ZKPunk.dev/about/</link>
				<pubDate>Mon, 09 Jan 2023 00:00:00 +0000</pubDate>
				<guid>https://www.ZKPunk.dev/about/</guid>
				<description>&lt;p&gt;I am a software engineer with several years of experience in the industry. I love sharing my learnings and knowledge to help others succeed in the industry.&lt;/p&gt;&#xA;&lt;p&gt;Apart from tinkering on software projects, I love to hike, climb mountains, travel the world, explore and experience the various cultures around the globe.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Getting Component Information From Date</title>
				<link>https://www.ZKPunk.dev/tips/getting-component-information-from-date/</link>
				<pubDate>Tue, 04 Aug 2020 20:59:37 -0700</pubDate>
				<guid>https://www.ZKPunk.dev/tips/getting-component-information-from-date/</guid>
				<description>&lt;p&gt;Last Run on XCODE 11.6 / Swift 5.2&#xA;Last Run on XCODE 12.0 beta 4 / Swift 5.3&lt;/p&gt;&#xA;&lt;h3 id=&#34;definition&#34;&gt;&#xA;  Definition&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#definition&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://developer.apple.com/documentation/foundation/calendar&#34;&gt;Calendar&lt;/a&gt; - A definition of the relationships between calendar units (such as eras, years, and weekdays) and absolute points in time, providing features for calculation and comparison of dates.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://developer.apple.com/documentation/foundation/calendar&#34;&gt;Calendar&lt;/a&gt; is a value type (struct) that provides with functions that can assist us in decoupling the component information from a given date like the year, month, day of week etc.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Usage of CaseIterable in Swift Enum</title>
				<link>https://www.ZKPunk.dev/tips/usage-of-case-iterable-in-swift/</link>
				<pubDate>Tue, 21 Jul 2020 22:04:00 -0700</pubDate>
				<guid>https://www.ZKPunk.dev/tips/usage-of-case-iterable-in-swift/</guid>
				<description>&lt;p&gt;Last Run on XCODE 11.6 / Swift 5.2&lt;/p&gt;&#xA;&lt;h3 id=&#34;definition&#34;&gt;&#xA;  Definition&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#definition&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://developer.apple.com/documentation/swift/caseiterable&#34;&gt;CaseIterable&lt;/a&gt; is a protocol in Swift, that typically lets an enumeration to provide all of its cases as a collection.&lt;/p&gt;&#xA;&lt;p&gt;Lets look at a simple example from my RoadRage car game. This is an enum type called TrafficType listing the cases of traffic/obstacle Sprites generated in my RoadRage car game.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;enum&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;TrafficType&lt;/span&gt;: UInt32 {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;case&lt;/span&gt; Police&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;case&lt;/span&gt; Ambulance&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;case&lt;/span&gt; FireTruck&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;case&lt;/span&gt; Van&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;case&lt;/span&gt; SportsCar&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;case&lt;/span&gt; Taxi&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In my game I would like to find out the total count of the TrafficType entities. I would also like the ability to randomly pick a  traffic object from the list to keep generating obstacles during the game loop. And to achive that is as simple as conforming to the &lt;a href=&#34;https://developer.apple.com/documentation/swift/caseiterable&#34;&gt;CaseIterable&lt;/a&gt; protocol in the enum.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Injecting custom behavior during editmode on a TextField in SwiftUI</title>
				<link>https://www.ZKPunk.dev/tips/injecting-custom-behavior-during-editmode-on-textfield-in-swift-ui/</link>
				<pubDate>Fri, 17 Jul 2020 08:30:06 -0700</pubDate>
				<guid>https://www.ZKPunk.dev/tips/injecting-custom-behavior-during-editmode-on-textfield-in-swift-ui/</guid>
				<description>&lt;p&gt;Last Run on XCODE 11.6 / Swift 5.2&lt;/p&gt;&#xA;&lt;h3 id=&#34;definitions&#34;&gt;&#xA;  Definitions&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#definitions&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://developer.apple.com/documentation/swiftui/textfield&#34;&gt;&amp;lsquo;TextField&amp;rsquo;&lt;/a&gt; is a View provided in SwiftUI for handling user entered input into an app. As per the documentaion, Apple defines it as&lt;/p&gt;&#xA;&lt;p&gt;&amp;ldquo;TextField - A control that displays an editable text interface.&amp;rdquo;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;struct&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;TextFieldEditMode&lt;/span&gt;: View {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    @State &lt;span style=&#34;color:#66d9ef&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; someData = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; body: some View {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        TextField(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Type something&amp;#34;&lt;/span&gt;, text: &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;$&lt;/span&gt;someData)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            .font(.largeTitle)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;initializers&#34;&gt;&#xA;  Initializers&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#initializers&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://developer.apple.com/documentation/swiftui/textfield&#34;&gt;&amp;lsquo;TextField&amp;rsquo;&lt;/a&gt; has four initializers, and the one we will be using in this post is the one listed below, that provides us with two additional parameters&#xA;&amp;ldquo;onEditingChanged&amp;rdquo; and &amp;ldquo;onCommit&amp;rdquo;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Custom View Modifiers in SwiftUI</title>
				<link>https://www.ZKPunk.dev/tips/custom-view-modifiers-in-swift-ui/</link>
				<pubDate>Wed, 15 Jul 2020 21:32:39 -0700</pubDate>
				<guid>https://www.ZKPunk.dev/tips/custom-view-modifiers-in-swift-ui/</guid>
				<description>&lt;p&gt;Last Run on XCODE 11.6 / Swift 5.2&lt;/p&gt;&#xA;&lt;p&gt;In SwiftUI View(s) are the building blocks of the UI. All changes to the Views are done by calling special functions called modfiers that wrap up the original View with the needful changes and return a View back.&lt;/p&gt;&#xA;&lt;p&gt;In the example below, we apply a few modifiers to a Text view to create the impression&#xA;of a highlighted text.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Text(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;I ♥️ SwiftUI&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    .font(.largeTitle)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    .foregroundColor(.black)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    .background(Color.yellow)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&#34;https://www.ZKPunk.dev/img/swift_ui_modifier_1.png&#34; alt=&#34;SwiftUI Text modifiers&#34;&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>User Input in Swift commandline</title>
				<link>https://www.ZKPunk.dev/tips/user-input-in-swift-commandline/</link>
				<pubDate>Sun, 03 May 2020 22:18:51 -0700</pubDate>
				<guid>https://www.ZKPunk.dev/tips/user-input-in-swift-commandline/</guid>
				<description>&lt;p&gt;Last Run on XCODE 11.4 / Swift 5.2&lt;/p&gt;&#xA;&lt;p&gt;If you are writing a command line tool and need user input, the &lt;code&gt;readLine()&lt;/code&gt; function&#xA;can be used for it. It returns an optional&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; input = readLine()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And, if you dont want the ending new line character, you can set the &lt;code&gt;strippingNewline&lt;/code&gt; parameter&#xA;to true.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; input = readLine(strippingNewline: &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
			</item>
			<item>
				<title>Checking if a Swift String contains a certain text</title>
				<link>https://www.ZKPunk.dev/tips/checking-if-swift-strings-contains-text/</link>
				<pubDate>Fri, 01 May 2020 12:11:26 -0700</pubDate>
				<guid>https://www.ZKPunk.dev/tips/checking-if-swift-strings-contains-text/</guid>
				<description>&lt;p&gt;Last Run on XCODE 11.4 / Swift 5.2&lt;/p&gt;&#xA;&lt;p&gt;A simple way to check if a string contains a certain text is to use the method &lt;code&gt;contains&lt;/code&gt; available to Strings.&lt;/p&gt;&#xA;&lt;p&gt;In the code snippet below, we will check if a string contains a certain text.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; fruit1 = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;apple&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; fruit2 = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;banana&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; mySentence = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;An apple a day keeps the doctor away.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mySentence.contains(fruit1) &lt;span style=&#34;color:#75715e&#34;&gt;// result --&amp;gt; True&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mySentence.contains(fruit2) &lt;span style=&#34;color:#75715e&#34;&gt;// result --&amp;gt; False&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If we need to check the string against multiple options, we will have&#xA;to use a variation of the &lt;code&gt;contains&lt;/code&gt; method that takes a closure. Checkout the code snippet below.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Matching Swift Strings by Prefix or Suffix</title>
				<link>https://www.ZKPunk.dev/tips/matching-swift-strings-by-prefix-or-suffix/</link>
				<pubDate>Tue, 28 Apr 2020 21:56:43 -0700</pubDate>
				<guid>https://www.ZKPunk.dev/tips/matching-swift-strings-by-prefix-or-suffix/</guid>
				<description>&lt;p&gt;Last Run on XCODE 11.4 / Swift 5.2&lt;/p&gt;&#xA;&lt;p&gt;A simple way to check if a string starts or ends with a certain pattern is to use the method &lt;code&gt;hasSuffix&lt;/code&gt; and &lt;code&gt;hasPrefix&lt;/code&gt; available to Strings.&lt;/p&gt;&#xA;&lt;p&gt;In the code snippet below, we will check if a string begins or ends with a specific text pattern.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; fileName1 = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;InstagramCover.jpg&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; fileName2 = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;SnapchatCover.doc&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fileName1.hasSuffix(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;jpg&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#75715e&#34;&gt;// result --&amp;gt; True&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fileName2.hasSuffix(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;jpg&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#75715e&#34;&gt;// result --&amp;gt; False&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fileName1.hasPrefix(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Instagram&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#75715e&#34;&gt;// --&amp;gt; True&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fileName2.hasPrefix(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Facebook&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#75715e&#34;&gt;// result --&amp;gt; False&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If we need to check against multiple variations, we can&amp;rsquo;t just use &lt;code&gt;hasSuffix&lt;/code&gt;. Instead, we will have&#xA;to use it along with another method &lt;code&gt;contains&lt;/code&gt;. Checkout the code snippet below.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Access Swift String by Index</title>
				<link>https://www.ZKPunk.dev/tips/access-swift-string-by-index/</link>
				<pubDate>Tue, 21 Apr 2020 22:23:31 -0700</pubDate>
				<guid>https://www.ZKPunk.dev/tips/access-swift-string-by-index/</guid>
				<description>&lt;p&gt;Last Run on XCODE 11.4 / Swift 5.2&lt;/p&gt;&#xA;&lt;p&gt;The &lt;strong&gt;swift&lt;/strong&gt; string class does not provide the ability to get a character at a specific index because of its native support for UTF characters.&lt;/p&gt;&#xA;&lt;p&gt;In the code snippets below, we will walk through code to access elements of a string at speific positions.&lt;/p&gt;&#xA;&lt;h4 id=&#34;getting-the-first-character&#34;&gt;&#xA;  Getting the first Character&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#getting-the-first-character&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; mySwiftString = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Swift is awesome!&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;//Getting the first Character&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mySwiftString.first&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; firstIndex = mySwiftString.startIndex&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mySwiftString[firstIndex]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;getting-the-last-character&#34;&gt;&#xA;  Getting the last Character&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#getting-the-last-character&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; mySwiftString = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Swift is awesome!&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;//Getting the last Character&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mySwiftString.last&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; lastIndex = mySwiftString.index(before: mySwiftString.endIndex)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mySwiftString[lastIndex]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;getting-the-2nd-character&#34;&gt;&#xA;  Getting the 2nd Character&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#getting-the-2nd-character&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; mySwiftString = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Swift is awesome!&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;//Getting the 2nd Character&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; secondIndex_Ver1 = mySwiftString.index(after: firstIndex)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mySwiftString[secondIndex_Ver1]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; secondIndex_Ver2 = mySwiftString.index(firstIndex, offsetBy: &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mySwiftString[secondIndex_Ver2]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;getting-the-nth-character-from-start--say-3rd&#34;&gt;&#xA;  Getting the Nth Character from start ( Say 3rd)&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#getting-the-nth-character-from-start--say-3rd&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; mySwiftString = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Swift is awesome!&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;//Getting the Nth Character from start ( Say 3rd )&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; thirdIndex = mySwiftString.index(firstIndex, offsetBy: &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mySwiftString[thirdIndex]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;getting-the-nth-character-from-end--say-3rd-last-&#34;&gt;&#xA;  Getting the Nth Character from end ( Say 3rd last )&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#getting-the-nth-character-from-end--say-3rd-last-&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; mySwiftString = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Swift is awesome!&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;//Getting the Nth Character from end ( Say 3rd last )&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; thirdLastIndex = mySwiftString.index(lastIndex, offsetBy: &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mySwiftString[thirdLastIndex]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
			</item>
			<item>
				<title>How to enumerate nodes in Spritekit?</title>
				<link>https://www.ZKPunk.dev/tips/enumerate_spritekit_nodes/</link>
				<pubDate>Fri, 10 Apr 2020 09:00:05 -0700</pubDate>
				<guid>https://www.ZKPunk.dev/tips/enumerate_spritekit_nodes/</guid>
				<description>&lt;p&gt;Last Run on XCODE 11.4 / Swift 5.2&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Spritekit&lt;/strong&gt; has a method &lt;code&gt;enumerateChildNodes&lt;/code&gt; that searches the children of the receiving node to perform processing for nodes that share a name.&lt;/p&gt;&#xA;&lt;p&gt;In the code snippet below, we are are iterating through all the nodes with the name &amp;ldquo;trafficCar&amp;rdquo; in the parent node (or &lt;code&gt;SKScene&lt;/code&gt;) and performing some action on it.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-swift&#34; data-lang=&#34;swift&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;moveTraffic&lt;/span&gt;() {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    enumerateChildNodes(withName: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;trafficCar&amp;#34;&lt;/span&gt;) { &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        (trafficCar, stop) &lt;span style=&#34;color:#66d9ef&#34;&gt;in&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; car = trafficCar &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt;! SKSpriteNode&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        car.position.y &lt;span style=&#34;color:#f92672&#34;&gt;-=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
			</item>
			<item>
				<title></title>
				<link>https://www.ZKPunk.dev/pixeledit/</link>
				<pubDate>Thu, 27 Feb 2020 10:01:08 -0800</pubDate>
				<guid>https://www.ZKPunk.dev/pixeledit/</guid>
				<description>&lt;h4 id=&#34;ios&#34;&gt;&#xA;  iOS&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#ios&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://apps.apple.com/us/app/pixel-edit-lite/id1665723146&#34;&gt;Pixel Edit Lite&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Contact &lt;a href=&#34;mailto:ZKPunk21&amp;#43;pixel@gmail.com&#34;&gt;ZKPunk21+pixel@gmail.com&lt;/a&gt; for any Support Issues!&lt;/p&gt;</description>
			</item>
			<item>
				<title>Select Sections From Images of Newspaper clippings, receipts etc Using Opencv and Python</title>
				<link>https://www.ZKPunk.dev/posts/select-sections-from-newspaper-clipping-images-using-opencv-and-python/</link>
				<pubDate>Wed, 25 Sep 2019 13:53:05 -0500</pubDate>
				<guid>https://www.ZKPunk.dev/posts/select-sections-from-newspaper-clipping-images-using-opencv-and-python/</guid>
				<description>&lt;p&gt;We often take pictures of menus, receipts, and message boards etc. They are often not aligned properly. In this post, I will show you how to select the pertinet parts and allign them as correctly as possible.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th style=&#34;text-align: center&#34;&gt;Original&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th style=&#34;text-align: center&#34;&gt;Processed&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: center&#34;&gt;&lt;img src=&#34;https://www.ZKPunk.dev/img/sudoku_newspaper_small.jpg&#34; alt=&#34;Sudoku &#34;&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: center&#34;&gt;&lt;img src=&#34;https://www.ZKPunk.dev/img/sudoku.jpg&#34; alt=&#34;Sudoku&#34;&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s get started.&lt;/p&gt;&#xA;&lt;h3 id=&#34;1-find-the-anchor-points&#34;&gt;&#xA;  1. Find the anchor points&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#1-find-the-anchor-points&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;We will first load the image of a newspaper clipping containing the sudoku puzzle. Next, we will find out the cordinates of the four corners of the puzzle in the original image.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Create and apply simple filters to an image using OpenCV and Python</title>
				<link>https://www.ZKPunk.dev/posts/create-filters-1/</link>
				<pubDate>Mon, 16 Sep 2019 13:55:46 -0500</pubDate>
				<guid>https://www.ZKPunk.dev/posts/create-filters-1/</guid>
				<description>&lt;p&gt;In this blog post, I will show you how we can enhance our images using colored filters&#xA;and add border backgrounds.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th style=&#34;text-align: center&#34;&gt;Original&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th style=&#34;text-align: center&#34;&gt;Original w/ color filter&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th style=&#34;text-align: center&#34;&gt;Original w/ color border&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: center&#34;&gt;&lt;img src=&#34;https://www.ZKPunk.dev/img/blagaj_resized.jpg&#34; alt=&#34;Blagaj&#34;&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: center&#34;&gt;&lt;img src=&#34;https://www.ZKPunk.dev/img/blagaj_red_filter.jpg&#34; alt=&#34;Blagaj&#34;&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: center&#34;&gt;&lt;img src=&#34;https://www.ZKPunk.dev/img/blagaj_black_border.jpg&#34; alt=&#34;Blagaj&#34;&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s get started.&lt;/p&gt;&#xA;&lt;h3 id=&#34;1-simple-color-filter&#34;&gt;&#xA;  1. Simple color filter&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#1-simple-color-filter&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;Lets start with first creating a color filter - an image with just a single color. This is as simple&#xA;as creating a 3-D array and filling each pixel with the same value. In the code below I create an&#xA;array of the same size (682,512,3) as that of the target image and fill each pixel with the color&#xA;red (0,0,255).&lt;/p&gt;</description>
			</item>
			<item>
				<title>Adding text to an image using OpenCV and Python</title>
				<link>https://www.ZKPunk.dev/posts/add-text-image/</link>
				<pubDate>Thu, 22 Aug 2019 23:08:06 -0700</pubDate>
				<guid>https://www.ZKPunk.dev/posts/add-text-image/</guid>
				<description>&lt;p&gt;In a series of upcoming blog posts, I will be using OpenCV to manipulate images. In this post, I will be adding text to an image (below), I took of a Dervish monastery at the beautiful village of Blagaj in Bosnia.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th style=&#34;text-align: center&#34;&gt;Resized Original&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th style=&#34;text-align: center&#34;&gt;Resized Original w/ text&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: center&#34;&gt;&lt;img src=&#34;https://www.ZKPunk.dev/img/blagaj_resized.jpg&#34; alt=&#34;Blagaj&#34;&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td style=&#34;text-align: center&#34;&gt;&lt;img src=&#34;https://www.ZKPunk.dev/img/blagaj_resized_text.jpg&#34; alt=&#34;Blagaj&#34;&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;Lets get started.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Read Image&lt;/li&gt;&#xA;&lt;li&gt;Resize Image by aspect ratio&lt;/li&gt;&#xA;&lt;li&gt;Add text to resized image&lt;/li&gt;&#xA;&lt;li&gt;Save resized image with text&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;1-cv2imread---read-an-image&#34;&gt;&#xA;  1. &lt;code&gt;cv2.imread()&lt;/code&gt; - Read an Image&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#1-cv2imread---read-an-image&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;The function &lt;code&gt;cv2.imread()&lt;/code&gt; takes a path to the image file and reads it into a variable for further computations. You can use &lt;code&gt;cv2.imshow()&lt;/code&gt; to display the image. However, the execution would be so fast,&#xA;that you won&amp;rsquo;t be able to see the picture loaded. Hence, you would want to pause the program while it&amp;rsquo;s displaying the image using &lt;code&gt;cv2.waitKey()&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>WC implementation in Go Lang</title>
				<link>https://www.ZKPunk.dev/posts/wc_implementation_in_golang/</link>
				<pubDate>Mon, 11 Mar 2019 00:21:00 -0800</pubDate>
				<guid>https://www.ZKPunk.dev/posts/wc_implementation_in_golang/</guid>
				<description>&lt;p&gt;Continuing the theme of exploring &lt;a href=&#34;https://golang.org/&#34;&gt;Go Lang&lt;/a&gt;, today I will be writing a simple version&#xA;of the &lt;code&gt;Unix&lt;/code&gt; utility &lt;code&gt;wc&lt;/code&gt; that displays the number of lines, words, and bytes contained in each&#xA;input file.&lt;/p&gt;&#xA;&lt;p&gt;This exploration process will involve the following pieces&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Getting a file name from command line. &lt;a href=&#34;https://golang.org/pkg/os/&#34;&gt;os&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Opening the file for reading. &lt;a href=&#34;https://golang.org/pkg/os/&#34;&gt;os&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Reading the contents of the file. &lt;a href=&#34;https://golang.org/pkg/bufio/&#34;&gt;bufio&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Count the lines, words and bytes. &lt;a href=&#34;https://golang.org/pkg/unicode/&#34;&gt;unicode&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Display the results.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;1-read-filename-from-the-commandline&#34;&gt;&#xA;  1. Read filename from the commandline&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#1-read-filename-from-the-commandline&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;Any arguments typed after the programs named are passed into the &lt;a href=&#34;https://golang.org/pkg/os/&#34;&gt;&lt;code&gt;os.Args&lt;/code&gt;&lt;/a&gt; array&#xA;with the name of the program accessible at the first index.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Exploring filesystem in golang</title>
				<link>https://www.ZKPunk.dev/posts/exploring_filesystem_in_golang/</link>
				<pubDate>Wed, 06 Mar 2019 00:12:00 -0800</pubDate>
				<guid>https://www.ZKPunk.dev/posts/exploring_filesystem_in_golang/</guid>
				<description>&lt;p&gt;I am currently dabbling in [GoLang]&#xA;&lt;a href=&#34;https://golang.org/&#34;&gt;go-lang&lt;/a&gt; and trying to get familiar with it&amp;rsquo;s syntax and style of programming. I also want to get familiar with the built-in packages for basic tasks witout having to google for basic features.&lt;/p&gt;&#xA;&lt;p&gt;In this post I will be working my way up to building a simple program that can list the files of a given path to it as a command line argument.&lt;/p&gt;&#xA;&lt;h4 id=&#34;1-print-to-console&#34;&gt;&#xA;  1. Print to console&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#1-print-to-console&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;p&gt;Lets start with a simple program that can print a statement to the console using the &lt;a href=&#34;https://golang.org/pkg/os/&#34;&gt;&lt;code&gt;&amp;quot;fmt&amp;quot; package&lt;/code&gt;&lt;/a&gt; and the &lt;code&gt;&amp;quot;Println()&amp;quot; fucntion&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>ls implementation in python3</title>
				<link>https://www.ZKPunk.dev/posts/ls_implmentation_in_python3/</link>
				<pubDate>Thu, 28 Feb 2019 00:08:00 -0800</pubDate>
				<guid>https://www.ZKPunk.dev/posts/ls_implmentation_in_python3/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;http://en.wikipedia.org/wiki/Ls&#34;&gt;&lt;strong&gt;&amp;ldquo;ls&amp;rdquo;&lt;/strong&gt;&lt;/a&gt; is unix utility that lists the  files and directories in the current path or a user passed path. In this post we will explore how to achive such a basic implementation if it using python. Lets explore the &lt;strong&gt;&lt;code&gt;ls&lt;/code&gt;&lt;/strong&gt; command line utility.&lt;/p&gt;&#xA;&lt;h3 id=&#34;some-basic-information&#34;&gt;&#xA;  Some basic information&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#some-basic-information&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;First, we execute &lt;strong&gt;&lt;code&gt;ls&lt;/code&gt;&lt;/strong&gt; command line utility to get some preliminary information of a directory. Here is an example of the output from the &lt;strong&gt;&lt;code&gt;ls&lt;/code&gt;&lt;/strong&gt; command on a sample directory.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Using Python&#39;s map() AND reduce()</title>
				<link>https://www.ZKPunk.dev/posts/using_pythons_map_and_reduce/</link>
				<pubDate>Sun, 29 Jan 2012 00:08:00 -0800</pubDate>
				<guid>https://www.ZKPunk.dev/posts/using_pythons_map_and_reduce/</guid>
				<description>&lt;h3 id=&#34;sum-of-the-squares-of-the-first-5-numbers&#34;&gt;&#xA;  Sum of the Squares of the first 5 numbers&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#sum-of-the-squares-of-the-first-5-numbers&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;In this post I will try to use the &lt;code&gt;map()&lt;/code&gt; and &lt;code&gt;reduce()&lt;/code&gt; functions to compute the sum of the squares of the first five numbers. The &lt;code&gt;map()&lt;/code&gt; function takes a function and an iterable as a parameter. The items of the iterable are fed to the function to create a new list. The &lt;code&gt;reduce()&lt;/code&gt; function also takes a function and an iterable as a parameter. However, this takes two arguments cumulatively to the items of iterable, from left to right, so as to reduce the iterable to a single value.&lt;/p&gt;</description>
			</item>
			<item>
				<title>What is memoization?</title>
				<link>https://www.ZKPunk.dev/posts/what_is_memoization/</link>
				<pubDate>Sat, 07 Jan 2012 00:08:00 -0800</pubDate>
				<guid>https://www.ZKPunk.dev/posts/what_is_memoization/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Memoization&#34;&gt;&lt;code&gt;Memoization&lt;/code&gt;&lt;/a&gt; is a computer science concept to optimize programs by avoiding computations that have already been done and to reuse it. This is achieved by storing the computaions in a lookup table and retrieving them if a need for it arrives in a future computation step.&lt;/p&gt;&#xA;&lt;p&gt;Now, lets try to walk this concept using a &lt;a href=&#34;https://en.wikipedia.org/wiki/Fibonacci_number&#34;&gt;&lt;code&gt;Fibonacci series&lt;/code&gt;&lt;/a&gt; where each number in the series is sum of the previous two numbers. In the subsequent code, we are trying to find the value of the N&amp;rsquo;th term in the series.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Traceroute implementation using scapy</title>
				<link>https://www.ZKPunk.dev/posts/traceroute_implementation_using_scapy/</link>
				<pubDate>Wed, 28 Sep 2011 00:08:00 -0800</pubDate>
				<guid>https://www.ZKPunk.dev/posts/traceroute_implementation_using_scapy/</guid>
				<description>&lt;h3 id=&#34;traceroute&#34;&gt;&#xA;  Traceroute&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#traceroute&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;Traceroute&lt;/code&gt; is a network diagnostic utility used for displaying the path taken by a packet to it&amp;rsquo;s destination. It uses the &lt;code&gt;ICMP&lt;/code&gt; protocol to help traverse the path. Each IP packet has an &lt;code&gt;8 bit TTL&lt;/code&gt; field that gets decremented by every router on the path, to prevent the packet from indefinitely circulating the internet (or network).  When the TTL value reaches zero  an ICMP error &amp;lsquo;Time To Live Exceeded&amp;rsquo; is sent back to the sender.  We can use this fact to our advantage by discovering all the hops between the source and the destination.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Dropbox: LAN Sync Protocol</title>
				<link>https://www.ZKPunk.dev/posts/dropbox_lan_sync_protocol/</link>
				<pubDate>Sat, 10 Sep 2011 00:08:00 -0800</pubDate>
				<guid>https://www.ZKPunk.dev/posts/dropbox_lan_sync_protocol/</guid>
				<description>&lt;p&gt;A year ago, I fired up wire shark on my home network to check out the packet flow of the &lt;strong&gt;DHCP process&lt;/strong&gt;. I closed all my browser windows and other chat/im services, and still noticed a lot of chatter on the network. One that got my particular attention was a packet that was related to the popular service dropbox. I had not updated/edited any files recently, so was surprised to see it. I then decided to dig a little more on wire shark and with some google search came to the conclusion that it was a dropbox feature to sync data changes within the local network.&lt;/p&gt;</description>
			</item>
			<item>
				<title>How does DHCP work?</title>
				<link>https://www.ZKPunk.dev/posts/how_does_dhcp_work/</link>
				<pubDate>Sat, 10 Sep 2011 00:08:00 -0800</pubDate>
				<guid>https://www.ZKPunk.dev/posts/how_does_dhcp_work/</guid>
				<description>&lt;h3 id=&#34;what-is-dhcp-&#34;&gt;&#xA;  What is DHCP ?&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#what-is-dhcp-&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;DHCP&lt;/code&gt; is a protocol used to provide an IP address to a device. It is also used to configure additional networking related parameters on the device like subnet mask, router, domain name, and dns server.&lt;/p&gt;&#xA;&lt;h3 id=&#34;why-dhcp-&#34;&gt;&#xA;  Why DHCP ?&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#why-dhcp-&#34;&gt;&#xA;    &lt;i class=&#34;fa fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;DHCP&lt;/code&gt; stands for &lt;code&gt;dynamic host configuration protocol&lt;/code&gt; and so allows a device to get an IP address without any manual intervention as long as the dhcp client is enabled and running on the device.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Apps &amp; Projects</title>
				<link>https://www.ZKPunk.dev/apps/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://www.ZKPunk.dev/apps/</guid>
				<description>&lt;style&gt;&#xA;  .app-grid {&#xA;    display: grid;&#xA;    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));&#xA;    gap: 1.5rem;&#xA;    margin-top: 1rem;&#xA;    margin-bottom: 3rem;&#xA;  }&#xA;  .app-card {&#xA;    border: 1px solid rgba(150, 150, 150, 0.2);&#xA;    border-radius: 12px;&#xA;    padding: 1.5rem;&#xA;    transition: all 0.3s ease;&#xA;    background: rgba(150, 150, 150, 0.05);&#xA;  }&#xA;  .app-card:hover {&#xA;    transform: translateY(-4px);&#xA;    border-color: #8b5cf6; /* Accent color on hover */&#xA;    background: rgba(139, 92, 246, 0.05); /* Very subtle accent background */&#xA;  }&#xA;  .app-card h3 {&#xA;    margin-top: 0;&#xA;    margin-bottom: 0.5rem;&#xA;    font-size: 2.2rem;&#xA;  }&#xA;  .app-card p {&#xA;    font-size: 1.6rem;&#xA;    color: var(--text-color, #666);&#xA;    margin-bottom: 1rem;&#xA;    line-height: 1.5;&#xA;  }&#xA;  .app-card a {&#xA;    font-weight: bold;&#xA;    text-decoration: none;&#xA;  }&#xA;  .platform-icon {&#xA;    margin-right: 8px;&#xA;  }&#xA;&lt;/style&gt;&#xA;&lt;p&gt;Below is a collection of applications I&amp;rsquo;ve built across various platforms.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
