×

sizeof float float at

C++里,sizeof(float)是?jdbctemplate 注解只能private么

admin admin 发表于2022-07-10 19:32:35 浏览120 评论0

抢沙发发表评论

C++里,sizeof(float)是


首先A:float表示单精度浮点数 显然A错
B:sizeof 输出整形 所以是对的
C: sizeof不能进行函数调用 支持2楼的说法
D: 不做过多解释。

jdbctemplate 注解只能private么


第一步,先引入需要的包,这里不作详细说明

第二步,配置注解扫描,txManager是事务管理提供datasource就可以了

《aop:aspectj-autoproxy /》

《!-- transaction manager, use JtaTransactionManager for global tx --》
《bean id=“txManager“
class=“org.springframework.jdbc.datasource.DataSourceTransactionManager“》
《property name=“dataSource“ ref=“dynamicDataSource“ /》
《/bean》

《!--
enable component scanning (beware that this does not enable mapper
scanning!)
--》
《context:component-scan base-package=“com.shadow“ /》

《!-- enable autowire --》
《context:annotation-config /》

《!-- enable transaction demarcation with annotations --》
《tx:annotation-driven transaction-manager=“txManager“ /》

第三步,配置jdbctemplate的实例,同样提供一个datasource就可以了
《!-- JDBC模板 --》
《bean id=“jdbcTemplate“
class=“org.springframework.jdbc.core.JdbcTemplate“》
《property name=“dataSource“ ref=“dynamicDataSource“ /》
《/bean》

第四步,写个BaseDao方便下面的dao层调用,由于时间转换经常用到,这里只写了个通用的时间转换
/**
*
* @author shadow
* @email 124010356@qq.com
* @create 2012.04.28
*
* @param 《T》
*/
public abstract class AbstractBaseDao《T》 implements DateFormatEntry {

// SPRING JDBC模板接口
private JdbcTemplate jdbcTemplate;

public JdbcTemplate getJdbcTemplate() {
return jdbcTemplate;
}

@Resource
public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}

/**
* 获取日期
*
* @param timestamp
* @return Date
*/
public Date getDate(Timestamp timestamp) {
return toDate(timestamp, null);
}

/**
* 获取日期
*
* @param timestamp
* @param format
* @return Date
*/
public Date getDate(Timestamp timestamp, String format) {
return toDate(timestamp, format);
}

/**
* Timestamp按格式转换成Date
*
* @param timestamp
* @param format
* @return Date
*/
public Date toDate(Timestamp timestamp, String format) {
Date date = null;
if (null == format || ““.equals(format))
format = DEFAULT_FORMAT;
SimpleDateFormat sdf = new SimpleDateFormat(format);
try {
date = sdf.parse(sdf.format(timestamp));
} catch (ParseException e) {
e.printStackTrace();
}
return date;
}

}

介绍法国城市里昂的历史(最好是英文)


找了三篇
一:

FRANCE : LYON HISTORY

Lyon was founded as a Roman colony in 43 BCE by Munatius Plancus, a lieutenant of Caesar, on the site of a Gaulish hill-fort settlement called Lug[o]dunon—from the Celtic sun god Lugus (’Light’, cognate to Old Irish Lugh, Modern Irish Lú) and dúnon (hill-fort). The name was latinised as Lugdunum. In Roman times Lugdunum was the capital of the three Gauls and symbolized the colonial power that made it a natural outpost of Rome. In the 11th century, after the barbarian invasions, Lyon awoke from the torpor into which it had subsequently fallen.

Later, the Christian Religion would have a profound influence on the city’s development. With the advent of the Renaissance, the town prospered and became a major trade centre, drawing numerous merchants and financiers. More particularly, Lyon found a new vocation at the end of the 15th century with the introduction of printing. In the middle of the 16th century the arrival of silk weavers from Italy gave birth to an industry that would continue to grow up until the 20th century. In the 18th century the town expanded as the renown of Lyon’s silk manufacturers spread across Europe.

The Revolution also strongly marked Lyon when, in 1793, the Convention ordered the troops to seize the city and destroy it. In the early 1800s, Jacquard invented the celebrated mechanism that doubled the number of looms working in the city and sparked off unrest that culminated in the silk weavers’ riots. During the 19th century, the city absorbed the surrounding villages and undertook a series of major planning projects with the development of the city centre, the construction of the basilica, a hospital, schools, etc.

二:

