text:
Era canonico e custode della chiesa di Aquisgrana.

Biografia
Non si conosce altro della sua vita, tranne che fu l'autore della Historia Hierosolymitanae expeditionis, chiamata anche Chronicon Hierosolymitanum de bello sacro o Liber Christianae expeditionis pro ereptione, emundatione, restitutione sanctae Hierosolymitanae ecclesia.
Un'opera in latino, costituita da dodici libri, scritta tra il 1125 ed il 1150, che inizia con l'Appello di Clermont, racconta le fortune della prima crociata e l'inizio della storia del regno di Gerusalemme e termina piuttosto bruscamente nel 1121.

Era ben conosciuta durante il Medioevo, e fu largamente usata da Guglielmo, arcivescovo di Tiro, per i primi sei libri della sua Belli sacri historia.
In epoca moderna è stata accettata senza riserve per molti anni dalla maggior parte degli storici, incluso Edward Gibbon.
Più recentemente, il suo valore storico è stato impugnato seriamente, ma il verdetto dei maggiori accademici sembra essere che in generale esso costituisce una registrazione veritiera degli eventi della prima crociata, sebbene contenga qualche materiale leggendario.

Alberto non visitò mai la Terra Santa, ma sembra aver avuto una considerevole quantità di colloqui con i crociati di ritorno dalla Terra Santa, ed aver avuto accesso ad una notevole corrispondenza.

Edizioni della  Historia Ierosolimitana
La prima edizione della cronaca fu pubblicata ad Helmstedt nel 1584;
una buona edizione è in Recueil des historiens des croisades, tomo IV, Parigi 1879;

 Albericus Aquensis,  Historia Hierosolymitanae Expeditionis (1095-1125) in Documenta Catholica Omnia (PDF; 6 kB)

Bibliografia
 F Krebs, Zur Kritik Alberts von Aachen, Monaco 1881;
 Heinrich von Sybel, Geschichte des ersten Kreuzzuges, Lipsia 1881;
 M Pigeonneau, Le cycle de la croisade et de la famille de Bouillon, Parigi 1877;
 B Kugler, Albert von Aachen, Stoccarda 1885;
 F Vercruysse, Essai critique sur la chronique d'Albert d'Aix, Liegi 1889;

Altri progetti

Collegamenti esterni

  Albert of Aix a The Latin Library (dalla: Patrologia Latina).

Cronisti medievali
Letteratura crociata
Nati nell'XI secolo

redpajama_set_name: RedPajamaWikipedia


text:
5453606.pdf (2.66 MB)
Imaging of myocardial fibrosis in patients with end-stage renal disease: Current limitations and future possibilities
posted on 2017-03-24, 13:32 authored by Matthew P.M. Graham-Brown, A.S. Patel, David StenselDavid Stensel, Daniel S. March, A.-M. Marsh, J. McAdam, Gerry P. McCann, James O. Burton
Cardiovascular disease in patients with end-stage renal disease (ESRD) is driven by a different set of processes than in the general population. These processes lead to pathological changes in cardiac structure and function that include the development of left ventricular hypertrophy and left ventricular dilatation and the development of myocardial fibrosis. Reduction in left ventricular hypertrophy has been the established goal of many interventional trials in patients with chronic kidney disease, but a recent systematic review has questioned whether reduction of left ventricular hypertrophy improves cardiovascular mortality as previously thought. The development of novel imaging biomarkers that link to cardiovascular outcomes and that are specific to the disease processes in ESRD is therefore required. Postmortem studies of patients with ESRD on hemodialysis have shown that the extent of myocardial fibrosis is strongly linked to cardiovascular death and accurate imaging of myocardial fibrosis would be an attractive target as an imaging biomarker. In this article we will discuss the current imaging methods available to measure myocardial fibrosis in patients with ESRD, the reliability of the techniques, specific challenges and important limitations in patients with ESRD, and how to further develop the techniques we have so they are sufficiently robust for use in future clinical trials.
Biomedical Research International
GRAHAM-BROWN, M.P.M. ... et al, 2017. Imaging of myocardial fibrosis in patients with end-stage renal disease: Current limitations and future possibilities. BioMed Research International, Volume 2017, Article ID 5453606.
© M. P. M. Graham-Brown et al. Published by Hindawi.
This work is made available according to the conditions of the Creative Commons Attribution 4.0 International (CC BY 4.0) licence. Full details of this licence are available at: http://creativecommons.org/licenses/ by/4.0/
This is an Open Access Article. It is published by Hindawi under the Creative Commons Attribution 4.0 International Licence (CC BY). Full details of this licence are available at: http://creativecommons.org/licenses/by/4.0/
Other health sciences not elsewhere classified
Cardiac MRIEchocardiogramMyocardial FibrosisCardiovascular diseaseEnd stage renal diseaseHemodialysisMedical and Health Sciences not elsewhere classified

redpajama_set_name: RedPajamaCommonCrawl


Oh So Bright: Date Change & Video!
You are probably going to be seeing a lot of posts in the future about Expedition Impossible! I'm just forewarning you. :) I've got to support my girls!
So there's been a date change and the premiere is now Thursday, June 23rd at 8:00pm CST. That's right... it's taking the spot of Grey's Anatomy!! So all you Grey's fans can watch too. I'm so glad it changed from Tuesday to Thursday because I had conflicts every Tuesday. Wooohooo!!!
Also, check out the very first Expedition Impossible commercial. My girl, Lindsey, is in it at least twice. Look for the girl in the red shirt. She may or may not be laying on the ground in one of the shots. What?!!
Go support Team Kansas and "Like" them on Facebook!!! Go here to do it.
Ok, that is INTENSE! I will totally watch!


text:
---
layout: post
title:  "[Build a CMS in an Afternoon with PHP and MySQL]-学习笔记"
date:   2018-04-18
categories: PHP
tags: PHP MySQL CMS
author: 6xian or xian6
---

* content
{:toc}

