Posts

Showing posts from 2019

CNC Return to Reference

What does G28 Return to Reference Position Do? G28 is one of those odd g-codes that you don’t use very often, but when you need it, it’s pretty darned handy. It’s function is to return to the machine’s reference position, sometimes called the zero position. That zero return position is where most progams begin, most machines will go to this position when you manually home or reference the machine, and it is the reference or zero position for calculating fixture offsets for mills and geometry offsets for lathes. Typically, G28 allows the movement to be done via an intermediate position. The movement to the reference position is done at rapids (G0) speed,and the intermediate position is used to ensure there are no collisions along the way. On many machines, if you have Single Block on, you push the Cycle Start twice–once to go to the intermediate position and once to finish at the reference position. Specifying the G28 Intermediate Position on Mills The intermediate position is speci...

How to Stop Selenium browser popup "Failed to load extension from : c:/users/internal. Loading of unpacked extensions is disabled by the administrator".

Image
How to Stop Selenium browser popup "Failed to load extension from : c:/users/internal. Loading of unpacked extensions is disabled by the administrator". You can stop this by creating webdriver with special properties. Example: ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions.setExperimentalOption("useAutomationExtension", false);

How to handle browser admin login popup in selenium?

Image
How to enter username and password to this browser login popup? Solution: You can send username and password in the URL request. Example:  htpp://username:password@xyz.com But in the latest web browser url credentials are blocked because of security issues. Still you can use that features, you have to create web driver with some special operations. Example: ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions.addArguments("--disable-blink-features=BlockCredentialedSubresources"); This feature consider as network error. You can reopen the URL. Example: driver.get(" htpp://username:password@xyz.com"); driver.get("xyz.com");

Java - Annotations for Concurrency

Class Annotations We use three class-level annotations to describe a class's intended thread- safety promises: @Immutable, @ThreadSafe, and @NotThreadSafe. @Immutable means, of course, that the class is immutable, and implies @ThreadSafe. @NotThreadSafe is optionalif a class is not annotated as thread-safe, it should be presumed not to be thread-safe, but if you want to make it extra clear, use @NotThreadSafe. These annotations are relatively unintrusive and are beneficial to both users and maintainers. Users can see immediately whether a class is thread-safe, and maintainers can see immediately whether thread-safety guarantees must be preserved. Annotations are also useful to a third constituency: tools. Static codeanalysis tools may be able to verify that the code complies with the contract indicated by the annotation, such as verifying that a class annotated with @Immutable actually is immutable. Field and Method Annotations The class-level annotations above ar...

Elasticsearch - Indices

Indices are containers for mapping types. An Elasticsearch index is an independent chunk of documents, much like a database is in the relational world: each index is stored on the disk in the same set of files; it stores all the fields from all the mapping types in there, and it has its own settings. For example, each index has a setting called refresh_interval, which defines the interval at which newly indexed documents are made available for searches. This refresh operation is quite expensive in terms of per- formance, and this is why it’s done occasionally—by default, every second—instead of doing it after each indexed document. If you’ve read that Elasticsearch is near-real-time, this refresh process is what it refers to. TIP Just as you can search across types, you can search across indices. This gives you flexibility in the way you can organize documents. For example, you can put your get-together events and the blog posts about them in different indices or in differ...

Elasticsearch - Types

Types are logical containers for documents, similar to how tables are containers for rows. You’d put documents with different structures (schemas) in different types. For example, you could have a type that defines get-together groups and another type for the events when people gather.  The definition of fields in each type is called a mapping. For example, name would be mapped as a string, but the geolocation field under location would be mapped as a special geo_point type. (We explore working with geospatial data in appendix A.) Each kind of field is handled differently. For example, you search for a word in the name field and you search for groups by location to find those that are located near where you live. TIP Whenever you search in a field that isn’t at the root of your JSON docu- ment, you must specify its path. For example, the geolocation field under location is referred to as location.geolocation. You may ask yourself: if Elasticsearch is schema-free, why ...

Elasticsearch - Documents

Elasticsearch is document-oriented, meaning the smallest unit of data you index or search for is a document. A document has a few important prop- erties in Elasticsearch: ■ It’s self-contained. A document contains both the fields (name) and their values (Elasticsearch Denver). ■ It can be hierarchical. Think of this as documents within documents. A value of a field can be simple, like the value of the location field can be a string. It can also contain other fields and values. For example, the location field might contain both a city and a street address within it. ■ It has a flexible structure. Your documents don’t depend on a predefined schema. For example, not all events need description values, so that field can be omitted altogether. But it might require new fields, such as the latitude and longitude of the location. A document is normally a JSON representation of your data. As we discussed in chap- ter 1, JSON over HTTP is the most widely used way to communicate wi...

Myworkspace JPMorgan

Myworkspace JPMorgan Chase links Below are the list of link for jpmc remote workspace myworkspace JPMorgan links : some time main server is down try with others links. myworkspace.jpmchase.com Myworkspace-sg-1.jpmchase.com/vpn/myworkspace.html Myworkspace-eqx-1.jpmchase.com/vpn/myworkspace.html https://myworkspace-cdh-1.jpmchase.com/vpn/myworkspace.html https://myworkspace-cdh-2.jpmchase.com/vpn/myworkspace.html https://myworkspace-ptp-4-in.jpmchase.com/vpn/myworkspace.html If any link is slow, use others link for fast vdi access.

Ag grid column ids dynamically changing adding _1

Column ID's Each column generated by the grid is given a unique ID. Parts of the Grid API use Column ID's (column identifiers). If you are using the API and the columns ID's are a little complex (eg what if two columns have the same  field , or what if you are using  valueGetter  instead of  field ) then it is useful to understand how columns ID's are decided. If the user provides  colId  in the column definition, then this is used, otherwise the  field  is used. If both  coldId  and  field then  colId  gets preference. If neither colId  or  field  then numeric is provided. Then finally the ID ensured to be unique by appending '_[n]' where n is the first positive number that allows uniqueness. In the example below, columns are set up to demonstrate the different ways ID's are generated. Open the example in a new tab and observe the output in the dev console. Note the following: Col 1 and Col 2 bot...

How do you find longest common substring ?

Problem statement: Given two strings S1 & S2. Find the longest common substring between S1 & S2. import java.util.ArrayList; import java.util.List; public class LongestCommonSubstring {     public static void main(String[] args) {         String S1 = "LCLC";         String S2 = "CLCL";         //String S3 = "abcdabccab";         //String S4 = "bcdaccabaabc";         List<String> com = commonSubstring(S1, S2);         for (String s: com){             System.out.println(s);         }     }     public static List<String> commonSubstring(String s1, String s2) {         Integer match[][] = new Integer[s1.length()][s2.length()];         int len1 = s1.length();         int len2 = s2.length(); ...

Jules + selenium + serenity + git configuration

ALM: Jules + bitbucket + Jira + git configuration example

How do you add two numbers represented by linked lists ??

Problem statement: You are given two  non-empty  linked lists representing two non-negative integers. The digits are stored in  reverse order  and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself. Example: Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Output: 7 -> 0 -> 8 Explanation: 342 + 465 = 807. class Node {     int data;     Node next;     Node(int data) {         this.data = data;     }     Node() {     }     @Override     public String toString() {         return "Node{" +                 "data=" + data +                 ", next=" + next +                 '}';     } } ...

Selenium sendkeys for non input like div or p or textarea

Intellij idea : rename variable and it's all reference places

Intellij idea shortcuts key: shift + F6

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 ...