Menu

Java Interface examples

In this blog we will see different ways of implement interface in Java.

For example we have two interfaces, IntOne and IntTwo as below.

interface IntOne {
    public String getSrc();
}

interface IntTwo {
    public String getName();
}

1. Simple one and one implements example of interface

class IntOneImpl implements IntOne {
    private String src = "Source Interface One";
    
    public String getSrc() {
        return src;        
    } 
}

class IntTwoImpl implements IntTwo {
    private String name = "Java Interface Examples";
    
    public String getName(){
        return name;
    }
    
}

public class Main
{
public static void main(String[] args) {
IntTwoImpl in = new IntTwoImpl();
IntOneImpl one = new IntOneImpl();
System.out.println(one.getSrc());
System.out.println(in.getName());
}
}

This will work fine and give you output 
Source Interface One
Java Interface Examples

2. Lets see if we implement both the interfaces in a single class and access their methods.


class IntOneImpl implements IntOne {
    private String src = "Source Interface One";
    
    public String getSrc() {
        return src;        
    } 
}

class IntTwoImpl implements IntOne, IntTwo {
    private String name = "Java Interface Examples";
    IntOneImpl intOne = new IntOneImpl();
    @Override
    public String getSrc() {
        return intOne.getSrc();
    }
    
    @Override
    public String getName(){
        return name;
    }
    
}

public class Main
{
public static void main(String[] args) {
IntTwoImpl in = new IntTwoImpl();
System.out.println(in.getSrc());
System.out.println(in.getName());
}
}

Lets see what is happeing in this code.

a. IntOneImpl implements the IntOne and provide definition of getSrc method.

b. IntTwoImpl implements IntOne and IntTwo interfaces and override methods from both the interfaces. 

 


Frame.io version 4

With the new Frame.io version 4, a user can customize and manage any end-to-end creative workflow faster and more effectively than ever before. Adobe is launching this features very soon. to know more and try it free for a while please do visit frame.io

New features added in Frame.io are:

1. Share from one centralize place to anywhere.

2. Share with customized or branded look and feel.

3. Easy collaboration with teams, users, and projects for design and customization.

4. Bulk upload.

5. Rich interface.

6. Frame level review.


AI for everything | Intelligent Innovations

AI Across Sectors: Pioneering Intelligent Innovations     

The integration of Artificial Intelligence (AI) into various sectors marks a significant leap towards a future where technology not only assists but also enhances human capabilities. AI's vast potential is reshaping industries by offering novel solutions to longstanding challenges, leading to a new era marked by heightened efficiency, improved productivity, and deeper insights. This blog delves into the transformative impact of AI across different domains, showcasing how it is driving progress and innovation.  

   


1. Healthcare: Enhancing Diagnosis and Treatment  

AI has been a pivotal force in healthcare, significantly advancing patient care and making medical services more accessible. By efficiently analyzing complex datasets, AI algorithms can identify patterns and insights at a pace and accuracy beyond human capability. Tools like IBM Watson are assisting healthcare professionals in making informed decisions by predicting disease outbreaks and tailoring patient treatment plans. AI's precision in surgeries minimizes recovery times and human error, showcasing its potential to save lives.  

   

2. Finance: Innovating for Security and Personalization

The finance sector has witnessed a revolution with the integration of AI, changing the way we manage and interact with our finances. AI-driven technologies enable personalized banking experiences, enhance fraud detection systems, and streamline risk management. By analyzing customer data, AI can offer customized financial advice and detect potential fraud, ensuring security and personalized service. Moreover, AI-powered investment platforms are democratizing financial planning, making it accessible to a wider audience.  

   

3. Agriculture: Boosting Yields and Sustainability

AI's application in agriculture is fostering more sustainable farming practices and increasing crop yields. Precision agriculture, powered by AI, utilizes data from satellites and field sensors to optimize resource use, predict weather patterns, and monitor crop health. This not only boosts productivity but also promotes environmental sustainability by reducing the use of water and chemicals.  

   

4. Manufacturing: Enhancing Efficiency and Productivity

In manufacturing, AI is streamlining operations through predictive maintenance and smart automation. AI's ability to forecast equipment failures reduces downtime and enhances production efficiency. Collaborative robots, or "cobots," work alongside humans, performing repetitive tasks and allowing the workforce to focus on more complex operations, thereby boosting overall productivity.  

   

5. Transportation and Logistics: Revolutionizing Mobility and Delivery

AI is transforming the transportation and logistics sector by improving safety and efficiency. The development of autonomous vehicles promises to minimize accidents and redefine both personal and public transport systems. In logistics, AI optimizes delivery routes in real-time, ensuring faster and more cost-effective services. Major companies are leveraging AI to refine their operations and enhance customer satisfaction.  

   

6. Education: Tailoring Learning Experiences

AI's role in education is expanding, offering more accessible and personalized learning opportunities. AI-driven tutoring systems adapt to individual learning styles, providing personalized content and pacing. Platforms leverage AI to recommend courses tailored to users' interests and learning history, while AI tools can automate grading, enabling educators to devote more time to student engagement and teaching.  

   

7. Environment: Championing Sustainability

