Sphinx documentation > Color Text
.. role:: blue
This text is :blue:`blue text`.
Search This Blog
Friday, October 7, 2016
Monday, September 19, 2016
Multine line text table Sphinx Documentation
Multine line text table Sphinx Documentation
+---------+
| Text |
+=====+
| | line1 |
| | line2 |
| | line3 |
+---------+
+---------+
| Text |
+=====+
| | line1 |
| | line2 |
| | line3 |
+---------+
Etichete:
sphinx
Thursday, September 8, 2016
sphinx-build example from command prompt
run from command prompt:
sphinx-build -b html -d _build/doctrees . _build/html index.rst
sphinx-build -b html -d _build/doctrees . _build/html index.rst
Etichete:
sphinx
Tuesday, September 6, 2016
LINQ OrderByDescending Example C#
C# > LINQ > Enumerable Class > OrderByDescending
Sorts the elements of a sequence in descending order.
Example
Sorts the elements of a sequence in descending order.
Example
List<int> list = new List<int> { 2, 5 ,3
,10, 7 };
IEnumerable<int> ordList = list.OrderByDescending(num => num);
foreach (int num in ordList)
{
Console.WriteLine(num);
}
Thursday, September 1, 2016
Include file PlantUml in rst file
PlantUml > Include file
PersonList.rst
@startuml
!include Person.iuml
Person <|.. PersonList
@enduml
Person.iuml
interface Person
Person: int age()
Person: string name()
PersonList.rst
@startuml
!include Person.iuml
Person <|.. PersonList
@enduml
Person.iuml
interface Person
Person: int age()
Person: string name()
Etichete:
PlantUML
Thursday, August 4, 2016
GIT - How to revert a faulty merge
git revert -m 1 3c6539c
where 3c6539c is the revision of the faulty merge
Etichete:
GIT
Friday, July 29, 2016
Get value from object using Lambda expression
C# > Linq > Expressions > Expression > Compile
Compiles the lambda expression described by the expression tree into executable code and produces a delegate that represents the lambda expression.
Example
Get value from object using Lambda expression
Compiles the lambda expression described by the expression tree into executable code and produces a delegate that represents the lambda expression.
Example
Get value from object using Lambda expression
using System;
using System.Linq.Expressions;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public class Project
{
public string Name { get; set; }
public int Id { get; set; }
}
public TProp GetValue(TObj obj, Expression<Func> prop)
{
return prop.Compile()(obj);
}
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
var project = new Project();
project.Name = "Project 1";
project.Id = 1;
int id = GetValue(project, i => i.Id);
string name = GetValue(project, i => i.Name);
}
}
}
Etichete:
c#
SQLITE Get All Tables
SQLITE > Get all tables
SELECT name FROM sqlite_master WHERE type='table'
SELECT name FROM sqlite_master WHERE type='table'
Etichete:
SQLite
Friday, July 8, 2016
SQLite C# Example
C# > SQLite
SQLiteConnection.CreateFile("MyDatabase.sqlite");
SQLiteConnection m_dbConnection = new SQLiteConnection("Data Source=MyDatabase.sqlite;Version=3;");
m_dbConnection.Open();
string sql = "create table
project (name varchar(100), id int)";
SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection);
command.ExecuteNonQuery();
sql = "insert into project (name, id) values ('project 1',
1)";
command = new SQLiteCommand(sql,
m_dbConnection);
command.ExecuteNonQuery();
sql = "select * from project order by id desc";
command = new SQLiteCommand(sql,
m_dbConnection);
SQLiteDataReader reader = command.ExecuteReader();
while (reader.Read())
Console.WriteLine("Name: " + reader["name"] + "\tScore:
" + reader["id"]);
Wednesday, June 29, 2016
PlantUML Set ForeColor and BackColor
PlantUML > Set ForeColor and BackColor
Font Color in Participants
This example will set font color to white and background color to some custom color.
participant "<color:#white>Setup" as Setup #FD9A00
Etichete:
PlantUML
Tuesday, June 7, 2016
C# get property value from object using reflection
C# > Reflection > Property Info > GetValue
Returns the property value of a specified object.
Example
Get property value from object using reflection.
Returns the property value of a specified object.
Example
Get property value from object using reflection.
private static object GetPropValue(object src, string propName)
{
return src.GetType().GetProperty(propName).GetValue(src, null);
}
Etichete:
c#
Subscribe to:
Posts (Atom)