How To Change Icon of your App In Android Studio

In android studio there is a default icon set by android studio itself that are located in MIPMAP OR DRAWBLE Directory. You can change it as per the application requirement.

How to change the Application Icon In Android Studio:

Follow the steps below.

STEP 1

Open your application in Android Studio if you have existing project you can import or create New project FILE>>NEW>>NEW PROJECT.

Further follow the path to reach the desired folder to add icon (app -> res-> drawable). and paste image or icon to this directory

STEP 2

After placing the image or in the drawable folder. You need to rename the default icon name to your icon image name in Androidmanifest.xml.

Now locate androidmanifest file and rename this  (app >> manifests) open AndroidManifest.xml file. Here find the following code.
android:icon=”@drawble/icon“ or default android:icon=”
@mipmap/ic_launcher” at this point you need to define the correct image path.

How To Create A New Project/app In Android Studio kotlin language

To create a new project perform the following steps below:

Step 1:

Launch the Android Studio  latest version. You will see “Welcome to Android Studio” on your computer screen you have to give it time to load. After that you click on “Start a new Android Studio project as shown below”.

STEP 2:

 Here pick your project template, if you are new pick any Activity but don’t pick Empty Activity.

STEP 3: Now enter the “Application name” and Type the “Company Domain” in the text box and then Click Next button.

NOTE: Company domain is used to uniquely identify you App (package name) but you can change later. Also Another thing to know is that company domain is written in reverse. Ex: www.techadvisor.co.ke can be written as

co.ke.techadvisor.

 STEP 4: Before you click finish button in step 3 make sure your computer is connected to internet this will help Android studio for downloading other missing files.

Now the App is ready for installation but with default content.

 STEP 5:

To test your app click buld in the top menu tab, then Build bundles/APKs then pick APK give it time to build.

 Click locate and copy app_debug.apk to your android phone and install. Having any problem please let me know in the comment area.

Welcome to C++ programming

Welcome to C++ programming

INTRODUCTION

C++ is completely free and readily available on all platforms  and easy to understand.

Follow the steps  below for you to run C++ on your computer.