AI is playing a crucial role in environmental conservation, using data analysis to monitor climate change and its impacts. It tracks deforestation, pollution, and illegal activities, aiding in the prediction and preparedness for natural disasters. Furthermore, AI-driven solutions in energy management are helping industries reduce their environmental footprint.  

   

Conclusion 

Artificial Intelligence is reshaping our world, touching every aspect of our lives and heralding a future filled with promise and potential. Its applications across various sectors demonstrate AI's ability to solve complex challenges, drive innovation, and pave the way for a more efficient, sustainable, and inclusive future. As we embrace AI's possibilities, it's imperative to consider the ethical dimensions to ensure these advancements benefit society as a whole. The journey with AI is just beginning, with its full potential yet to be explored, promising a smarter and more connected world for future generations.

Issues with Aadhaar enrollment centers

We are the people from a small town named xyz, in state of Jharkhand. we are struggling to enroll for new Aadhaar and update the information in existing Aadhaar because there is no Aadhaar enrollment center in our town. The population of our town in approx eight thousand. Our town have post office and a banks as well; where hundred of people daily interacting and using their services. 

As we all aware that without Aadhaar a person seems he doesn't living in India; and if we are holding Aadhaar then we have to link everything means everything with our Aadhaar number. In case If we dont have Aadhaar; 
  • We cant to able to open a bank account.
  • We can't enroll for PAN, 
  • We can't buy a SIM card. and many more 

We could analyse and think the difficult life of a common man without Aadhaar. Or a civilian's life become more difficult when there is no Aadhaar enrollment center in his/her village or town. In our town we don't have any Aadhaar enrollment center and nearest enrollment centers are too far; a person had to travel 20-30 kilometers to update their Aadhaar card and have to waste one or half of the his/her day; specially for those people who are working on daily wage. 

Hence I reuqest UIDAI to open a Aadhaar enrollment center either based on population or division. At least we should have a Aadhaar enrolment center on 10,000 people.

Also I would like to bring to your kind notice that some Aadhaar enrollment centers are charging willfulness amount to enroll for new Aadhaar or make any update in existing Aadhaar card; I heard from some people that they used to charge 150-250 rupees, which is completely unacceptable. But the maximum charge which UIDAI proposed is far less than the amount collected by the center. Visit https://www.uidai.gov.in/images/akr_policy_on_pricing_30082016.pdf to see the maximum fee to be collected from the residents for the services(enrollment, update and other services) provided by Registrar/EAs/Other Service Providers, w.e.f. January 01, 2017.

I think this is not only the story of our town, but this is the issue of every small town and village of India. 

I wrote this article and need your help and support to bring this issue in attention of UIDAI, and let UIDAI know how civilians are struggling with the service of UIDAI. I hope and expecting UIDAI will take necessary action and make their service easy and accessible for every citizen and take the restrict action against those centers who are charging more than proposed fees.

Image from @Aadhar official portal



References:
1. Maximum fee for Aadhaar service:UIDAI | https://www.uidai.gov.in/images/akr_policy_on_pricing_30082016.pdf

Different ways of writting loops in Python

Lets see we have a list of inetgers name x. 

x = [3,3,3,4,4,4,3,3,5,5,6,6,7,8,9,9,9]

Now iterate over this list using differnet loops.


  1. For loop

          #To read all  the elements from list

for elem in x:
    print(elem)


       #To read element from specific index using range(startindex, stopindex)

        for i in range(2, len(x)):

            print(x[i])

 

  1. While loop
    i = 4
while i < len(x):
    print(x[i])
    i+=1

    Prefix sling is not bound | AEM Dialog

    [ERROR] ValidationViolation: Could not parse FileVault Document View XML: The prefix "sling" for attribute "sling:resourceSuperType" associated with an element type "jcr:root" is not bound. @ jcr_root\apps\wknd\components\banner\.content.xml, line 6, column 42, validator: jackrabbit-docviewparser, JCR node path: /apps/wknd/components/banner, Throwable: The prefix "sling" for attribute "sling:resourceSuperType" associated with an element type "jcr:root" is not bound.


    Resolution:

    Sling is not added in the xml name space. In jcr:root element add the follwing xmlns. 

    xmlns:sling="http://sling.apache.org/jcr/sling/1.0"

    Difference Casings in Programming

    In this blog we will understand the differences between the most widely used case types while writing the variable name or function or method name in computer programming.

    1. Camel Case: In Camel case we start writing from small letter and then after write first character of every word in capital. e.g. javaVariableNaming, namingConvension, camelCaseType

    2. Pascal Case: Pascal case is similar to camel case the only difference is, we write first letter of first word also capital. e.g. VariableName = "Name", BackgroundColorCode = "red", MaximumMarks = 100

    3. Snake Case: In Snake case we write all characters either in lower or upper case and seprate the words with undescore character(_). This is widely use in JavaScript, Node JS, Python e.g. modal_id = "pop-singup", PETROL-MILEAGE-CAR = 20

    4. Kebab Case: Kebab case is similar to Snake case where we write eveything in small or capital case and seprate the word with hyphen(-) e.g. color-code = "#FFFFFF", max-value-allow = 55, DIESEL-MILEAGE-CAR = 20