A Counter Project in JavaScript

Welcome to JavaScript course. This is a new JavaScript course designed, created and recorded fresh in 2020. This course will give you a fantastic start for your JavaScript journey. After this course you can move to Reactjs, AngularJS, NodeJS and many other such JS libraries and framework.

#javascript #developer

What is GEEK

Buddha Community

A Counter Project in JavaScript
Autumn  Blick

Autumn Blick

1593867420

Top Android Projects with Source Code

Android Projects with Source Code – Your entry pass into the world of Android

Hello Everyone, welcome to this article, which is going to be really important to all those who’re in dilemma for their projects and the project submissions. This article is also going to help you if you’re an enthusiast looking forward to explore and enhance your Android skills. The reason is that we’re here to provide you the best ideas of Android Project with source code that you can choose as per your choice.

These project ideas are simple suggestions to help you deal with the difficulty of choosing the correct projects. In this article, we’ll see the project ideas from beginners level and later we’ll move on to intermediate to advance.

top android projects with source code

Android Projects with Source Code

Before working on real-time projects, it is recommended to create a sample hello world project in android studio and get a flavor of project creation as well as execution: Create your first android project

Android Projects for beginners

1. Calculator

build a simple calculator app in android studio source code

Android Project: A calculator will be an easy application if you have just learned Android and coding for Java. This Application will simply take the input values and the operation to be performed from the users. After taking the input it’ll return the results to them on the screen. This is a really easy application and doesn’t need use of any particular package.

To make a calculator you’d need Android IDE, Kotlin/Java for coding, and for layout of your application, you’d need XML or JSON. For this, coding would be the same as that in any language, but in the form of an application. Not to forget creating a calculator initially will increase your logical thinking.

Once the user installs the calculator, they’re ready to use it even without the internet. They’ll enter the values, and the application will show them the value after performing the given operations on the entered operands.

Source Code: Simple Calculator Project

2. A Reminder App

Android Project: This is a good project for beginners. A Reminder App can help you set reminders for different events that you have throughout the day. It’ll help you stay updated with all your tasks for the day. It can be useful for all those who are not so good at organizing their plans and forget easily. This would be a simple application just whose task would be just to remind you of something at a particular time.

To make a Reminder App you need to code in Kotlin/Java and design the layout using XML or JSON. For the functionality of the app, you’d need to make use of AlarmManager Class and Notifications in Android.

In this, the user would be able to set reminders and time in the application. Users can schedule reminders that would remind them to drink water again and again throughout the day. Or to remind them of their medications.

3. Quiz Application

Android Project: Another beginner’s level project Idea can be a Quiz Application in android. Here you can provide the users with Quiz on various general knowledge topics. These practices will ensure that you’re able to set the layouts properly and slowly increase your pace of learning the Android application development. In this you’ll learn to use various Layout components at the same time understanding them better.

To make a quiz application you’ll need to code in Java and set layouts using xml or java whichever you prefer. You can also use JSON for the layouts whichever preferable.

In the app, questions would be asked and answers would be shown as multiple choices. The user selects the answer and gets shown on the screen if the answers are correct. In the end the final marks would be shown to the users.

4. Simple Tic-Tac-Toe

android project tic tac toe game app

Android Project: Tic-Tac-Toe is a nice game, I guess most of you all are well aware of it. This will be a game for two players. In this android game, users would be putting X and O in the given 9 parts of a box one by one. The first player to arrange X or O in an adjacent line of three wins.

To build this game, you’d need Java and XML for Android Studio. And simply apply the logic on that. This game will have a set of three matches. So, it’ll also have a scoreboard. This scoreboard will show the final result at the end of one complete set.

Upon entering the game they’ll enter their names. And that’s when the game begins. They’ll touch one of the empty boxes present there and get their turn one by one. At the end of the game, there would be a winner declared.

Source Code: Tic Tac Toe Game Project

5. Stopwatch

Android Project: A stopwatch is another simple android project idea that will work the same as a normal handheld timepiece that measures the time elapsed between its activation and deactivation. This application will have three buttons that are: start, stop, and hold.

This application would need to use Java and XML. For this application, we need to set the timer properly as it is initially set to milliseconds, and that should be converted to minutes and then hours properly. The users can use this application and all they’d need to do is, start the stopwatch and then stop it when they are done. They can also pause the timer and continue it again when they like.

6. To Do App

Android Project: This is another very simple project idea for you as a beginner. This application as the name suggests will be a To-Do list holding app. It’ll store the users schedules and their upcoming meetings or events. In this application, users will be enabled to write their important notes as well. To make it safe, provide a login page before the user can access it.