这是一篇学习 ["Build a CMS in an Afternoon with PHP and MySQL"](https://www.elated.com/articles/cms-in-an-afternoon-php-mysql/) 的笔记,目的是学习如何用 `PHP + MySQL` 进行简单的项目开发,为 PHP 代码审计打下基础。

原文:

[Build a CMS in an Afternoon with PHP and MySQL](http://www.elated.com/articles/cms-in-an-afternoon-php-mysql/)

[All code copyright Elated Communications Ltd 2011.](http://www.elated.com/)

我把原文的代码敲了一遍,放在自己的 Github 里,叫做 mini-cms-article。除了学习用 PHP + MySQL 搭建一个简单的 CMS 之外,也是学习熟悉一些 Git 的操作。

## 知识点:

> Along the way, you'll learn how to create MySQL databases and tables; how to work with PHP objects, constants, includes, sessions, and other features; how to separate business logic from presentation; how to make your PHP code more secure, and much more!

* 创建数据库和数据库表
* 数据库查询、插入、更新、删除等
* PHP 对象、常量、包含、会话等
* 分离业务逻辑和页面展示

## 环境准备

> For this tutorial, you'll need to have the Apache web server with PHP installed, as well as the MySQL database server running on your computer.

关于 Apache + PHP + MySQL,Windows 下推荐用 phpStudy 或者 XAMPP。phpStudy 有个"站点域名管理"的功能,能够在不同目录,不同域名和端口下灵活部署多个站点。

PHP 版本:php-5.3.29-nts

MySQL 版本:5.5.53

## CMS 功能

该 CMS 实现了简单的文章显示、编辑和管理功能,但是只有管理员 1 个账户,可以考虑增加多用户、文章评论等功能,类似博客。

前端:

* 主页,显示 5 篇最近的文章
* 文章列表页面,显示所有文章
* 文章查看页面,显示文章内容

后端:

* 管理登录和登出
* 列出所有文章
* 增加新的文章
* 编辑文章
* 删除文章

每篇文章列表会显示标题、摘要和发布时间。

## 实现步骤

1. Create the database (articlescms)
2. Create the articles database table  (articles)
3. Make a configuration file  (config.php)
4. Build the Article class  (classes/Article.php)
5. Write the front-end index.php script
6. Write the back-end admin.php script
7. Create the front-end templates
8. Create the back-end templates
9. Create the stylesheet and logo image

> Ready? Grab a cup of coffee, and let's get coding!

## Step 1: Create the database

1. Run the mysql client program

   ```
   C:\Users\Administrator
   λ mysql -u root -p
   Enter password:  ****

   Welcome to the M ySQL monitor.  Commands end with ; or  \g.
   Your MySQL conne ction id i s  2
   Server version:  5.5.53 MyS QL  Community Server ( GPL)
   Copyright (c) 20 00, 2016,  Or acle  and/or its aff iliates. All rights  reserved.
   Oracle is a r egistered trademark of Oracle Corporation and/or  its
   affiliates. O ther  names may be trademarks of their  respective
   owners.
   Type 'h elp;' or '\h' for help. Type '\c' to clear the current input  stateme nt.
   mysql>
   ```

2. Create the database

3. Quit the mysql client program

   ```
   mysql> create database articlescms;
   Query OK, 1 row affected (0.02 sec)

    mysql> use articlescms;
    Database changed
    mysql> exit
    Bye
   ```

## Step 2: Create the articles database table

1. Create the articles table
2. Give each article a unique ID
3. Add the publicationDate field
4. Add the title field
5. Add the summary and content fields
6. Add the primary key

articles 表的结构如下:

```
DROP TABLE IF EXISTS articles;
CREATE TABLE articles
(
  id              smallint unsigned NOT NULL auto_increment,
  publicationDate date NOT NULL,                              # When the article was published
  title           varchar(255) NOT NULL,                      # Full title of the article
  summary         text NOT NULL,                              # A short summary of the article
  content         mediumtext NOT NULL,                        # The HTML content of the article

  PRIMARY KEY     (id)
);

```

每篇文章包括 id,发布时间,标题,摘要,内容等 5 个属性。

id 为主键,类型为 smallint unsigned,值不能为空,值是唯一的,并自动增加。每个表只能有一个主键,用来标识表中的各项记录。

新建 tables.sql,内容如上表,在 articlescms 数据库中创建该表。

命令如下:

```
d:\myProjects
λ cd mini-cms-article\

d:\myProjects\mini-cms-article
λ ls tables.sql
tables.sql

d:\myProjects\mini-cms-article
λ mysql -u root -p
Enter password: ****
Welcome to the MySQL monitor.
...

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| articlescms        |
| challenges         |
| mysql              |
| performance_schema |
| security           |
| test               |
| zvuldrill          |
+--------------------+
8 rows in set (0.00 sec)

mysql> use articlescms;
Database changed
mysql> source tables.sql;
Query OK, 0 rows affected, 1 warning (0.31 sec)

Query OK, 0 rows affected (0.08 sec)

mysql> desc articles;
+-----------------+----------------------+------+-----+---------+----------------+
| Field           | Type                 | Null | Key | Default | Extra          |
+-----------------+----------------------+------+-----+---------+----------------+
| id              | smallint(5) unsigned | NO   | PRI | NULL    | auto_increment |
| publicationDate | date                 | NO   |     | NULL    |                |
| title           | varchar(255)         | NO   |     | NULL    |                |
| summary         | text                 | NO   |     | NULL    |                |
| content         | mediumtext           | NO   |     | NULL    |                |
+-----------------+----------------------+------+-----+---------+----------------+
5 rows in set (0.01 sec)

```

或者

```
d:\myProjects\mini-cms-article
λ mysql -u root -p articlescms < tables.sql
Enter password: ****
```

## Step 3: Make a configuration file

配置文件存储一些设置,用于整个 CMS 的所有脚本。

1. Display errors in the browser
2. Set the timezones
3. Set the database access details
4. Set the paths
5. Set the number of articles to display on the homepage
6. Set the admin username and password
7. Include the  Article class
8. Create an exception handler

```php
<?php
ini_set( "display_errors", true ); // 在浏览器上显示错误信息。
date_default_timezone_set( "Asia/Shanghai" );  // 设置时区 http://www.php.net/manual/en/timezones.php
define( "DB_DSN", "mysql:host=localhost;dbname=articlescms" );
define( "DB_USERNAME", "username" );
define( "DB_PASSWORD", "password" );
define( "CLASS_PATH", "classes" );
define( "TEMPLATE_PATH", "templates" );
define( "HOMEPAGE_NUM_ARTICLES", 5 );
define( "ADMIN_USERNAME", "admin" );
define( "ADMIN_PASSWORD", "mypass" );
require( CLASS_PATH . "/Article.php" );

function handleException( $exception ) {
  echo "Sorry, a problem occurred. Please try later.";
  error_log( $exception->getMessage() );
}

set_exception_handler( 'handleException' );
?>

```

将数据库相关的参数改为自己 MySQL 的设置,包括数据库地址、名称、用户、密码等。

`ADMIN_USERNAME` 和 `ADMIN_PASSWORD` 为 CMS 管理员用户和密码。

**Security note**

> In a live server environment it'd be a good idea to place config.php somewhere outside your website's document root, since it contains usernames and passwords. While it's not usually possible to read the source code of a PHP script via the browser, it does happen sometimes if the web server is misconfigured.

> You could also use hash() to make a hash from your admin password, and store the hash in config.php instead of the plaintext password. Then, at login time, you can hash() the entered password and see if it matches the hash in config.php.

在 Web 的部署环境中,最好不好把配置文件放在网站目录下,除了采取 hash() 的方式外,最好是把管理员和密码放在服务器的环境变量里,在代码啊中不存放用户名和密码,需要时从环境变量里读取。而普通用户的密码一般是加密后存放在数据库里,用户登录验证的时候,从数据库读取相应值进行比较来完成验证。

## Step 4: Build the Article class

Article 类是该 CMS 的核心,用于处理文章的所有操作,包括存储文章到数据库,从数据库获取文章,以及其他脚本用它来创建、更新、检索和删除文章。

1. The class definition and properties

   ```php
   class Article {
     // Properties

     /**
     * @var int The article ID from the database
     */
     public $id = null;
     ...
   }
   ```

2. The constructor

   > The first method, `__construct()`, is the constructor. This is a special method that is called automatically by the PHP engine whenever a new `Article` object is created. Our constructor takes an optional `$data` array containing the data to put into the new object's properties. We then populate those properties within the body of the constructor. This gives us a handy way to create and populate an object in one go.

   创建类的实例后,会首先调用类的构造函数,完成一些初始化的工作。

   ```php
   public function __construct( $data=array() ) {
       if ( isset( $data['id'] ) ) $this->id = (int) $data['id'];
       if ( isset( $data['publicationDate'] ) ) $this->publicationDate = (int) $data['publicationDate'];
       if ( isset( $data['title'] ) ) $this->title = preg_replace ( "/[^\.\,\-\_\'\"\@\?\!\:\$ a-zA-Z0-9()]/", "", $data['title'] );
       if ( isset( $data['summary'] ) ) $this->summary = preg_replace ( "/[^\.\,\-\_\'\"\@\?\!\:\$ a-zA-Z0-9()]/", "", $data['summary'] );
       if ( isset( $data['content'] ) ) $this->content = $data['content'];
   }
   ```

3. `storeFormValues()`

   >  Sets the object's properties using the edit form post values in the supplied array

   通过用户提交的表单的数据,来设置 Article 类对象的属性。

4. `getById()`

   >  Returns an Article object matching the given article ID
   >
   >  `$sql = "SELECT *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles WHERE id = :id";`

   通过文章的 ID 属性来获取 Article 对象的其他属性,这里返回的是一个新的 Article 对象。

5. `getList()`

   > Returns all (or a range of) Article objects in the DB
   >
   > `$sql = "SELECT SQL_CALC_FOUND_ROWS *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles ORDER BY " . mysql_escape_string($order) . " LIMIT :numRows";`

   获取数据库中所有的 Article 对象。

6. `insert()`

   > Inserts the current Article object into the database, and sets its ID property.
   >
   > `$sql = "INSERT INTO articles ( publicationDate, title, summary, content ) VALUES ( FROM_UNIXTIME(:publicationDate), :title, :summary, :content )";`

   插入新的 Article 对象到数据库,这里的 ID 属性会自动增加。

7. `update()`

   > Updates the current Article object in the database.
   >
   > `$sql = "UPDATE articles SET publicationDate=FROM_UNIXTIME(:publicationDate), title=:title, summary=:summary, content=:content WHERE id = :id";`

   更新数据库中当前的 Article 对象。

8. `delete()`

   > Deletes the current Article object from the database.
   >
   > `"DELETE FROM articles WHERE id = :id LIMIT 1"`

   从数据库里删除当前的 Article 对象。

```php
<?php

/**
 * Class to handle articles
 */

class Article
{
  // Properties

  /**
  * @var int The article ID from the database
  */
  public $id = null;

  /**
  * @var int When the article is to be / was first published
  */
  public $publicationDate = null;

  /**
  * @var string Full title of the article
  */
  public $title = null;

  /**
  * @var string A short summary of the article
  */
  public $summary = null;

  /**
  * @var string The HTML content of the article
  */
  public $content = null;

  /**
  * Sets the object's properties using the values in the supplied array
  *
  * @param assoc The property values
  */

  public function __construct( $data=array() ) {
    if ( isset( $data['id'] ) ) $this->id = (int) $data['id'];
    if ( isset( $data['publicationDate'] ) ) $this->publicationDate = (int) $data['publicationDate'];
    if ( isset( $data['title'] ) ) $this->title = preg_replace ( "/[^\.\,\-\_\'\"\@\?\!\:\$ a-zA-Z0-9()]/", "", $data['title'] );
    if ( isset( $data['summary'] ) ) $this->summary = preg_replace ( "/[^\.\,\-\_\'\"\@\?\!\:\$ a-zA-Z0-9()]/", "", $data['summary'] );
    if ( isset( $data['content'] ) ) $this->content = $data['content'];
  }

  /**
  * Sets the object's properties using the edit form post values in the supplied array
  *
  * @param assoc The form post values
  */

  public function storeFormValues ( $params ) {

    // Store all the parameters
    $this->__construct( $params );

    // Parse and store the publication date
    if ( isset($params['publicationDate']) ) {
      $publicationDate = explode ( '-', $params['publicationDate'] );

      if ( count($publicationDate) == 3 ) {
        list ( $y, $m, $d ) = $publicationDate;
        $this->publicationDate = mktime ( 0, 0, 0, $m, $d, $y );
      }
    }
  }

  /**
  * Returns an Article object matching the given article ID
  *
  * @param int The article ID
  * @return Article|false The article object, or false if the record was not found or there was a problem
  */

  public static function getById( $id ) {
    $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );
    $sql = "SELECT *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles WHERE id = :id";
    $st = $conn->prepare( $sql );
    $st->bindValue( ":id", $id, PDO::PARAM_INT );
    $st->execute();
    $row = $st->fetch();
    $conn = null;
    if ( $row ) return new Article( $row );
  }

  /**
  * Returns all (or a range of) Article objects in the DB
  *
  * @param int Optional The number of rows to return (default=all)
  * @param string Optional column by which to order the articles (default="publicationDate DESC")
  * @return Array|false A two-element array : results => array, a list of Article objects; totalRows => Total number of articles
  */

  public static function getList( $numRows=1000000, $order="publicationDate DESC" ) {
    $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );
    $sql = "SELECT SQL_CALC_FOUND_ROWS *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles
            ORDER BY " . mysql_escape_string($order) . " LIMIT :numRows";

    $st = $conn->prepare( $sql );
    $st->bindValue( ":numRows", $numRows, PDO::PARAM_INT );
    $st->execute();
    $list = array();

    while ( $row = $st->fetch() ) {
      $article = new Article( $row );
      $list[] = $article;
    }

    // Now get the total number of articles that matched the criteria
    $sql = "SELECT FOUND_ROWS() AS totalRows";
    $totalRows = $conn->query( $sql )->fetch();
    $conn = null;
    return ( array ( "results" => $list, "totalRows" => $totalRows[0] ) );
  }

  /**
  * Inserts the current Article object into the database, and sets its ID property.
  */

  public function insert() {

    // Does the Article object already have an ID?
    if ( !is_null( $this->id ) ) trigger_error ( "Article::insert(): Attempt to insert an Article object that already has its ID property set (to $this->id).", E_USER_ERROR );

    // Insert the Article
    $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );
    $sql = "INSERT INTO articles ( publicationDate, title, summary, content ) VALUES ( FROM_UNIXTIME(:publicationDate), :title, :summary, :content )";
    $st = $conn->prepare ( $sql );
    $st->bindValue( ":publicationDate", $this->publicationDate, PDO::PARAM_INT );
    $st->bindValue( ":title", $this->title, PDO::PARAM_STR );
    $st->bindValue( ":summary", $this->summary, PDO::PARAM_STR );
    $st->bindValue( ":content", $this->content, PDO::PARAM_STR );
    $st->execute();
    $this->id = $conn->lastInsertId();
    $conn = null;
  }

  /**
  * Updates the current Article object in the database.
  */

  public function update() {

    // Does the Article object have an ID?
    if ( is_null( $this->id ) ) trigger_error ( "Article::update(): Attempt to update an Article object that does not have its ID property set.", E_USER_ERROR );

    // Update the Article
    $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );
    $sql = "UPDATE articles SET publicationDate=FROM_UNIXTIME(:publicationDate), title=:title, summary=:summary, content=:content WHERE id = :id";
    $st = $conn->prepare ( $sql );
    $st->bindValue( ":publicationDate", $this->publicationDate, PDO::PARAM_INT );
    $st->bindValue( ":title", $this->title, PDO::PARAM_STR );
    $st->bindValue( ":summary", $this->summary, PDO::PARAM_STR );
    $st->bindValue( ":content", $this->content, PDO::PARAM_STR );
    $st->bindValue( ":id", $this->id, PDO::PARAM_INT );
    $st->execute();
    $conn = null;
  }

  /**
  * Deletes the current Article object from the database.
  */

  public function delete() {

    // Does the Article object have an ID?
    if ( is_null( $this->id ) ) trigger_error ( "Article::delete(): Attempt to delete an Article object that does not have its ID property set.", E_USER_ERROR );

    // Delete the Article
    $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );
    $st = $conn->prepare ( "DELETE FROM articles WHERE id = :id LIMIT 1" );
    $st->bindValue( ":id", $this->id, PDO::PARAM_INT );
    $st->execute();
    $conn = null;
  }

}

?>

```

**关于对输入数据的检查**

在构造函数中,对 title 和 summary 变量进行了过滤,避免一些恶意的数据进入数据库,采取的是正则的方式来过滤变量输入。关于正则的内容,还要仔细的学习下。

> 1. You'll notice that the method filters the data before it stores them in the properties. The `id` and `publicationDate`properties are cast to integers using `(int)`, since these values should always be integers. The `title` and `summary`are filtered using a regular expression to only allow a certain range of characters. It's good security practice to filter data on input like this, only allowing acceptable values and characters through.
> 2. We don't filter the `content` property, however. Why? Well, the administrator will probably want to use a wide range of characters, as well as HTML markup, in the article content. If we restricted the range of allowed characters in the content then we would limit the usefulness of the CMS for the administrator.
> 3. Normally this could be a security loophole, since a user could insert malicious JavaScript and other nasty stuff in the content. However, since we presumably trust our site administrator — who is the only person allowed to create the content — this is an acceptable tradeoff in this case. If you were dealing with user-generated content, such as comments or forum posts, then you would want to be more careful, and only allow "safe" HTML to be used. A really great tool for this is [HTML Purifier](http://htmlpurifier.org/), which thoroughly analyses HTML input and removes all potentially malicious code.
> 4. PHP security is a big topic, and beyond the scope of this tutorial. If you'd like to find out more then start with Terry Chay's excellent post, [Filter Input-Escape Output: Security Principle and Practice](http://terrychay.com/article/php-advent-security-filter-input-escape-output.shtml). Also see the Wikipedia entries on [secure input/output handling](http://en.wikipedia.org/wiki/Secure_input_and_output_handling), [XSS](http://en.wikipedia.org/wiki/Cross-site_scripting), [CSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery), [SQL injection](http://en.wikipedia.org/wiki/SQL_injection), and [session fixation](http://en.wikipedia.org/wiki/Session_fixation).

**关于数据库连接**

这里使用 PDO 连接数据库。

```php
$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );
$sql = "SELECT *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles WHERE id = :id";
$st = $conn->prepare( $sql );
$st->bindValue( ":id", $id, PDO::PARAM_INT );
$st->execute();
$row = $st->fetch();
```

> [PDO](http://php.net/manual/en/book.pdo.php) — PHP Data Objects — is an object-oriented library built into PHP that makes it easy for PHP scripts to talk to databases.

使用 PDO 可以很好的解决 SQL 注入的问题,在 sql 语句中,会先用占位符来代替条件语句中的参数值,后续用 `bindValue()` 来赋值和检测,最后再对数据库执行 sql 操作。

> Our `SELECT` statement retrieves all fields (`*`) from the record in the `articles` table that matches the given `id`field. It also retrieves the `publicationDate` field in UNIX timestamp format instead of the default MySQL date format, so we can store it easily in our object.
>
> Rather than placing our `$id` parameter directly inside the `SELECT` string, which can be a security risk, we instead use `:id`. This is known as a placeholder. In a minute, we'll call a PDO method to bind our `$id` value to this placeholder.
>
> Once we've stored our `SELECT` statement in a string, we prepare the statement by calling `$conn->prepare()`, storing the resulting statement handle in a `$st` variable.
>
> We now bind the value of our `$id` variable — that is, the ID of the article we want to retrieve — to our `:id`placeholder by calling the `bindValue()` method. We pass in the placeholder name; the value to bind to it; and the value's data type (integer in this case) so that PDO knows how to correctly escape the value.
>
> Lastly, we call `execute()` to run the query, then we use `fetch()` to retrieve the resulting record as an associative array of field names and corresponding field values, which we store in the `$row` variable.

**关于类的成员,即属性和方法:**

> All of the members (that is, the properties and methods) of our `Article` class have the `public` keyword before their names, which means that they're available to code outside the class. You can also create `private` members (which can only be used by the class itself) and `protected`members (which can be used by the class and any of its subclasses).

另外,Article 类有两个成员函数加了 `static` 来修饰。有了 `static` 后,这两个函数可以直接通过类来调用,而不用先创建类实例。

````php
public static function getById( $id ) {
  ...
}

public static function getList( $numRows=1000000, $order="publicationDate DESC" ) {
  ...
}

// 在 index.php  里,有直接通过类调用的代码。
$data = Article::getList();
$results['article'] = Article::getById( (int)$_GET["articleId"] );
````

## Step 5: Write the front-end `index.php` script

1. Include the config file
2. Grab the action parameter
3. Decide which action to perform
4. `archive()`
5. `viewArticle()`
6. `homepage()`

```php
<?php

/*
We use require() rather than include(); require() generates an error if the file can't be found.
*/
require( "config.php" );

/*
It's good programming practice to check that user-supplied values, such as query string parameters, form post values and cookies, actually exist before attempting to use them. Not only does it limit security holes, but it prevents the PHP engine raising "undefined index" notices as your script runs.
*/
$action = isset( $_GET['action'] ) ? $_GET['action'] : "";

switch ( $action ) {
  case 'archive':
    archive();
    break;
  case 'viewArticle':
    viewArticle();
    break;
  default:
    homepage();
}

function archive() {
  $results = array();
  $data = Article::getList();
  $results['articles'] = $data['results'];
  $results['totalRows'] = $data['totalRows'];
  $results['pageTitle'] = "Article Archive | Widget News";
  require( TEMPLATE_PATH . "/archive.php" );
}

function viewArticle() {
  if ( !isset($_GET["articleId"]) || !$_GET["articleId"] ) {
    homepage();
    return;
  }

  $results = array();
  $results['article'] = Article::getById( (int)$_GET["articleId"] );
  $results['pageTitle'] = $results['article']->title . " | Widget News";
  require( TEMPLATE_PATH . "/viewArticle.php" );
}

function homepage() {
  $results = array();
  $data = Article::getList( HOMEPAGE_NUM_ARTICLES );
  $results['articles'] = $data['results'];
  $results['totalRows'] = $data['totalRows'];
  $results['pageTitle'] = "Widget News";
  require( TEMPLATE_PATH . "/homepage.php" );
}

?>

```

## Step 6: Write the back-end `admin.php` script

1. Start a user session

   > Towards the top of the script we call `session_start()` . This PHP function starts a new session for the user, which we can use to track whether the user is logged in or not. (If a session for this user already exists, PHP automatically picks it up and uses it.)
   >
   > Because sessions need cookies to work, and cookies are sent to the browser before content, you should call`session_start()` at the top of the script, before any content has been output.

   `session_start()` 函数一般要放在其他代码之前。因为会话要基于 cookies 来工作,而 cookies 要在其他内容交互之前进行传输。

2. Grab the `action` parameter and `username` session session variable

3. Check the user is logged in

4. Decide which action to perform

5. `login()`

   > If the user has submitted the login form — which we check by looking for the `login` form parameter — then the function checks the entered username and password against the config values `ADMIN_USERNAME` and `ADMIN_PASSWORD`. If they match then the `username`session key is set to the admin username,

   这里只是把用户提交的表单数据和 config.php 里的设置进行简单比较来完成验证。

6. `logout()`

   >   It simply removes the `username` session key.
   >
   >   `unset( $_SESSION['username'] );`

7. `newArticle()`

8. `editArticle()`

9. `deleteArticle()`

10. `listArticles()`

```php
<?php

require( "config.php" );
session_start();
$action = isset( $_GET['action'] ) ? $_GET['action'] : "";
$username = isset( $_SESSION['username'] ) ? $_SESSION['username'] : "";

if ( $action != "login" && $action != "logout" && !$username ) {
  login();
  exit;
}

switch ( $action ) {
  case 'login':
    login();
    break;
  case 'logout':
    logout();
    break;
  case 'newArticle':
    newArticle();
    break;
  case 'editArticle':
    editArticle();
    break;
  case 'deleteArticle':
    deleteArticle();
    break;
  default:
    listArticles();
}

function login() {

  $results = array();
  $results['pageTitle'] = "Admin Login | Widget News";

  if ( isset( $_POST['login'] ) ) {

    // User has posted the login form: attempt to log the user in

    if ( $_POST['username'] == ADMIN_USERNAME && $_POST['password'] == ADMIN_PASSWORD ) {

      // Login successful: Create a session and redirect to the admin homepage
      $_SESSION['username'] = ADMIN_USERNAME;
      header( "Location: admin.php" );

    } else {

      // Login failed: display an error message to the user
      $results['errorMessage'] = "Incorrect username or password. Please try again.";
      require( TEMPLATE_PATH . "/admin/loginForm.php" );
    }

  } else {

    // User has not posted the login form yet: display the form
    require( TEMPLATE_PATH . "/admin/loginForm.php" );
  }

}

function logout() {
  unset( $_SESSION['username'] );
  header( "Location: admin.php" );
}

function newArticle() {

  $results = array();
  $results['pageTitle'] = "New Article";
  $results['formAction'] = "newArticle";

  if ( isset( $_POST['saveChanges'] ) ) {

    // User has posted the article edit form: save the new article
    $article = new Article;
    $article->storeFormValues( $_POST );
    $article->insert();
    header( "Location: admin.php?status=changesSaved" );

  } elseif ( isset( $_POST['cancel'] ) ) {

    // User has cancelled their edits: return to the article list
    header( "Location: admin.php" );
  } else {

    // User has not posted the article edit form yet: display the form
    $results['article'] = new Article;
    require( TEMPLATE_PATH . "/admin/editArticle.php" );
  }

}

function editArticle() {

  $results = array();
  $results['pageTitle'] = "Edit Article";
  $results['formAction'] = "editArticle";

  if ( isset( $_POST['saveChanges'] ) ) {

    // User has posted the article edit form: save the article changes

    if ( !$article = Article::getById( (int)$_POST['articleId'] ) ) {
      header( "Location: admin.php?error=articleNotFound" );
      return;
    }

    $article->storeFormValues( $_POST );
    $article->update();
    header( "Location: admin.php?status=changesSaved" );

  } elseif ( isset( $_POST['cancel'] ) ) {

    // User has cancelled their edits: return to the article list
    header( "Location: admin.php" );
  } else {

    // User has not posted the article edit form yet: display the form
    $results['article'] = Article::getById( (int)$_GET['articleId'] );
    require( TEMPLATE_PATH . "/admin/editArticle.php" );
  }

}

function deleteArticle() {

  if ( !$article = Article::getById( (int)$_GET['articleId'] ) ) {
    header( "Location: admin.php?error=articleNotFound" );
    return;
  }

  $article->delete();
  header( "Location: admin.php?status=articleDeleted" );
}

function listArticles() {
  $results = array();
  $data = Article::getList();
  $results['articles'] = $data['results'];
  $results['totalRows'] = $data['totalRows'];
  $results['pageTitle'] = "All Articles";

  if ( isset( $_GET['error'] ) ) {
    if ( $_GET['error'] == "articleNotFound" ) $results['errorMessage'] = "Error: Article not found.";
  }

  if ( isset( $_GET['status'] ) ) {
    if ( $_GET['status'] == "changesSaved" ) $results['statusMessage'] = "Your changes have been saved.";
    if ( $_GET['status'] == "articleDeleted" ) $results['statusMessage'] = "Article deleted.";
  }

  require( TEMPLATE_PATH . "/admin/listArticles.php" );
}

?>

```

以上 6 个步骤,就完成了 CMS 主要功能的 PHP 代码。下面的步骤就是创建前端显示的模板、样式,以及页面等文件。

这里的后端到前端的交互,主要是通过 `$results` 这个数组变量来进行,把后端的业务功能数据,通过该变量在前端页面上显示出来。前端到后端的交互,主要是通过 `$_GET['xxx']`  `$_POST['xxx']` `$_SESSION['xxx']` 等超全局变量,把前端 URL 地址栏变量,表单数据等传给后端来处理。

HTML 的代码不贴了,这里的前后端交互方式是有点落后吗?比如 header.php 和 footer.php 拼接在一起组成一个页面? HTML 和 php 代码在一起有没有更好的组织方式?还有就是什么是 MVC,什么是 REST 风格,后续有时间的话再深入学习下。

## Step 7: Create the front-end templates

1. The include files
2. homepage.php
3. archive.php
4. viewArticle.php

## Step 8: Create the back-end templates

1. loginForm.php
2. listArticles.php
3. editArticle.php

> As usual, we pass all data through `htmlspecialchars()`before outputting it in the markup. Not only is this a good security habit, but it also ensures that our form field values are properly escaped. For example, if the `title` field value contained a double quote (`"`) that wasn't escaped then the title would be truncated, since double quotes are used to delimit the field's value in the markup.

`htmlspecialchars()` 函数,会将特殊字符转换为 HTML 实体,某类字符在 HTML 中有特殊用处,如需保持原意,需要用 HTML 实体来表达。 该函数会返回字符转义后的表达。比如一些字符转义后的值如下表:

|    字  符    | 替换后                                      |
| :--------: | :--------------------------------------- |
| `&` (& 符号) | `&`                                  |
| `"` (双引号)  | `"`,除非设置了 **ENT_NOQUOTES**          |
| `'` (单引号)  | 设置了 **ENT_QUOTES** 后, `'` (如果是 **ENT_HTML401**) ,或者 `'` (如果是 **ENT_XML1**、         **ENT_XHTML** 或 **ENT_HTML5**)。 |
|  `<` (小于)  | `<`                                   |
|  `>` (大于)  | `>`                                   |

`htmlspecialchars()` 使得 HTML 之中的特殊字符被正确的编码,从而不会被使用者在页面注入 HTML 标签或者 Javascript 代码。

## Step 9: Create the stylesheet and logo image

见 style.css

## All done!

> 1. In this tutorial you've built a basic content management system from the ground up, using PHP and MySQL. You've learnt about MySQL, tables, field types, PDO, object-oriented programming, templating, security, sessions, and lots more.
>
> 2. While this CMS is pretty basic, it has hopefully given you a starting point for building your own CMS-driven websites. Some features you might want to add include:
>
> 3. - Pagination on the article archive (front end) and article list (back end) so that the system can easily handle hundreds of articles
>    - A [WYSIWYG editor](http://www.elated.com/articles/adding-wysiwyg-editor-to-your-site/) for easier content editing
>    - An image upload facility (I've written a [follow-up tutorial on adding an image upload feature to the CMS](https://www.elated.com/articles/add-image-uploading-to-your-cms/))
>    - A preview facility, so the admin can see how an article will look before publishing it
>    - Article categories and tags (I've written a [follow-up tutorial on adding categories](https://www.elated.com/articles/add-article-categories-to-your-cms/))
>    - Integration with Apache's [mod_rewrite](http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html) to create more human-friendly permalink URLs for the articles ([find out how to do this](https://www.elated.com/articles/mod-rewrite-tutorial-for-absolute-beginners/#friendly-urls))
>    - A user comments system
>
> 4. I hope you've enjoyed this tutorial and found it useful. Happy coding!

可以进一步增加的内容:

* 分页功能
* 编辑器功能
* 图片上传功能
* 预览功能
* 文章分类和标签功能
* 评论功能

该文章讲得非常详细,非常适合入门学习,值得多读几遍,最好能码一遍代码。

redpajama_set_name: RedPajamaGithub


text:
Q: Swiftui get top padding from system I am following some tutorial in which i need to get the top height.
I am doing right this now
import SwiftUI

struct ContentView: View {
    let keyWindow = UIApplication.shared.connectedScenes
        .filter({$0.activationState == .foregroundActive})
        .compactMap({$0 as? UIWindowScene})
        .first?.windows
        .filter({$0.isKeyWindow}).first

    // MARK: - Properties

    // MARK: - body

    var body: some View {
        ZStack {
            VStack(spacing: 0) {
                NavigationBarView()
                    .padding(.horizontal, 15)
                    .padding(.bottom)
                    .padding(.top, keyWindow?.safeAreaInsets.top)
                    .background(Color.white)
                    .shadow(color: Color.black.opacity(0.05), radius: 5, x: 0, y: 5)

                Spacer()

                FooterView().padding(.horizontal)
            }
            .background(colorBackground.ignoresSafeArea(.all, edges: .all))
        }
        .ignoresSafeArea(.all, edges: .top)
    }
}

// MARK: - Preview
struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

Issue is in preview it's working fine but on simulator it's not working.

Also, I have find this code then
extension UIApplication {
    var safeAreaInsets: UIEdgeInsets? {
        let keyWindow = UIApplication.shared.connectedScenes
            .filter {$0.activationState == .foregroundInactive }
            .map { $0 as? UIWindowScene }
            .compactMap { $0 }
            .first?.windows
            .filter {$0.isKeyWindow}
            .first

        return keyWindow?.safeAreaInsets
    }
}

and use it like .padding(.top, UIApplication.shared.safeAreaInsets?.top)
Then its working on simulator but not on preview. Just looking for solution which will work on both.
I try to remove .ignoreSafeArea but issue is I need padding on navbar and for responsive like on iPhone 8 i need little large padding on iPhone 13 I need to less so that's why I think need to get padding from safe area inspect
My code if I remove .ignoreSafeArea
    ZStack {
            VStack(spacing: 0) {
                NavigationBarView()
                    .padding(.horizontal, 15)
                    .padding(.bottom)
                    .background(Color.white)
                    .shadow(color: Color.black.opacity(0.05), radius: 5, x: 0, y: 5)
                Spacer()

            }
            .background(colorBackground.ignoresSafeArea(.all, edges: .all))

    }

Its Preview

A: Follow @Tamas comment, you don't need all of that. Just do:
struct ContentView: View {
    var body: some View {
        VStack(spacing: 0) {
            NavigationBarView()
                .padding()
                .frame(maxWidth: .infinity)
                .background(Color.white)

            Spacer()

            FooterView().padding(.horizontal)
        }
        .background(Color.gray)
    }
}

A: func topInsetHeight() -> CGFloat {

    guard let window = UIApplication.shared.windows.first else  {
        return 0

    }
    let topPadding = window.safeAreaInsets.top
    return topPadding
}

USAGE:
import SwiftUI

struct ContentView: View {

    ...

    // MARK: - body

    var body: some View {
        ZStack {
            VStack(spacing: 0) {
                NavigationBarView()
                    .ignoresSageArea() // Added this
                    .padding(.horizontal, 15)
                    .padding(.bottom)
                    .padding(.top, topInsetHeight()) // Change made here
                    .background(Color.white)
                    .shadow(color: Color.black.opacity(0.05),
                            radius: 5,
                            x: 0,
                            y: 5
                     )
                Spacer()
                FooterView().padding(.horizontal)
            }
            .ignoresSafeArea()
            .background(colorBackground)
        }
        .ignoresSafeArea()
    }
}

// MARK: - Preview
struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

redpajama_set_name: RedPajamaStackExchange


Title:From the Edge of Biometrics: What's Next?
Abstract:Biometric recognition refers to the automated recognition of individuals based on their biological and behavioral traits such as fingerprint, face, iris, and voice. The first scientific paper on automated fingerprint matching was published by Trauring (1963). Since then progress in the field has enabled biometric systems to accurately recognize individuals in real-time in applications ranging from unlocking personal smartphones to international border crossings. Despite this progress, a number of challenges and lack of understanding continue to inhibit the full potential of biometrics. In this talk I would like to share with you some of these challenges, requirements, opportunities for basic and applied research, and few ongoing projects in my laboratory.
Qiang Ji received his Ph.D degree in Electrical Engineering from the University of Washington. He is currently a Professor with the Department of Electrical, Computer, and Systems Engineering at Rensselaer Polytechnic Institute (RPI). From 2009 to 2010, he served as a program director at the National Science Foundation (NSF), where he managed NSF's computer vision and machine learning programs. He also held teaching and research positions with the Beckman Institute at University of Illinois at Urbana-Champaign; the Robotics Institute at Carnegie Mellon University; the Dept. of Computer Science at University of Nevada; and the Air Force Research Laboratory. Prof. Ji currently serves as the director of Intelligent Systems Laboratory (ISL) at RPI.
Prof. Ji's research interests are in computer vision, probabilistic graphical models, machine learning, and their applications in various fields. He has published over 230 papers in peer-reviewed journals and conferences, and has received multiple awards for his work. Prof. Ji is an editor on several related IEEE and international journals and he has served as a general chair, program chair, technical area chair, and program committee member for numerous international conferences/workshops. Prof. Ji is a fellow of the IEEE and the IAPR.
Abstract: Facial landmark detection (a.k.a facial alignment) is a fundamental step for facial biometrics such as facial recognition, facial verification, and iris recognition. In this talk, I will first summarize different categories of methods for facial landmark detection. I will then discuss our recent work on facial landmark detection under challenging conditions, including significant facial and head pose variation and facial occlusion. My talk will end with a summary of the latest developments in facial landmark detection, the remaining challenges, and possible solutions.
Gang Hua is a Principal Researcher/Research Manager at the Microsoft Cloud and AI Group. His research focuses on computer vision, pattern recognition, machine learning, robotics, towards general Artificial Intelligence. He was an Associate Professor of Computer Science at Stevens Institute of Technology between 2011 and 2015.
He was a Research Staff Member (2010-2011) with IBM Research T. J. Watson Center, a Senior Researcher (2009-2010) with Nokia Research Center Hollywood, and a Scientist (2006-2009) with Microsoft Live labs Research. He received his Ph.D. degree in ECE from Northwestern University in 2006.
He is the recipient of the 2015 IAPR Young Biometrics Investigator Award for his contribution to Unconstrained Face Recognition from Images and Videos, and a recipient of the 2013 Google Research Faculty Award. He will serve as a Program Chair for CVPR'2019 and CVPR'2022. He has served as Area Chairs for many top international conferences. He is currently an Associate Editor in Chief for CVIU, and Associate Editors for IJCV, IEEE T-IP, IEEE T-CSVT, IEEE Multimedia, and MVA.
He has published 150 peer reviewed papers in top conferences such as CVPR/ICCV/ECCV, and top journals such as T-PAMI and IJCV. He holds 19 issued U.S Patents and has more than 20 U.S. Patents Pending. He is a Senior Member of IEEE, an IAPR Fellow, and an ACM Distinguished Scientist.
Abstract: Face recognition has matured to a stage to support a lot of commercial applications. Nevertheless, there are still lots of challenges need to be addressed. I will start the talk with a brief status quo of face recognition research and development in both academia and industry. Then, I will summarize some of our recent research works on efficient and accurate face detection and recognition, and how we may deal with adversarial attacks using an identity preserving deep generative model. I will conclude my talks with recent trends in the research community in face recognition..
Copyright(c)CCBR 2018, All Rights Reserved.


text:
Busworld India Continues to Keep the Industry Connected
The public transportation segment saw a major slowdown during the pandemic as bus ridership and service levels were severely impacted and public transport operators were strained due to lack of revenue. With things slowly getting back to normal over the past few months, the public transportation is gradually starting to recover and the stakeholders of bus and coach industry are looking forward to make a strong comeback in the market.
Analysing the shift in mobility trends over the last three months, the 'Covid-19 Community Mobility Report' released by Google indicates a steady revival of public transport hubs, including bus and train stations in India. According to the report, the public transportation has recovered to -9 per cent and is expected to revert to the pre-Covid levels in the coming months.
As India's leading trade fair for bus and coach industry, Busworld India 2022 will re-open its doors from 25th – 27th August 2022 in Bengaluru, bringing new sourcing and networking opportunities on its show floors.
"The year 2020 and the beginning of the year 2021 has been a tough one for the industry with lots of uncertainty and sluggishness marring the supply chain. However, the signs of recovery in bus transportation in these past few months have brought back the spark among bus manufacturers and sellers. Through Busworld India 2022, we aim to strongly contribute in the industry's revival and bring crucial and invaluable business opportunities to the industry players across India and worldwide," states in a joint statement issued by the trade show's organisers.
Even during the slowdown last year, Busworld India continued to keep the industry connected and updated through a series of virtual webinars and knowledge sessions.
During a recent webinar on "Restoring bus in public transport through collaboration between Asian cities and the bus industry" hosted by Busworld India, Prasanna Patwardhan, President, Bus & Car Operators Confederation of India (BOCI), urged the government to support STUs and private bus operator alike to increase the public preference toward buses: "The government should completely open up luxury services by buses to private sector and let State Transport Undertakings (STUs) compete with private operators on quality of services. All STU bus stations need to be modernised and private operators should be allowed to operate from the same stations, on similar lines like airports, and open government lands can be made available for bus parking at a nominal cost."
Also a part of the webinar panel, Ganesh Raj Joshi, Researcher, United Nations Centre for Regional Development (UNCRD) suggested the implication of smart congestion relief policies, and improving bus infrastructure to reduce traffic congestion level in India:
"Integrated land use, transport planning, transport mode integration and use of high-occupancy vehicles can majorly help in reducing the traffic congestion level in the country. Additionally, setting up of dedicated bus lanes along with a transit-priority traffic control system and use of state-of-the-art frontier technologies, like ITS and GPS can be implemented to optimise routes."
The Indian government's goal to add maximum electric buses on the road has given rise to huge opportunity for both vehicle manufacturers, as well as component suppliers and charging infrastructure suppliers. Mumbai's local lifeline, BEST has recently received 25 brand new electric AC buses adding to its list of 206 existing e-buses, and plans to procure 115 more e-buses within the next two months. As per the sources, BEST will procure a total of 1,800 electric buses by mid-2023.
With new opportunities arising in the industry, Busworld India 2022 aims to be a crucial meeting point for industry decision makers, such as private and public bus and coach operators, vehicle manufacturers, component, accessory and software suppliers to reconnect and rebuild their value chain more strongly.
Tweets by TruckBusNews


This bust of Chief Petty Officer John Finn of the US Navy was installed on the USS John Finn, an Arleigh Burke-class destroyer, commissioned July 15, 2016 at Pearl Harbor. Chief Finn showed magnificent courage in the face of almost certain death during the attack on Pearl Harbor.
As a Chief Aviation Ordnanceman, he manned a .50 caliber machine gun from an exposed position throughout the attack, despite being repeatedly wounded. Later, 15 Medals of Honor were awarded for acts of heroism. 14 of those were for rescue actions, but Chief Finn was the only person awarded the Medal of Honor for heroism in combat, and one of only 4 awardees to survive the war.


During skeletogenesis, protein levels of β-catenin in the canonical Wnt signaling pathway determine lineage commitment of skeletal precursor cells to osteoblasts and chondrocytes. Adenomatous polyposis coli (Apc) is a key controller of β-catenin turnover by down-regulating intracellular levels of β-catenin.
To investigate whether Apc is involved in lineage commitment of skeletal precursor cells, we generated conditional knockout mice lacking functional Apc in Col2a1-expressing cells. In contrast to other models in which an oncogenic variant of β-catenin was used, our approach resulted in the accumulation of wild type β-catenin protein due to functional loss of Apc. Conditional homozygous Apc mutant mice died perinatally showing greatly impaired skeletogenesis. All endochondral bones were misshaped and lacked structural integrity. Lack of functional Apc resulted in a pleiotropic skeletal cell phenotype. The majority of the precursor cells lacking Apc failed to differentiate into chondrocytes or osteoblasts. However, skeletal precursor cells in the proximal ribs were able to escape the noxious effect of functional loss of Apc resulting in formation of highly active osteoblasts. Inactivation of Apc in chondrocytes was associated with dedifferentiation of these cells.
Our data indicate that a tight Apc-mediated control of β-catenin levels is essential for differentiation of skeletal precursors as well as for the maintenance of a chondrocytic phenotype in a spatio-temporal regulated manner.
During vertebrate embryogenesis, the axial and appendicular skeleton develop through endochondral bone formation. In this process, mesenchymal cells aggregate to form a chondrocytic template that prefigures the shape of the future bone. At the periphery of this cartilaginous mold, osteoblasts differentiate to form the bone collar. The cartilaginous mold is eventually replaced by bone in a step-wise program. Besides chondrocytes and osteoblasts, the skeleton also contains osteoclasts, which are of haematopoietic origin and play pivotal roles in both cartilage and bone resorption and remodelling [1–3].
Every step in the proliferation, differentiation, maturation, apoptosis, and resorption of both chondrocytes and osteoblasts is characterized by a specific transcriptional guideline . Sox9, a high-mobility-group transcription factor, and Runx2, a Runt domain transcription factor, are both expressed in bi-potential skeletal precursor cells differentiating into either chondrocytes or osteoblasts [5–7]. Sox9 and Runx2 play leading roles in lineage commitment of these precursors: upregulation of Sox9 leads to chondrogenic differentiation , while activation of Runx2 is required for their osteogenic commitment .
Recently, based on mouse models, the canonical Wnt/β-catenin signaling pathway was found to act upstream of Sox9 and Runx2. In this pathway, in the absence of a Wnt signal, cytosolic β-catenin is degraded by the ubiquitination/proteasome system upon its phosphorylation at specific Ser-Thr residues by a destruction complex consisting of scaffold proteins such as Axin1, Axin2 (also known as Conductin) and the adenomatous polyposis coli (APC) tumor suppressor, and two kinases, namely glycogen synthase kinase 3β (GSK3β) and casein-kinase 1α (CK1α). Binding of Wnt to a complex composed of the transmembrane frizzled receptor and low-density lipoprotein receptor-related protein 5 or 6 (LRP5 or 6) co-receptor results in inactivation of the destruction complex and accumulation of cytoplasmic β-catenin. Upon its nuclear translocation, β-catenin acts as transcriptional co-activator in complex with transcription factors of the TCF/LEF family, leading to transcriptional activation of Wnt target genes . In wild type mouse embryos, high levels of β-catenin and activation of canonical Wnt signaling have been found in osteoblastic precursors in developing skull and limb bones . Accumulating evidence suggests that increased levels of canonical Wnt/β-catenin signaling inhibit Sox9 expression and activity, and stimulate Runx2 expression, leading to decreased chondrocyte differentiation and increased osteoblast differentiation, respectively [12–15]. Similar results have been found in transgenic mice with Wnt14 overexpression in Collagen 2a1 (Col2a1)-expressing cells .
It has been also demonstrated that β-catenin is required at an early stage to repress chondrocytic differentiation . Upon conditional inactivation of β-catenin in the limb and head mesenchyme before or during early mesenchymal condensations, Prx1-expressing and Dermo1-expressing skeletal precursors, respectively, differentiate into chondrocytes instead of osteoblasts [11, 15]. Finally, results on both constitutively active and inactivated β-catenin in Osterix (Osx)-, Collagen 1a1 (Col1a1)- or Osteocalcin (Osc)-expressing osteoblasts suggest that Wnt/β-catenin signaling coordinates bone formation by controlling the differentiation and activity of both osteoblasts and osteoclasts in a sequential, stage-specific manner [16, 17].
Little is known about the mechanisms regulating β-catenin activity in skeletal precursors. Through its wide range of specific motifs and domains, APC is involved in multiple cellular processes such as signal transduction, cytoskeletal organization, apoptosis, cell adhesion and motility, cell fate determination, and chromosomal stability . However, biochemical and genetic evidence has been provided showing that APC's main tumor suppressing activity resides in its ability to bind to β-catenin and induce its degradation, thereby acting as a strong negative regulator of the canonical Wnt pathway [19–21].
Familial adenomatous polyposis (FAP) patients heterozygous for an APC mutation frequently develop osteomas and dental anomalies . Heterozygous Apc1638N mutant mice occasionally develop osteomas (R. Fodde, personal communication). Homozygosity for the severely truncated ApcMin and for the more hypomorphic Apc1638N allele in the mouse results in a failure of primitive ectoderm development shortly after implantation, leading to lethality prior to gastrulation [23, 24]. Mutant Apc disturbs the differentiation capacity of mouse embryonic stem (ES) cells in a quantitative and qualitative fashion depending on the dose of β-catenin signaling. Aberrant differentiation capacity of ES cells ranges from a strong differentiation blockade in case of two severely truncated ApcMin alleles, to more specific neuroectodermal, dorsal mesodermal, and endodermal defects (e.g., no differentiation in bone or cartilage) in case of two hypomorphic Apc1638N alleles [25, 26]. Osteoblast-specific loss of Apc in the mouse leads to early onset of dramatically increased bone deposition and to lethality early in life . However, Apc has not yet been linked with a role in the differentiation of skeletal precursor cells.
Here, we report that skeletal precursors of the axial and appendicular skeleton, when exposed to an uncontrolled rise of the β-catenin level due to conditional inactivation of Apc, lose their differentiation capacity to both the chondrogenic and osteogenic lineage. Moreover, conditional Apc mutant ribs show enhanced osteoblast activity, while the mutant nasal septum displays chondrocyte dedifferentiation. These results provide the first genetic evidence that Apc plays a crucial role throughout mouse skeletogenesis by regulating the differentiation of skeletal progenitor cells and maintenance of chondrocytes.
Recently, we (ECR-M and RF) generated a novel mouse model carrying a conditional Apc15lox allele where exon 15, encoding the majority of the coding region of Apc, and the polyadenylation signal, is flanked by loxP sites. Mice heterozygous and homozygous for the conditional Apc15lox allele did not show any major abnormalities or susceptibility to tumors. Apc Δ15/+ mice, heterozygous for the Apc Δ15 mutant allele obtained by germline Cre-mediated deletion of exon 15, developed multiple intestinal tumors at an early age similar to Apc Min/+ animals. These results indicate that Cre-mediated recombination of the Apc15lox allele leads to inactivation of the Apc protein and to the constitutive activation of Wnt/β-catenin signaling (Robanus-Maandag et al., in preparation).
Next, we investigated the temporal and spatial expression pattern of Cre in transgenic Col2a1-Cre mice  using LacZ reporter mice ("Rosaflox") . Col2a1-Cre;Rosaflox embryos expressed Cre specifically at all sites of endochondral bone formation (Fig. 1A). In accordance with previous studies suggesting that Col2a1 is already expressed at E9.5 in the sclerotome of the somites , we detected Cre activity (based on positive LacZ staining) in mesenchymal condensations forming the sclerotome at E9.5 (Fig. 1B). At E12.5, LacZ-positive cells were identified in cartilage primordia later forming the vertebrae, long bones, sternum and cranial bones (Fig. 1C; data not shown). As reported in other Col2a1-Cre mouse lines [11, 30], we found LacZ staining in the perichondrium at E14.5 (data not shown), and in the periosteum and primary spongiosa of long bones at E16.5, sites where osteoblasts normally differentiate (Fig. 1D, D'). The early onset (E9.5) of the LacZ expression in the sclerotome as well as its presence at later developmental stages (E14.5 and E16.5) in cells of the osteogenic lineage prompted us to conclude that the Col2a1-Cre-mediated recombination occurred in skeletal precursors characterized by both a chondrogenic and osteogenic differentiation potential.
Col2a1- Cre ;Rosaflox mice express Cre at sites of endochondral bone formation. (A-D) LacZ expression in Col2a1-Cre;Rosaflox embryos following Cre recombination, detected by whole-mount X-Gal staining. (A) Macroscopic picture of E12.5 Col2a1-Cre;Rosaflox embryo. (B) Transversal section of E9.5 embryo showing β-galactosidase-positive sclerotomal cells adjacent to the neural tube. (C) Transversal section of E12.5 embryo showing LacZ expression in vertebrae primordia. (D) Sagital section of E16.5 embryo showing LacZ expression in the femur. The boxed region in D is magnified in D' showing LacZ expression in the periosteum (arrow head), osteoblasts (red arrow) and osteocytes (black arrow). Ne, neuroepithelium; Sc, sclerotome; N, notochord; Fe, femur. Scale bars: 1 mm in A; 50 μm in B, D'; 100 μm in C, D.
Apc15lox/15lox mice were bred with Col2a1-Cre mice to generate conditional heterozygous Col2a1-Cre;Apc15lox/+ mice. Microscopical analysis performed on Col2a1-Cre;Apc15lox/+ and control Apc15lox/+ embryos at various developmental stages (E12.5, E14.5, E16.5) displayed a normal spatio-temporal expression of all chondrogenic and osteogenic markers investigated (data not shown).
To study postnatal growth and bone acquisition, 18 Col2a1-Cre;Apc15lox/+ mice (7 males, 11 females) and 11 Apc15lox/+ mice (7 males, 4 females) were monitored for 12 weeks after birth. Mice of both genotypes were healthy, similar in appearance, size, body length/weight ratio and growth rate (data not shown). We next assessed bone architecture in these animals by micro-computed tomography (μCT) of the distal femora. No difference was detected between Col2a1-Cre;Apc15lox/+ mice and gender-matched Apc15lox/+ control littermates with respect to bone mineral density, trabecular bone volume fraction, trabecular number, trabecular thickness, and trabecular separation (Fig. 2A–D; data not shown). We further wanted to study whether conditional heterozygous Apc inactivation would lead to skeletal anomalies later in life. For this purpose, 10 Col2a1-Cre;Apc15lox/+ mice (5 males and 5 females) and 5 Apc15lox/+ male mice were followed for 24 months. At the end of this period, animals were sacrificed and tissues were analyzed microscopically using hematoxiline/eosine-stained sections. No important abnormalities could be distinguished in the skull, ribs, vertebral column and long bones. We evenly detected in both groups signs of cartilage degradation, fibrosis, and osteochondritis, pathological findings which most likely were all age-related (data not shown). Altogether, we considered conditional heterozygous Apc mutant embryos as controls for the next experiments.
Col2a1-Cre;Apc15lox/+ mice were crossed with Apc15lox/15lox mice to generate conditional homozygous Col2a1-Cre;Apc15lox/15lox mice (1:4). None of these mice were found at one month of age among 77 liveborn offspring. Of 27 dead pups found within the first month after delivery, only 5 pups on the day after delivery were Col2a1-Cre;Apc15lox/15lox. To further investigate the Col2a1-Cre;Apc15lox/15lox phenotype, embryonic litters at various developmental stages were isolated. Eight of 31 embryos isolated between E16.5 and E19.5 were Col2a1-Cre;Apc15lox/15lox (26%). We concluded that conditional homozygosity for this Apc mutant allele was perinatally lethal. At E12.5, Col2a1-Cre;Apc15lox/15lox embryos, although normal in size, displayed poor mandible and limb outgrowth compared to control littermates (Fig. 3A). At E14.5 and E16.5, Col2a1-Cre;Apc15lox/15lox embryos were much smaller in comparison to controls, displayed craniofacial abnormalities, short trunk, and an incomplete closure of both thoracic and abdominal cavities (Fig. 3B, C). Gross analysis further indicated a severe truncation of both upper and lower limbs. Already at E14.5, but more significantly at E16.5, Col2a1-Cre;Apc15lox/15lox embryos presented large skin blisters especially in the dorso-lumbar region (Fig. 3C).
Skeletogenesis is severely impaired in Col2a1- Cre ; Apc 15lox/15lox embryos. (A-E) Greatly impaired skeletal development and growth arrest of Col2a1-Cre;Apc15lox/15lox embryos. Gross appearance (A-C) and Alcian blue and Alizarin red staining (D-E) of skeletal preparations of Col2a1-Cre;Apc15lox/15lox embryos and control littermates at indicated developmental stages. Conditional Apc mutants showed lack of mandible outgrowth (arrowheads), poor limb development (black arrows), and an open thoracic and abdominal cavity (red arrows). Scale bars: 1 mm.
Skeletal preparations of mouse embryos stained with Alcian blue (chondrocyte matrix) and Alizarin red (mineralized matrix) of embryos at E14.5 revealed a clear difference in size between Col2a1-Cre;Apc15lox/15lox mutants and control littermates (Fig. 3D). All mutant structures were severely misshaped and fragmented. Mutants failed to develop a cartilaginous mold of both the mandibles and the occipital bone. The axial skeleton contained patchy and irregular cartilaginous structures that did not organize in vertebrae. All 13 rib pairs could be individually distinguished, however, due to their inadequate orientation, size, and shape and due to lack of a sternum, no thoracic basket was formed (Fig. 4A, B). Distorted cartilage rudiments were found where forelimbs should normally arise (Fig. 4E, F), while no signs of bone formation were found in hindlimb rudiments. Furthermore, no cartilaginous primordia of pelvic bones were observed. Similar observations were made in Col2a1-Cre;Apc15lox/15lox embryos at E16.5 (Fig. 3E). At this developmental stage however, distinct areas of mineralization were observed in most parts of the mutant skeleton. The mutant hind skull showed mineralized regions, whereas the control occipital and temporal bone primordias stained only with Alcian blue (Fig. 4I, J). Mutant proximal ribs in these Col2a1-Cre;Apc15lox/15lox embryos were much thicker and shorter in comparison to those in control embryos, and stained intensively with Alizarin red (Fig. 4C, D). In the mutant forelimb, a hypoplastic scapula could be identified, whereas more distal components were agenetic and replaced by an irregular cartilaginous structure (Fig. 4G, H).
Details of skeletal preparations. (A-D) Vertebral column of control and mutant littermates at E14.5 (A, B) and E16.5 (C, D). Mutant vertebrae lacked structural integrity (arrowheads). At E16.5, mineralization was enhanced in the proximal part of the mutant rib (arrow). (E-H) Forelimb of control and mutant littermates at E14.5 (E, F) and E16.5 (G, H). At E16.5, only the scapula was identified (arrowhead), while more distal parts were represented by patchy cartilage aggregations (arrow). (I, J) Skull of control and mutant littermates at E16.5. The mutant displayed mineral deposition in the back skull corresponding to the cartilaginous structure in the control (arrowheads). Scale bars: 3 mm in A-H; 1 mm in I, J.
Lack of functional Apc results in accumulation of cytoplasmic β-catenin, which subsequently translocates into the nucleus. This process can be well detected by immunohistochemistry (IHC). To investigate endochondral bone formation in Col2a1-Cre;Apc15lox/15lox embryos, we analyzed vertebra formation at E12.5 and E14.5, and humerus development at E16.5 using IHC for β-catenin in combination with Alcian blue staining, and in situ hybridization (ISH) for several chondrocyte- and osteoblast-specific genes. Strongly elevated levels of β-catenin were seen at all sites of endochondral ossification in the Col2a1-Cre;Apc15lox/15lox embryos at E12.5, E14.5 and E16.5, indicating efficient Col2a1-Cre-mediated Apc inactivation.
At E12.5, transversal sections of control vertebral primordia showed normal mesenchymal cell condensation and subsequent chondrogenic differentiation (Fig. 5A–C). Chondrocytes stained negatively for β-catenin, started to deposit an Alcian blue-stained matrix, and expressed the nascent chondrocyte markers Sox9 and Col2a1. In marked contrast, mutant sclerotomal cells failed to condense into skeletal primordias. They showed strong nuclear β-catenin staining and displayed a mesenchymal-like spindle shape morphology. These cells expressed neither Sox9, nor Col2a1, implying that conditional loss of functional Apc in skeletal precursors inhibited mesenchymal cell condensation and chondrogenic differentiation. Next, we investigated whether these cells had switched their commitment to the osteogenic lineage due to the accumulation of β-catenin. Surprisingly, they did not express the early osteoblast markers Runx2 and Col1a1, suggesting that β-catenin accumulation due to Apc inactivation impaired osteogenic differentiation of skeletal precursors as well (Fig. 5D, E).
Abnormal axial skeleton formation of Col2a1- Cre ; Apc 15lox/15lox embryos already detectable at E12.5. (A) Immunostaining for β-catenin combined with Alcian blue (AB) staining, and (B-E) gene expression analysis by in situ hybridization with indicated probes on consecutive transversal sections of the sclerotome of a Col2a1-Cre;Apc15lox/15lox embryo and control littermate at E12.5. (F-J) Similar analysis of vertebrae primordia at E14.5. β-Catenin-positive spindle-shaped cells lacked expression of all indicated chondrogenic and osteogenic markers (arrowheads). Scale bars: 100 μm.
At E14.5, chondrocytes in the control vertebrae did not stain positively for β-catenin, displayed an intensely Alcian blue-stained matrix and expressed both early (Sox9, Col2a1) and mature chondrocyte markers, like Indian hedgehog (Ihh) and Collagen 10a1 (Col10a1), indicating a normal progression of endochondral ossification (Fig. 5F–J). Although somite formation was present, mutant vertebrae were heavily crumbled and failed to organize in a cartilaginous anlage. Occasionally Alcian blue-positive clusters of chondrocytes were seen, which lacked detectable β-catenin immunostaining and were positive for chondrogenic marker expression. These cells were probably derived from non-recombined cells due to mosaicism of Cre expression. Surrounding these cartilage islands, mesenchymal-like spindle-shaped cells were observed. Comparable to the defects observed at E12.5, these cells expressed high levels of nuclear β-catenin due to Apc inactivation and lacked not only an Alcian blue-positive matrix but also expression of both chondrogenic and osteogenic markers (Fig. 5F–J; data not shown).
At E16.5, chondrocytes of control proximal humeri did not express detectable β-catenin protein levels and were surrounded by a proteoglycan-rich matrix, which stained positively with both Alcian blue and Toluidine blue (Fig. 6A, B). They were organized in growth plates with a characteristic spatial expression pattern of the chondrogenic markers Sox9, Col2a1, Ihh, and Col10a1 (Fig. 6C–F). Young osteoblasts in the perichondrium, periosteum and primary spongiosa were surrounded by a mineralized osteoid as detected by von Kossa staining (Fig. 6B) and expressed Runx2 and Col1a1 (Fig. 6G, H). Mature osteoblasts expressed Osc (Fig. 6I), while osteoclasts expressed Matrix metalloproteinase 9 (Mmp9) (Fig. 6J). In contrast, mutant humeri were completely misshaped and contained nuclear β-catenin-positive cells that were organized in clusters, showing a mesenchymal-like shape (Fig. 6A). Similar to our observations at E12.5 and E14.5, these cells expressed neither chondrogenic, nor osteogenic markers (Fig. 6C–I). In addition, no Mmp9 expression could be detected (Fig. 6J), suggesting that differentiation of bone-resorbing cells was impaired as well. These β-catenin-positive cell clusters were surrounded by chondrocytes expressing Sox9 and Col2a and lacked positive staining for β-catenin. These cell most likely have not undergone a recombination event as observed at E14.5 (Fig. 6A, C, D).
No chondrogenic and osteogenic differentiation in the developing humerus due to lack of functional Apc. (A-B) Immunostaining for β-catenin combined with Alcian blue (AB) staining (A), combined von Kossa-Toluidine blue staining (B), and (C-J) gene expression analysis by in situ hybridization with indicated probes for (C-F) chondrocytes, (G-I) osteoblasts and (J) osteoclasts on consecutive transversal sections of the developing humerus of a Col2a1-Cre;Apc15lox/15lox embryo and control littermate at E16.5. β-Catenin-positive spindle-shaped cells organized in clusters and failed to express chondrogenic and osteogenic markers (arrowheads). β-Catenin-negative cells at the periphery of these clusters expressed early chondrogenic markers only (arrows), probably due to lack of Cre-mediated loss of functional Apc. Scale bars: 100 μm.
Despite the inhibitory effect of Apc inactivation on differentiation of skeletal precursors in long bones and vertebrae, proximal ribs of Col2a1-Cre;Apc15lox/15lox embryos at E16.5 showed clearly enhanced mineralization upon skeletal staining (Fig. 4D). Therefore, we analyzed the development of these skeletal structures in more detail. The ribs develop through endochondral ossification from the paired lateral sclerotomic areas . Formation of the proximal rib depends on the notochord and the ventral neural tube, whereas development of the distal part depends on the surface ectoderm . At E14.5, proximal ribs of control embryos were cartilaginous and contained mature chondrocytes that did not stain for β-catenin (Fig. 7A–C). Mutant proximal ribs were severely misshaped and contained β-catenin negatively stained cartilage islands, accounting for the positive Alcian blue staining observed upon skeletal preparation (Fig. 4B, 7A). β-Catenin-positive cells were negative for chondrogenic and osteogenic markers (Fig. 7A–D). At E16.5, the β-catenin-negative proximal ribs of control embryos consisted of cartilage and mineralized bone matrix as indicated by combined von Kossa-Toluidine blue staining (Fig. 7E, F; data not shown). They contained chondrocytes, osteoblasts, and osteoclasts as assessed by ISH (Fig. 7H–K; data not shown). In contrast, proximal ribs of mutant littermates stained strongly positive for β-catenin and were significantly thicker and shorter compared to those of control embryos (Fig. 4C, D and 7E–G). They consisted of a massive mineralized bone matrix and a poorly developed bone marrow cavity, although osteoclast differentiation and activity were normal as assessed by ISH for Mmp9 and TRAP staining, respectively (Fig. 7K, L, L'). Interestingly, β-catenin-positive cells expressed all osteogenic markers analyzed (Runx2, Col1a1, and Osc), indicating that, unlike in the long bones and vertebrae, Apc inactivation in skeletal precursors of the proximal ribs did not impair osteoblastogenesis (Fig. 7H–J). Since Ihh is a critical regulator of osteoblastogenesis, we subsequently tested whether the increased ossification might be due to increased Ihh expression in the non-recombined neighbouring chondrocytes. The β-catenin-negative cells, however, matured normally expressing all chondrocyte markers investigated (Sox9, Col2a1, Ihh and Col10a1) at similar levels compared to control cartilage (data not shown). The abundant presence of a bone matrix combined with evidence of functional osteoclasts suggested that the β-catenin-positive osteoblasts were sclerotic.
Conditional Apc inactivation enhances osteoblast formation and mineral deposition in the developing proximal rib. (A-L) Immunostaining for β-catenin combined with Alcian blue (AB) staining (A, E), combined von Kossa-Toluidine blue staining (F), hematoxylin/eosin staining (G), gene expression analysis by in situ hybridization with indicated probes for chondrogenic (B, C), osteogenic (D, H-J) and osteoclastogenic differentiation (K) on consecutive transversal sections of the developing proximal rib of a Col2a1-Cre;Apc15lox/15lox embryo and control littermate at E14.5 (A-D) and E16.5 (E-K). The double-headed arrows in G indicate the thickness of the rib. (L) Tartrate-resistant acid phosphatase (TRAP) staining of the developing proximal rib of a Col2a1-Cre;Apc15lox/15lox embryo at E16.5. The boxed region in L is magnified in L' showing multinucleated osteoclasts (arrowheads) staining positive for TRAP. Scale bars: 100 μm in A-L; 50 μm in L'.
The nasal septum is a midline vertical plate of hyaline cartilage, which undergoes endochondral ossification in postnatal life . Endochondral ossification of the caudal and dorsal borders of the septum, when combined with interstitial expansion, has the effect of displacing the facial skeleton away from the neurocranium and thus enlarging the skull . At E16.5, chondrocytes forming the nasal septum of control mice did not stain for β-catenin, were surrounded by an Alcian blue-positive matrix, and expressed Sox9 and Col2a1 (Fig. 8A–D). In the mutant nasal cartilage we distinguished crumbled chondrogenic islands surrounded by β-catenin-positive cells with an undifferentiated mesenchymal-like phenotype (Fig. 8F–H). The chondrogenic islands consisted of round cells embedded in chondrons surrounded by extracellular matrix (ECM) (Fig. 8E). Interestingly, molecular analysis of these chondrogenic islands revealed the presence of two cell populations: β-catenin-negative and β-catenin-positive cells. The former expressed chondrogenic markers like Sox9 and Col2a1, and their ECM stained positive with Alcian blue, whereas the latter did not express any chondrogenic or osteogenic markers, while their ECM stained significantly less with Alcian blue (Fig. 8F–I; data not shown).
Dedifferentiation in the nasal septum of Col2a1- Cre ; Apc 15lox/15lox embryos at E16.5. (A, E) Hematoxylin/eosin staining, (B, F, H) immunostaining for β-catenin combined with Alcian blue (AB) staining, and (C-D, G, I) gene expression analysis by in situ hybridization with indicated probes for chondrogenic differentiation on consecutive transversal sections of the developing nasal septum of a Col2a1-Cre;Apc15lox/15lox embryo and control littermate at E16.5. (F', G', H', I') High magnification pictures of the boxed regions in F, G, H, and I, respectively. Mesenchymal-like β-catenin-positive cells (arrow in F, H) were present between crumbled cartilage islands. Within these cartilage islands, although displaying chondrocytic morphology and an Alcian blue stained matrix, most of the β-catenin-positive cells did not express Sox9 (arrowheads in G') or Col2a1 (arrows in I'). Scale bars: 100 μm in A, E, F, H; 5 μm in F', H'.
The presence of β-catenin-positive cells in the chondrogenic islands suggested that these cells, due to mosaicism of Cre expression, had initiated normal chondrocyte differentiation before undergoing Apc inactivation. Subsequently, the increased level of β-catenin triggered the loss of expression of the early chondrogenic markers and initiated degradation of the ECM. These observations were indicative of dedifferentiated chondrocytes. Similar observations were made in cartilaginous rudiments at other sites of endochondral bone formation, but the effect was most pronounced in the nasal septum (data not shown).
According to most of the transgenic mouse studies reported, levels of β-catenin, the effector of the canonical Wnt ligands, need to be downregulated in skeletal precursor cells to enable chondrogenic differentiation, whereas elevated β-catenin levels promote differentiation into osteoblasts [11, 12, 15, 35, 36]. This theory is partly based on observations in heterozygous gain-of-function models in which Cre-mediated recombination results in the expression of oncogenic β-catenin. The cellular mechanisms controlling the biological effects of oncogenic β-catenin in the presence of wild type β-catenin are largely unknown. In addition, there are no reports on the role of Apc in regulation of skeletal precursor differentiation via control of β-catenin in the mouse. Here, we have focused on this important role of the multifunctional protein Apc, binding to and downregulating β-catenin. We have selectively inactivated one or both alleles of Apc in murine Col2a1-expressing cells. Our data indicate that the Col2a1 promoter is suitable for this study, since Cre-mediated recombination starts very early (E9.5) in skeletal precursor cells that have not yet committed to the chondrogenic or the osteogenic lineage, consistent with previous findings in other Col2a1-Cre lines [11, 30].
Conditional heterozygous inactivation of Apc does not result in a detectable level of its target β-catenin as determined by IHC. Moreover, heterozygous Col2a1-Cre-mediated Apc inactivation does not interfere with embryonic skeletal development, postnatal growth or bone acquisition up to 24 months of age, as determined by histological and μCT analysis. Our data imply that the level of Apc protein produced by a single functional Apc allele is sufficient to mediate appropriate β-catenin degradation. This is in agreement with normal body weight, size, and growth of young ApcMin/+ mice .
In marked contrast, conditional inactivation of Apc results in a strongly elevated level of (wild type) β-catenin in skeletal precursors, leading to greatly impaired embryogenesis and perinatal lethality. The significantly reduced size and the vast range of skeletal malformations in these embryos is most likely due to the specific Col2a1-Cre activity in skeletal primordias at a very early embryonic stage starting at E9.5 resulting in massive β-catenin accumulation in the developing endochondral skeleton. Probably several factors, like the open rib cage and the severe malformation, from E14.5 on have led to the perinatal lethality. The loss of the multiple β-catenin-independent functions of the Apc protein might have contributed to the gravity and complexity of the skeletal phenotype observed in Col2a1-Cre;Apc15lox/15lox mice as well . Moreover, since Col2a1 expression is not completely restricted to skeletal tissues during mouse embryogenesis , we can not exclude that the severity of the phenotype might have been partly due to loss of functional Apc in other Col2a1-Cre-expressing cell types.
Wnt/β-catenin signaling represents a mechanism in mesenchymal precursor cells for selecting between chondrocytic and osteoblastic fates. This key regulating role in lineage commitment has been attributed to β-catenin. Indeed, conditional gain-of-function mutation of β-catenin leads to decreased chondrocyte differentiation in Prx1-expressing and Col2a1-expressing cells [12, 15]. However, corresponding increased osteoblast differentiation has not been observed in these models, instead, a decreased osteoblast marker expression has been seen in case of Prx1-expressing cells, suggesting that activation of β-catenin negatively affects skeletogenesis [12, 15]. In addition, conditional loss-of-function mutation of β-catenin in Prx1-expressing cells leads to increased expression of not only chondrocyte but also early osteoblast markers . These data strongly suggest that β-catenin negatively regulates the differentiation of mesenchymal cells into a common skeletal precursor .
We report here that in the vast majority of endochondral skeletal elements, precursor cells lacking functional Apc express strong nuclear β-catenin staining and fail to differentiate into both chondrogenic and osteogenic lineages. These data are in line with the inability of mouse embryonic stem cells carrying specific bi-allelic Apc mutations to differentiate into bone and cartilage . Our data are also consistent with those based on conditional stabilization of β-catenin in mesenchymal skeletal precursors which had an undifferentiated appearance . This consistency strongly suggests that, notwithstanding the multiple functions of Apc, its β-catenin-controlling role is the most important during skeletogenesis. We conclude that Apc plays a crucial role in differentiation of skeletal precursors in vertebrae and long bones: it enables the differentiation into both skeletal lineages by decreasing the level of β-catenin.
Although in the vast majority of the endochondral skeleton both chondrogenic and osteogenic differentiation is inhibited due to loss of functional Apc in skeletal precursors, we find a different phenotype in the proximal ribs. Notwithstanding the cartilaginous structure at E14.5, proximal ribs of Col2a1-Cre;Apc15lox/15lox mutants at E16.5 show abundant bone matrix deposited by osteoblasts, invariably expressing high levels of nuclear β-catenin. Since osteoblasts do not express Col2a1, these cells are most likely derived from Col2a1-expressing skeletal precursors lacking functional Apc. This implies that, in contrast to other skeletal elements, skeletal precursors of the proximal ribs are able to escape from the noxious effects of strongly elevated β-catenin levels on differentiation of precursor cells by an as yet unknown mechanism. Since Ihh expression is normal in the non-recombined neighbouring chondrocytes, we speculate that Ihh may be a prime target for inducing osteoblastogenesis in the recombined precursor cells counteracting the noxious effect of β-catenin.
Despite the evidence of functional osteoclasts, the intensely ossified proximal ribs show a strongly diminished bone marrow cavity, rendering it likely that the increased bone formation is due to osteosclerosis. These observations are in agreement with other data, showing that enhanced canonical Wnt signaling can increase bone mass through stimulation of osteoblast activity rather than inhibition of osteoclast formation and activity [39–41]. Such an osteopetrotic phenotype has only been seen in mice with conditional loss of functional Apc or constitutively active β-catenin in already differentiated osteoblasts, resulting in dramatically increased bone deposition [17, 42].
We have found clear evidence for the occurrence of chondrocyte dedifferentiation due to β-catenin accumulation in the nasal septum. Morphologically characterized chondrocytes, which were nuclear β-catenin-positive, lacked expression of typical chondrocyte markers. Furthermore, they were imbedded in an ECM containing significantly less proteoglycans.
Given the noxious effect of increased β-catenin levels on chondrocyte formation (our data and [12, 15]), these cells most likely have undergone Cre-mediated loss of functional Apc after completion of the initial stages of chondrocyte differentiation. Mouse models with an increased level of β-catenin in Col2a1-expressing cells show accelerated chondrocyte maturation [11, 12]. We have found no indication for this phenomenon, implying that the high level of β-catenin due to loss of Apc does not result in chondrocyte maturation but in chondrocyte dedifferentiation. Our data suggest that accumulated β-catenin triggers this dedifferentiation program not only through inhibition of chondrogenic marker expression but also by enhancing the loss of ECM presumably through stimulation of matrix-degrading enzymes. It has been demonstrated that β-catenin increases expression and activity of a number of enzymes involved in matrix degradation [43–45]. β-Catenin stabilization has been associated with dedifferentiation of articular chondrocytes in vitro upon serial monolayer culture, or treatment with retinoic acid or IL1β . Dedifferentiated chondrocytes have also been observed at other sites of endochondral bone formation in the Col2a1-Cre;Apc15lox/15lox embryos, however, the presence of these cells was most pronounced in the nasal septum. Altogether, our data indicate that Apc is required to suppress β-catenin for maintenance of the chondrocytic phenotype.
We show here for the first time that Apc, by negatively controlling the levels of β-catenin, is a critical regulator of the differentiation of skeletal progenitor cells. Conditional inactivation of the mouse Apc gene results in a heterogeneous skeletal phenotype. Based on our results, we postulate that Apc-mediated control of the dosage of transcriptionally active β-catenin protein is directive for the differentiation program of skeletal precursor cells. In the vast majority of the skeletal precursors, loss of functional Apc leads to a strongly increased β-catenin level, resulting in the formation of an undifferentiated mesenchymal cell, which lacks differentiation potential for both osteogenic and chondrogenic lineages. When the inhibitory effect of a strongly increased β-catenin level in the skeletal precursors is reduced, highly active osteoblasts arise. Strong repression of β-catenin in these precursors is required for chondrogenesis. Support for our hypothesis on the importance of the dosage of Apc and β-catenin is provided by observations in Col2a1-Wnt14 transgenic mice . Higher levels of Wnt14 expression resulting in a high level of β-catenin block differentiation of skeletal precursors into chondrocytes or osteoblasts, whereas lower levels of Wnt14 expression result in enhanced ossification. We provide evidence that Apc plays a crucial role in modulating the β-catenin level during mouse skeletogenesis in a spatio-temporal regulated manner. In skeletal precursor cells, Apc is required for differentiation into both chondrocytes and osteoblasts. In addition, Apc is essential in chondrocytes to maintain their phenotype and enable their maturation.
All animal studies were approved by the ethical committee of the Leiden University Medical Centre and complied with national laws relating to the conduct of animal experiments. The Apc15lox/+ mouse was generated by gene targeting in IB10 embryonic stem cells, using a 22.5 kb targeting vector containing loxP sites flanking the last exon of Apc, i.e. exon 15. LoxP sites were inserted in the BglII site of intron 14 and in the ApaI site approximately 350 bp downstream of the Apc polyadenylation signal. Exon 15 of the Apc gene encodes for codons 660 to 2842 of the Apc protein and harbours all the functional domains of Apc involved in β-catenin regulation as well as the C-terminal domains binding to microtubules, DLG, and EB1. Therefore, following Cre-mediated deletion of exon 15, functionality of the remaining protein will be fully impaired with respect to the main function of Apc, i.e. β-catenin regulating. Moreover, as deletion of exon 15 also removes the polyadenylation signal, no stable mRNA is produced and as a consequence no stable truncated protein will be generated. A full description of this new conditional Apc mouse model is currently in preparation (Robanus-Maandag et al., in preparation). Col2a1-Cre mice  were mated with Apc15lox/15lox mice. Of the offspring, Col2a1-Cre+/-;Apc15lox/+ mice were mated with Apc15lox/15lox mice to obtain Col2a1-Cre+/-;Apc15lox/15lox mice. LacZ reporter mice were obtained from Dr. Xiaohong Mao . Routine mouse genotyping was performed on tail DNAs by PCR (Robanus-Maandag et al., in preparation).
Skeletons of mouse embryos were stained with Alcian blue and Alizarin red for cartilaginous and mineralized tissues, respectively, according to standard procedures . For micro-computed tomography (μCT) analysis, femora were recovered from 12-week-old mice after death and processed as described .
Whole mount β-galactosidase staining was performed as described , from E16.5 on after removal of the skin. For histology, immunohistochemistry, and in situ hybridization, specimens were fixed in phosphate-buffered formalin, embedded in paraffin, and sectioned at 6 μm. Hematoxylin/eosin, Nuclear red, Toluidine blue, and von Kossa stainings were performed according to standard procedures. For immunohistochemistry, sections were treated with 1% H2O2 in 40% methanol/60% TBS for 30 minutes to reduce endogenous peroxidase activity. For antigen retrieval the sections were boiled in Tris-EDTA pH 9.0 for 20 minutes. Blocking was performed with 5% blocking buffer for 30 minutes at 37°C (Boehringer Ingelheim). Sections were incubated with the primary mouse monoclonal antibody against β-catenin (1:100; BD Transduction Laboratories) overnight at 4°C, followed by incubation with the second antibody biotin-conjugated rabbit anti-mouse IgG (1:300; Amersham Biosciences) for 45 minutes at 37°C. The biotinylated proteins were detected by incubation with horseradish peroxidase-conjugated streptavidin (1:200; Amersham Biosciences) for 30 minutes at 37°C and visualized with DAB (Sigma). After counterstaining with Alcian blue for 15 minutes and hematoxylin for 1 minute, sections were dehydrated and embedded in Histomount (BDH). For in situ hybridization, digoxigenin-labeled single-stranded RNA probes were prepared using a DIG RNA labeling kit (Boehringer) following the manufacturers' instructions. All probes are available upon request. In situ hybridization was carried out as described [15, 50]. Images were taken with a DXM-1200 digital camera (Nikon).
Razvan L Miclea, Marcel Karperien contributed equally to this work.
We thank Christine Hartmann (IMP, Vienna, Austria) for the mouse Runx2, Sox9, Osc, and Ihh probes, Eero Vuorio (University of Turku, Finland) for the mouse Col1a1 and Col2a1 probes, and Willy Hofstetter (University of Bern, Switzerland) for the mouse Col10a1 probe.
This work was financially supported by a short-term research fellowship from the European Society for Pediatric Endocrinology (RLM), an unrestricted educational grant from IPSEN FARMACEUTICA BV (RLM), a research grant from The Human Growth Foundation (MK), and a research grant from the Association for International Cancer Research (CAJB).
The studies were designed and initiated by MK as principal investigator, with the help of RF and ECR-M; Col2a1-Cre mice were provided by TK and HMK; mutant mice were generated and genotyped by CAJB and ECR-M; embryo experimental work and analysis were performed by RLM; μCT analysis was performed by GR; data interpretation was carried out by RLM assisted by MK, GH, MAV, PA, CWGML, RF, JMW, and ECR-M; the manuscript was written by RLM with the assistance of all co-authors. All authors read and approved the final manuscript.


text:
import os
import git
from datetime import date

def update_change_log(config, version, new):
    directory = config.get("MCConfig", 'changelog_directory')
    changelog_name = config.get("MCConfig", 'changelog_name')
    change_file = os.path.join(directory, changelog_name)
    try:
        g = git.Git('./')
        log = g.log('%s..' % version, '--no-merges', '--pretty=format:%s').split('\n')
        today = date.today()
        with open(change_file, 'r') as old_changelog:
            old = old_changelog.read()
        minus_header = "\n".join(old.split('\n')[1:])
        with open(change_file, 'w') as new_changelog:
            new_changelog.write('#CHANGELOG\n\n')
            new_changelog.write('##Version %s (%s)\n\n' % (new, today))
            for line in log:
                new_changelog.write("* " + line + "\n")
            new_changelog.write('\n')
            new_changelog.write(minus_header)
    except Exception as ex:
        print ex


Mark Smith, Vice President, Operations Finance | Cummins Inc.
Vice President and Chief Financial Officer, Cummins Inc.
Mark Smith is the Vice President and Chief Financial Officer, Cummins Inc. In this role, he oversees the operations of Cummins' business from a finance perspective and works with finance controllers to ensure that the company meets its operational and financial commitments. In addition, Mark also leads the Investor Relations, Business Planning and Analysis, and Capital Management functions at Cummins.
Mark joined Cummins in 1995. In his more than 20-year tenure, he has served in a number of leadership positions including Vice President of Investor Relations, Controller for the Components business and Controller for the Filtration business. In addition, Mark also served in a number finance and business strategy roles in the Engine and Power Generation businesses in the U.S. and the U.K.
Mark earned a Bachelor of Arts in Economics from the University of Kent and a Master of Business Administration from the Kellogg School of Management at Northwestern University. Prior to joining Cummins, Mark spent six years as a public accountant with Ernst & Young in the U.K. Mark is a qualified member of the Institute of Chartered Accountants in England and Wales.


People like you are sick and twisted. Are you really afraid that being healthy and getting into shape turns all straight men gay? This article, and your words, are not Christocentric. Ever seen an NFL game? Is this serious or a joke? I have been out of the homosexual life for almost seven years. He is not weak minded.
No one I know that does this program has turned gay because of it. Yes, there are gay people who are extreme partiers—-as there are straight people who are into drugs and self-destructive behavior. People either like or don't like his jokes, his energy, but he just seems happy and at peace with himself. He later created a sequel, P90X —or Power 90 Extreme—which was his breakout hit.