Posts

Convert String to an int

How to convert a String to an int ? String str = "1234"; Integer x = Integer.valueOf(str); // or int y = Integer.parseInt(str);

Groovy : Use Collect with Initial Collection Value

The collect() method in Groovy can be used to iterate over collections and transform each element of the collection. The transformation is defined in as a closure and is passed to the collect() method. But we can also add an initial collection to which the transformed elements are added. // Collect without // initial collection. assert [0,2,4,6] == (0..3).collect { it * 2 } assert ['Groovy', 'Grails'] == [lang: 'Groovy', framework: 'Grails'].collect { it.value } // Collect with initial collection argument. assert [0, 1, 2, 3] == [2, 3].collect([0, 1]) { it } assert [0, 3, 6, 9] == [2, 3].collect([0, 3], { it * 3}) assert ['Gradle', 'groovy', 'grails'] == ['Groovy', 'Grails'].collect(['Gradle']) { it.toLowerCase() } assert ['m','r','h','a','k','i'] == [4, -3, 7, 5].collect(['m', 'r']) { (it + 100) as char }

Groovy : Regular Expressions example

In Groovy we use the =~ operator (find operator) to create a new matcher object. If the matcher has any match results we can access the results by invoking methods on the matcher object. But Groovy wouldn't by groovy if we could access the results easier. Groovy enhances the Matcher class so the data is available with an array-like syntax. If we use groups in the matcher the result can be accessed with a multidimensional array. Although the result of the =~ operator is a matcher object in a conditional statement the result will be converted to a Boolean values. We can use a second operator, ==~ (match operator), to do exact matches. With this operator the matches() method is invoked on the matcher object. The result is a Boolean value. def finder = ('groovy' =~ /gr.*/) assert finder instanceof java.util.regex.Matcher def matcher = ('groovy' ==~ /gr.*/) assert matcher instanceof Boolean assert 'Groovy rocks!' =~ /Groovy/  // =~ in conditional cont...

Intellij idea: search anything with file extension

1. Press Ctrl+shift+f button 2. Check mark "file mask" checkbox 3. Enter extension "*. example" in this format

Wells Fargo payslips

1. Download https://allsechro.com/WellsFargo

Google Adsense High Paying Keywords 2019

Google AdSense is one of the best and leading monetizing networks to generate money from your blog. Most of the new bloggers or webmasters use AdSense as their only way to generate income from their websites. But the majority of them don’t know the importance of high CPC keywords even me at the starting of my blogging career. High Paying keywords list for Google Adsense. 1.Adobe illustrator classes (10$) 2.ANNUITY SETTLEMENT ($100.72) 3.ASBESTOS LAWYERS ($105.84) 4.AUTO ACCIDENT ATTORNEY ($75.64) 5.AUTOMOBILE ACCIDENT ATTORNEY ($76.57) 6.Bankruptcy lawyer (23$) 7.BEST CRIMINAL LAWYER IN ARIZONA ($97.93) 8.Best Seo company (16$) 9.Best social media platforms (15$) 10.Best social media platforms for business (20$) 11.BETTER CONFERENCING CALLS ($91.44) 12.Business finance group (20$) 13.Business management software (15$) 14.CAR ACCIDENT LAWYERS ($75.17) 15.CAR DONATE ($88.26) 16.CAR INSURANCE IN SOUTH DAKOTA ($92.72) 17.CAR INSURANCE QUOTES COLORADO ($100.93) 18.CAR ...

High CPC Adsene Ad Network List High CPC rate 2019

250 High CPC Adsene Ad Network List High CPC rate Adsene High CPC Ad Network List    High CPC Rate 1 Hearst Digital Media $10.80 2 InPowered $10.19 3 Kapanlagi $10.13 4 Yandex.ru $10.11 5 Open Inventory $9.24 6 WebAds $8.71 7 Madhouse Mobile $8.12 8 CPX Interactive $7.75 9 Guru Media $7.41 10 Advertising Alliance $6.59 11 Compare Group $6.33 12 transcosmos $6.09 13 eHealthcare Solutions $6.06 14 KPI Solutions $5.70 15 ScaleOut $5.65 16 Bannerconnect $5.43 17 Independent Traveler $5.40 18 Quantcast $5.29 19 MediaScience $5.17 20 AdKnowledge $5.11 21 Barons Media $4.91 22 Specific Media $4.81 23 InterCLICK $4.73 24 Dun & Bradstreet $4.70 25 Advantage Media $4.45 26 Bridge Marketing $4.41 27 Belgacom $4.39 28 Connexity $4.32 29 HealthiNation $4.30 30 Advertising Technologies $4.28 31 remerge $4.19 32 Media Decision $4.17 33 Performance ...