Skip to main content

Posts

Showing posts from 2017

6 Major signs of leadership by Dr Tareq al-Suwaidan

    6 Major signs of leadership         1. The ability to analyze (Analytical Ability).
            1. Smart Questions.
            2. Smart Comments.
            3. Quick Understanding.
            4. Good Expectations.
        2. Take Initiatives (Ideas, Projects).
            1. One who starts projects.
            2. One who presents new ideas.
            3. One who leads the group.
            4. One who starts an organization.
            5. One who has creativity.
        3. Courage.
            1. Situation of fear.
            2. Expressing ideas boldly.
            3. Criticism.
            4. Has influence on others.
        4. Being Serious.
            1. Activism.
            2. Clubs.
            3. Hobbies.
            4. Reads a lot.
        5. Ambitious.
            1. Look to be in High position.
            2. Want to leave a legacy.
        6. Leadership Environment.
            1. Families already leaders.
            2. Coming from rich families.
            3.…

How-to Generate Build-Numbers for Gradle Projects

Add the below stuff to your build.gradle file. Everytime build or any other task is executed the below code will generate date based build-no and insert into the application.properties file


allprojects { updateVersionInApplicationProperties() } def updateVersionInApplicationProperties() { def configFile = new File('Webapp/src/main/resources/application-build.properties') if (!configFile.exists()) { configFile = new File('src/main/resources/application-build.properties') } println "Updating version to '" + getDate() + "' in ${configFile}" String configContent = configFile.getText('UTF-8') configContent = configContent.replaceAll(/info\.build\.version=.*/, "info.build.version=" + getDate()) configFile.write(configContent, 'UTF-8') } def getDate() { new Date().format('yy.MM.dd') }

Go For Java Developers

Data Types:String  --> string (defaults to "")Integer --> int    (defaults to 0)Double --> float (defaults to 0.0)Boolean --> bool (defaults to false)    final equivalent      const x string = "text"      Define      String x   -->    var x string    Initialize     x = "text" --> x = "text"   Define & Initialize     String x = "text" --> x := "text"
   Collection      List list = new ArrayList<>();   --> var list []string                                                                       --> list := []string{"text"}                                                                       --> list = append(list, "another text")
    Map map = new HashMap<>():
       var x map[string]int  where string is key and int is value.        x["key1"] = 10    Control Statements      if/for/switch if (condition) {} --> if (condition) {}     e.g.      if (10 >= …