1. You need to download a compiler and install it in your pc you can download DEV -C++ {https://filehippo.com/download_dev-c/} this will work best

2. If you want a quick start, you can also run C++ program online with your phone or pc.  online compiler

How the program works?

The code is divided into six major parts check the code below:

/******************************************************************************
 C++ PROGRAM TO PRINT HELLO, ENGINEERS 
AUTOR: ORENGO DICKSON
EGERTON UNIVERSITY.
DATE: 11TH. 5. 2019
*******************************************************************************/
#include <iostream>  
using namespace std;
int main()
{
std::cout << "Hello Engineers!\n" << std::endl
return 0;
}
  1. #include <iostream>
  1. If you’ve already written code in C language before, you might seen this line of code before {#include <stdio.h>}. If you haven’t, don’t worry we’ll cover it now for better understanding.

2. This statement includes the header file into the application so that you are able to use the operations included in them. Also, you can create your own header files and include them in your program using the #include.

What is iostream? 

  1. iostream is what you call the header file. It is a standard C++ input/output library file.
  2. It comes packaged with the compiler/IDE (integrated development environment. ) and contain mechanisms to get the information from the user and print same or added information to a file, screen or any other media.

What is #include? 

  1. The #include iostream file, into the program. This ensures that now you’re able to use the operations, iostream operations (like: taking input from user, displaying output on the screen), in the program.

What is using namespace std;”?

  1. The statement is intuitive in itself, you are “using” the “namespace” “std” in your file.
  2. We use the namespace std to make it easier to reference operations included in that namespace.
  3. If we hadn’t used the namespace, we’d have written std::cout instead of cout. This tells the compiler that every cout is actually std::cout.

What’s a namespace?

  1. It’s a region where your code resides. It limits or expands the scope of your code to one or more files.

Why do you use namespace?

  1. Like two persons can have the same name, variables and functions in C++ can have same names as well. The use of namespace is to avoid the confusion of which variables/functions you are referencing to.

What is std?

  1. std is a standard namespace used in C++.

Semicolon ”;”

  1. Ask any C++ programmer and they will tell you at least one horror story related to the semicolon ; .
  2. The semicolon is a terminal. It terminates a statement. When missed or incorrectly used, it will cause a lot of issues.

int main() { }

  1. As the name suggests, it is the main function of the program. The code inside { } is called the body and is executed first when you run your C++ program.
  2. It is one code that is mandatory in a C++ program. If you just have this line of code alone, your program will be valid.

cout << “Hello World!”;

  1. This statement prints “Hello World!” onto the output screen.
  2. The cout is an object of standard output stream. What this means is, it outputs/prints the data after << , i.e. Hello World! into a stream (in this case, the output screen).

What is a stream?

  1. Stream is basically a sequence of objects, usually bytes. It can describe files, input/output terminal, sockets, etc.

What is <<?

  1. << is the insertion operator used to write formatted data into the stream.

What is return 0;?

  1. This statement returns 0 ‘zero’.
  2. This is called a return statement. It isn’t mandatory to return anything from the main() function but is rather a convention. If not return, the compiler returns a status automatically.

Why zero in return statement?

  1. It denotes Exit status of the application that basically the tells system “The program worked fine.”


Thanks for visiting our website!

????

Navigation Drawer for an Android App with source code

Navigation Drawer for an Android App with source code In this post, you’ll figure out how to show navigationdrawer in Android in kotlin language. We’ll cover how to utilize the.
DrawerLayout and NavigationView if you are new to Android Development this post will make you understand some of structure used in Android programming.
 The image below is an example of navigation drawer,  The user can view the navigation drawer when they touch menu icon.
How to add Navigation Drawer in Android, follow the steps below
#1. Open blank activity
Launch android studio and give your first application any name
After creating process has finished you can see project structure as shown in the image below.

#1 Adding dependencies .
This are found in build.gradle located in the following directory after android studio is launched           /app/build.gradle before we add any code to build.gradle let’s discuss few things about dependencies.
1. What are dependencies ?
2. Why do we add dependencies ?
In Android Studio, dependencies allows us to include external library or local jar files or other library modules in our Android project.
Example: Suppose I want to show some images in ImageView. But I’m using Glide Library to enhance the smoothness of application. So I have to add a dependency in the build.gradle(Module App) as:
compile ‘com.github.bumptech.glide:glide:3.7.0’
So Now I can use Glide library 🙂 and show my images. This makes it easy to manage external libraries in your project. To learn more about dependencies check here https://developer.android.com/studio/build/dependencies.html
Now open build.gradle file and add the following code below. [module-239]

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
 
android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.eufetresources.androidnavigationdrawer"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
 
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
Step 3. Create “drawer_view.xml” menu
Create first “Android Resource directory” and give it a name menu in the following directory /app/src/main/res/  then create resource file “drawer_view.xml” inthe follow directory /app/src/main/res/manu.
Then add the following code,


 

   
        <item
            android:id=”@+id/nav_profile”
            android:icon=”@drawable/ic_launcher_round”
            android:title=”Profile” />
        <item
            android:id=”@+id/nav_wallet”
            android:icon=”@drawable/ic_launcher_round”
            android:title=”Wallet” />
        <item
            android:id=”@+id/nav_offer”
            android:icon=”@drawable/ic_launcher_round”
            android:title=”Offers” />
        <item
            android:id=”@+id/nav_setting”
            android:icon=”@drawable/ic_launcher_round”
            android:title=”Setting” />
   




Once the above code is added you will realized the following code has an error android:icon="@drawable/ic_launcher_round" this can only be fixed by adding image icon named ic_launcher in drawable directory.  app/src/main/res/drawable/
You can download icon here Material icon download link: https://material.io/tools/icons/ and add to (app/src/main/res/drawable/      )   directory.
 



Adding code in  “activity_main.xml” layout file
Open activity_main,xml file and ad the follow code.



    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

   
    <FrameLayout
        android:id="@+id/content_frame"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
   

   
    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        app:menu="@menu/drawer_view" />



Setting App Theme
 Open your “values/style.xml” and set the app theme
such as Theme.AppCompat.Light.NoActionBar: 


 
   
   
 

Adding code to MainActivity.kt
Now open MainActivity.kt file and add the following code.

package `com.eufetresource.androidnavigationdrawer
 
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.design.widget.NavigationView
import android.support.v4.view.GravityCompat
import android.support.v4.widget.DrawerLayout
import android.support.v7.app.ActionBar
import android.support.v7.widget.Toolbar
import android.view.MenuItem
import android.widget.Toast
 
class MainActivity : AppCompatActivity() {
 
    private lateinit var mDrawerLayout: DrawerLayout
 
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
 
        val toolbar: Toolbar = findViewById(R.id.toolbar)
        setSupportActionBar(toolbar)
        val actionbar: ActionBar? = supportActionBar
        actionbar?.apply {
            setDisplayHomeAsUpEnabled(true)
            setHomeAsUpIndicator(R.mipmap.baseline_menu_white_18dp)
        }
 
        mDrawerLayout = findViewById(R.id.drawer_layout)
 
        val navigationView: NavigationView = findViewById(R.id.nav_view)
        navigationView.setNavigationItemSelectedListener { menuItem ->
            // set item as selected to persist highlight
            menuItem.isChecked = true
            // close drawer when item is tapped
            mDrawerLayout.closeDrawers()
 
            // Handle navigation view item clicks here.
            when (menuItem.itemId) {
 
                R.id.nav_profile -> {
                    Toast.makeText(this, "Profile", Toast.LENGTH_LONG).show()
                }
                R.id.nav_wallet -> {
                    Toast.makeText(this, "Wallet", Toast.LENGTH_LONG).show()
                }
                R.id.nav_offer -> {
                    Toast.makeText(this, "Offer", Toast.LENGTH_LONG).show()
                }
                R.id.nav_setting -> {
                    Toast.makeText(this, "Setting", Toast.LENGTH_LONG).show()
                }
            }
            // Add code here to update the UI based on the item selected
            // For example, swap UI fragments here
 
            true
        }
    }
 
    //appbar - toolbar button click
    override fun onOptionsItemSelected(item: MenuItem): Boolean {
        return when (item.itemId) {
            android.R.id.home -> {
                mDrawerLayout.openDrawer(GravityCompat.START)
                true
            }
 
            else -> super.onOptionsItemSelected(item)
        }
    }
}

Download Source code

 

apk

To create and format a new partition (volume)

To create and format a new partition (volume)

1. Open Computer Management by selecting the Start button. The select Control Panel > System and Security > Administrative Tools, and then double-click Computer Management .
2. In the left pane, under Storage , select Disk Management.
3. Right-click an unallocated region on your hard disk, and then select New Simple Volume .
4. In the New Simple Volume Wizard, select Next .
5. Enter the size of the volume you want to create in megabytes (MB) or accept the maximum default size, and then select Next .
6. Accept the default drive letter or choose a different drive letter to identify the partition, and then select Next .
7. In the Format Partition dialog box, do one of the following: If you don't want to format the volume right now, select Do not format this volume , and then select Next .
To format the volume with the default settings, select Next .

8. Review your choices, and then select Finish .

.

We'd love to hear your feedback and questions about the problem kindly use comment area below.

How to Install a Windows Operating System in any laptop

Installing Windows may sound like an overwhelming  yet it’s actually very simple, if you’re installing  Windows 10, Windows 8 or Windows 7. You don’t need to take your computer to any experts for a simple reinstallation,  you can install Windows by yourself. In this tutorial i will explain the installation process of Windows. 

There are three question to be asked during Windows installation, Why do we install Windows, how to install Windows and where to install Windows.

Why do we install Windows?

1. We install Windows when it has affected by virus e.g shortcuts virus. But it is recommended to run latest anti-virus in your system.

2. If you want to creating partition specified amount of space in drive C, this means drive C should not contain any important files ,

NOTE Please make sure to back up all of your important data before proceeding with this installation . You can use external storage for a backup.

3. For upgrading,  e.g Windows 7 to Windows 8. or 8 to 10

Note: Before upgrading, check to make sure your PC meets the system requirements . For example If your device does not meet requirements for Windows 10, you may not have the great experience intended with Windows 10 and might want to consider purchasing a new computer.

Windows 10 Requirements

You can also go to the PC manufacturer’s website for any additional info about updated drivers and hardware compatibility.

4. Changing 64-bit or 32-bit processor (CPU) , for example 32bit(×86) and 64bit(64) To check this on your PC, go to PC info in PC settings or you can search for System type.

System type.

5. Slow start up. Sometimes slow start up can be affected by virus.

You can also disable start-up program prom task manager

6. Less responsive programs.

7. Hdd hard disk replacement.

If your computer experiences signs of hard drive failure, it’s best to replace it before it completely wears out. An this will need windows installation if you were to buy a new hard disk. The hard drive in your computer stores all of your files and the operating system, which is essential to using the computer. Computers can turn on and display the system BIOS screens without a hard drive, so removing the drive doesn’t damage anything — it just renders the computer useless. You will not be able to launch windows.

How to install Windows

Before you install window there are few things that I have highlighted below.

Requirements:

1. Os (operating system) that is Windows 7, Windows 8, Windows 10 and this can be downloaded from Here .

2. Set your computer to boot from DVD or USB.

For you to install window you need to have a bootable device such as flash disk. I have done this since 2013 and found flask disk is the best atleast 8GB because all operating system are more than 4GB size.

Step 3 – Choose the Windows 10 clean install option

precision agriculture kilimopap mobile application

PRECISION AGRICULTURE- KILIMOPAP MOBILE APPLICATION


INTRODUCTION


KilimoPAP mobile application is an agriculture technology project that was conceptualized and actualized by Enactus Egerton University Main Campus. The project seeks to improve agricultural productivity by empowering the youth to venture into agribusiness. Kilimo Pap is an integrated mobile application system that provides a link between the physical farm and digital farm through automation. Through the application of technology in agriculture specifically precision agriculture, KilimoPAP mobile application makes agriculture more profitable, efficient, safe, and environmentally friendly.


NEED
The mobile application was developed to reduce wastage associated with agriculture by ensuring precision. KilimoPAP Team observed the high number of unemployed youth, the agricultural productivity capability of Kenya and losses associated with agricultural products. The application addresses the dilemma of famine and hunger by empowering the youth to become farmers. The youth are the most proactive of the population yet most of them remain unemployed because they prefer white collar jobs over agriculture. Most youths tend to shy away from agriculture considering it unattractive due to the limited access, low returns, and lack of a market-lead approach in the agricultural sector. In addition, agriculture is labor intensive and requires a strong seasonal component.


INTERVENTION
KilimoPAP team intervened by developing a mobile application that will make agriculture easy, efficient and enjoyable. The mobile application focuses on digital farming which is the application of new technologies such as data science and digital communication channels. Through KilimoPap, one is able to access real-time data by monitoring of agricultural parameters such as soil moisture, temperature, soil pH, humidity, pests and diseases. The app makes it possible to carry out agricultural practices like fertigation, irrigation, procurement of agricultural inputs and agricultural extension services. In addition, KilimoPap connects farmers who wish to sell their produce to the consumers. The registration and signing up of farmers will help in the collection of critical data which will help in knowing the location of the farm, the size of the land under production, details of the farmer. The data collected will be used in helping farmers, private firms and the government in planning and knowing the total area under production. The analysis of the data is significant to establish if the country is achieving food security, agenda number one in Kenya’s big 4 agenda. Additionally information collected from farmers will be stored made retrievable by the farmer for future purpose. The data collected in the form of farm records is essential as it enables planning for subsequent crops to be planted in future. The digitalization of agriculture will enable key players in the sector to establish a feedback mechanism on performance and design based agricultural needs.

TECHNOLOGICAL ASPECT
 Integration of all methods through development of a mobile app/software and linking it to monitoring gadgets/devices in the farm to facilitate real time feeds on conditions of the crops in the farm.
 Use of tech to do efficient and precision application of all inputs in required quantities and at right time.
  Link farmers with Agro-input companies, processing companies and post-harvest storage and data storage of every farmer on the activities that take place in the farm.
  Remotely carry out all farm practices such irrigation, chemigation, pest and disease identification through a smartphone.
  Provision of agronomic services to farmers through USSD, links in the app and online chat services with qualified agronomist.
  Ability to quantify the expected output per square meter due to real data collected by the gadgets in the field.

OUTCOME
KilimoPAP mobile application ensures precision agriculture as farmers are no longer required to apply water, fertilizers, and pesticides uniformly across the entire farm. Instead, they can apply minimum quantities required and target very specific areas or even treat individual plants differently according to their specific requirements and needs. KilimoPAP mobile App will benefit its users in the following ways:  Higher crop productivity
 Reduce post-harvest losses by connecting farmers through the Soko
 Provide a link between farmers and agricultural services and specialists such as agronomists
 Decreased use of water, fertilizer, and pesticides, which in turn translates to reduced product prices
 Storage of specific farm data and farm records
The ultimate goal is to make farming attractive, interesting and fun so as to increase the number of youths participating in agriculture. This will increase agricultural productivity making Kenya food and nutrition secure.

How to displays all current IP network configuration values

Displays all current TCPor IP network configuration values and refreshes Dynamic Host Configuration Protocol DHCP and Domain Name System DNS settings. Used without parameters, ipconfig displays the IP address, subnet mask, and default gateway for all adapters.

  • The ipconfig command is the command-line equivalent to the winipcfg command, which is available in Windows Millennium Edition, Windows 98, and Windows 95. Although Windows XP does not include a graphical equivalent to the winipcfg command, you can use Network Connections to view and renew an IP address. To do this, open Network Connections, right-click a network connection, click Status, and then click the Support tab.
  • This command is most useful on computers that are configured to obtain an IP address automatically. This enables users to determine which TCP or IP configuration values have been configured by DHCP, Automatic Private IP Addressing APIPA, or an alternate configuration.
  • If the Adapter name contains any spaces, use quotation marks around the adapter name that is, Adapter Name.
  • For adapter names, ipconfig supports the use of the asterisk * wildcard character to specify either adapters with names that begin with a specified string or adapters with names that contain a specified string. For example, Local* matches all adapters that start with the string Local and *Con* matches all adapters that contain the string Con.
  • This command is available only if the Internet Protocol TCP or IPprotocol is installed as a component in the properties of a network adapter in Network Connections

Introduction to Skytop Technologies, DemosCAD

Introduction to Skytop Technologies.

Skytop technologies is a software innovation company whose core business is the development of software solutions for the building and construction industry, the manufacturing and the education sector.




The aim of skytop is to make professionals and students around the world become passionate and skilled in Autodesk AutoCAD and other CAD products.

Their Click-a-tool concept focuses on demonstrating how each tool works when you click on it.

Features in Demoscad:

  • Similar Interface to that of AutoCAD making it easy to replicate a design from the demonstration.
  • When you click on any command tool in DemosCAD, it instantly demonstrates how to carry out a task with that tool in Autodesk AutoCAD software.
  • Each of the tools in DemosCAD contains a project file that is linked to Autodesk AutoCAD software so that users may try out similar tasks with AutoCAD software.

The command tools in DemosCAD are the same tools found in Autodesk AutoCAD software program. They are also located in the same position as they are in AutoCAD. This similarity lets users easily identify and locate the tools in AutoCAD after learning how to work with them in DemosCAD. A person working with AutoCAD can also seamlessly transit to DemosCAD while in the middle of a design project to quickly see how a tool that he is struggling with works and easily return back toAutoCAD to continue with the project.

      Command Tutorials in DemosCAD

Upon viewing a demonstration in DemosCAD of an AutoCAD command tool, you may want to learn more about how the tool is used in a project. Clicking the Command Tutorials tab in DemosCAD opens up tutorials which show a user how the command tool is used with other AutoCAD tools in a Project. This lets you learn how to work with the tool to carry out a design project that require the use of multipleAutoCAD command tools.

Information!

For more information about DemosCAD

REMOVING SHORTCUT VIRUS USING CMD

REMOVING SHORTCUT VIRUS USING CMD

Computer Virus infection can also be removed through antivirus programs as you know, In this article we’re are talking about Shortcut Virus, a new modern virus automatically comes in your computer removal device and convert all of your content into a shortcut. Some

time this virus makes you content invisible (not showing)with only shortcut icon and storage showing still full.



Shortcut virus can’t be removed by anti-virus programs, even when you scan the shortcut virus infected location with an antivirus, the output will be “No threat detected” and it becomes really confusing. Format over infected storage can’t solve the problem.

The shortcut virus only affect your computer hence turn all removable device to shortcuts. 



Method available to remove any virus is using CMD. Before going through any method, I highly recommend you to First Scan the infected storage with an antivirus, and then go for the below methods. If your USB is bootable then it may change to normal.


Method  one > Using command prompt


Follow the steps below to remove shortcut virus using command prompt (CMD):

You need to access your computer task manager


1. Press Windows logo key +X and then press T key, this will open task manager

 

2. At the task manager click startup keenly look at programs that are running you will find some unique program. Make sure you Google those programs and get the full description.

3. If you are sure just right click at that program and select end program.

4. Right click again and select “open file location”

5. Delete all files are in that folder and restart your machine.

6. Now your computer virus is fixed but at your removable device they are still virus program, whenever you run it will affect your machine again please insert your removal device and don’t open any file that you don’t know. for more about removing the shortcut virus on a removable device and prevent affecting again your machine.