The history of Lyon, known at the time as Lugdunum (meaning “the hill of light“ or “the hill of crows“) began under the Romans, in the first century B.C. when the city was proclaimed capital of the three Gauls. This official status brought political, economic, military and religious development to the city. This period of pre-eminence lasted 3 centuries but did not survive the downfall of the Roman Empire. A long period of upheaval possessed the city until the church gave it new impetus by declaring Lyon the seat of the Primate of Gaul in the 11th century. From that time, prosperity continued to grow, reaching its peak in the Renaissance. By the end of the 15th century, Lyon was an important center of trade with its fairs and a well-developed banking system which attracted commercial interests from all over Europe. Soon, the social, intellectual and artistic elite settled here. Development continued through the 17th and 18th centuries with the Lyon silk industry dressing the rich the world over and decorating their interiors. The city continued to gain in size and equipped itself with hospitals, public squares and impressive edifices. The French Revolution in 1789 brought a brutal halt to expansion but development was re-vitalized under the Napoleonic empire. Lyon became an industrial city and pursued its urban development with a distinct preference for the Haussman style prevalent at the time. Though the revolt of the Canuts silk workers tarnished the era, Lyon enjoyed an undeniable power which it carried into the 20th century. Urban development continued to expand and change the face of the city. During World War II, Lyon was the center of the French Resistance. The post-war period marked the beginning of the race for modernity with a new challenge, the construction of Europe. Lyon acquired a European dimension through the development of the transportation system, hotel and other tourist facilities, cultural establishments and the creation of the Part-Dieu business quarter in 1960. The 1980’s saw a new drive to improve the city’s infrastructure. The momentum continues today. Important town planning projects have been completed in strategic locations, while maintaining a policy of preservation of local historical cultural assets. In barely a dozen years, Lyon has become a major metropolis where the successes of the past live in harmony with the goals of the future. These different phases of Lyon’s history are engraved in the urban landscape.

三:
Nestled between Fourvière and Croix-Rousse Hills, nicknamed by author Michelet during the 19th century “The Praying One“ and “The Working One“ respectively, Lyon is the second largest French metropolis after Paris. Capital of the Rhône-Alpes region, ideally located between Massif Central and the Alps, not far from the Mediterranean, the city benefits from an exceptional location at a cross road of commerce, ideas and cultures. This extraordinary capital offers a plethora of monuments and buildings telling the tale of Lyon’s 2000-year history. Accordingly, 1235 acres of the town were classified as a UNESCO World Heritage site in 1998.

From the founding of Lugdunum city to the downfall of the Roman Empire Lyon’s site was settled long before the city was formally founded by the Romans. Legend explains that the city is named after a god from Celtic mythology. Tribes from northern Europe (Celts) are said to have erected a sanctuary in honor of Lug, the God of the Sun or a God of Light. This sanctuary was supposedly located on Fourvière Hill, next to Lyon’s other original site, Condate, at the bottom of Croix-Rousse Hill.

The true history of this city began after the Romans founded it during the first century before Christ. Julius Caesar, during his campaign to conquer the Three Gauls in 58 B.C., decided to set up camp at the bottom of Fourvière Hill. In 43 B.C., a lieutenant named Lutius Muniatus Placus chose the same site to build the city of Lugdunum which would welcome Romans expelled from neighboring Vienna by the Allobroges. The name of the city has several meanings. It could mean “Hill of the Light“ (lug being equivalent to the latin lux, meaning light) or “Hill of the Crow“ (taking lug from the word lukos meaning crow, an animal that announces the presence of God Lug in Celtic mythology). In 27 B.C., Lugdunum gained weight and importance when named Capital of the Three Gauls under Emperor Augustus. Little by little, the city grew significant enough to become second only to Rome in the Roman Empire. Its role, originally limited to military, was expanded to include politics, economics, and religion. An amphitheater, called Amphitheâtre des 3 Gaules, was built at the bottom of Croix-Rousse Hill to celebrate the imperial cult. It was the meeting venue for the 60 Gallic tribes attending the ceremonies. Later expanded to host as many as 20,000, it served to honor and entertain Roman Emperors visiting the city. During the period of conversion to Christianity in 177 A.D., 48 Christian martyrs were sacrificed here, including Bishop Pothinus and Saint Blandina. Under Augustus’ reign, many monuments were erected like the Theater, the Temple dedicated to the Phrygian goddess Cybele, and the thermal facilities.

The downfall of the Roman Lugdunum began with the first invasion by Germanic peoples in 276 A.D. and the internal squabbling that accompanied the decline of the Roman Empire. The once thriving city fell victim to the pillaging and political instability that put an end to its growth. By the end of the 3rd century, it had lost its status as Capital of the Three Gauls. Its inhabitants, expelled from their houses by tribes of Barbarians, found refuge in the low part of the town, the old city now called Vieux Lyon. Vestiges and tracks from that period remain in the Cathedrale Saint-Jean neighborhood as well as in the Musee de la civilization Gallo-Romaine, a Gallo-Roman museum.

