CodeHistoryAttribute a = (CodeHistoryAttribute)Attribute.GetCustomAttribute(typeof(Demo), typeof(CodeHistoryAttribute)); string S = "Developer: " + a.Developer + Environment.NewLine + "Revision: " + a.Revision + Environment.NewLine + "Comments: " + a.Comments;
The .Net is actually two things:
CLR is an application execution environment. The CLR makes it possible to code and compile an application once and then execute it in any platform or CPU the CLR supports. The CLR provides a host of services. Some of them are
The Framework Class Library (FCL) is a huge class library provided by the CLR. Classes are organized into hierarchical namespaces and contain classes for building user interfaces for desktop and web applications, accessing data, communicating, encrypting etc.
.Net is a standard administrated by European Computer Manufacturers Association (ECMA).
Microsoft .Net is Microsoft's implementation of .Net. There are at least two other implementations,
see also:
Compilers that target CLR compile to Common Intermediate Language (CIL), formerly called Microsoft Intermediate Language (MSIL). CIL is an object-oriented assembly language and it is actually a CPU and platform independent assembly-like instruction set and can be executed in any environment the CLR supports. see also:
CLR is the actual implementation of the Common Language Infrastructure (CLI) open specification standard (ECMA-335 and ISO/IEC 23271). CLI is a specification regarding the executable code and the runtime environment. CLI's design allows multiple high level programming languages to be used in writing applications, as long as they comform to the standard. Applications are written and compiled once and they are able to run in any platform the CLR supports. CLI makes it possible to have a single application written in multiple high level programming languages.
Among other things, CLI defines the following
CTS defines a set of data types that are common to all programming languages targeting CLR. Metadata defines type information in a language neutral manner. So type information is understandable by any language or tool targeting CLR.
CLS defines a set of rules, such as member visibility and instance construction that are common to all programming languages targeting CLR. CLS-compliant code of one language can interoperate with CLS-compliant code of another language. CLS is a subset of CTS.
VES loads and executes CLR applications. VES is the actual executor of the CIL bytecode.
see also:
Managed code is application code which is executed under the management of a virtual execution machine like VES. Unmanaged code is application code which is executed directly by the computer's CPU.
Code that targets the CLR is managed code, since the CLR manages the whole code execution. Code that does not target CLR is unmanaged code.
Manage code is type safe code according to rules befined by the CTS. Manage code is said to be "verifiable " because its type safety is verified.
see also:
Application is a term used in computing to denote a software tool which functions and operates on a computer, by means provided by the computer, possibly displaying some sort of user interface. An application enables people to use the computer in order to accomplish a specific task and is what is commonly called computer program.
In a multi-tasking environment it is required to isolate running applications, otherwise an application may affect the execution of another application. Traditionally this isolation context is called "a process ". An operating system process forms the boundaries of the execution of an application. In an unmanaged execution environment, those process boundaries prevent an application from directly accessing memory addresses or calling code which belongs to another running application.
Process is an operating system kernel object. When an application starts the operating system creates a process object associated with that application. An application may spawn multiple processes though.
see also:
In the CLR, managed code must successfully pass a verification test before it is allowed to run. That verification process prevents an application from accessing invalid memory addresses or perform any other not valid action that may harm other running applications. The CLR's ability to verify code resembles the process boundaries isolation offered by an operating system process and it comes with much lower performance cost.
Application domains is the CLR's way of imposing isolation between running applications. An application domain is contained within an operating system process. A single operating system process may contain several application domains. When a CRL application starts, a default application domain is created inside an operating system process.
see also:
System.AppDomain
class
An assembly contains CIL code, metadata, that is type information, dependency information, security information and resources.
An assembly is the unit of deployment, versioning and security in the .Net system.
There are two types of assemplies: application assemblies (EXE) and library assemblies (DLL).
An application assembly that starts an application must contain an entry point, such as a Main()
.
CLR recognizes the type of an assembly by examining a special flag each assembly contains. File extension is irrelevant. That is a library assembly may have either .dll
or .exe
as its extension.
The CIL code an assembly contains is compiled into machine code at runtime by the CLR Just In Time (JIT) compiler.
An assembly actually contains three things
A module may be written in a different programming language although this happens very rarely. For more information on creating multi-language assemblies check the /addmodule
compiler option. MS Visual Studio does not support multi-language assemblies.
It is also possible to create multi-file assemblies using command line tools such as the Assembly Linker (Al.exe). More information can be found in the online documentation.
For the contents of an assembly to be available to an application, the application has to define a reference to that assembly by using either the /reference
compiler option or the References item of the project tree in the Solution Explorer.
For an assembly to be executed it must be loaded into an application domain. A typical application loads several assemblies into a single application domain.
It is possible to explicitly load an assembly into an application domain by code.
It is not possible to unload an assembly. Only a complete application domain can be unloaded.
see also:
System.Reflection.Assembly
class
Assemblies that may be used by multiple applications are installed in the Global Assembly Cache (GAC) and they are called shared assemblies. GAC is found at C:\Windows\Assembly
.
For an assembly to be installed in GAC it must have a strong name. A strong name consists of the assembly's identity which is its simple text name, version number, and culture information, plus a public key and a digital signature.
MS Visual Studio and other IDEs can be used to assign a strong name to an assembly. Also a strong name can be generated by the Assembly Linker (Al.exe) tool which comes with the SDK.
Finally a strong name can be inserted by using the AssemblyKeyFileAttribute
or the AssemblyKeyNameAttribute
attributes directly in source code.
Assemblies that are not in GAC and are used locally by an application are called private assemblies. Private assemblies do not require a strong name because versioning information and security standards are more flexible than for shared assemblies.
The Global Assembly Cache command line tool (Gacutil.exe) makes it possible to inspect and manipulate the contents of the global assembly cache.
The execution of any type of CLR application requires a CLR host. A CLR host is a managed or unmanaged application which
Windows shell is a CLR host which starts applications (.exe) from the shell.
ASP.NET is also a CLR host which loads the CLR into a process which in turn handles web requests submitted to a web server.
The System.AppDomain
class corresponds to the application domain. The System.Reflection.Assembly
class corresponds to the assembly.
Reflection is the procedure by which application code can inspect its content regarding types, and query those types in order to discover their members. Reflection is about type information at runtime.
In CLR, Reflection is possible because of metadata information stored inside an assembly.
Reflection in CLR constructs objects which describe type information regarding types contained in assemblies, modules and types.
Reflection can also be used to dynamically create an instance of a type and invoke a certain member of the type.
The System.Type
class is the primary tool of the provided reflection functionality. System.Type
provides members which return information about a type, such as its constructors, methods, fields and properties. Those System.Type
members return information using instances of classes with descriptive names. Here are some of the returned types
System.Reflection.MemberInfo System.Reflection.ConstructorInfo System.Reflection.MethodInfo System.Reflection.PropertyInfo System.Reflection.FieldInfo System.Reflection.EventInfo
System.Type
also provides a number of bool read only properties, again with descriptive names, such as
IsClass IsValueType IsEnum IsInterface IsByRef IsArray IsNested IsSealed
System.Type
also provides a number of utility methods such as
InvokeMember() IsSubclassOf() GetType(string typeName)
The AppDomain
and Assembly
class also provide reflection capabilities.
Getting the currently executing assembly and an array of the types it contains
Assembly A = Assembly.GetExecutingAssembly(); // another way to get the current assembly Type[] types = A.GetExportedTypes(); // gets an array of all public types
Supposing there is a Lessons.dll
assembly with the following code
namespace Lessons { public class Item { public Item(string Name, double Price) { this.Name = Name; this.Price = Price; } public void IncreasePriceBy(double Percent) { Price += Price * Percent / 100; } public string Name { get; set; } public double Price { get; set; } } }
Loading an assemply dynamically
Assembly LessonsAssembly; // a reference for a dynamic loaded assembly ... if (File.Exists(FileName)) LessonsAssembly = Assembly.LoadFrom(FileName); // load the Lessons.dll assembly dynamically
Accessing types and member info from an assembly
Type t = LessonsAssembly.GetType("Lessons.Item"); // get a type from the dynamically loaded assembly PropertyInfo[] props = t.GetProperties(); // get the properties of a type MethodInfo[] methods = t.GetMethods(); // get the methods of a type
Invoking a constructor
ConstructorInfo ci = t.GetConstructor(new Type[] {typeof(string), typeof(double) }); // get a constructor of a type object o = ci.Invoke(new object[] {"Hard disk", 5 }); // invoke the constructor
Getting and setting property values and invoking a method
pi = t.GetProperty("Name"); pi.SetValue(o, "Mouse", null); // set the value of a property MessageBox.Show(pi.GetValue(o, null).ToString()); // display its value MethodInfo mi = t.GetMethod("IncreasePriceBy"); // get a method mi.Invoke(o, new object[] { 10 }); // invoke the method, the method affects the Price property
A lambda expression is a form of an anonymous method introduced in C# 3.0.
Anonymous methods of the C# 2.0 and lambda expressions of C# 3.0 are collectively known as anonymous functions. Both forms are used in creating delegate values "on the fly" and may contain expessions and statements.
Lambda expressions are also used in creating Expression Trees. Here is an old sample, taken from the Delegates section above and enhanced with a lambda expression example.
public delegate void StringDelegate(string Text); public void Display(string S) { MessageBox.Show("Named method: " + S); } private void button1_Click(object sender, EventArgs e) { // a named method StringDelegate d = Display; // an anonymous method d += delegate(string S) { MessageBox.Show("Anonymous method: " + S); }; // a lambda expression d += (S) => { MessageBox.Show("Lambda expression: " + S); }; d("Hi there!"); }
The operator =>
is called the lambda operator (and it has nothing to do with the >=
relational operator). The lambda expression operator resembles an arrow, just to emphasize that whatever is at its left side "goes to" the right side as an input parameter to an anonymous method. Left side parameters, if any, are passed to the right side code block.
( parameters ) => { code block };
If the code block contains just a single expression then block braces are optional.
// a lambda expression d += (S) => MessageBox.Show("Lambda expression: " + S);
A lambda expression, which, at the right side, has just a single expression, without braces, is called Expression Lambda.
Only Expression Lambdas are used in Expression Tree construction.
A lambda expression, which, at the right side, has more than a single expression enclosed in braces is called Statement Lambda.
Parentheses required when there are no parameters at all or there are more than a single paremeter.
A single parameter makes parentheses optional.
// a lambda expression d += S => { MessageBox.Show("Lambda expression: " + S); };
Parameter types may also, optionally, be specified.
// a lambda expression d += (string S) => { MessageBox.Show("Lambda expression: " + S); };
Sometimes it is not possible for the compiler to infer parameter types. In that case parameter types are required.
A lambda expression may use multiple parameters separated by commas.
A lambda expression may contain a return
statement. That return
statement does not cause the enclosing method to return.
public delegate int MathDelegate(int a, int b, int c); private void button2_Click(object sender, EventArgs e) { // multiple parameters MathDelegate d = (x, y, z) => { return x + y + z; }; string S = d(1, 2, 3).ToString(); MessageBox.Show(S); }
see also:
A lambda expression defined in a method body can use any accessible variable, which may be either a variable local to the enclosing method or member of the enclosing type.
A lambda expression defined as a member field in a class can use only static fields of the enclosing type.
Variables captured that way by a lambda expression are stored with the lambda expression and they are not garbage collected as usually.
/* a lambda expression defined outside of any method, it is actually a field such a lambda expression can use only static fields */ int a = 1; static int b = 2; MathDelegate d = (x, y, z) => { return x + y + z + b; }; private void button3_Click(object sender, EventArgs e) { int c = 3; string S = d(a, b, c).ToString(); MessageBox.Show(S); MathDelegate d2 = (x, y, z) => { return x + y + z + a + b + c; }; S = d2(a, b, c).ToString(); MessageBox.Show(S); }
ref
and out
parameters passed to an enclosing method are not directly accessible by a lambda expression.
Generics are types (such as classes, structs, interfaces, delegates and arrays) and methods, which contain type placeholders, called type parameters, in their declaration, for one or more types, unknown at compile-time, thus giving to the type or method declaration, a generic form.
When a generic type is instantiated, those type placeholders are assigned concrete types, called type arguments, thus transforming the generic type or method into a strongly-typed one.
public interface IGenericList<T> { int Add(T Item); void Insert(int Index, T Item); void Remove(T Item); void RemoveAt(int Index); int Count { get;} T this[int Index] { get; } }
In a generic type, such as the above, type parameters are used when defining members of the type, such as fields, properties and methods and inside code. Inside that type, those type parameters may be used in typecasting too.
A generic type or method may be instantiated or called in many different circumstances, and possibly each time with different combinations of type arguments.
Here is a generic class which implements the above generic interface.
public class GenericList<T> : IGenericList<T> { private ArrayList list = new ArrayList(); public int Add(T Item) { Insert(list.Count, Item); return list.Count; } public virtual void Insert(int Index, T Item) { list.Insert(Index, Item); } public virtual void Remove(T Item) { list.Remove(Item); } public void RemoveAt(int Index) { Remove((T)list[Index]); // type-casting using a type parameter } public int Count { get { return list.Count; } } public T this[int Index] // generic property { get { return (T)list[Index]; } // type-casting using a type parameter } }
And here is how to use the above generic class, using string as the type argument.
GenericList<string> list = new GenericList<string>(); list.Add("C#"); list.Add("generics"); string S = ""; for (int i = 0; i < list.Count; i++) S += list[i] + " "; MessageBox.Show(S);
And here is that same generic class using integer as the type argument.
GenericList<int> list = new GenericList<int>(); list.Add(1); list.Add(2); list.Add(3); int total = 0; for (int i = 0; i < list.Count; i++) total += list[i]; MessageBox.Show(total.ToString());
see also:
Following are terms used with generics.
A type paremeter is used in a generic type or method declaration as a placeholder for an actual type which is going to be specified upon instantiation or calling.
class SomeClass<A, B> {...} // A and B are type parameters T SomeMethod(T x, T y) {...} // T is a type parameter
A generic type argument is the actual type a client code specifies to be used in place of a type parameter.
A constructed type is a generic type variable, parameter or field, which contains at least one generic argument.
Specifying type arguments for generic type parameteres of a generic type constructs the actual run-time strongly-typed type, thus allowing the compiler to perform compile-time type cheching.
An open constructed type is a generic type variable, parameter or field, which contains at least one generic type parameter.
A closed constructed type is a generic type variable, parameter or field, which contains no generic type parameter.
Type inference is the compiler's ability to conclude the actual type of a type argument passed to a generic method.
Covariance in a type system refers to type compatibility.
With strong types it is perfectly valid to write
Generics are invariant.
There is no compatibility between two generics with different type arguments.
A generic with a derived type argument can not be assigned to a generic with a base type argument.
Here is an example
A Generic value can not be assigned to a Generic even though a Derived value is a Base value too.
see also:
BCL provides the generic
The size of a
The
The
A single dimensional array with a lower bound of zero it automatically implements the
The resulting list is of a fixed size. Elements can not be added or removed.
A generic method may belong to a generic or non-generic type.
Methods belonging to a generic type could be generic or non-generic.
A generic method has two parameter lists : one that comes right after the name of the method, which contains type parameters and a usual list of formal parameters.
Type parameters declared in the type parameter list, can be used to define the return type or the types of the formal parameters.
Generic methods may be oveloaded and may use more than one type parameter.
It is valid to inherit from a generic class.
It is valid to supply typed parameters when inheriting, in order to create a strongly-typed derived class.
It is also valid to expand the inherited list of type parameters.
Constraints are restrictions placed, by the author of a class, on generic type parameters regarding their type.
Constraints are defined by using the keyword
A user of that class has to conform to constaint restrictions, otherwise a compile-time error occurs.
Constraints may limit a type parameter to a type which
It is possible to have multiple
The reference, in case 4 above, can be of any Reference type, such as class, interface or delegate.
The case 6 above is known as the naked type constraint.
Type parameters with no constraints are known as unbounded type parameters.
It is possible to use constraints with inherited generic classes.
Here is an example of a constraint applied to a generic
Constraints can be used with generic methods too.
It is possible to define generic delegates.
Here is a generic class which uses an event based on that generic delegate.
And here is how to link methods to that generic event.
BCL includes a number of generic delegates. The most commonly used is the
The following delegates are designed to be used mostly with the static generic methods of the
The
All those methods rely on a passed in callback, a delegate in .Net parlance, in order to achieve their task.
Here is an example using the
The
Here is an example of use of one of those helper generic interfaces, the
An initialization problem arises with generic values inside classes and methods because of their unknown type. The keyword
The
The
In a
A
Arrays are iterators by default, as most of the list classes and so they can be used with foreach statements.
Instead of explicitly implementing the
The keyword
The
The
The keyword
The presence of the
The keyword yield
The return type of an iterator method must be
Here is an example which uses an
A class may implement multiple iterator methods which may or may not accept parameters. No
Here is how to call those methods.
Generic Type Argument
class SomeClass<A, B> {...}
...
SomeClass<int, double> g = new SomeClass<int, double>(); // int and double are type arguments
Constructed Type
class SomeClass<A, B> {...}
...
SomeClass<A, B> a;
SomeClass<int, B> b;
SomeClass<A, string> c;
Open Constructed Type
class SomeClass<A, B> {...}
...
SomeClass<A, B> a;
SomeClass<int, B> b;
SomeClass<A, string> c;
Closed Constructed Type
class SomeClass<A, B> {...}
...
SomeClass<int, int> a;
SomeClass<double, int> b;
SomeClass<int, string> c;
Type Inference
T Infer(T a)
{
return a;
}
...
int i = Infer(123);
string S = Infer("C# generics");
Generics are not covariant
class Base { }
class Derived : Base { }
...
Base b = new Derived();
class Generic<T> {}
...
Generic<Base> b2 = new Generic<Derived>(); // does not compile
The generic List<T> class
System.Collections.Generic.List<T>
class already, which is a generic list used in constructing strongly-typed lists of objects of various types.
List<T>
list, that is the number of contained elements, is dynamic. It is increased and decreased as required, when adding or removing elements.
List<T>
provides an indexer property so elements of that list can be accessed by index. It also provides various methods for sorting, searching and in general manipulating the list.
List<int> list = new List<int>();
list.Add(1);
list.Add(2);
list.Add(3);
int total = 0;
for (int i = 0; i < list.Count; i++)
total += list[i];
MessageBox.Show(total.ToString());
System.Collections.ArrayList
class is still available though.
Arrays with a lower bound of zero and the generic IList<T> interface
IList<T>
generic interface.
int[] a = { 0, 1, 2 };
IList<int> list = a;
Generic methods
private void GenericMethod<T>(T x)
{
string S = x.GetType().Name + ": " + x.ToString();
MessageBox.Show(S);
}
...
GenericMethod(123);
GenericMethod(12.3);
GenericMethod("123");
private void GenericMethod<T, T2>(T x, T2 y)
{
string S = x.GetType().Name + ": " + x.ToString() + Environment.NewLine +
y.GetType().Name + ": " + y.ToString();
MessageBox.Show(S);
}
...
int a = 123;
string b = "generics";
GenericMethod(a, b);
Generic inheritance
public class DerivedList<T> : GenericList<T>
{
private int insertions = 0;
private int deletions = 0;
public override void Insert(int Index, T Item)
{
base.Insert(Index, Item);
insertions++;
}
public override void Remove(T Item)
{
base.Remove(Item);
deletions++;
}
}
public class IntegerList : GenericList<int>
{
}
public class DoubleGenericList<T, T2> : GenericList<T>
{
}
Constraints on generic type parameters
where
.
class Generic<T> where T: SomeClass {}
class Generic<T> where T: ISomeInterface {}
class Generic<T> where T: new() {}
class Generic<T> where T: class {}
class Generic<T> where T: struct {}
class Generic<T, U> where T: U {}
where
clauses for multiple type parameters or a where
clause for a single type parameter declaring more than one constraint. In this latter case, if a new()
constraint is required then it should be the last one.
public class SomeClass<A, B>
where A : IList, new()
where B : IEnumerable
{
}
public class GenericValueList<T> : GenericList<T> where T : struct
{
}
Sorter
class.
public class Sorter<T> where T : IComparable
{
public T[] Sort(GenericList<T> SourceList)
{
T[] elements = new T[SourceList.Count];
for (int i = 0; i < elements.Length; i++)
elements[i] = SourceList[i];
Array.Sort(elements);
return elements;
}
}
...
GenericList<int> list = new GenericList<int>();
list.Add(3);
list.Add(1);
list.Add(2);
Sorter<int> sorter = new Sorter<int>();
int[] elements = sorter.Sort(list);
string S = "";
foreach (int i in elements)
S += i.ToString() + Environment.NewLine;
MessageBox.Show(S);
T GenericMethod<T>(T a) where T: IEnumerable
{
...
}
Generic delegates
public delegate void GenericDelegate<T>(T sender);
public class Employee<T>
{
private T department = default(T); // provides the default value for the actual type
public Employee(T Department)
{
department = Department;
}
public override string ToString()
{
return "Employee department: " + department.ToString();
}
public T Department
{
get { return department; }
set
{
if (!department.Equals(value))
{
department = value;
if (DepartmentChanged != null)
DepartmentChanged(this);
}
}
}
public event GenericDelegate<Employee<T>> DepartmentChanged;
}
void GenericHandler<T>(T sender)
{
MessageBox.Show(sender.ToString()); // only System.Object members are available to a generic parameter
}
void ConcreteHandler(Employee<int> sender)
{
MessageBox.Show(sender.ToString());
}
...
Employee<string> em = new Employee<string>("sales");
em.DepartmentChanged += new GenericDelegate<Employee<string>>(GenericHandler); // this is really ugly
em.Department = "IT";
Employee<int> em2 = new Employee<int>(100);
em2.DepartmentChanged += ConcreteHandler; // this is better
em2.Department = 101;
Predefined generic delegates
public delegate void EventHandler<TEventArgs>(Object sender, TEventArgs e) where TEventArgs : EventArgs
Array
class and the List<T>
class.
public delegate void Action<T>(T obj)
public delegate void Action<T1, T2>(T1 arg1, T2 arg2)
public delegate void Action<T1, T2, T3>(T1 arg1, T2 arg2, T3 arg3)
public delegate void Action<T1, T2, T3, T4>(T1 arg1, T2 arg2, T3 arg3, T4 arg4)
public delegate int Comparison<T>(T x, T y)
public delegate TOutput Converter<TInput, TOutput>(TInput input)
public delegate bool Predicate<T>(T obj)
Array and List<T> generic methods
Array
and the List<T>
classes provide a great number of generic methods.
public abstract class Array : ICloneable, IList, ICollection, IEnumerable
{
// some of the generic members
public static bool Exists<T>(T[] array, Predicate<T> match);
public static T Find<T>(T[] array, Predicate<T> match);
public static T[] FindAll<T>(T[] array, Predicate<T> match);
public static int FindIndex<T>(T[] array, Predicate<T> match);
public static T FindLast<T>(T[] array, Predicate<T> match);
public static void ForEach<T>(T[] array, Action<T> action);
public static int IndexOf<T>(T[] array, T value);
public static int LastIndexOf<T>(T[] array, T value);
public static void Sort<T>(T[] array, Comparison<T> comparison);
// ... other members here
}
public class List<T> : IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable
{
// some of the generic members
public bool Exists(Predicate<T> match);
public T Find(Predicate<T> match);
public List<T> FindAll(Predicate<T> match);
public int FindIndex(Predicate<T> match);
public T FindLast(Predicate<T> match);
public void ForEach(Action<T> action);
public int IndexOf(T item);
public int LastIndexOf(T item);
public void Sort(Comparison<T> comparison);
public T[] ToArray();
// ... other members here
}
List<T>
class and the delegate void Action<T>(T obj)
.
int globalTotal = 0;
/* to be used with delegates of type
delegate void Action<T>(T obj) */
void TotalHandler(int obj)
{
globalTotal += obj;
}
...
List<int> list = new List<int>();
list.Add(1);
list.Add(2);
list.Add(3);
list.ForEach(TotalHandler); // using a generic delegate handler
MessageBox.Show(globalTotal.ToString());
int localTotal = 0;
list.ForEach(delegate(int z) // using an anonymous method
{
localTotal += z;
});
Action<int> action = x => localTotal += x; // define a lambda expression variable
list.ForEach(action); // using a lambda expression variable
list.ForEach(x => localTotal += x); // using a lambda expression directly
MessageBox.Show(localTotal.ToString());
Predefined generic classes and interfaces
System.Collections.Generic
namespace contains most of the predefined generic types. Here is a partial list of some of the predefined generic classes and interfaces
Generic Type Non-generic equivalent
--------------------------------------------------
List<T> ArrayList
Collection<T> Collection
Dictionary<K, T> HashTable
KeyValuePair<K, V>
SortedDictionary<K, T> SortedList
SortedList<T> SortedList
Queue<T> Queue
Stack<T> Stack
LinkedList<T>
LinkedListNode<T>
Comparer<T> Comparer
BindingList<T>
IList<T> IList
ICollection<T> ICollection
IDictionary<K, T> IDictionary
IEnumerable<T> IEnumerable
IEnumerator<T> IEnumerator
IComparer<T> IComparer
IComparer<T>
, along with the generic methods of the Array
class.
class StringComparer : IComparer<string>
{
/* Comparison methods return table
A < B -1
A == B 0
A > B 1 */
public int Compare(string A, string B)
{
if ((A == null) && (B == null))
return 0; // if both are null then return equal
else if (A == null)
return -1;
else if (B == null)
return 1;
else // both not null
return A.CompareTo(B); // so, perform string comparison
}
}
...
void Display(IList list)
{
string S = "";
foreach (object o in list)
S += o.ToString() + Environment.NewLine;
MessageBox.Show(S);
}
...
string[] cities = { "Rome", "Berlin", "Athens", "Madrid", "London", "Paris", "Oslo"};
Display(cities); // a zero bounded array is an IList
IComparer<string> comparer = new StringComparer();
Array.Sort<string>(cities, comparer);
Display(cities);
Generics and the keyword default
default
is used to safely provide the default value for the actual type.
public class Employee<T>
{
private T department = default(T); // provides the default value for the actual type
...
}
Iterators
foreach
statement works in conjunction with a so called "iterator ". For an object to be used as an iterator it is required to implement the IEnumerable
interface.
public interface IEnumerable
{
IEnumerator GetEnumerator();
}
IEnumerable.GetEnumerator()
returns an IEnumerator
object.
public interface IEnumerator
{
object Current { get; }
bool MoveNext();
void Reset();
}
foreach
statement the expression after the keyword in
, it must return an object that either implements the IEnumerable
or it is already an IEnumerator
object.
foreach
statement continues execution as long as its iterator has a next value to provide.
int[] numbers = int[] {1, 2, 3, 4, 5};
foreach (int n in numbers)
{
DoSomething(n); // this will be executed 5 times
}
The keyword yield
IEnumerable/IEnumerator
pattern the keyword yield
forces the compiler to provide the needed code automatically at runtime.
yield
is used inside a method and it has the same effect as the explicit implementation of an IEnumerator
object.
yield
return statement causes the iterator to return the current element in the sequence and advances its position.
yield break
statement breaks the iteration.
public class WordList
{
public IEnumerator GetEnumerator()
{
yield return "C#";
yield return "is";
yield return "a";
yield return "great";
yield return "language";
}
}
...
WordList list = new WordList();
string S = "";
foreach (string word in list)
S += word + " ";
yield
provides a quick and easy way in creating enumerable classes since it forces the compiler to create a nested IEnumerator
class which keeps track of the position of the iterator.
GetEnumerator()
method in conjunction with the yield
keyword makes the class to be treated as an IEnumerable
"implementor", even if it is not an actual IEnumerable
implementor.
public class NumberList //: IEnumerable
{
int[] numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9 };
public IEnumerator GetEnumerator()
{
for (int i = 0; i < numbers.Length; i++)
{
yield return numbers[i];
}
}
}
...
NumberList list = new NumberList();
int sum = 0;
foreach (int i in list)
sum += i;
ref
and out
parameters are not allowed)
get
accessor
catch
block
try
block that has one or more catch
clauses
unsafe
blocks
The return type of iterator methods
IEnumerable
IEnumerator
IEnumerable<T>
or
IEnumerable<T>
.
IEnumerator
and a generic IEnumerator<T>
public class Person
{
public Person(): this("John Doe")
{
}
public Person(string Name)
{
this.Name = Name;
}
public override string ToString()
{
return Name;
}
public string Name { get; set; }
}
public class PersonList
{
ArrayList persons = new ArrayList { new Person("John Doe"), new Person("Jane Doe") };
public IEnumerator GetEnumerator()
{
for (int i = 0; i < persons.Count; i++)
{
yield return persons[i];
}
}
}
public class GenericList
{
ArrayList persons = new ArrayList { new Person("John Doe"), new Person("Jane Doe") };
public IEnumerator<Person> GetEnumerator()
{
for (int i = 0; i < persons.Count; i++)
{
yield return (Person)persons[i];
}
}
}
...
PersonList persons = new PersonList();
string S = "";
foreach (Person p in persons)
S += p.ToString() + Environment.NewLine;
MessageBox.Show(S);
...
GenericList persons = new GenericList();
string S = "";
foreach (Person p in persons)
S += p.ToString() + Environment.NewLine;
MessageBox.Show(S);
Multiple iterators
ref
or out
parameters though.
public class MultiList
{
string[] words = {"C#", "is", "a", "great", "language" };
int[] numbers = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
ArrayList persons = new ArrayList { new Person("John Doe"), new Person("Jane Doe") };
public IEnumerable GetWords()
{
for (int i = 0; i < words.Length; i++)
{
yield return words[i];
}
}
public IEnumerable GetNumbers(int StartIndex, int EndIndex)
{
for (int i = StartIndex; i <= EndIndex; i++)
{
yield return numbers[i];
}
}
public IEnumerable GetPersons()
{
for (int i = 0; i < persons.Count; i++)
{
yield return persons[i];
}
}
}
MultiList multiList = new MultiList();
string S = "";
foreach (string word in multiList.GetWords())
S += word + " ";
MessageBox.Show(S);
int sum = 0;
foreach (int i in multiList.GetNumbers(3, 6))
sum += i;
MessageBox.Show(sum.ToString());
S = "";
foreach (Person p in multiList.GetPersons())
S += p.ToString() + Environment.NewLine;
MessageBox.Show(S);


1.Front binding cover template
2.Front cover page template
3.certificate page template
4.Abstract page template
5.declaration page template
6.Table of contents page template
for further guidlines on preparing report particular to your project you can drop in questions in the forum


Emancipate yourself from mental slavery, noone but ourselves can free our minds!
Ich habs kommen sehen!
Herr Führer, we see you at the poker table this weekend? We play at the Clintons house.
Turn on, Tune in, Drop out!
Bob Marley 13 Oktober 1980
Emancipate yourself from mental slavery, noone but ourselves can free our minds!
Adolf Hitler 19 June 1945
Ich habs kommen sehen!
Barack Obama 09 Jan 2018
Herr Führer, we see you at the poker table this weekend? We play at the Clintons house.
Timothy Leary 29 August 1967
Turn on, Tune in, Drop out!


Family Bring Loved One’s Corpse To Insurance Firm To Prove He’s Dead
by Emily BrownThe family of a recently deceased man presented his corpse to an insurance firm after their claim on a funeral policy was rejected.
Footage shared on Twitter showed two women carrying a blue body bag through the offices of Old Mutual, the oldest insurance company in South Africa, after having driven it to the branch from the morgue.
The bereaved relatives decided to take evidence to the insurance company this week after they refused to pay out following the death of Sifiso Mtshali. Although the women had paperwork for the man’s life insurance claim, his ID and his death certificate, they felt they had to go the extra mile and take his dead body along too.
Check out the video here:
The footage was taken in Old Mutual offices in KwaDukuza, South Africa and staff members can be seen looking on in shock as the two family members marched the body bag through the building.
The pair demanded a payout from the insurance firm and told workers they would not leave until Old Mutual paid out the death claim in full.
It seems the women’s extreme tactics did the trick because their arrival prompted hurried discussions between Old Mutual management as well as phone calls to the head office, after which the firm agreed to honour the insurance claim – as long as the ladies removed the dead body.
The two family members agreed to the terms and the video shows them taking the body from the building and loading it into the back of a minivan.
Ntombenhle Mhlongo, one of the women in the video, told News24 the family had been battling to get the claim processed for nine days after Mtshali passed away on November 7.
She described the drawn-out process they had to go through, explaining:
At first, [the firm] told us we need to wait 48 hours before we can get anything. We handed in all documents and followed all of their instructions.
We went in and waited all of Thursday. They kept telling us we had to wait for an assessment but eventually, they said we must come on Friday.
Mhlongo continued:
We got there early in the morning and waited three hours. When we asked what was taking so long, they again said the assessment was happening and we must wait another three hours later.
We were angry, frustrated and just wanted to make sure we could properly prepare and bury him by Sunday… We thought, if the documents are not giving them enough answers, maybe the body will.
We were coping with so many different things during that time. We are not rich people. We are poor and they were refusing to pay us. We are still so heartbroken.
The shocking video has been viewed over 60,000 times on Twitter and Old Mutual have since confirmed the family received their payout.
They expressed their regret at the situation in a tweet, writing:
This has been most unsettling and we are sympathetic towards the family during this difficult time. We can confirm that the claim was paid. Due to the sensitive nature of this matter, we will continue engaging directly with the family.
We take note of this incident and would like to assure our customers that claims are assessed on an individual basis and the incident at this branch whilst isolated is regrettable.
Though the women were successful in getting their insurance money, a spokesman for the National Funeral Practitioners Association of South Africa said the matter was far from over, iAfrica report.
Spokesman Muzi Hlengwa said:
When the body was taken from the mortuary to the Old Mutual it was out of anger so the rituals that were supposed to be done to move the body from one place to another were not done.
The soul of that man is still left at the Old Mutual so they will have to cover the costs of performing these rituals.
It is thought the women returned their relative’s body to the morgue after their business with the insurance firm was completed.
If you have experienced a bereavement and would like to speak with someone in confidence contact Cruse Bereavement Care via their national helpline on 0808 808 1677.
Emily Brown first began delivering important news stories aged just 13, when she launched her career with a paper round. She graduated with a BA Hons in English Language in the Media from Lancaster University, and went on to become a freelance writer and blogger. Emily contributed to The Sunday Times Travel Magazine and Student Problems before becoming a journalist at UNILAD, where she works on breaking news as well as longer form features.


Third-party licenses
Volley
https://github.com/google/volley
ExoPlayer
https://github.com/google/ExoPlayer
Picasso
https://github.com/square/picasso
MaterialFilePicker
https://github.com/nbsp-team/MaterialFilePicker
CircleImageView
https://github.com/hdodenhof/CircleImageView


--- layout: post title: Addendum to Dragged in … AGAIN oneliner: People sometimes want to hear exactly what the problem is. summary: Sometimes telling the basic truth that there is no obvious root cause is what a customer wants to know. excerpt: It seems that telling people exactly what the problem is sometimes is exactly what they want to hear ... categories: - Random tags: - Work status: publish type: post published: true meta: _edit_last: '2' if_slider_image: '' slider_hidetitle: 'on' slider_custom_thumb: '' ---
It seems that telling people exactly what the problem is sometimes is exactly what they want to hear, even if there is no obvious root cause.
The customer was very happy to hear that we knew what the issue was and that we were doing things to alleviate the issue. It was a good call to be involved on and even though I was dragged in so to speak I was glad to be the one that could help the customer. Now I hope we can get to the bottom of things with the third party vendor!


We collected bibliographic and scientometric data from collection of articles that are the references for the information of the FGSC strains. We will summarize these variables.
Load the data stored in a Google Sheet format using the gsheet library.
library(tidyverse)
library(janitor)
Sys.setlocale("LC_ALL", "pt_BR.UTF-8") # set the UTF to read the characters in portuguese
## [1] ""
articles <- gsheet::gsheet2tbl('https://docs.google.com/spreadsheets/d/1rAC_U5upuDPHCSLi9kieb4R5tztHVJGW84aQOf6z7Lk/edit?usp=sharing')
library(viridis)
library(cowplot)
theme_set(theme_minimal_hgrid())
library(tidyverse) # load several libraries for data wrangling and plotting
library(ggthemes)
##
## Attaching package: 'ggthemes'
## The following object is masked from 'package:cowplot':
##
## theme_map
p1 <- articles %>%
select(year, source) %>%
group_by(year, source) %>%
tally() %>%
ggplot(aes(year, n, fill = source))+
geom_col()+
scale_fill_few()+
theme_minimal_hgrid(font_size = 9)+
labs(x = "Year of publication",
y = "Number of articles",
fill = "Strain info source")+
theme(legend.position = "top")
A total of (n = 123) peer-reviewed articles were published from 2000 to 2021.
Not all articles contributed data at the strain level and these were summarized in relation to article metrics and a summary data for the strains together with all associated information that could be obtained such as origin, year, species, genotype, etc. These articles were assigned as summary
for the strain source category.
For those articles contributing data, they were classified as author
when obtained directly from the authors and article
when the source were the tables and supplemental materials from where the strain information was obtained.
Let’s have a look at the number of articles on each category.
articles %>%
nrow()
## [1] 123
articles %>%
select(source) %>%
group_by(source) %>%
tally(sort = T)
## # A tibble: 3 x 2
## source n
## <chr> <int>
## 1 Article 56
## 2 Author 42
## 3 Not available 25
#100/19
Let’s plot the number of articles per year conditional to the contribution of strain data.
library(cowplot)
articles %>%
ggplot(aes(year, fill = source))+
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
geom_bar()+
scale_fill_viridis_d()+
scale_y_continuous(breaks=seq(0, 11, 1), expand=c(0.01, 0))+
scale_x_continuous(breaks=seq(2000, 2019))+
labs(y = "Number of articles", x = "Published year", title = "Articles per year", fill = "Strain info")
journal <- articles %>%
select(journal_name) %>%
group_by(journal_name) %>%
tally(sort = T)
p2 <- journal %>%
filter(n > 2) %>%
ggplot(aes(reorder(journal_name, n), n))+
geom_col(fill = "steelblue", color = "white")+
coord_flip()+
theme_minimal_vgrid(font_size = 8)+
labs(x = "",
y = "Number of articles")
library(patchwork)
##
## Attaching package: 'patchwork'
## The following object is masked from 'package:cowplot':
##
## align_plots
(p1 | p2)+ plot_annotation(tag_levels = "A")+
plot_layout(widths = c(1, 0.7))+
ggsave("figs/fig1.png", width = 8, height =3.8)
The articles were published in 40 peer-reviewed journals. The journal with the greatest number of articles was Plant Disease with 14 articles, followed by Plant Pathology (11 articles) and Fungal Genetics and Biology (9 articles). We had only a few journals where the articles did not contribute data at the strain level. Most of the articles contributed data at the strain level obtained from the authors or extracted from the articles.
library(cowplot)
articles %>%
ggplot(aes(reorder(journal_name, journal_name, function(x) length(x)), fill = source))+
geom_bar()+
theme_minimal_vgrid()+
scale_fill_viridis_d()+
scale_y_continuous(breaks=seq(0,20), expand=c(0.01, 0))+
coord_flip()+
labs(y = "Number of articles", x = "", title = "Articles per journal", fill = "Strain info")
Here we will analyze the authorship network to detect connections among the authors and research communities. For such, we need to build an edge list, or all pairs of occurrences of two authors in a same publication. Let’s see below the first 10 pairs or authors. The whole list has almost one thousand pairs.
library(purrr)
library(purrrlyr)
authors_net <- articles %>% select (7:20)
author_list <- flatten(by_row(authors_net, ..f = function(x) flatten_chr(x), .labels = FALSE))
author_list <- lapply(author_list, function(x) x[!is.na(x)])
# create the edge list
author_edge_list <- t(do.call(cbind, lapply(author_list[sapply(author_list, length) >= 2], combn, 2)))
author_edge_list[1:10, ]
## [,1] [,2]
## [1,] "Astolfi P" "Reynoso MM"
## [2,] "Astolfi P" "Ramirez ML"
## [3,] "Astolfi P" "Chulze SN"
## [4,] "Astolfi P" "Alves TCA"
## [5,] "Astolfi P" "Tessmann DJ"
## [6,] "Astolfi P" "Del Ponte EM"
## [7,] "Reynoso MM" "Ramirez ML"
## [8,] "Reynoso MM" "Chulze SN"
## [9,] "Reynoso MM" "Alves TCA"
## [10,] "Reynoso MM" "Tessmann DJ"
Within an authorship network, co-authors (present in a same article) are linked together. Authors from this articles can be connected to authors from other articles whenever they appear together. Therefore, two articles are linked by a common author. Each author is then considered a node in the network and the connections between them are the edges or links. There are several statistics to calculate in a network analysis.
For now, let’s visualize the authorship network and also the community structure which was defined via a function that tries to find densely connected subgraphs, also called communities. We will use a random walk algorithm for determining the communities. The idea is that short random walks tend to stay in the same community. In the network below, there are 15 communities or subgraphs which are represented by the colors.
# igraph
library(igraph)
net=graph.edgelist(as.matrix(author_edge_list), directed=FALSE)
degree <- enframe(degree(net))
degree %>%
arrange(-value)
## # A tibble: 498 x 2
## name value
## <chr> <dbl>
## 1 Ward TJ 190
## 2 O’Donnell K 85
## 3 Corby Kistler H 77
## 4 Waalwijk C 73
## 5 Xu J 68
## 6 van der Lee T 63
## 7 Del Ponte EM 61
## 8 Zhang H 53
## 9 Lee T 53
## 10 Chen W 47
## # ... with 488 more rows
#summary(degree$degree.net.)
between <- data.frame(round(betweenness(net), 1))
page <- data.frame(page_rank(net)$vector)
close <-data.frame(round(closeness(net), 10))
eigen <- data.frame(round(evcent(net)$vector, 5))
library(network)
library(intergraph)
# Clusters
wc <- cluster_walktrap(net)
eb <- cluster_edge_betweenness(net)
lec <- cluster_leading_eigen(net)
cl <- cluster_label_prop(net)
# Modularity
mod <- modularity(wc)
ms <- membership(wc)
net_stat <- asNetwork(net)
png("figs/network1.png", res = 600, width = 5000 , height = 5000, units="px")
set.seed(11)
par(mar=c(0,0,0,0))
plot.network(net_stat, vertex.cex= 0.05 + 0.25*log(graph.strength(net)), label =ifelse(degree(net)>37,V(net)$name,NA), label.bg = "white", label.col = "black", edge.col = "lightgray", edge.lty = 0.5, label.cex = 0.6, displaylabels = TRUE, vertex.col = membership(wc), jitter = T, edge.len = 0.2, boxed.labels=T, label.border=1, pad=5)
dev.off()
## quartz_off_screen
## 2
library(purrr)
library(purrrlyr)
country_net <- articles %>% select (31:36)
country_list <- flatten(by_row(country_net, ..f = function(x) flatten_chr(x), .labels = FALSE))
country_list <- lapply(country_list, function(x) x[!is.na(x)])
# create the edge list
country_edge_list <- t(do.call(cbind, lapply(country_list[sapply(country_list, length) >= 2], combn, 2)))
country_edge_list[1:10, ]
## [,1] [,2]
## [1,] "Brazil" "Argentina"
## [2,] "Brazil" "United States"
## [3,] "Brazil" "United States"
## [4,] "Brazil" "United States"
## [5,] "Argentina" "Brazil"
## [6,] "Argentina" "Uruguay"
## [7,] "Brazil" "Uruguay"
## [8,] "Brazil" "United States"
## [9,] "Brazil" "United States"
## [10,] "Brazil" "United States"
# igraph
library(igraph)
net2 <- graph.edgelist(as.matrix(country_edge_list), directed=FALSE)
degree <- data.frame(degree(net2))
#summary(degree$degree.net.)
between <- data.frame(round(betweenness(net2), 1))
page <- data.frame(page_rank(net2)$vector)
close <-data.frame(round(closeness(net2), 10))
eigen <- data.frame(round(evcent(net2)$vector, 5))
library(network)
library(intergraph)
# Clusters
wc2 <- cluster_walktrap(net2)
eb2 <- cluster_edge_betweenness(net2)
lec2 <- cluster_leading_eigen(net2)
cl2 <- cluster_label_prop(net2)
# Modularity
mod <- modularity(wc2)
ms <- membership(wc2)
net_stat2 <- asNetwork(net2)
png("figs/network2.png", res = 600, width = 4500 , height = 4000, units="px")
set.seed(1003)
par(mar=c(0,0,0,0))
plot.network(net_stat2, vertex.cex= 1 + 0.25*log(graph.strength(net2)), label =ifelse(degree(net2)>0, V(net2)$name,NA), label.bg = "NA", label.col = "black", edge.col = "gray", edge.lty = 1, label.cex = 0.7, edge.lwd = 2, displaylabels = TRUE, vertex.col = membership(wc2), jitter = T, edge.len = 0.2, boxed.labels = T, label.border="NA", pad=1)
dev.off()
## quartz_off_screen
## 2
library(broom)
# Transitivity
trans <- transitivity(net, type = "global")
# Degree
deg <- degree(net)
deg <- tidy(deg)
deg2 <- deg %>% group_by(names) %>%
arrange(desc(x)) %>% head(20)
# Betweenness
bet <- betweenness(net, normalized = TRUE, directed = FALSE)
bet <- tidy(bet)
bet2 <- bet %>% group_by(names) %>%
arrange(desc(x)) %>% head(20)
# Eigenvector centrality
eigen <- eigen_centrality(net)
eigen1 <- tidy(eigen$vector)
eigen2 <- eigen1 %>% group_by(names) %>%
arrange(desc(x)) %>% head(20)
# Page rank centrality
rank <- page.rank(net)
rank1 <- tidy(rank$vector)
rank2 <- rank1 %>% group_by(names) %>%
arrange(desc(x)) %>% head(20)
# Closeness centrality
close <- closeness(net)
close1 <- tidy(close)
close2 <- close1 %>% group_by(names) %>%
arrange(desc(x)) %>% head(20)
# Clusters
wc <- cluster_walktrap(net)
# Modularity
mod <- modularity(wc)
ms <- membership(wc)
# clustering edge betweenness
eb <- cluster_edge_betweenness(net)
lec <- cluster_leading_eigen(net)
Transitivity, also know as clustering coefficient, is the mean probability that two author with a common author are themselves co-authors. In our study the transitivity was 0.4736311, which means that, on average, the chance that two scholars that share a common collaborator wrote a paper together is almost one-half.
Individually, authors can be highly connected or influential. The degree of a node is a basic structural property that quantify the number of adjacent nodes or edges. Let’s see the 25 authors with most degree values.
plot(deg2$x, eigen2$x)
head(bet2, 10)
## # A tibble: 10 x 2
## # Groups: names [10]
## names x
## <chr> <dbl>
## 1 Ward TJ 0.310
## 2 Waalwijk C 0.183
## 3 Lee T 0.0773
## 4 Chen W 0.0759
## 5 Chulze SN 0.0641
## 6 Del Ponte EM 0.0451
## 7 Proctor RH 0.0354
## 8 Zhang H 0.0258
## 9 Lee Y-W 0.0255
## 10 Wu X 0.0255
head(rank2)
## # A tibble: 6 x 2
## # Groups: names [6]
## names x
## <chr> <dbl>
## 1 Ward TJ 0.0276
## 2 O’Donnell K 0.0119
## 3 Corby Kistler H 0.0105
## 4 Del Ponte EM 0.00882
## 5 Waalwijk C 0.00847
## 6 Xu J 0.00739
head(eigen2)
## # A tibble: 6 x 2
## # Groups: names [6]
## names x
## <chr> <dbl>
## 1 Ward TJ 1
## 2 O’Donnell K 0.769
## 3 Corby Kistler H 0.701
## 4 Aoki T 0.415
## 5 Gale LR 0.368
## 6 Geiser DM 0.324
head(close2)
## # A tibble: 6 x 2
## # Groups: names [6]
## names x
## <chr> <dbl>
## 1 Ward TJ 0.0000143
## 2 Waalwijk C 0.0000143
## 3 Chulze SN 0.0000143
## 4 Lee T 0.0000143
## 5 Clear RM 0.0000143
## 6 Kelly A 0.0000143
articles %>%
ggplot(aes(n_isolates))+
geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 1 rows containing non-finite values (stat_bin).
sum(articles$n_isolates, na.rm = TRUE)
## [1] 26644
summary(articles$n_isolates)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 1.0 20.0 62.0 218.4 155.2 4062.0 1
articles %>%
dplyr::group_by(source) %>%
summarize(n_strains = sum(n_isolates, na.rm = TRUE))
## n_strains
## 1 26644
# number of strains per species
articles %>%
select(38:53) %>%
gather(species, value) %>%
filter(value != "NA") %>%
group_by(species) %>%
summarize(n_strains = sum(value),
strains = round((sum(value)/sum(articles$n_isolates, na.rm = true))*100,2)) %>%
arrange(-strains)
## n_strains strains
## 1 24384 91.52
# species by number of studies
articles %>%
select(38:53) %>%
gather(species, value) %>%
filter(value != "NA") %>%
tabyl(species) %>%
arrange(-n)
## species n percent
## Fgra 106 0.41406250
## Fasi 47 0.18359375
## Fmer 36 0.14062500
## Fboo 20 0.07812500
## Fcor 18 0.07031250
## Faus 9 0.03515625
## Fbra 4 0.01562500
## Faca 3 0.01171875
## Fvor 3 0.01171875
## FbooXFgra 2 0.00781250
## Fnep 2 0.00781250
## Fuss 2 0.00781250
## Faet 1 0.00390625
## Fger 1 0.00390625
## Flou 1 0.00390625
## Fmes 1 0.00390625
# species by number of studies
articles %>%
select(80:90) %>%
gather(fgra, value) %>%
filter(value != "NA") %>%
tabyl(fgra) %>%
arrange(-n)
## fgra n percent
## Fgra_15ADON 84 0.512195122
## Fgra_3ADON 40 0.243902439
## Fgra_NIV 22 0.134146341
## Fgra_DON 8 0.048780488
## Fgra_NX2 4 0.024390244
## Fgra_DON/NIV 2 0.012195122
## Fgra_15ADON/NX2 1 0.006097561
## Fgra_DON/ZEA 1 0.006097561
## Fgra_s3ADON 1 0.006097561
## Fgra_ZEA 1 0.006097561
# species by number of studies
articles %>%
select(80:90) %>%
gather(fgra, value) %>%
filter(value != "NA") %>%
tabyl(fgra) %>%
arrange(-n)
## fgra n percent
## Fgra_15ADON 84 0.512195122
## Fgra_3ADON 40 0.243902439
## Fgra_NIV 22 0.134146341
## Fgra_DON 8 0.048780488
## Fgra_NX2 4 0.024390244
## Fgra_DON/NIV 2 0.012195122
## Fgra_15ADON/NX2 1 0.006097561
## Fgra_DON/ZEA 1 0.006097561
## Fgra_s3ADON 1 0.006097561
## Fgra_ZEA 1 0.006097561
# species by number of studies
articles %>%
select(92:97) %>%
gather(fmer, value) %>%
filter(value != "NA") %>%
tabyl(fmer) %>%
arrange(-n)
## fmer n percent
## Fmer_NIV 29 0.80555556
## Fmer_15ADON 2 0.05555556
## Fmer_DON 2 0.05555556
## Fmer_15ADON/NIV 1 0.02777778
## Fmer_3ADON 1 0.02777778
## Fmer_DON/NIV 1 0.02777778
articles %>%
select(57:65) %>%
gather(fasi, value) %>%
filter(value != "NA") %>%
tabyl(fasi) %>%
arrange(-n)
## fasi n percent
## Fasi_NIV 35 0.44303797
## Fasi_3ADON 21 0.26582278
## Fasi_15ADON 11 0.13924051
## Fasi_DON 5 0.06329114
## Fasi_N15ADON 3 0.03797468
## Fasi_4,15-diANIV 1 0.01265823
## Fasi_DON/NIV 1 0.01265823
## Fasi_NX-2 1 0.01265823
## Fasi_NX-2/3-ADON 1 0.01265823
articles %>%
select(115:128) %>%
gather(host, value) %>%
filter(value != "NA") %>%
tabyl(value) %>%
arrange(-n) %>%
tibble()
## # A tibble: 45 x 3
## value n percent
## <chr> <dbl> <dbl>
## 1 Wheat 71 0.348
## 2 Maize 33 0.162
## 3 Barley 29 0.142
## 4 Rice 12 0.0588
## 5 Soybean 8 0.0392
## 6 Oat 6 0.0294
## 7 Durum wheat 3 0.0147
## 8 Soil 3 0.0147
## 9 Rye 2 0.00980
## 10 Sugar beet 2 0.00980
## # ... with 35 more rows
fgsc <- readxl::read_excel("data/fgsc-dat-clean.xlsx")
fgsc
## # A tibble: 16,273 x 12
## `Collection cod~ Host Country Year Latitude Longitude FGSC TRI_genotype
## <chr> <chr> <chr> <dbl> <dbl> <dbl> <chr> <chr>
## 1 07Tr001 Wheat Brazil 2007 -28.0 -53.4 F. g~ 15-ADON
## 2 07Tr002 Wheat Brazil 2007 -28.0 -53.4 F. g~ 15-ADON
## 3 07Tr003 Wheat Brazil 2007 -28.0 -53.4 F. g~ 15-ADON
## 4 07Tr004 Wheat Brazil 2007 -28.0 -53.4 F. g~ 15-ADON
## 5 07Tr005 Wheat Brazil 2007 -28.0 -53.4 F. g~ 15-ADON
## 6 07Tr006 Wheat Brazil 2007 -28.0 -53.4 F. g~ 15-ADON
## 7 07Tr007 Wheat Brazil 2007 -28.0 -53.4 F. g~ 15-ADON
## 8 07Tr008 Wheat Brazil 2007 -28.0 -53.4 F. g~ 15-ADON
## 9 07Tr009 Wheat Brazil 2007 -28.0 -53.4 F. g~ 15-ADON
## 10 07Tr010 Wheat Brazil 2007 -28.0 -53.4 F. g~ 15-ADON
## # ... with 16,263 more rows, and 4 more variables: Pub1 <chr>, Pub2 <lgl>,
## # Pub3 <lgl>, FGSC2 <chr>
species <- fgsc %>%
select(FGSC, TRI_genotype) %>%
filter(TRI_genotype != "NA") %>%
group_by(FGSC, TRI_genotype) %>%
tally(sort = T) %>%
head(6) %>%
ggplot(aes(reorder(FGSC, n), n, fill = TRI_genotype))+
geom_col()+
coord_flip()+
theme_minimal_vgrid(font_size = 8)+
theme(legend.position = "bottom")+
scale_fill_colorblind()+
labs(x = "", y = "Number of strains")
host <- fgsc %>%
select(Host) %>%
filter(Host != "unknown") %>%
group_by(Host) %>%
tally(sort = T) %>%
head(6) %>%
ggplot(aes(reorder(Host, n), n))+
geom_col(fill = "steelblue")+
coord_flip()+
theme_minimal_vgrid(font_size = 8)+
theme(legend.position = "none")+
labs(x = "", y = "Number of strains")
chemotype <- fgsc %>%
select(TRI_genotype) %>%
filter(TRI_genotype %in% c("15-ADON", "3-ADON", "NIV")) %>%
group_by(TRI_genotype) %>%
tally(sort = T) %>%
ggplot(aes(reorder(TRI_genotype, n), n))+
geom_col(fill = "steelblue")+
coord_flip()+
scale_fill_brewer(palette = "Set2")+
theme_minimal_hgrid()+
theme(legend.position = "none")+
labs(x = "", y = "Number of strains")
inset_map <- fgsc %>%
select(Country) %>%
group_by(Country) %>%
tally(sort = T) %>%
arrange(-n) %>%
head(10) %>%
ggplot(aes(reorder(Country, n), n/1000))+
geom_col(fill = "steelblue")+
theme_minimal_grid(font_size = 8)+
coord_flip()+
labs(x = "", y = "Thousand strains")
global_map <- ggplot(fgsc) +
geom_sf(data = world1, fill = NA, size = 0.2, color = "gray")+
geom_point(aes(Longitude, Latitude), size = 0.3, alpha = 0.4,
shape = 16,
color = "steelblue")+
theme_map()+
theme(legend.position = "right")+
scale_fill_viridis_c()
ggsave("figs/map_strains.png", dpi = 300, width = 8)
## Saving 8 x 5 in image
## Warning: Removed 288 rows containing missing values (geom_point).
library(patchwork)
global_map +
inset_element(inset_map,
left = 0,
bottom = 0.05,
right = 0.24,
top = 0.6)+
plot_annotation(tag_levels = "A")+
ggsave("figs/map_strains2.png", dpi = 300, width =9)
## Saving 9 x 5 in image
## Warning: Removed 288 rows containing missing values (geom_point).
## Warning: Removed 288 rows containing missing values (geom_point).
fgra1 <- ggplot(fgsc %>% filter(
FGSC == "F. graminearum" |
FGSC == "F. boothii" |
FGSC == "F. austroamericanum"))+
geom_sf(data = world1, fill = NA, size = 0.2, color = "gray")+
geom_point(aes(Longitude, Latitude, color = FGSC),
size = 0.2, alpha = 1,
shape = 1)+
theme_minimal()+
scale_color_colorblind()+
labs(x = "", y ="")+
theme(legend.position = c(0.15, 0.3),
legend.key.size = unit(1,"line"),
legend.background = element_rect(fill="gray98",
size=1, color = "gray98",
linetype="solid"))+
guides(color = guide_legend(override.aes = list(size=3, alpha =1)))+
ggsave("figs/map_Fgra1.png", dpi = 300, width = 9)
## Saving 9 x 5 in image
## Warning: Removed 177 rows containing missing values (geom_point).
library(ggthemes)
fgra2 <- ggplot(fgsc %>% filter(FGSC == "F. asiaticum" |
FGSC =="F. meridionale" |
FGSC == "F. cortaderiae" ))+
geom_sf(data = world1, fill = NA, size = 0.2, color = "gray")+
geom_point(aes(Longitude, Latitude, color = FGSC), size = 0.2, alpha = 1,
shape = 1)+
theme_minimal()+
scale_color_few()+
labs(x = "", y ="")+
theme(legend.position = c(0.15, 0.3),
legend.key.size = unit(1,"line"),
legend.background = element_rect(fill="gray98",
size=1, color = "gray98",
linetype="solid"))+
guides(color = guide_legend(override.aes = list(size=3, alpha =1)))+
ggsave("figs/map_Fgra2.png", dpi = 300, width = 9)
## Saving 9 x 5 in image
## Warning: Removed 104 rows containing missing values (geom_point).
(fgra1 / fgra2)+
ggsave("figs/map_Fgra.png", dpi = 300, width = 10)
## Saving 10 x 5 in image
## Warning: Removed 177 rows containing missing values (geom_point).
## Warning: Removed 104 rows containing missing values (geom_point).
## Warning: Removed 177 rows containing missing values (geom_point).
## Warning: Removed 104 rows containing missing values (geom_point).
ggplot(fgsc %>% filter(TRI_genotype == "15-ADON" |
TRI_genotype =="3-ADON" |
TRI_genotype == "NIV" ))+
geom_sf(data = world1, fill = NA, size = 0.2, color = "gray")+
geom_point(aes(Longitude, Latitude, color = TRI_genotype), size = 0.2, alpha = 1,
shape = 1)+
theme_minimal()+
labs(x = "", y ="")+
scale_color_colorblind()+
theme(legend.position = c(0.15, 0.3),
legend.key.size = unit(1,"line"),
legend.background = element_rect(fill="gray98",
size=1, color = "gray98",
linetype="solid"))+
guides(color = guide_legend(override.aes = list(size=3, alpha =1)))+
ggsave("figs/map_tri.png", dpi = 300, width = 9)
## Saving 9 x 5 in image
## Warning: Removed 269 rows containing missing values (geom_point).
## Warning: Removed 269 rows containing missing values (geom_point).
fgsc2 <- fgsc %>%
filter(TRI_genotype == "15-ADON" |
TRI_genotype == "3-ADON" |
TRI_genotype == "NIV") %>%
select(Host, TRI_genotype, FGSC2) %>%
filter(FGSC2 == "Fgra" |
FGSC2 == "Fmer" |
FGSC2 == "Fasi" |
FGSC2 == "Fcor" |
FGSC2 == "Fboo" |
FGSC2 == "Faus") %>%
filter(Host == "Wheat" |
Host == "Rice" |
Host == "Barley"|
Host == "Maize"
)
library(FactoMineR)
attach(fgsc2)
data_mca = data.frame(Host, TRI_genotype, FGSC2)
head(data_mca)
## Host TRI_genotype FGSC2
## 1 Wheat 15-ADON Fgra
## 2 Wheat 15-ADON Fgra
## 3 Wheat 15-ADON Fgra
## 4 Wheat 15-ADON Fgra
## 5 Wheat 15-ADON Fgra
## 6 Wheat 15-ADON Fgra
cats<- apply(data_mca, 2, function(x) nlevels(as.factor(x))) #enumera as categorias
cats
## Host TRI_genotype FGSC2
## 4 3 6
mca1 <- MCA(data_mca, graph = TRUE)
mca1
## **Results of the Multiple Correspondence Analysis (MCA)**
## The analysis was performed on 14393 individuals, described by 3 variables
## *The results are available in the following objects:
##
## name description
## 1 "$eig" "eigenvalues"
## 2 "$var" "results for the variables"
## 3 "$var$coord" "coord. of the categories"
## 4 "$var$cos2" "cos2 for the categories"
## 5 "$var$contrib" "contributions of the categories"
## 6 "$var$v.test" "v-test for the categories"
## 7 "$ind" "results for the individuals"
## 8 "$ind$coord" "coord. for the individuals"
## 9 "$ind$cos2" "cos2 for the individuals"
## 10 "$ind$contrib" "contributions of the individuals"
## 11 "$call" "intermediate results"
## 12 "$call$marge.col" "weights of columns"
## 13 "$call$marge.li" "weights of rows"
res.mca = MCA(data_mca, graph=FALSE)
plot(mca1)
library("factoextra")
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
eig.val <- get_eigenvalue(res.mca)
head(eig.val)
## eigenvalue variance.percent cumulative.variance.percent
## Dim.1 0.6796397 20.389191 20.38919
## Dim.2 0.5559623 16.678870 37.06806
## Dim.3 0.3716780 11.150339 48.21840
## Dim.4 0.3553292 10.659876 58.87828
## Dim.5 0.3341201 10.023604 68.90188
## Dim.6 0.3219566 9.658697 78.56058
fviz_screeplot(res.mca, addlabels = TRUE)
p <- fviz_mca_var(res.mca, label = "var", repel = T,
col.var = "contrib",
# Avoid text overlapping (slow if many point)
ggtheme = theme_minimal())
pca <- p + scale_color_viridis(end = 0.8)+
labs(title = "")+
xlim(-3, 3)+
ylim(-3,3)
ggsave("figs/pca.png", width =5, height = 5)
p <- pca | (host /species)
p+
plot_layout(widths = c(1, 0.5))+
theme_minimal_grid(font_size = 8)
ggsave("figs/fig_combo.png", width = 8, height =4)


Crispy@sh100
Stuffed@sh250
Gluten-free@sh300
Select Your Toppings at sh. 100 each
Green Peppers
Bacon
Chillies
Chicken
Beef
Proceed
Your order will be ready in 1 hr.
Regards, Pizza Opolis.
Your Order is:
Name
Size
Crust
Topping
Total
Delivery will cost sh. 150
Add Pizza
Checkout
Home delivery?
Place Order


We invited you to celebrate our wedding
A passionate entrepreneur, CEO of RightVows Technologies & CTO of Galanation
A teacher by profession, passionate towards teaching. The spirit which drives her forward.
Holy mass folowed by weddng ceremony, in the holy church of Saint Baselios Yeldo who was the Maphrian of the East named Cheriapally.
Let the party festival begins at Kala Auditorium, Kothamangalam. It is in the heart of Kothamangalam town where it resides with pride.
We met in the heavens and then the blossoms of flower began to fell towards us.
The day I met her, began to blow my mind still today ! I liked her at the very first sight so do she. It was just like we are just like made for each other.
We met at a restaurant and it clicked ! We fell in love. It was a day we never forget !
The day finally arrives, we join the sacred harmony of marriage and began to live as one hearted and one soul !
I met her and here it all happens !
October 22, 2018


{% extends "base_generic.html" %} {% block content %} {% if user.username == username %}
You have been removed from {{group_name}}.
{{username}} has been removed from {{group_name}}.


Welcome to my Portfolio! My name is Paola Gonzalez and I am currently a student of the Trilogy Coding Bootcamp through the University of Arizona (UArizona).
Before I took the step to delve into the exciting world of coding, I studied public health at UArizona earning both a Bachelor of Science and a Masters degree.
Throughout my career, I have served my community through projects that utilized my skills in organization and creativity. When I worked as a Community Nutrition Educator, I designed educational materials to teach over Zoom and co-directed, filmed, and edited videos for our participants. I have also managed and maintained the social media and outreach materials of different organizations.
All roads have lead me here... The time spent researching, designing, and collaborating with people of many different backgrounds has inspired me to take on coding projects such as the ones you will see here.
I will keep this page updated with new projects. Do visit again soon!


What.
Creative Objective
I conceptualize, develop and execute digital marketing campaigns.
Ideas become code, code becomes front end development and front end development becomes an engaging and innovative web page or email template ready for consumption by the masses.
Full-Time Hobbies or you could say Specialties
-
Discover
Digital Marketing
Brand Promotion
SEO
SEM Marketing
-
Design
HTML / CSS / JS
UX
Visual Design
Photoshop
Indesign
-
Deploy
Campaigns
ESP
CMS Updates
Development


Today, I decided to create a light and free version of WebStart.
It will only include Apache 2, MySQL 5.1, and PHP 5.3.
Only one virtual host will be available by default (but you can still tweak the configuration files).
No log file viewing, no configuration editing, no OpenLDAP, no easy website creation and management, no SCM...
But it will be free. : )


Utils¶
The Utils module contains a wrapper for the discrete externally excited motor, an simple Euler integrator and an optionparsing to specify parameter, e.g. motor parameter. The wrapper is needed that the motor fits to the kers-rl DQN. The Euler integrator has go the same interface as the dopri5 integrator from the scipy.integrate.ode package.
-
class
gym_electric_motor.envs.utils.
EulerSolver
(system_eq, nsteps=1)[source]¶ Solves a system of differential equations of first order for a given timestep with linear approximation.
\(x^\prime(t) = f(x(t))\)
\(x(t + \frac{\tau}{nsteps}) = x(t) + x^\prime(t) * \frac{\tau}{nsteps}\)
Interface is a subset of the scipy.ode solver interfaces.
Parameters: - system_eq – Function pointer to the systems differential equation. Must accept an n-dimensional state and return the n-dimensional derivative of the state.
- nsteps – Number of cycles to calculate for each iteration. Higher steps make the system more accurate, but take also longer to compute.
-
class
gym_electric_motor.envs.utils.
FlattenActionWrapper
(env)[source]¶ Wrapper for the discrete action externally excited motor environment to make the actions fit to keras-rl DQN agent.
-
gym_electric_motor.envs.utils.
parse_env_args
()[source]¶ Option parsing function for the gym motor environments.
- Options:
--env_id Environment id that is used for the gym.make(env_id) call. --env_parameter Parameter json file path, that contains parameters that can be set in the environments | constructor except load_parameter and motor_parameter. --motor_parameter Parameter json file path that contains the technical motor parameters. | These parameters will be set at env_parameter[‘motor_parameter’] when returned. --load_parameter Parameter json file path that contains the technical load parameters. | These parameters will be set at env_parameter[‘load_parameter’] when returned.
Returns: Tuple of the environment_id and the environment constructor parameters including the motor and load parameters.


█
OS:
undefined
EtchTerm [Version 1.5.0]
Imagineee
(c) 2020 Imagineee. All rights reserved.
Type 'etter' for info
>


This inspection reports any
switch
statements in Javascript content which are nested in other
switch
statements. Such nested switch statements can be very confusing, particularly if proper indenting is not followed.
Powered by InspectionJS


Password Generator
Password length
Include uppercase letters
Include lowercase letters
Include numbers
Include symbols
Generate password
Made with
by
Giorgio Giannotta
Contact Me On
Get in Touch
© All Right Reserved 2020


{% extends "base.html" %} {% block title %}BrewLocker - Internal Server Error{% endblock %} {% block content %}
Don't worry, we'll sort this out as soon as possible
Go somewhere nice


Sitemap:
HOME
blog
blog/data-structures
blog/my-medium
blog/python-for-js-dev
blog/python-resources
docs
docs/sitemap
docs/about
docs/about/me
docs/about/node/install
docs/about/node/intro
docs/about/node/nodejs
docs/about/node/nodevsbrowser
docs/about/node/reading-files
docs/about/node/writing-files
docs/about/resume
docs/articles
docs/articles/algo
docs/articles/article-compilation
docs/articles/basic-web-dev
docs/articles/gallery
docs/articles/install
docs/articles/intro
docs/articles/python
docs/articles/reading-files
docs/articles/resources
docs/articles/ten-jamstack-apis-to-checkout
docs/articles/writing-files
docs/faq
docs/faq/contact
docs/interact
docs/interact/clock
docs/interact/jupyter-notebooks
docs/links/Social
docs/links
docs/links/medium-links
docs/links/my-websites
docs/quick-reference/Emmet
docs/quick-reference
docs/quick-reference/docs
docs/quick-reference/installation
docs/quick-reference/new-repo-instructions
docs/react
docs/react/createReactApp
docs/react/react2
docs/tools
docs/tools/default-readme
docs/tools/notes-template
docs/tools/plug-ins
docs/tools/vscode
notes-template
showcase


In life, sometimes you have an opportunity to fulfill your purpose. I am achieving that through this page.
From games to apps and everything in between for the Android platform
Designing responsive web sites with beautiful UIs and simplified page flow.
Efficiently transferring and storing user data. Quick processing for Big Data.
There's always something new cooking in the coding kitchen. Let's get spicy!


Covid-19 India
India
World
Confirmed
0
Recovered
0
Active
0
Deaths
0
Last Updated :
State
Confirmed
Recovered
Active
Deaths
Statelable
CONFIRMED
0
RECOVERED
0
ACTIVE
0
DEATHS
0
District
Confirmed
Recovered
Active
Deaths


--- layout: post-classic title: "Trello Enhanced Date - Chrome Extension" desc: "Trello Enhanced Date is a Chrome extension to make Trello's due date feature more customizable by allowing the user to specify when you use certain colors." thumbnail: "cd6c88e4b82aaa623e7436168587a673.png" categories: article tags: {} ---
This extension overwrites Trello's default styling and replaces it.
Download the extension from the Chrome store or contribute to the project on GitHub


Extended Splice Junction RNA-Seq Analysis with USeq
To create a novoindex with extended splice junctions:
- Create a multi-fasta file containing extended splice junctions matched to your target read length minus 4bp using the USeq MakeTranscriptome app.
- Download from UCSC an Ensembl transcript table, use the "output file: selected fields from primary and related tables" to
select: name chrom strand txStart txEnd cdsStart cdsEnd exonCount exonStarts exonEnds name2.
- Optional but recommended, toss annotations to non standard chromosomes (e.g. chrUn_XXX, chrXX_ctg5_XXX, chrXX_g100XXX). These contain unassembled and different variations of the reference chromosomes. They add duplicate identical sequence too so that reads will sometimes match to both the variant and the reference and are scored as non unique hits.
- Use the USeq PrintSelectColumns app to move the name2 column before name. This places the ensembl gene name first and the transcript name second.
Note, Excel won't work here. (e.g. java -jar -Xmx2G ~/AppsUSeq/PrintSelectColumns -i 10,0,1,2,3,4,5,6,7,8,9 -f mm9EnsTrans.ucsc) . Either remove the header line or place a # at it's start.
- Run the USeq MakeTranscriptome app to generate extended splice junctions. The splice junction radius should be set to your read length minus 4.
This is a time and memory intensive. If needed, split by chromosome and run on a cluster.
(e.g. java -jar -Xmx22G ~/USeqApps/MakeTranscriptome -n 10000 -m 5 -f /Genomes/Mm10/Fastas -u mm10EnsTrans_Corr.ucsc -r 46)
- Place the splice junction fasta file in the fasta genome directory and run novoindex. It is a good idea to include a chromosome with adapter
sequence combinations as well as a chromosome with phiX sequence. It is also recommended to exclude non standard chromosomes that could potentially provided duplicate identical sequence causing unique matches to look non unique.
(e.g. ~/BioApps/novocraft/novoindex mm9EnsTransRad46Num100kMin10SplicesChrPhiXAdaptr.novoindex Fastas/* )
- Share your novoindex and splice junction files by uploading your data into an Analysis Report in GNomEx! Novoindexes, gene, and transcript files are available for many species and genome builds,
see UBioCore Transcriptomes.
To align and process your Illumina fastq RNA-Seq data:
- Align your fastq data using novoalign and the read length matched extended splice junction novoindex. Output the reads in SAM format and allow for 50
repeat matches for each read. Limit the maximum alignment quality to 120 ~ 4 mismatches per alignment. Use grep to toss @SQ lines and those reads that don't align.
Also, be sure to test your gzip compressed fastq files. Novoalign doesn't throw an error when encountering a broken gzip file.
(e.g. gunzip -t *gz && ~/novocraft/novoalign -o SAM -r All 50 -t 120 -a
-d ~/mm9EnsTransRad46Num10kMin5SplicesChrPhiXAdaptr.novoindex -f *fastq.gz | grep -v ^@SQ | grep chr | gzip > raw.sam.gz )
Note, these alignments are not ready for use. The splice-junction coordinates need to be converted to genomic coordinates by running the
SamTranscriptomeParser or the RNASeq app. (e.g. java -jar -Xmx4G ~/AppsUSeq/SamTranscriptomeParser -a 90 -f 7410X6_s_5_raw.sam.gz Sam headers are created automatically.)
To analyze your processed RNA-Seq data:
The easiest option is to run the RNASeq application on your raw sam alignment files. This executes many USeq applications and is a good starting point.
Custom Analysis:
- Convert splice-junction coordinates to genomic coordinates by running the SamTranscriptomeParser (e.g. java -jar -Xmx4G ~/AppsUSeq/SamTranscriptomeParser -a 90 -f 7410X6_s_5_raw.sam.gz Sam headers are created automatically.)
- Generate relative read/ depth coverage graphs using the USeq Sam2USeq apps. These can be visualized in IGB (and UCSC Genome Browser if you upload your data to GenoPub) to show the sequence depth over every base.
- Run the DefinedRegionDifferentialSeq to score known annotation for differential expression using Loves et. al. DESeq2 package and your processed BAM files.
- First create a gene table containing collapsed transcripts using the modified transcript table downloaded from UCSC, see above. This should contain
the following columns: geneName transcriptName chrom strand txStart txEnd cdsStart cdsEnd exonCount exonStarts exonEnds. Use the USeq
MergeUCSCGeneTable app to merge any transcripts that share the same geneName. Exons are maximized, introns minimized.
(e.g. java -jar -Xmx4G ~/AppsUSeq/MergeUCSCGeneTable -u mm9EnsTrans_Corr.ucsc )
- Install R and the DESeq2 package, see http://www.bioconductor.org/packages/release/bioc/html/DESeq2.html
- Run the DefinedRegionDifferentialSeq app to score genes (or other defined regions) for differential expression and alternative splicing
(e.g. java -Xmx4G -jar ~/AppsUSeq/DefinedRegionDifferentialSeq -c /Data/PolIIConditions -s PolIIResults/ -u /Anno/mm9EnsGenes.ucsc.gz -g H_sapiens_Feb_2009)
- Upload your analysis into an Analysis Report in GNomEx and post your data tracks!


import {MatTreeNodeHarness} from '@angular/material/tree/testing';
MatTreeNodeHarness
extends
ContentContainerComponentHarness
Harness for interacting with a standard Angular Material tree node.
| Name | Description |
|---|---|
|
The selector of the host element of a |
async
collapse
|
|
|---|---|
|
Collapses the node if it is expanded. Only works when node is not disabled. |
|
| Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
async
expand
|
|
|---|---|
|
Expands the node if it is collapsed. Only works when node is not disabled. |
|
| Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
async
getAllChildLoaders
|
|
|---|---|
| Parameters | |
|
selector S
|
|
| Returns | |
Promise<HarnessLoader[]>
|
|
async
getAllHarnesses
|
|
|---|---|
| Parameters | |
|
query HarnessQuery<T>
|
|
| Returns | |
Promise<T[]>
|
|
async
getChildLoader
|
|
|---|---|
| Parameters | |
|
selector S
|
|
| Returns | |
Promise<HarnessLoader>
|
|
async
getHarness
|
|
|---|---|
| Parameters | |
|
query HarnessQuery<T>
|
|
| Returns | |
Promise<T>
|
|
async
getHarnessOrNull
|
|
|---|---|
| Parameters | |
|
query HarnessQuery<T>
|
|
| Returns | |
Promise<T | null>
|
|
async
getLevel
|
|
|---|---|
|
Gets the level of the tree node. Note that this gets the aria-level and is 1 indexed. |
|
| Returns | |
Promise<number>
|
|
async
getText
|
|
|---|---|
|
Gets the tree node's text. |
|
| Returns | |
Promise<string>
|
|
async
hasHarness
|
|
|---|---|
| Parameters | |
|
query HarnessQuery<T>
|
|
| Returns | |
Promise<boolean>
|
|
async
host
|
|
|---|---|
|
Gets a |
|
| Returns | |
Promise<TestElement>
|
|
async
isDisabled
|
|
|---|---|
|
Whether the tree node is disabled. |
|
| Returns | |
Promise<boolean>
|
|
async
isExpanded
|
|
|---|---|
|
Whether the tree node is expanded. |
|
| Returns | |
Promise<boolean>
|
|
async
toggle
|
|
|---|---|
|
Toggles node between expanded/collapsed. Only works when node is not disabled. |
|
| Returns | |
Promise<void>
|
Promise that resolves when the action completes. |
static
with
|
|
|---|---|
|
Gets a |
|
| Parameters | |
|
options TreeNodeHarnessFilters = {}
|
Options for narrowing the search |
| Returns | |
HarnessPredicate<MatTreeNodeHarness>
|
a |
MatTreeHarness
extends
ComponentHarness
Harness for interacting with a standard mat-tree in tests.
| Name | Description |
|---|---|
|
The selector for the host element of a |
async
getNodes
|
|
|---|---|
|
Gets all of the nodes in the tree. |
|
| Parameters | |
|
filter TreeNodeHarnessFilters = {}
|
|
| Returns | |
Promise<MatTreeNodeHarness[]>
|
|
async
getTreeStructure
|
|
|---|---|
|
Gets an object representation for the visible tree structure
If a node is under an unexpanded node it will not be included.
Eg.
Tree (all nodes expanded):
Tree structure: { children: [ { text: 'Node 1', children: [ { text: 'Node 2', children: [ { text: 'Node 2.1', children: [{text: 'Node 2.1.1'}] }, {text: 'Node 2.2'} ] } ] } ] }; |
|
| Returns | |
Promise<TextTree>
|
|
async
host
|
|
|---|---|
|
Gets a |
|
| Returns | |
Promise<TestElement>
|
|
static
with
|
|
|---|---|
|
Gets a |
|
| Parameters | |
|
options TreeHarnessFilters = {}
|
Options for narrowing the search |
| Returns | |
HarnessPredicate<MatTreeHarness>
|
a |
TreeHarnessFilters
A set of criteria that can be used to filter a list of tree harness instances
TreeNodeHarnessFilters
A set of criteria that can be used to filter a list of node harness instances.
| Name | Description |
|---|---|
|
Only find instances whose disabled state matches the given value. |
|
Only find instances whose expansion state matches the given value. |
|
Only find instances whose level matches the given value. |
|
Only find instances whose text matches the given value. |
TextTree
type TextTree = {
text?: string;
children?: TextTree[];
};


Extracts a member from a tuple.
Extracts a tuple from a set.
Syntax
Syntax that Returns a Member—one of the following:
tuple[.Item] ( index ) Item ( tuple, index )
Syntax that Returns a Tuple—one of the following:
set[.Item] ( index ) Item ( set, index )
| Parameter | Description |
|---|---|
|
The tuple from which to get a member. |
|
index |
The usage depends upon whether you are returning a member or a tuple:
|
|
The set from which to get a tuple. |
Example
Example 1, Extracting a Member from a Tuple
SELECT {( [Qtr1], [Sales], [Cola], [Florida], [Actual] ).Item(3)} ON COLUMNS FROM Sample.Basic
returns:
| Florida |
| 5029 |
SELECT {Item(( [Qtr1], [Sales], [Cola], [Florida], [Actual] ), 2)} ON COLUMNS FROM Sample.Basic
returns:
| Cola |
| 22777 |
Example 2, Extracting a Tuple from a Set
The following query
SELECT {CrossJoin ( [Market].CHILDREN, [Product].CHILDREN ).ITEM(0)} ON COLUMNS FROM Sample.Basic
returns the first tuple in the set CrossJoin([Market].CHILDREN, [Product].CHILDREN), which is ([East], [Colas]):
| East |
| Colas |
| 12656 |
The above query can also be written as:
SELECT {CrossJoin ( [Market].CHILDREN, [Product].CHILDREN )(0)} ON COLUMNS FROM Sample.Basic
because the ITEM keyword is optional.
Example 3, Extracting Member from a Set
Consider the following crossjoined set of Market and Product members:
{ ([East],[100]),([East],[200]),([East],[300]),([East],[400]),([East],[Diet]), ([West],[100]),([West],[200]),([West],[300]),([West],[400]),([West],[Diet]), ([South],[100]),([South],[200]),([South],[300]),([South],[400]),([South],[Diet]), ([Central],[100]),([Central],[200]),([Central],[300]),([Central],[400]),([Central],[Diet]) }
The following example
CrossJoin([Market].CHILDREN, [Product].CHILDREN).item(0)
returns the first tuple of the crossjoined set, ([East],[100]), and the following example
CrossJoin([Market].CHILDREN, [Product].CHILDREN).item(0).item(1)
returns [100], the second member of the first tuple of the crossjoined set.


Earn $KMD by completing marketing, software development, and creative tasks. You can find the fourm here: https://forum.komodoplatform.com/c/jobs-bounties.
Pungo Token, the utility digital token of peer2group that’s empowering access to decentralized stateless currencies: cryptocurrencies.
faiz12-Sep-18 04:47 PM
thanks
faiz18-Sep-18 12:45 PM
@Virginia (Peer2Group) i already submit for it today
Virginia (Peer2Group)18-Sep-18 02:10 PM
Thanks! faizkh. You will receive an email confirming your participation in the ambassadors program
faiz19-Sep-18 01:16 AM
@Virginia (Peer2Group) i still waiting
Virginia (Peer2Group)19-Sep-18 06:30 AM
@faiz Please, check also your Inbox and Spam/Junk folder, just in case. Thanks
faiz19-Sep-18 06:32 AM
i recive it. when submit address?
Virginia (Peer2Group)19-Sep-18 07:58 AM
We will send you the Pungo Tokens when the sale ends. The lasts days we will send you an email with the total amount collected and asking your address in order to send them
Berg19-Sep-18 01:00 PM
Hello everyone!
HUSH is looking for developers that are experienced in binary packaging, we are in the end stages of our wallet development and are seeking talent for end stages of development. Please feel free to join our Discord at https://myhush.org/discord if you are interested in lending a hand. We will compensate well for work completed.
2
faiz19-Sep-18 04:12 PM
@Virginia (Peer2Group) ok thanks for your information
1
dukeleto23-Sep-18 03:17 PM
Hush is especially looking for people that know NodeJS/Electron
to work on this wallet, which is compatible with KMD and all KMD asset chains, currently only Hush GUI exists: https://github.com/MyHush/hush-ng
There is a large OTC (=over the counter market) market for BTC and other big coins. Such OTC trades are usually done via escrow services like Genesis Global, Itbit, GBTC and others. The worldwide OTC market volume is estimated to be way larger than what we see on open exchan...
Cryptoon28-Sep-18 04:48 PM
@PhilConee, @KomodoWorld is the one that issued the bounty I think.
Caglio28-Sep-18 05:20 PM
I would like to talk with someone, about community outreach bounties....
I have some ideas, so if someone can direct message me it would be amazing
Cryptoon28-Sep-18 05:21 PM
Community outreach: @benohanlon
Caglio28-Sep-18 05:27 PM
thank you kind sir
benohanlon28-Sep-18 05:52 PM
Thanks @Cryptoon
KomodoWorld28-Sep-18 05:57 PM
@PhilConee hi, the bounty is still open. The main stumbling block is how home users can setup a full relay node. Also I should ask the admin to correct the title, it's not for a graphical user interface. It was after I created it that I was told that it's not trivial. So the bounty is more for solving this backend issue and then have a working solution at cli/uglygui level. If one can also do a pretty gui it's welcome but not the first thing
@SHossain can you put that link as description of channel
SHossain05-Oct-18 07:49 PM
done
faiz11-Oct-18 12:24 PM
@Virginia (Peer2Group) when i got paid?
Virginia (Peer2Group)11-Oct-18 02:33 PM
Throughout the day
faiz12-Oct-18 11:11 PM
not yet recieve
AlvinLeito13-Oct-18 03:13 PM
Hey all.. there is an active bounty challenge going on, for people that want to give feedback on the whitepaper of the ViisiitCoin. ViisiitCoin will become an assetchain of Komodo.
The whitepaper is a Google docs, and we cannot give the link to it away freely, so’ I’ll need to add you to the document through an e-mail if you’re interested.
You can find more information on the bounty challenge, on the bottom page of www.H12N.com
Hi @everyone I"m putting up a personal bounty of 100 KMD for a graphic that reveals the inner dragon of my ever escaping hound
I'm working on a GPS tracking solution with pi/arduino which incorporates oracles cryptoconditions to alert when he escapes, and broadcast location intel to find him.
He's had a few 24hr+ walkabouts over the last fortnight, most recently last night during harsh thunderstorms.
The comercial GPS "Biotraka" was not up to the task, failing to transmit and no longer on his collar when he returned.
I'll be housing the GPS unit in a K9 tactical vest once ready. It's likely there will be another graphics comp like the above once it's ready to go.
1
photos of the dog are available at http://cryptocartography.io/skrunched/ to help the artists out there render a good likeness. I can also try and take a few ni specific poses on request (no gaurantee he'll comply tho!)
I"m not totally sure yet, but the concept is based on the dog having an inner dragon, stubborrn, intelligent but a lust (or dreaming of) the freedom of the skies. My first image thought was a sketch with his shadow risng, like batman, but forming a dragon.
It's to promo a gps/cryptoconditions tracking project for a dog who is impossible to contain in my backyard, and has escaped 4 times in the last 2 weeks, twice for over 24hrs.
NutellaLicka14-Oct-18 11:52 AM
So I wasn't on the money?
javadth14-Oct-18 11:54 AM
@NutellaLicka let see all participates
CryptAiz14-Oct-18 12:14 PM
oh i see. and u want to include live picture of your dog in this artwork.. okay cool.
smk762 - dracocanis ominator14-Oct-18 10:43 PM
I dont want to constraint the art, a caricature of the hound etc is ok too. Over the next few days I'll try and get some better photos and write up the full background to this and specifics on the comp like timeline etc. @NutellaLicka your pic isn't what I was thinkning to begin with, but I'd never have thought of it until you didi it! Sytle and interpretation is open to individual artistic freedom, though I'll elaborate more about the background of the concept etc in the next few days so it's a bit less of a vague brief. The "hidden dragon" can be anything across the broad range of lore to the reptiles we all know and love. Can be a shadow rising, or a trickster spirit on the shoulder whispering escape.
He's a river dog, when he escapes he heads into the bush along it and is a master at evading capture. Had 3 ranger units trying to corner him a couple weeks ago but he gave them the run around for a couple of hours unitl I showed up. So could be him evading capture attempts.
He might have a den on the foreshore, guarding a hoard of kmd? Or maybe his dragon familiar flys up to scout his next destination as he breaks through all baricades to reach it. He's a good geocaching partner, and that kind of ties in with the tracker gps side of things, so it could be a cache he's searching for or protecting.(edited)
Distilled to it's most basic, the concept is dog/dragon/freedom. I"ll add some context for personality and activity based on experience soon
He stalks my chickens, not to eat but he seems to get a huge kick out of winding them up. If one is sitting on eggs, he'll stand nearby and bark to move it along so he can grab an egg, go drop it on the concrete an have a feed.
i know why! who ever heard of a 34 year old chicken!
1
smk762 - dracocanis ominator16-Oct-18 10:19 AM
dammit... I'll have to switch to childrens passports
Thanks for the interest @faiz and those that have contacted me with queries and pictures
I'm working on finalising bounty details by end of week, and collecting some more photos for the artists. I'll post the backstory, comp rules/timeline/bounty splits and ultralitepaper of the GPS/Oracle CC project being built.
@smk762 - dracocanis ominator Your ID should get you through KFC, though.
ComputerGenie 👴👴👴28-Oct-18 02:10 PM
goes to Popeyes, they don't require ID
smk762 - dracocanis ominator28-Oct-18 02:22 PM
Bounty still pending sorry for wait. Backstory post at https://imgur.com/gallery/QIEAQ1U
I've been testing with oracles on Staked, still waiting for GPS unit to arrive. Should be thins week, it's been in transit for 5 days!
Collecting a few more photos, and "greenscreening" some to make it easier.
@smk762 - dracocanis ominator just read that all, pretty freaking awesome
We had some epic walks in bushland and along the river, stumbling into some beautiful outdoor spots I'd no idea existed so close to home, sniffing out a geocache or 10 along the way, chasing urban kangaroos and jumping away from startled bobtail lizards. It's a challenge keeping up him, I'm sure he'd walk forever but I'd really prefer a rest every 10km or so.
this is duped btw
Cryptoon29-Oct-18 07:58 AM
Just read it all! Great story and seems like Skrunch is very lucky to have found you!
cantptalblonit29-Oct-18 03:00 PM
What a great story...life brings us exactly what we need, you are fortunate to have found each other. Thanks for taking the time to share this Put a smile on my face and in my heart.
Yes, it's still open. I'll go through and check any I like next week.
PTYX28-Nov-18 03:49 PM
Is there a bounty for adding the ledger to graphical interface and being able to claim interest?
SHossain03-Dec-18 08:20 PM
The first KMD public pool to be Sapling ready will get a 100 KMD bounty from me and 1000 KMD bounty from jl777.
Hint: You need sapling specific pool code and release the source for community.
The komodod binaries need to be compiled from FSM branch of https://github.com/PirateNetwork/komodo repo specifically. and the chain param is
A NOMP based stratum for the Komodo platform. Contribute to blackjok3rtt/Knomp development by creating an account on GitHub.
payouts are also working, and pool fee is wokring as normal. Only required setting is "disablecb":true in coins.json for all coins sapling is activated on, and this will also work on coins saplin is not activated on. Not 100% sure if pirate payouts work with it, but as webworkeers pool already has sapling in it, I assume pirate pools will use his.(edited)
blackjok3r04-Dec-18 06:20 AM
This pool can be changed to work with pirate if someone wants this just ask.


Only a few hours after being dropped off for Lauren's first semester at UofM, she met Ansgar. Even thou neither of them were looking to get into a relationship, there was something special...
A few days later, Ansgar asked Lauren if she would like to grab dinner at Noodles and Company. Things were off to a good start when they both ordered the Mac and Cheese.
Several dates later, Ansgar and Lauren took the very important step of becoming Facebook official. This may or may not have involved an adventure on the roof of the Art and Architecture building.
After a long and exhastive search, Ansgar and Lauren found the cutest and cuddliest dog, Piper. She is perfect in every way with her best feature being her constant underbite.
On a beautiful ski day at Schuss Mountain, Ansgar took the risky step of asking Lauren to marry him. Little did he know, the only risk he was taking was dropping the ring while asking on the chair lift.
After six years of dating, Ansgar and Lauren will be thrilled to join together as a married couple. Fingers crossed for snow!
435 Ionia Ave SW, Grand Rapids, MI 49503
February 3, 2018 at 5:30PM
Our ceremony and reception will both take place in the Downtown Market Greenhouse. Between the two events, guests will be able to explore the market on the first floor of the Downtown Market.
Maid of Honor
Maid of Honor
Bridesmaid
Bridesmaid
Best Man
Groomsman
Groomsman
Groomsman


Haiku Checker
Line 1 (5 syllables)
Line 2 (7 syllables)
Line 3 (5 syllables)
Submit
Line 1:
Line 2:
Line 3:


RICHARD K WARE
Democrat
Retired, living on Social Security disability
BS Computer Science, MIT, 1978
80907
See above.
I attended Democratic caucuses in my city, Colorado Springs, in 2018 and 2020. I was a delegate at the county and state Democratic conventions in 2018 and 2020. In 2018, I did a fair amount of door-to-door canvassing, and a little phone canvassing. 2015 through 2019, I probably donated $100 a year or less to various liberal organizations, and Democratic organizations and candidates. This year, I've donated a few hundred dollars to Democratic organizations, and Democratic candidates for president, as well as Democratic House and Senate candidates in Colorado and other states.
I am the webmaster for Casa Verde Cohousing, a cohousing condominium in Colorado Springs (web-site: https://www.casaverde.us) .
I have a passion for fair districting, to yield fair proportional representation in the U.S. House and the Colorado legislature. Here's a hypothetical example of my approach to redistricting. Imagine, in the future, Colorado is apportioned 10 seats in the U.S. House. And imagine registered voters in Colorado are 50% Democrats, 30% Republicans, and 20% unaffiliated. Then the map should be drawn so that 5 districts are likely to elect Democratic representatives, 3 are likely to elect Republicans, and 2 are thoroughly unpredictable as to the candidate they will elect. I also expect to understand the software packages presented to the Commission by its staff, and the algorithms embodied in that software, as well any other Commissioner.
See passion cited above. It is my hope that, by advocating a fair and representative map, as opposed to only representing the interests of Democratic voters, I will win the trust of the Republican and unaffiliated Commissioners.
See my resume, showing my career as a software engineer (note that the address and phone number listed on the resume are quite out of date: I retired in 2013, and moved to Colorado Springs).
Male


|
XPMP2
X-Plane multiplayer library 2 - using instancing
|
Implementation of 2-D routines, like drawing aircraft labels. More...
#include "XPMP2.h"
Namespaces | |
| XPMP2 | |
| Defined by FMOD. | |
Macros | |
| #define | DEBUG_ENABLE_AC_LABELS "Aircraft labels %s" |
Functions | |
| void | XPMP2::TwoDDrawLabels () |
| Write the labels of all aircraft. More... | |
| int | XPMP2::CPLabelDrawing (XPLMDrawingPhase, int, void *) |
| Drawing callback, called by X-Plane in every drawing cycle. More... | |
| void | XPMP2::TwoDActivate () |
| Activate actual label drawing, esp. set up drawing callback. More... | |
| void | XPMP2::TwoDDeactivate () |
| Deactivate actual label drawing, esp. stop drawing callback. More... | |
| void | XPMP2::TwoDInit () |
| Initialize the module. More... | |
| void | XPMP2::TwoDCleanup () |
| Grace cleanup. More... | |
| void | XPMPEnableAircraftLabels (bool _enable) |
| Enable or disable drawing of labels with the aircraft. More... | |
| void | XPMPDisableAircraftLabels () |
| Disable drawing of labels with the aircraft. More... | |
| bool | XPMPDrawingAircraftLabels () |
| Returns if labels are currently configured to be drawn. More... | |
| void | XPMPSetAircraftLabelDist (float _dist_nm, bool _bCutOffAtVisibility) |
Implementation of 2-D routines, like drawing aircraft labels.
2-D drawing is a bit "unnatural" as the aircraft are put into a 3-D world. These functions require to turn 3D coordinates into 2D coordinates.
| #define DEBUG_ENABLE_AC_LABELS "Aircraft labels %s" |
| void XPMPDisableAircraftLabels | ( | ) |
Disable drawing of labels with the aircraft.
Effectively calls XPMPEnableAircraftLabels()
| bool XPMPDrawingAircraftLabels | ( | ) |
Returns if labels are currently configured to be drawn.
| void XPMPEnableAircraftLabels | ( | bool | _enable | ) |
Enable or disable drawing of labels with the aircraft.
| void XPMPSetAircraftLabelDist | ( | float | _dist_nm, |
| bool | _bCutOffAtVisibility = true |
||
| ) |
Configure maximum label distance and if labels shall be cut off at reported visibility
| _dist_nm | Maximum label distance in nm, default is 3, minimum is 1 |
| _bCutOffAtVisibility | Shall labels not be drawn further away than XP's reported visibility? |


{{include /home/users/zhangwanlong/project/go-spg/testing/head.html}}
This page is inspired by the Things page of Kenneth Reitz.
How Google Works, 断舍离, 日本的八个审美意识
败家实验室, Muji, Pilot, Lamy
iPhone 6, Kindle, Bose Wave Music System
OLYMPUS E-M5 Mark II w/ DG15 & 1442EZ, SONY RX100 Mark III
My photos are posted on Tumblr and Instagram.
See details in 我喜欢的应用。
{{include /home/users/zhangwanlong/project/go-spg/testing/foot.html}}


Form Upload
Dropzone multiple file uploader
Drag multiple files to the box below for multi upload or click to select files. This is for demonstration purposes only, the files are not uploaded to any server.
Drag multiple files to the box below for multi upload or click to select files. This is for demonstration purposes only, the files are not uploaded to any server.