This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new QualifiedNameProvider().getFullyQualifiedName(aObject) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| EObject eObject = ieObjectDescription.getEClass().getEPackage().getEFactoryInstance().create(ieObjectDescription.getEClass()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| final List<Customer> customers = getCustomersFromDb(); | |
| IntStream.range(0, customers.size()).forEach(index -> { | |
| print("Index " + index) | |
| print("Customer " + customers.get(index)); | |
| } | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*************************GO-LICENSE-START********************************* | |
| * Copyright 2014 ThoughtWorks, Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String jvmVersion = System.getProperty("java.vm.specification.version"); | |
| if ("1.8".equals(jvmVersion)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get PID using "jps -mv" | |
| jstack -l <PID> > dump.txt | |
| Reference - https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static final String SCHEME = "content"; | |
| public static final String AUTHORITY = "org.nbhusare.contacts"; | |
| public static final String CONTENT_PATH = "contacts"; | |
| new Uri.Builder().scheme(SCHEME).authority(AUTHORITY).appendPath(CONTENT_PATH).build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create in-memory database | |
| Room.inMemoryDatabaseBuilder(context, ContactDb.class).build(); | |
| // Create file based database | |
| Room.databaseBuilder(context, ContactDb.class, "contact-db").build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static List<File> getFilesFromBundle(final Bundle bundle, final String folderName) { | |
| final List<File> files = Lists.newLinkedList(); | |
| final Enumeration<URL> findEntries = bundle.findEntries("/" + folderName, "*", false); // recursive = false | |
| while (findEntries.hasMoreElements()) { | |
| final URL url = findEntries.nextElement(); | |
| try { | |
| final URL fileURL = FileLocator.toFileURL(url); | |
| final File file = new File(fileURL.getFile()); | |
| files.add(file); | |
| } catch (final IOException e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [alias] | |
| aliases = !git config --get-regexp ^alias\\. | sed -e s/^alias.// -e s/\\ /\\ $(printf \"\\043\")--\\>\\ / | column -t -s $(printf \"\\043\") | sort -k 1 | |
| $ git aliases |