Tutorial by Examples: n

When you need multi level menus, with multiple parameters SharpShell comes to rescue. https://github.com/dwmkerr/sharpshell has umpteen number of examples and it works perfect even for single level to multi level custom context menus. Key thing is to create class with attributes [ComVisible(true)]...
Usage of loops is an excellent way to keep the code DRY and avoid repetition. Unlike in Sass, there are no built-in @for or @each directive in Less for writing loops but it can still be written using recursive mixins. A recursive mixin is nothing but a mixin which keeps calling itself. There are fo...
private final Logger logger = Logger.getLogger(getClass().getCanonicalName()); WebView webView = new WebView(); webEngine = webView.getEngine(); webEngine.setOnAlert(event -> logger.warning(() -> "JS alert: " + event.getData()));
When using a WebView to display your own custom webpage and this webpage contains Javascript, it might be necessary to establish a two-way communication between the Java program and the Javascript in the web page. This example shows how to setup such a communication. The webpage shall display an i...
The display of elements in a list or grids is a very common pattern in mobile applications. The user sees a collection of items and can scroll through them. The collection of items can be a list, a grid or another structured representations of data. The RecyclerView widget is a more advanced and fl...
Installing TeamCity server Setting up and Running Additional Build Agents
The chart consists out of HTML container and the JavaScript code that instantiates a chart in it. HTML We use a <div> element as chart container. <div id="chartdiv" style="height: 300px;"></div> JavaScript To instantiate the chart we use AmCharts.makeChar...
You can concatenate strings separated by delimiter using the string_agg() function. If your individuals table is: NameAgeCountryAllie15USAAmanda14USAAlana20Russia You could write SELECT ... GROUP BY statement to get names from each country: SELECT string_agg(name, ', ') AS names, country FROM ...
Bash can easily create lists from alphanumeric characters. # list from a to z $ echo {a..z} a b c d e f g h i j k l m n o p q r s t u v w x y z # reverse from z to a $ echo {z..a} z y x w v u t s r q p o n m l k j i h g f e d c b a # digits $ echo {1..20} 1 2 3 4 5 6 7 8 9 10 11...
Sometimes it's useful to test private & protected methods as well as public ones. class Car { /** * @param mixed $argument * * @return mixed */ protected function drive($argument) { return $argument; } /** * @return bool *...
Selection with increasing scope This comes handy when you want to select a block to extract a variable / method etc, no need to do a precise bracket matching, just put the caret somewhere in the statement and keep doing this Windows: Ctrl + W OS X / macOS: Cmd + W Selection with decreasing scope...
A for-each loop in Less has the same key components as a for loop except for the following differences: A variable which contains the list of items that has to be iterated over. An extract() function to extract each item in the variable based on the loop's index. A length() function to calculat...
The only major differences between this and a regular TCP connection are the private Key and the public certificate that you’ll have to set into an option object. How to Create a Key and Certificate The first step in this security process is the creation of a private Key. And what is this private ...
SolrJ comes as part of the Solr distribution since Solr 1.x. The latest Solr version can be downloaded here. From Solr-6.3.0 that is the latest version available, we need to get the following libraries and add them to our build path: /dist/apache-solr-solrj-.jar /dist/solrj-lib/ Once we're done,...
CREATE TABLE users (username text, email text); CREATE TABLE simple_users () INHERITS (users); CREATE TABLE users_with_password (password text) INHERITS (users); Our three tables look like this: users ColumnTypeusernametextemailtext simple_users ColumnTypeusernametextemailtext users_with_p...
Let's create two simple tables: CREATE TABLE users (username text, email text); CREATE TABLE simple_users () INHERITS (users); Adding columns ALTER TABLE simple_users ADD COLUMN password text; simple_users ColumnTypeusernametextemailtextpasswordtext Adding the same column to the parent ta...
With AspNetCore you can develop the application on any platform including Mac,Linux,Window and Docker. Installation and SetUp Install visual Studio Code from here Add C# extesnion Install dot net core sdk. You can install from here Now you have all the tools available. To develop the applic...
While the String.Format() method is certainly useful in formatting data as strings, it may often be a bit overkill, especially when dealing with a single object as seen below : String.Format("{0:C}", money); // yields "$42.00" An easier approach might be to simply use the To...
public class AuthenticationHandler : DelegatingHandler { /// <summary> /// Holds request's header name which will contains token. /// </summary> private const string securityToken = "__RequestAuthToken"; /// <summary> ...
Spock framework information can be found at the Spock website. There are basically three ways to use Spock in Groovy as a dependency using the Grape dependency manager : Add the following to your groovy script. @Grab(group='org.spockframework', module='spock-core', version='1.1-groovy-2.4.1'...

Page 615 of 1088