So, this app will have a login page, sign-up page, logout system, and the area to write their tasks, events, or important notes. You can build it in android studio using Java and XML at ease. Using XML you can build the user interface as user-friendly as you can. And to store the users’ data, you can use SQLite enabling the users to even delete the data permanently.

Now for users, they will sign up and get access to the write section. Here the users can note down the things and store them permanently. Users can also alter the data or delete them. Finally, they can logout and also, login again and again whenever they like.

7. Roman to decimal converter

Android Project: This app is aimed at the conversion of Roman numbers to their significant decimal number. It’ll help to check the meaning of the roman numbers. Moreover, it will be easy to develop and will help you get your hands on coding and Android.

You need to use Android Studio, Java for coding and XML for interface. The application will take input from the users and convert them to decimal. Once it converts the Roman no. into decimal, it will show the results on the screen.

The users are supposed to just enter the Roman Number and they’ll get the decimal values on the screen. This can be a good android project for final year students.

8. Virtual Dice Roller

Android Project: Well, coming to this part that is Virtual Dice or a random no. generator. It is another simple but interesting app for computer science students. The only task that it would need to do would be to generate a number randomly. This can help people who’re often confused between two or more things.

Using a simple random number generator you can actually create something as good as this. All you’d need to do is get you hands-on OnClick listeners. And a good layout would be cherry on the cake.

The user’s task would be to set the range of the numbers and then click on the roll button. And the app will show them a randomly generated number. Isn’t it interesting ? Try soon!

9. A Scientific Calculator App

Android Project: This application is very important for you as a beginner as it will let you use your logical thinking and improve your programming skills. This is a scientific calculator that will help the users to do various calculations at ease.

To make this application you’d need to use Android Studio. Here you’d need to use arithmetic logics for the calculations. The user would need to give input to the application that will be in terms of numbers. After that, the user will give the operator as an input. Then the Application will calculate and generate the result on the user screen.

10. SMS App

Android Project: An SMS app is another easy but effective idea. It will let you send the SMS to various no. just in the same way as you use the default messaging application in your phone. This project will help you with better understanding of SMSManager in Android.

For this application, you would need to implement Java class SMSManager in Android. For the Layout you can use XML or JSON. Implementing SMSManager into the app is an easy task, so you would love this.

The user would be provided with the facility to text to whichever number they wish also, they’d be able to choose the numbers from the contact list. Another thing would be the Textbox, where they’ll enter their message. Once the message is entered they can happily click on the send button.

#android tutorials #android application final year project #android mini projects #android project for beginners #android project ideas #android project ideas for beginners #android projects #android projects for students #android projects with source code #android topics list #intermediate android projects #real-time android projects

Shawn  Durgan

Shawn Durgan

1595547778

10 Writing steps to create a good project brief - Mobile app development

Developing a mobile application can often be more challenging than it seems at first glance. Whether you’re a developer, UI designer, project lead or CEO of a mobile-based startup, writing good project briefs prior to development is pivotal. According to Tech Jury, 87% of smartphone users spend time exclusively on mobile apps, with 18-24-year-olds spending 66% of total digital time on mobile apps. Of that, 89% of the time is spent on just 18 apps depending on individual users’ preferences, making proper app planning crucial for success.

Today’s audiences know what they want and don’t want in their mobile apps, encouraging teams to carefully write their project plans before they approach development. But how do you properly write a mobile app development brief without sacrificing your vision and staying within the initial budget? Why should you do so in the first place? Let’s discuss that and more in greater detail.

Why a Good Mobile App Project Brief Matters?

Why-a-Good-Mobile-App-Project-Brief-Matters

It’s worth discussing the significance of mobile app project briefs before we tackle the writing process itself. In practice, a project brief is used as a reference tool for developers to remain focused on the client’s deliverables. Approaching the development process without written and approved documentation can lead to drastic, last-minute changes, misunderstanding, as well as a loss of resources and brand reputation.

For example, developing a mobile app that filters restaurants based on food type, such as Happy Cow, means that developers should stay focused on it. Knowing that such and such features, UI elements, and API are necessary will help team members collaborate better in order to meet certain expectations. Whether you develop an app under your brand’s banner or outsource coding and design services to would-be clients, briefs can provide you with several benefits:

  • Clarity on what your mobile app project “is” and “isn’t” early in development
  • Point of reference for developers, project leads, and clients throughout the cycle
  • Smart allocation of available time and resources based on objective development criteria
  • Streamlined project data storage for further app updates and iterations

Writing Steps to Create a Good Mobile App Project Brief

Writing-Steps-to-Create-a-Good-Mobile-App-Project-Brief