The gloomy Middle Ages: marked by religious events The early Middle Ages saw the invasion of the Germanic tribes, the Burgundians who were expelled from their territory by the Huns. They finally settled in Lyon and named it Capital of Burgundy in 461. In 532, the sons of Emperor Clovis annexed Burgundy, making Lyon a part of the Frank Empire. During the next several centuries, the city saw many waves of invaders. Outside the brief but stable reign of Emperor Charlemagne (742-814), the city was plagued by ravages and instability as it was successively devastated by Normans, Hungarians and Muslims eager to annex Provence or Burgundy.

After this long dark period, the city was reborn thanks to its religious role in the 11th century, when it was named “Primate of Gaul“ in 1079 under the reign of pope Gregory VII. During that period, numerous churches, abbeys and bridges were erected. Among the extraordinary edifices remaining are the Saint-Jean Cathedral and the abbeys Saint-Paul and Saint Martin d’Ainay. The bridges built in the ecclesiastic city at these times created a strong infrastructure for the future development of the garment and food industry and trade. However, Lyon still remained modest in size and much smaller than it had been in the Gallo-Roman times. The Fourvière and Croix-Rousse hills were deserted while the bank alongside the Saône River grew. The bank alongside the Rhône River remained undeveloped until the 15th century because of the difficulty of building a bridge in the regularly flooding water.

In 1307, Philip IV The Fair definitively attached Lyon, which had always been under the aegis of archbishops, to the French Kingdom. But it remained undeveloped due to the Hundred Years’ War and the many disasters (floods, epidemic diseases, etc) that occurred in the 14th century. For example, the Black Plague killed approximately half of Lyon’s population in 1343 reducing it to 40,000 people.

From the thriving times of Renaissance to the French Revolution It was not until the Renaissance that Lyon took full advantage of its geographic characteristics. Benefiting from the attention and favors of successive French kings, Louis XI “The Prudent“, Charles VIII and Francis I, the city saw its largest development and economic growth. It became a center of trade and business. Charles VIII allowed Lyon to host four international fairs annually, when merchants came from as far as the Middle-East and Asia to buy, sell, and trade silk, leather goods, spices, and metals. Numerous occupations and jobs developed in relation to these trades. The silk industry brought a great number of workers, sometimes highly qualified, to design the best pieces for the French crown. Banking families arrived from thriving Italian cities like Venice, Florence, or Genoa to be part of the bustling city. The first real use of credit was invented in Lyon at that time, and the city was home to Europe’s first Stock Exchange (Bourse). Both the economy and the culture flourished. Printing methods had been imported from Germany, and the first book published in the French language was printed in Lyon in 1473. Famous works by legendary French writers - physician and philosopher François Rabelais, poet Louise Labe, and Ronsard - were published here.

This cultural and economical wealth led to the erection of sumptuous masterpieces of architecture that dramatically changed the city of Vieux Lyon. Under the influence of powerful and wealthy families establishing their activities in the city, numerous mansions (hôtels particuliers) were built. The Hôtel Gadagne which now houses the Musee Historique de Lyon, the Loge du Change, and the Traboules are from that period.

The economic and cultural prosperity of this flourishing city was destabilized by the looming wars between Catholics and Protestants. Beginning in the 1560s, massacres and acts of vengeance plagued the town. People were killed and churches were destroyed, chasing away those engaged in cultural activities and merchants afraid of losing their capital. Banking families returned to Italy while publishers emigrated towards Geneva. Lyon became a working-class city, hidden behind the splendor of Paris.

However, in the 17th and 18th centuries the city regained prosperity thanks to the silk trade and the garment industry. It also benefited from the favors of the prosperous French crown, notably under the reign of Louis XIV. The city was redesigned and roads, buildings, and the Hospital were renovated. The Place des Cordeliers and the Place Bellecour were designed during that period. The general hospital, called Hôtel Dieu, was expanded. Some new buildings appeared: the Hôtel de Ville (the city hall from 1643), Saint Mary’s Chapel in Fourvière, the city Theater, and the fountains replacing the medieval wells. Architects and politicians sought to enlarge a narrow city by elevating the buildings (they are taller in Lyon than is common in other French cities) and building new neighborhoods. The Presqu’Île, Saint-Clair, and Les Brotteaux neighborhoods knew their development at this time under the aegis of architects Soufflot, Perrache, and Morand.

