Should I use Swift or Objective-C to learn iOS development ?

The Swift programming language is the standard features rich language to create iOS apps, iPadOS apps and MacOS X apps. The present and the future is just Swift on Apple ecosystem. Apple is perfecting Swift every year with updates and new features and capabilities. We are now in the era of SwiftUI, you should go for Swift already. Swift itself is a robust programming language. So go for it! it is standard for hiring, learning, creating apps for Apple operating systems.

What are great ways to promote an iOS app?

I think deeply about marketing and how to reach your target audience online and offline. In this post, I’ll cover all areas of marketing and advertising your mobile application specially the iOS apps. fix a problem, give great value Your iOS application must solve a problem or fulfill a need which some users of iPhone or iPad have. describe it for the public You should consider writing a comprehensive description which normal people can understand. For example, do not say OCR but say extract text from images which non-technical people can understand. Write description that list all features of the iOS application, and its benefits in day-to-day life.

How to animate the change of background color of a view on iOS ?

Step by step guide to create background color changing with beautiful animation open Main.storyboard add a button as shown below add one @IBAction for touchUpInside of ‘Change Background’ button. Name the function as changeBackgroundClicked. use animate function of UIView to animate the change of background color. It provides us the duration and optional completion as parameters. In changeBackgroundClicked we will change the background color of the view from red to blue and vice versa. Here is the code. @IBAction func changeBackgroundClicked(_ sender: Any) { if self.view.backgroundColor == UIColor.red { UIView.animate(withDuration: 2) { self.view.backgroundColor = UIColor.

How do you animate the change of background color of a view on Android ?

The idea is to use this code snippet. ColorDrawable[] colorDrawables = { new ColorDrawable(Color.RED), new ColorDrawable(Color.BLUE), new ColorDrawable(Color.GREEN) }; TransitionDrawable transitionDrawable = new TransitionDrawable(colorDrawables); textView.setBackground(transitionDrawable); transitionDrawable.startTransition(2000); In this code snippet, we created a list of colorDrawables, then feed them to the TransitionDrawable. And now we have an animating color change, so we pass it to the setBackground to get the animating colors in the background. Got the idea ? let’s create a complete code example. use this xml code in res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/relativeLayout" android:padding="8dp" tools:context=".MainActivity"> <Button android:id="@+id/button" android:text="Animate background color" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@id/textView" android:layout_centerInParent="true" android:layout_marginBottom="15dp"/> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="36sp" android:textStyle="bold" android:text="Changing Background color of this view.

How to change background color of selected item in listview in android ?

The main idea is to use view.setBackgroundColor(getColor(R.color.colorAccent)) to the selected view (list item). Let’s see a complete example. use this xml code in res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="8dp" tools:context=".MainActivity"> <ListView android:id="@+id/listView" android:layout_width="match_parent" android:layout_height="match_parent" /> </RelativeLayout> use this Kotlin code in src/MainActivity.kt. import android.os.Build import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.ArrayAdapter import android.widget.ListView class MainActivity : AppCompatActivity() { var operatingSystem: Array<String> = arrayOf("Android", "IPhone", "WindowsMobile", "Blackberry", "WebOS", "Ubuntu", "Windows7", "Max OS X") override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) title = "KotlinApp" val listView: ListView = findViewById(R.id.listView) val adapter = ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, operatingSystem) listView.

How to Change Listview Item Color in Android

The idea is to create an a list item xml, and give it the design choices you want. If you want to change the list item color, use this xml code android:textColor="@android:color/holo_orange_dark". If you want to change the text to italic or bold, use this xml android:textStyle="italic|bold". And even if you want to change the font itself, you can by this font-family property in xml android:fontFamily="sans-serif-condensed". Now, you got the idea. Let’s build a sample application to illustrate this more practically. create Android app in Android Studio use this XML as a res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:fontFamily="sans-serif-condensed" android:textColor="@android:color/holo_orange_dark" android:textSize="24sp" android:textStyle="italic|bold" /> </LinearLayout> use this Kotlin code in your src/MainActivity.

Fix Login Loop Ubuntu Linux

If you stuck in the login screen and can’t load the Ubuntu desktop, follow those steps. when you on the login screen, press ctrl + shift + alt + f1. A black screen appeared? No? Just the login page? So try ctrl + shift + alt + f2. Still the login screen? try ctrl + shift + alt + f3. If the login screen still showing? Try to use another external keyboard. a black screen appeared? ok, type your username then ENTER and type your password then ENTER. type ping 8.8.8.8 then ENTER to ensure you have a good Internet connection.

[FIXED] I Can Not Create Database in PhpMyAdmin on my website

When I try to create database in phpMyAdmin. This error show up access denied for user 'user'@'localhost' to database 'db'. and there is no buttons to create database in phpMyAdmin page. On CPanel, we can’t create database in phpMyAdmin directly so security reasons. So the fix is to create MySQL database via CPanel not in phpMyAdmin. So, when using CPanel we create Database using Database Wizard as you see in this video. The steps is simple. just open CPanel on your host, and select MySQL Database Wizard, then write the name of database. And create a database user with password, and give all the privileges to that user.

How To Disable WordPress Plugins In CPanel ?

How to disable WordPress plugins from CPanel in hosting company because I can not login to the WordPress admin dashboard ? Here is a step by step guide: open file manager on your host. open public_html then wp-content then plugins, you’ll see all plugins listed as folders / directories. click on any plugin to rename it. just change the name a little bit to disable it. just add -bak or anything to disable the plugin. If you can’t rename it, just right click on a plugin folder and select rename from the dropdown menu. Congratulations! You disabled a plugin from CPanel successfully.

[Solved] Parse Error : Syntax Error in wp-include/functions.php

I faced this error parse error : syntax error, unexpected "." , expecting "&" or variable (T_VARIABLE) in wp-include/functions.php on line 1081. This error is because there is two PHP versions loaded on the modules. So we should comment out one of them. So I commented out the php5 module. And everything worked fine. First step, edit the httpd.conf file using this command. sudo nano /etc/apache2/httpd.conf Then add a # in front of the php5 module (or one of the two versions of PHP you have). Make sure that one PHP version is enabled. Then save the file, and restart apache server using this command.

How to fix dyld: Library not loaded: /usr/local/opt/ icu4c/lib/ libicui18n.60.dylib ?

Use [Homebrew] to uninstall node and icu4c like this. brew uninstall --ignore-dependencies node icu4c Then install node.js like this. brew install node If the problem persists and the error kept occuring, try running this command. brew link --overwrite node If the issue resists again, try upgrading node instead of reinstalling it. So use this command: brew upgrade node Want to watch how to fix it in a video ? watch it here on YouTube. If one of those works for you, share this post with your friends.

Is your Software Company a Feature Factory or Lean Startup ?

Progress If your software company just focus on delivering features.. more features.. more abilities.. more things into that project.. you burning money! You assume that you know what the users want. The best approach is to create a minimum viable product which has the bare minimum features to work, then discuss the current features and the suggested features from your clients/users. Then Think thoroughly about the features and integration. Then hand those features you decide to add with the edits to the current features to the development team. This progress process ensures that the product / software will always be suitable for the clients / users, and the customer satisfaction will be great.

3 Tips to have Long and Successful Creative Career

Start Before You’re Ready If you are waiting to be ready to start, you will never start! Just start chasing your dreams and goals. You will learn more during your work. The process of success is iterative. Your first work will suck, but the next work will be more polished. After too many iterations of work, your work will be amazing. Repetition makes perfect. You’ll gain experience through that journey of success. Failure is NOT the End You’ll fail, and that’s OK. Failure is just the beginning. The first time you do anything, you’ll suck. Nothing to worry about.. just continue working and improving and gaining experience.

Useful npm Packages for All Projects

date-fns date-fns (a.k.a Date Functions) is a library which gives you functions to deal with dates. It is great package with a small size. dotenv dotenv create a .env file to store your environment variables. So when you publish that project online you use the environment variables which you deploy the project on. socket.io Help you use the sockets to create realtime communications such as chat apps. UUID Help you create a universal unique identifier (UUID) with one line of code. axios Axios is an alternative to fetch. Axios help you make requests easier than fetch and AJAX. classnames Help you with class names in CSS with Javascript manipulations.

Why built-in functions in python are faster ?

Because Python is sitting of the shoulders of giants. Built-in functions are written in C and C++ under the hood. C and C++ languages are efficient and fast, so their functions will be faster than the functions you write in Python. So it is recommended to use built-in functions instead of creating new ones.

Website Types

E-Commerce Website There are too many e-commerce websites such as Amazon, Souq, Jumia, AliBaba, .. etc. What you should focus on if you are about to create an e-commerce website ? showcase the product in a visual appealing way optimize checkout process with best practices Marketing & Business Website The vast majority of websites are the marketing websites and business websites. What is the goal of marketing and business websites ? show who they are contact information storytelling w/ emotional connection social proof & trust call to action (follow, like, email, notification, .. ) Blogs & Media Outlets If you are working for a news agency, or just a blogger, you should focus on the same things which are:

How to Inspect Hover Element in Chrome Dev Tools ?

If the hover effect is given with CSS then yes, I normally use two options to get this: The Tricky Way To See Inspect Hover One, to see the hover effect when the mouse leave the hover area: Open the inspector in docked window and increase the width until reach your HTML element, then right click and the popup menu must be over the inspector zone… then when you move the mouse over the inspector view, the hover effect keep activated in the document. The Best Way (IMO) To See Inspect Hover in Chrome Dev Tools Two, to keep the hover effect even if the mouse is not over the HTML element, open the inspector, go to Styles TAB and click in the upper right icon that says Toggle Element State (dotted rectangle with an arrow) There you can manually activate the Hover Event (among others) with the checkbox provided.

How to Calculate Age in Microsoft Excel

In the cell of age, write this =INT((TODAY()-B2)/365) where B2 is the location of the cell where the date of birth written. This code just caclulate the number of years passed. So you know the age of this person in years. But what if I want to know the months and days too ? To get the age in years, use =DATEDIFF(dateOfBirth, TODAY(), "Y") and replace dateOfBirth by the location of the cell where the birthday are written. To get the age in months, use =DATEDIFF(B2, TODAY(), "YM") where B2 is the cell where the birth date written. To get the age in days, use =DATEDIFF(B2, TODAY(), "MD") where B2 is the date of birth.

How to Use Systemd to Keep Programs Running ?

Systemd manages these services in unit files like this. [Unit] Description=Some Really Important Service [Service] Type=simple WorkingDirectory=/root ExecStart=/root/my_program.sh [Install] WantedBy=multi-user.target The program that will start is. #!/usr/bin/env bash while true; do echo 'service is working' sleep 3 done If you don’t want to use this line #!/usr/bin/env bash, then you should make sure to specify what is the program is dedicated to execute the script like this. ExecStart=/bin/bash /root/my_program.sh If you want to execute this service, you should store it in /etc/systemd/system/. You can copy the unit file to that directory, or symlink it. Now you can start or stop or enable or disable the service.

How to Master a New Technology ?

Here are 4 steps to master any new technology. Quick Start Guide Go to the official website of the new language, or framework. And find the quick start, or starter guide, or language tour, or framework tour, and play / do it. It gives you the necessary minimum knowledge of that new technology. The ultimate reason to do this get started is that it rarely outdated because it is the official beginner guide. So follow that get started or language tour. Videos Look for videos of tutorials or a whole course. Follow a crash course or a full course. Book or Documentation Pick a book that tells you everything about that technology.

All Javascript Optimization Tips & Techniques

Parsing Objects in Javascript if you are using object like this. const data = {foo: 42, bar: 1337, ... }; use the JSON.parse() instead const data = JSON.parse('{"foo":42,"bar":1337, ... }'); It seems slower, but in the real world IT IS WAY WAY FASTER. Why is it faster? because JSON.parse() has one token (Javascript object literal), but the string literal has too many tokens. want to know more ? watch this video from Google chrome developers YouTube channel. If you want the benchmark results, see it here. Use requestAnimationFrame for visual changes When visual changes are happening on screen you want to do your work at the right time for the browser, which is right at the start of the frame.

Things To Do After Installing elementary OS Hera (5.1)

Enable PPA sudo apt update sudo apt install software-properties-common Install apt-fast sudo add-apt-repository -y ppa:apt-fast/stable sudo apt -y install apt-fast echo "alias apt='apt-fast'" >> ~/.bashrc source ~/.bashrc Update OS apt update && apt upgrade Install git apt install git Uninstall Apps If you do not like epiphany browser - like me, just run this command. apt purge epiphany-browser epiphany-browser-data If you don’t use the pantheon mail app - like me, just run this command to uninstall it. apt purge pantheon-mail Again, if you don’t use the music app shipped with elementary OS which is called noise, just uninstall it like that.

How to Install Gnome Shell Extensions from ZIP File using command line

First check your gnome version: $ gnome-shell --version GNOME shell 3.36.4 Then go to location where your downloaded ZIP file, for me its Downloads directory. cd ~/Downloads/ Get the extension UUID from metadata.json by this command. $ unzip -c dash-to-dock-micxgx.gmail.com.v68.shell-extension.zip metadata.json | grep uuid | cut -d \" -f4 dash-to-dock@micxgx.gmail.com Or simply open metadata.json file and copy the UUID value. For me it is dash-to-dock@micxgx.gmail.com. Create destination directory for the gnome extension. $ mkdir -p ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com Unzip gnome extension file into the directory we made in the previous step, using this command. $ unzip -q dash-to-dock-micxgx.gmail.com.v68.shell-extension.zip -d ~/.

Is Go better than PHP?

First, “web development” is a very broad term and might, therefore, mean a lot of things including server-side rendered HTML pages, JSON APIs, microservices, etc. Second, let’s define what makes a programming language qualify for web development. (sorted by importance) Ecosystem Tooling Libraries Developer market Success stories Maintainability Language design Ecosystem consistency Performance Asynchronous execution for increased throughput Low latency Raw number-crunching performance Infrastructure Hosting and deployment Memory usage and cost in general So, let’s get ready to compare! Ecosystem (it depends) Both PHP and Go have created huge web-development ecosystems but they are focusing on different goals.

Why Do People Use Go ?

People use Go programming language For various reasons. Here is all reasons in brief: Go is open-source but backed up by a large corporation (Google) It’s fast: to learn to build up to compile to arrange and install to scamper Go is a modern language Go is Simple It is Concurrent Static code analysis Garbage collected language Testing Support And now, let’s dive in each reason. Performance Most people come to Go from dynamic languages like Ruby, Python, JavaScript, PHP and similar.

Which programming language should you learn if you want a job at Google, Amazon, Facebook or any big software company?

The typical way to get hired as a developer at these companies (Googel, Amazon, .. ) is as follows: Get an interview - If you’re already established in industry their recruiters are likely already pinging you if you’re on LinkedIn or other job site. Otherwise referrals are a good way to do this. Pass the interview - to do this you need the following: a. Be a good coder in a widely used industry language. Java is a very good choice in that regard. Most interviews will let you choose the language as long as it’s one of the commonly used industry languages (Remember the interviewer does need to be able to assess you!

Why is n++ faster than n=n+1?

The answer is related to the old CISC cpu instructions and the way how C (or any programming language) is compiled to binary code. In almost every CISC CPU there is a special “add” instruction that is named INC (or DEC) and that instruction increments (or decrements) by 1 the value of a register (or memory). If you use another instruction for addition you have to add both operands you want to sum. That makes INC/DEC more efficient: They take less space (no space for operands). In CISC they execute faster (because you save time to load operands). The initial C compiler has been technically a simple 3 step macro processor on top of assembly so it was leaving this choice to the programmer.

Why Did Google Develop Go ?

Google has two tremendous problems. One of them is compile time. Back in the 1980’s, reasonable sized projects took hours to do a clean build. There were whole server farms dedicated to recompiling. You got a new “nightly build” and made modifications to that. Google builds things that are so ridiculously huge that it’s still like that in 2017. It takes 5 hours to rebuild chrome from scratch even on a big fat i7 system. The pain of compile time on these builds hurts so much that Google has invented build tools that separate the dependency analysis and compiling, just to gain a few percent in build time using conventional languages.

Markdown Cheatsheet

Headers in Markdown # H1 ## H2 ### H3 #### H4 ##### H5 ###### H6 H1 H2 H3 H4 H5 H6 Alternatively, for H1 and H2, an underline-ish style: Alt-H1 ====== Alt-H2 ------ Alt-H1 Alt-H2 Emphasis *italic* _italic too_ __emphasis__ **also called bold** **_bold italic text_** ~~strikethrough or scratched text~~ italic italic too emphasis also called bold bold italic text strikethrough or scratched text Lists in Markdown 1. first item 2. second 3. third * a submenu item with 4 spaces * a second item in the submenu 4. fourth indented paragraph with 3 spaces. 5. fifth * you can use asterisk or - dash or minus or tack + plus to create unordered list items first item

Bash Shell Scripting Language - Documentation and Code Snippets

This is a bash shell scripting which can be found on Unix, Linux and Mac. You can install bash on the Linux subsystem on Windows too. The first line is #! /bin/bash because the bash program is in /bin/bash, you can know the path where the bash is by this command which bash. Print data or text on the screen You can use echo Hello, World! or echo "Hello, World". Variables & Print out them NAME = "Abanoub" echo "My name is $NAME" or you can use this NAME = "Abanoub" echo "My name is ${NAME}" Get Data From User read -p "Enter your name: " Name echo "Hello, $NAME!