Since TreeMaps and TreeSets maintain keys/elements according to their natural ordering. Therefor TreeMap keys and TreeSet elements have to comparable to one another.
Say we have a custom Person class:
public class Person {
private int id;
private String firstName, lastName;
priva...
TreeMap and TreeSet are not thread-safe collections, so care must be taken to ensure when used in multi-threaded programs.
Both TreeMap and TreeSet are safe when read, even concurrently, by multiple threads. So if they have been created and populated by a single thread (say, at the start of the pro...
OnInit: this is really amazing thing in ionic2 or we can say in AngularJs2. With the same above example we can see what is ngOnInit is. So you are ready with the service method, now in your view/page you want that student list data available as soon as your view is going to appear, this should be th...
Log into a Google Account and click New > More > Google Forms.
Build the form fields required using the editor.
If the form was built with an account that is part of an organisation then click on the cog and unselect the option that only members can complete the form.
Set the form to save t...
This is done by adding a button, dialog box and iframe as explained below.
The examples below use MDL for look and feel because it is used by Google forms and so it makes the additional elements look fairly seamless.
Dialog boxes may require a polyfill if you plan to support older browsers.
The value of GOOGLE-FORM-PREFILLED-URL should look something like this:
https://docs.google.com/forms/.../?usp=pp_url&entry.1739003583=labelname1
jQuery('#googleFormButton').click(showGoogleForm)
jQuery('#googleFormButton').attr('googleFormsURL', 'GOOGLE-FORM-PREFILLED-URL')
Add a new function called showGoogleForm and adapt the follow code to suit. Note for simplicity this example does not contain any error checking which should be added in a production environment.
The url should look something like this:
https://docs.google.com/forms/.../?usp=pp_url&entry.17391...
To work with Json using C#, it is need to use Newtonsoft (.net library). This library provides methods that allows the programmer serialize and deserialize objects and more.
There is a tutorial if you want to know details about its methods and usages.
If you use Visual Studio, go to Tools/Nuget P...
Before reading some code, it is important to undersand the main concepts that will help to program applications using json.
Serialization: Process of converting a object into a stream of bytes that can be sent through applications. The following code can be serialized and converted into the previ...
You can receive a json from anywhere, a file or even a server so it is not included in the following code.
static void Main(string[] args)
{
string jsonExample; // Has the previous json
Author author = JsonConvert.DeserializeObject<Author>(jsonExample);
}
The method ".Dese...
Remove all conditional format in range:
Range("A1:A10").FormatConditions.Delete
Remove all conditional format in worksheet:
Cells.FormatConditions.Delete