The French Revolution put an end to this quiet and prosperous period. In 1793, Lyon chose to support the Girondists against the “Convention“ (the government that reigned from September 1792 to September 1795) and was considered too royalist. As a result, she had to endure a 2-month siege. During the French Revolution, 2000 people were shot or decapitated in Lyon. The architectural work was suspended and numerous frontages were ruined, especially in the Place Bellecour neighborhood.

Nevertheless, Lyon’s Age of Enlightenment was punctuated by major scientific discoveries surrounding the first veterinary school in Europe, the Brothers Montgolfier (Aerostat), and the notable talents of Ampère, the genius of physics who developed units for measuring electricity.

From the Industrial Revolution to the contemporary era In the 19th century, the main activities in town linked to the silk industry continued to expand but their location, influenced by a number of historical inventions, changed significantly. In the beginning of the century, Joseph Marie Jacquard revolutionized the textile industry by inventing a mechanical loom that could replace six men at work. In need of more space, the workshops moved to the Croix-Rousse hill, and Lyon grew to the north and east. Another major innovation changed the garment industry: the sewing machine of Barthelemy Thimonnier, invented in 1829.

The benefits of the Industrial Revolution in Lyon extended beyond the textile industry itself. The chemistry of dyes and other synthetic products, linked to that industry, saw strong development with the colorant products constituting a foundation for the success of the future giant of French chemistry, Rhône-Poulenc. The pharmaceutical sector was represented by Marcel Merieux who founded the eponymous institute. Besides Rhône-Poulenc and Merieux, we should also mention Berliet, a key company in the French automotive industry. The great banking institution, Le Credit Lyonnais, was created in 1860 as a result of the prosperity of these sectors. Working in Lyon towards the end of the century, the Brothers Lumière developed the cinematographe that founded the modern movie industry. The Institut Lumière, honoring their contributions, was born in 1895. Throughout the 19th century, Lyon underwent rapid economic development due to the railway (constructed in 1832, making it the first railway built in Europe)linking it to the nearby industrial city of Saint-Étienne.

During this period, the city also witnessed dramatic architectural development. Notable buildings from this time include the Opera, the Palais de Justice built by Baltard Senior in the old city, the Prefecture, the Basilique de Fourvière, the banks of the Rhône and Saône rivers and the large streets on the Presqu’Île. The bourgeoisie, made up of merchants and “captains of industry“, lived in the magnificent buildings still standing on the Cours Morand or the Avenue de Saxe. Workings in the Parc de La Tête d’Or began at that same period. By the end of the century, the Guillotière, Croix-Rousse and Vaise neighborhoods had become part of the city. The modern city grew with the construction of large roads, making the town more sanitary, making paths for natural light to fall or to emphasize municipal monuments. Meanwhile, the oldest parts of the city underwent extensive renovations.

Throughout the first half of the 20th century, the mayor of Lyon, Édouard Herriot, continued to remodel the city to improve quality of life for its inhabitants. During his term (1905-1957), numerous public buildings were erected under the direction of architect Tony Garnier. The slaughterhouse and the cattle marketplace remain today as the great Halle, and the Stade Gerland stadium built in 1912, the Hospital, and low-income housing structures are among the masterpieces built under Herriot.

During World War II, being located on the frontier between the occupied and free zone, Lyon played a great role as the headquarters of the French Resistance fighting against the Nazi regime, notably under the leadership of Jean Moulin. It was bombed in May 1944, only months before being freed in September. After the war, as was true throughout France, the population and the city grew again. During the 30 Glorieuses, communication and transportation infrastructure was built to give Lyon its European dimension: the Satolas airport, now called Saint-Exupery (1975), the metro (1978), the Fourvière Tunnel, where the highway goes through Lyon, and the TGV (high speed train) shortening the trip between Paris and Lyon to only two hours. Municipal and cultural infrastructures like the Exhibit Center Eurexpo, the Auditorium Maurice Ravel, the Maison de la Danse, the Bibliothèque Municipale, the Palais des Congrès, and the Cite Internationale are also from that time. The Opera was remodeled by French architect Jean Nouvel as was the Place des Terreaux by Drevet and Buren. In Old Lyon, all the monuments, bridges and riverbanks are illuminated to emphasize the historical and artistic style of this city.

Today’s city is much more than the once-industrial city of factories. It is praised for its gastronomy, its arts & crafts, its culture and its history. Thanks to its metalworking activities, its garment industry, and its chemical and pharmaceutical sector, it has developed cutting edge technologies (located in Gerland metropolis) and a bustling business center (in La Part-Dieu neighborhood) offering a new dynamic economy in Lyon which has resulted in the appearance of a large service industry. The Hôtel Hilton and the casino, devotion to cutting-edge research (biotechnology, medical sciences, vehicle manufacturing) and services, the city is dedicated to a successful future.
-float