1. Establish the “You” Behind the App

Depending on how “open” your project is to the public, you will want to write a detailed section about who the developers are. Elements such as company name, address, project lead, project title, as well as contact information, should be included in this introductory segment. Regardless of whether you build an in-house app or outsource developers to a client, this section is used for easy document storage and access.

#android app #ios app #minimum viable product (mvp) #mobile app development #web development #how do you write a project design #how to write a brief #how to write a project summary #how to write project summary #program brief example #project brief #project brief example #project brief template #project proposal brief #simple project brief template

wp codevo

wp codevo

1608042336

JavaScript Shopping Cart - Javascript Project for Beginners

https://youtu.be/5B5Hn9VvrVs

#shopping cart javascript #hopping cart with javascript #javascript shopping cart tutorial for beginners #javascript cart project #javascript tutorial #shopping cart

What's New in ECMAScript 2022 (ES2022/ES13)?

Howdy, folks! The fact that you're here means you're looking for the new JavaScript features you can use in the close future. But by any chance, if you're not familiar with TC39, ECMA, or ECMAScript, check this article before reading this one, because you will need to know these to understand some of the following parts.

The transparent stages of the TC39

TC39 is an amazing and dedicated group of people who come from many different backgrounds and have one goal in common: they want to help to make the JavaScript language better. To do so, they have to keep many things in mind, and one rule they have is "don't break the web". Their approach to the language actually reminds me of the medical approach to the patients: "First, do no harm". Every step is carefully and meticulously calculated, so they don't break the existing parts.

Every feature that gets added to the spec has to go through the following 5 stages, just like drug trials. To proceed to the next stage, each has to achieve certain criteria. To be added to the ECMAScript spec, a feature has to be at least on stage 4.

  • Stage 0 / Proposal: A new possible feature that is planned to be presented to the committee, or proposals that haven't yet achieved the criteria to pass to the next stage. Check out the current stage 0 proposals from here.
  • Stage 1 / Proposal: Still primitive, but the committee is willing to spend time on solving this problem and the general structure of the API is defined. Check out the current stage 1 proposals from here.
  • Stage 2 / Draft: Critical aspects of the proposal and its problems are solved. These features are expected to exist in future versions of the spec. Check out the current stage 2 proposals from here.
  • Stage 3 / Candidate: The proposal is comprehensively and meticulously reviewed, no stone is left unturned. This is the final stage before the feature actually makes it to the spec. Check out the current stage 3 proposals from here.
  • Stage 4 / Finished: Congrats, you are in the spec! Check out the finished proposals from here.

The ones who made it before

JavaScript is an evolving language, and some features we use today were actually added pretty recently. After 2015, TC39 decided to make the changes annually, so each year they decide which new features are ready to be added. This is the list of the features that have been added to the spec after 2015:

ES2016

  • Array.prototype.includes(): Determines if a given element is included in the specified array. String.prototype.contains() was also deprecated and String.prototype.includes() was added to determine if a given string in included in another string.
  • Exponentiation operator(** and **=): a**b is shorthand notation for Math.pow(a,b), and a **= b is shorthand for a = a**b

ES2017

  • Object.values / Object.entries: Retrieves an array of values / arrays of key-value pairs, respectively.
  • Trailing commas in function parameter lists and calls: Both (a) => {} and (a,) => {} are valid function definitions, and both foo(a) and foo(a,) are valid function calls.
  • Async functions: async/await was introduced to JavaScript
  • Object.getOwnPropertyDescriptors(): Returns the property descriptors of all own properties of an object.
  • String.prototype.padStart() / String.prototype.padEnd(): Takes two arguments, first one being the repeat number, second one being the string that is going to be added and adds padding to the start or end of a given string.

ES2018

  • Promise.prototype.finally: Finally was introduced to register a callback function that runs when a promise is settled (either fulfilled or rejected)
  • Rest and spread operators(...): Rest operator collects values in an array. The spread operator spreads the values in an iterator.
  • Asynchronous iteration: for-await-of was introduced. It is a variation of the for-of iteration statement and can be used in async iterable objects.
  • Improvements on Regular Expressions: RegExp Unicode Property Escapes, RegExp Lookbehind Assertions, s(dotAll) flag for regular expressions, RegExp named capture groups

ES2019

  • Array.prototype.flat(): Flattens nested arrays up to a provided depth. Default depth is 1.
  • Array.prototype.flatMap(): Flattens and maps a given array subsequently. Flattening depth is 1.
  • Object.fromEntries(): Builds an object from given key-value pairs.
  • String.prototype.trimStart(): Trims the start of a given string.
  • String.prototype.trimEnd(): Trims the end of a given string.
  • Symbol.prototype.description: Read-only and optional string description for the Symbol objects.
  • Optional catch binding: Allows the omission of the catch block.
  • Also the implementation of some existing features have changed, such as JSON.stringify(), Function.prototype.toString() and Array.sort()

