How to check if a value is a double value in Android (Java)

To check if a value is a double value in Android you can use the snippet below.

Samples

Java (Android) Sample

If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

Please rate this snippet

IsSmallerThan generic extension method for C# and VB.NET

This is the IsSmallerThan generic extension method, this extension method which is part of the Fesslersoft.Extensions. It should only work with numeric values.

Samples

Sample C#

Sample VB.NET


If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

Please rate this snippet

IsLargerThan generic extension method for C# and VB.NET

This is the IsLargerThan generic extension method, this extension method which is part of the Fesslersoft.Extensions. It should only work with numeric values.

Samples

Sample C#

Sample VB.NET

If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

Please rate this snippet

How to check if an array contains a value in Javascript

To check if an array contains a value in Javascript you can use the snippet below.

Sample Javascript

Array.prototype.inArray = function (inputValue) {
	var counter;
	for (counter=0; counter < this.length; counter++) {
		if (this[counter] === inputValue) {
			return true;
		}
	}
	return false;
};

Please rate this snippet

How to check if a Form is Open in C# and VB.NET

To Check if a Form is open in C# and VB.NET you can use the snippet below.

Sample C#

public static bool FormIsOpen(FormCollection application, Type formType)
{
	//usage sample: FormIsOpen(Application.OpenForms,typeof(Form2)
	return Application.OpenForms.Cast<Form>().Any(openForm => openForm.GetType() == formType);
}

Sample VB.NET

Public Shared Function FormIsOpen(application__1 As FormCollection, formType As Type) As Boolean
	'usage sample: FormIsOpen(Application.OpenForms,GetType(Form2)
	Return Application.OpenForms.Cast(Of Form)().Any(Function(openForm) openForm.[GetType]() = formType)
End Function

Please rate this snippet

How to check if a variable exists in Python

To check if a variable exists in Python, you can use the snippet below.

Sample Python

if 'myVariable' in locals(): # myVariable exists locally.
if 'myVariable' in globals(): # myVariable exists globally.

Please rate this snippet

IsNull extension method for C# and VB.NET

You can use the IsNull Extension method by using the snippet below.

Sample C#

public static bool IsNull(this object source)
{
     return source == null;
}

Sample VB.NET

<System.Runtime.CompilerServices.Extension> _
Public Shared Function IsNull(source As Object) As Boolean
	Return source Is Nothing
End Function

As always, this extension method has been added to the Github Fesslersoft.Extensions Repository

Please rate this snippet