ES2020

  • String.prototype.matchAll(): Returns all matches for a global regex.
  • dynamic imports: Before this, we could only use static imports, which only accepted strings for the module path. With dynamic imports, we got to conditionally import modules by using promises.
  • BigInt: A new primitive data type that represents numbers bigger than 2⁵³.
  • Promise.allSettled(): Returns when all given promises are settled (rejected or fulfilled, doesn't matter).
  • globalThis: Before this, the global object had different syntax in different JavaScript environments (in a web browser it can be either window, self, frames, or this, in web workers it is self, in Node.js it is global). globalThis provided a single syntax for the global object in all JavaScript environments.
  • Optional Chaining Operator(?.): Legible property chains that don't throw an error if a requested reference is missing. If one of the chained properties is nullish (null or undefined), the whole expression returns undefined.
  • Nullish coalescing operator(??): Binary operator. If the value of the left side expression is null or undefined, the right side of the operator is evaluated.

ES2021

  • String.prototype.replaceAll(): Replaces all the occurrences of a given string with another.
  • Promise.any(): resolves if any of the given promises are resolved.
  • Underscore as a numeric separator: To increase legibility in bigger numbers, numeric separators can be replaced with underscores.
  • Logical assignment operators(&&=, ||=, ??=) All of them are binary operators, with the added functionality for assignment. For &&=, if the left side is truthy, the right-side expression is evaluated and assigned to the variable on the left side. For ||= if the left side is falsy, the right-side expression is evaluated and assigned to the left-side variable. With the ??=, if the left-side value is null or undefined, the right-side expression is evaluated and assigned to the variable on the left side.
  • WeakRefs and Finalizers: This is a class that helps you create weak references to objects, so they can be garbage collected. A FinalizationRegistry object lets you register a callback that will allow you to invoke when the object is garbage collected.

The ones who made it to ES2022

Alright! You can check the latest spec that was published from here.

1. Class Fields:

Class Public Instance Fields & Private Instance Fields:

Since ES2015, we could define fields by simply setting them up in our constructors. As a convention, fields that were not supposed to be accessed outside of the class methods were preceded by an underscore, but this did not stop any consumer of this class from accessing them anyway.

class ColorButton extends HTMLElement {
  
  constructor() {
    this.color = "red"
    this._clicked = false
  }
}

const button = new ColorButton()
// Public fields can be accessed and changed by anyone
button.color = "blue" 

// Curse your sudden but inevitable betrayal 
console.log(button._clicked) // Prints: false, can be accessed from the instance
button._clicked = true // Doesn't throw an error, can be read from the instance

The first part of this proposal offers a more clear way to define the fields in a class. Instead of defining them in our constructor, we can now define, and if we want to, initialize them on the top level of our classes.

class ColorButton extends HTMLElement {
  color = "red"
  _clicked = false
}

The second part offers a more secure way of hiding private fields from prying eyes. Instead of the conventional underscore, we can now use a preceding # in the field names to block anybody from accessing them outside of the class they're defined on.

class ColorButton extends HTMLElement {
  // All fields are public by default
  color = "red"

  // Private fields start with a #, can only be changed from inside the class
  #clicked = false
}

const button = new ColorButton()
// Public fields can be accessed and changed by anyone
button.color = "blue"

// SyntaxError here 
console.log(button.#clicked) // Cannot be read from outside
button.#clicked = true // Cannot be assigned a value from outside

Private instance methods and accessors:

Some methods and variables of a class are internally important for that class to behave like it's supposed to, but shouldn't be accidentally reached from outside. To protect these implementation details and keep them strictly internal, we can use private methods and accessors with the syntax of a preceding #.

class Banner extends HTMLElement {
  // Private variable that cannot be reached directly from outside, but can be modified by the methods inside:

  #slogan = "Hello there!"
  #counter = 0

  // private getters and setters (accessors):

  get #slogan() {return #slogan.toUpperCase()}
  set #slogan(text) {this.#slogan = text.trim()}

  get #counter() {return #counter}
  set #counter(value) {this.#counter = value}

  constructor() {
    super();
    this.onmouseover = this.#mouseover.bind(this);
  }

  // private method:
  #mouseover() {
    this.#counter = this.#counter++;
    this.#slogan = `Hello there! You've been here ${this.#counter} times.`
  }
}

Static class fields and private static methods:

Static class fields and methods are useful when you want certain fields and methods to only exist in the prototype, but not in every instance of the given class. On the other side, you might also want to allow some of these fields and methods to be only accessed from within the class.

Since ES2015, we can define static fields on a class by simply defining the field on the class itself.

class Circle {}
Circle.PI = 3.14

Going forward, we are now able to define these static fields inside the class definition using the static keyword.

class Circle {
  static PI = 3.14
}

Just like we did with class fields and methods, we can use the # prefix to set any static method or field as private. This prevents access to these static fields and methods from the outside, meaning they can only be accessed from inside the class.

class Circle {
  static #PI = 3.14

  static #calculateArea(radius) {
    return #PI * radius * radius
  }

  static calculateProperties(radius) {
    return {
      radius: radius,
      area: #calculateArea(radius)
    }
  }

}

// Public static method, outputs {radius: 10, area: 314}
console.log(Circle.calculateProperties(10))

// SyntaxError - Private static field
console.log(Circle.PI)

// SyntaxError - Private static method
console.log(Circle.calculateArea(5))

2. Ergonomic brand checks for Private Fields:

In public fields, if you try to access a non-existent field on a class, you get undefined as a result. However, private class fields throw an exception instead of returning undefined when you try to access a non-existent field on an object. Then, one way to check if a private field exists in an object is to see if accessing that field inside the class throws an exception or not. However, this approach has a big shortcoming. The exception might simply be because of another reason, such as a faulty getter on an existing field.

That's why, in keyword was proposed to allow us to check if a given private property/method exists in a class instance:

class VeryPrivate {
  constructor() {
    super()
  }

  #variable
  #method() {}
  get #getter() {}
  set #setter(text) {
    this.#variable = text
  }

  static isPrivate(obj) {
    return (
      #variable in obj && #method in obj && #getter in obj && #setter in obj
    )
  }
}

3. RegExp Match Indices

Regular expressions allow us to search for patterns in strings. If you're not familiar with regular expressions, you might want to start by reading this article first.

Both Regexp.exec and String.matchAll gives us a list of matches as a result. Regexp.exec gives these results one by one, so you need to call it multiple times to get all matches until it returns null. On the other hand String.matchAll returns an iterator where you can iterate over all matches. These results include both the full string of characters and the parenthesized substrings being matched, the input string and the 0-based index of the match. Take a look at the following example:


const str = 'Ingredients: cocoa powder, cocoa butter, other stuff'
const regex = /(cocoa) ([a-z]+)/g
const matches = [...str.matchAll(regex)]

// 0: "cocoa powder", 1: "cocoa", 2: "powder"
// index: 13
// input: "Ingredients: cocoa powder, cocoa butter, other stuff"
console.log(matches[0])


// 0: "cocoa butter", 1: "cocoa", 2: "butter"
// index: 27
// input: "Ingredients: cocoa powder, cocoa butter, other stuff"
console.log(matches[1])

While these results are pretty informative about the location of the entire match in the original input, they lack information regarding the indices of the substring matches. By using the new /d flag, we can ask for the start and end positions of each matched capture group.


const str = 'Ingredients: cocoa powder, cocoa butter, other stuff'
const regex = /(cocoa) ([a-z]+)/gd
const matches = [...str.matchAll(regex)]

// 0: "cocoa powder", 1: "cocoa", 2: "powder"
// index: 13
// input: "Ingredients: cocoa powder, cocoa butter, other stuff"
// indices: [[13,25],[13,18],[19,25]]
console.log(matches[0])


// 0: "cocoa butter", 1: "cocoa", 2: "butter"
// index: 27
// input: "Ingredients: cocoa powder, cocoa butter, other stuff"
// indices: [[27,39],[27,32],[33,39]]
console.log(matches[1])

4. Top-level await:

Until this point, we could only use await in the scope of async functions. This was fine until it wasn't, like when we hit the top level of our module and could not use the await keyword. Now await can be used at the top level of a module, and can be super handy when initializing imports and creating fallbacks.

Here's an example:

// Before the top-level await, JavaScript would have given you a SyntaxError with this line of code, but that is no more
await Promise.resolve(console.log("🎉"))

So until the awaited promise is resolved, the execution of the current module and the parent module that imports the current child module are deferred, but the sibling modules can be executed in the same order. Check this article out to see more examples.

#javascript #es2022 

DCODE SHOW

DCODE SHOW

1597917769

Animated Counter Using JavaScript With HTML CSS | JavaScript Counter Animation

https://youtu.be/CQFgmBhwuN0

#javascript #counter #animatedcounter #setinterval #javascript counter animation