![]() |
Robi Ludwig: To Spank or Not to Spank, That Is the Question!
In the middle of a popular New York City toy store stood a very tearful little boy. He looked no more than 5 years old as he increased his tearful pleas. The young dad bent down and unsuccessfully tried to reason with his increasingly disgruntled son, who at this point turned up his already loud screams as he threatened his father <a href="http://newerahatstock.com/monster-energy-hat-c-14.html"><strong>monster energy hat </strong></a> to buy this very expensive toy for him. The young son (let's call him Sam) screamed, "If you don't get me this toy, then I'm not going to talk to you, and I'm not going to sleep in your bed anymore!" While the bed issue is a topic for another article, Sam's father trying, in an unnaturally calm, saccharine and weak state, to reason theoretically with his impulsive, temper-infused son was clearly not working. "Sam," said the dad, "this is a very expensive store, and your birthday is right around the corner, so now is just not the right time to get you this kind of gift." Sam, for his part, wasn't having any of it, so his threats against his father continued -- relentlessly. He stood his ground and wasn't having any of his father's logic. He simply continued with his own verbal diatribe. "Then I'm not going to love you or talk to you anymore!" I really had to remove myself from this scene or I would have been in serious danger of putting in my two cents, which would have been an unwise move, because I give psychological analyses on national TV. My impulse, however, was to talk on behalf of this dad and say, "Is this a promise? You won't talk to me anymore?" (How about starting now?!) I found the father equally infuriating. This child didn't need to be given reason; he needed parameters. One could even argue that he needed a firm hand in this instance. Sometimes, children push so hard because they need to know their limits and, on some level, want those limits to be enforced. My thoughts wandered back to a moment in my psychoanalytical training when a fellow student, a father, spoke with much sadness and regret over spanking his daughter when she was a child. His child had recently told him how emotionally damaging this was for her. I was quite shocked by his daughter's extreme upset, because I was a child who was spanked all the time! My fellow classmate, this remorseful father, was very surprised as I talked fondly and humorously about my childhood memories of getting spanked. He was very surprised that I didn't feel particularly scarred by these physical punishments -- not at all! I explained to him that I felt very loved by my parents, even as they were intermittently exasperated by me and felt the need show this feeling by a spanking. Who knows? Maybe I even deserved it back then. Now, as the parent of two children ages 9 and 12, I don't choose to embrace my parents' physical style of punishment. Each of my children may have been spanked once in their lives, once when my son slapped me across the face, and once when my daughter was very <a href="http://newerahatstock.com/burberry-hat-c-6.html"><strong>burberry hat</strong></a> young, completely out of control and in real need of some major limit-setting. Since then, time-outs, strong verbal limit-setting and a sense of humor seem to do the trick for them and their blessed temperaments, which is not from my side of the family, to be sure! Do I believe in spanking? No, not really, but when carried out in a thoughtful way and not out of parental angst, spanking can work as an effective disciplining tool with certain types of children. However, I don't think reasoning with an unreasonable 5-year-old who is threatening not to love you or talk to you unless you buy him the whim of the moment is the right way to go, either. This child needed some firm comments from his father, <a href="http://newerahatstock.com/coogi-hat-c-11.html"><strong>coogi hat</strong></a> such as, "Stop your begging, you're not getting this toy, and you're not to threaten me, either. You are not going to get this toy at this time, and we are leaving this store -- now!" The entire point of setting limits is to prepare our children for the world they will live in. If they do not get discipline from their parents who love and care for them the most, then they will get it from far harsher people in the world that they will have to learn to navigate, and that could prove to be a very unpleasant experience. Setting limits in a strong and effective way is loving your children, and on a certain level, your kids know that, too. They realize that parents who care enough about them to stand up to them and set limits are mature adults doing their parental job: providing love, care and preparation for the adult world that their children will one day enter. Parents who do give love along with limits are preparing their kids for life and the real world, which, at times, is not always so loving or easy. As parents, our job is to prepare our kids to live successfully in their personal world as well as in the outside world, which comes complete with rules, regulations and imperfections. And this training begins with us as parents. Follow Robi Ludwig on Twitter: www.twitter.com/drrobiludwig
|
Web configuration file web.config is a Web application's data configuration file, which is an XML file that contains settings related to Web application XML tags can be used to simplify the application of related equipment ASP.NET set.
11.7.1 Web based configuration file Web configuration file web.config in the Web application in any directory, subdirectory if no web.config file, is to inherit the parent directory web.config settings related documents; if there is a subdirectory web.config file to parent directory web.config file override the relevant settings. . NET Framework is the name of the root configuration file Machine.config, stored in the Windows folder Microsoft.NET \ Framework \ \ CONFIG, the Web server settings for all Web applications are inherited this profile,air max 2009, if you need to change the settings,air max sale, use the web.config file in the directory covering relevant settings. Web configuration file is an XML file,cheap nike air max shoes, the attributes in the XML tag value is set, tag name and attribute value format is a string,nike air max 2009, the first one begins with the letter lowercase,air max 2010 sale, followed by each prefix is capitalized,air max 2009 sale, such as . Web configuration file example is shown below. the root of the Web configuration file marks are , his son mark , and is the configuration section. In the settings section under are ASP. NET related settings. Commonly used configuration section tag that is shown in Table 11-9. Table 11-9 Common Settings section tag configuration section Description ; control anonymous user Web application, details refer to Chapter 16 set the ASP.NET authentication, see Chapter 13 set ASP.NET user authorization, see Chapter 13 Set up browsing program compatible components HttpBrowserCapabilities Set compilation mode ASP.NET applications ASP.NET application to set custom error handling ASP.NET applications on the global setting, which is localized Set set HTTP handling corresponds to the URL request is IHttpHandler class Create, delete, or clear the ASP.NET application's HTTP module ASP.NET the HTTP implementation of the relevant settings set the ASP.NET application's user identification is to use server-side user account privileges (impersonate attribute), or the specified user account (userName and password attributes) set to form the basis of authentication using the Cookie data, and decoding for coded key value set the ASP.NET Membership mechanism, see Chapter 13 ASP.NET process to set the relevant settings, that is, the properties of the command Page Guidelines set personal information Porfile objects, details refer to Chapter 14 set the ASP.NET role management, details see Chapter 13 Set Session State ASP.NET application HttpModule (Continued) configuration section Description set the ASP.NET site navigation system, details refer to Chapter 12 ASP.NET debugging applications, you can Set whether the tracing application execution Set ASP.NET Web application components, details refer to Chapter 18 set the ASP.NET Web service, details refer to Chapter 18 11.7.2 appSetting with the connectionStrings section of the connection string parameters and in the Web section of the configuration file program you can create ASP.NET required parameters, ASP.NET 2.0 Add section, you can specify the database connection string. 1. Web web.config configuration file contents tag in the web.config file child tag and section, you can create parameters and database connection string, as shown below. ... ... ... the sub-tag tag is to create arguments, each tag can create a parameter , property key is the parameter name, value is the parameter value. tag in the sub-tag can also create connection string attribute name is the name, connectionString property is the connection string content. 2. Conifguration API based ASP.NET 2.0 Configuration API can access the web.config and machine.config configuration file to set data. In the ASP.NET program is to use the name space System.Web.Configuration WebConfigurationManager class to access the settings. First , import the required namespace, as follows. <% @ Import NameSpace = \ the Import command to import System.Web.Configuration namespace, and then they can get the parameters created section, as shown below. Dim dbType As String = WebConfigurationManager.AppSettings (\ Use the above code AppSettings property to get the specified parameters, using the key attribute tag. Section can also obtain the database connection string, as shown below. Dim pd, db As String pd = WebConfigurationManager.ConnectionStrings (_ \ db = WebConfigurationManager.ConnectionStrings (_ \ use the ConnectionStrings property to access the program code provider and the database parameter value, that tag name attribute. ASP.NET sample is a complete program Ch11-7-2.aspx, the table shows the performance results using the data table records, as shown in Figure 11-12. Figure 11-12 Ch11-7-2.aspx operating results Access Database on the map is a section of the application parameters, data tables is to use the GridView control to display record data, the database connection string is defined in the web.config file. 11.7.3 Session state settings in the sessionState section ASP.NET Session state management with the scalability, you can set the web.config file Session state management section, it belongs to sub-tags, as shown below. <sessionState cookieless = \ ... ... ... common property of the tag as shown in Table 11-10. Table 11-10 common attribute tag attribute Description mode Session state is stored in the location can be off (not stored), InProc (with Cookie), StateServer (using the state server) and SqlServer (stored in SQL Server) cookieless whether to use the Cookie store Session state. True is not in use, False to use timeout Session time limit, in minutes, default is 20 minutes, and its function as the Session object of the TimeOut property 11.7.4 globalization section of the code set subtags in localization of the relevant section is set, you can set the default file encoding ASP.NET program, request and response encoding, date and time formats, and digital and other localization settings as shown below. <globalization fileEncoding = \ requestEncoding = \ responseEncoding = \ culture = \ ... ... ... the tag property is set encoding gb2312, culture is a localized setting, zh-CN for the Chinese mainland. Related properties described in Table 11-11 below. Table 11-11 globalization section related properties attribute Description requestEncoding Request request encoding specified, the default is UTF-8 encoding, most of the coding requestEncoding and responseEncoding property should be the same responseEncoding Response response encoding specified, the default is UTF-8 encoding fileEncoding specified extension. aspx,. asmx and. asax file default encoding culture specify the localization of language areas, different regions have different date and time format, number and so the default localization settings property value on the table you can use the language culture and the area code, is a culture in Chinese language attribute values shown in Table 11-12. Table 11-12 culture property values can use the language and area code culture attribute value language or region zh-HK Hong Kong zh-MO Macau zh-CN China zh -SG Singapore zh-TW Taiwan zh-CHS Chinese Simplified zh-CHT Chinese Traditional 11.7.5 compilation compiled section setting marked in sub-section , you can set the default ASP.NET process compilation mode, as shown below. <compilation defaultLanguage = \ ... ... ... the tag property is set to open the default program language, and whether the debug mode. Related properties described in Table 11-13 below. Table 11-13 compilation section related properties attribute Description debug is turned on debug mode, do not open by default False, True to open defaultLanguage default programming language, such as C #, VB or PERL the default is VB explicit Microsoft Visual Basic is compiled using the explicit, that is, all variables declared in advance are required, the default value is True used in the web.config file compilation marking, as the beginning of the program files with ASP.NET Page Language and Debug command properties, as shown below. <% @ Page Language = \ 11.7.6 customErrors custom error page section child tag in section, you can set the ASP.NET custom error page program. For example, the error code HTTP 404, as shown in Figure 11-13. Figure 11-13 displays an error message the above error message is the default error page, the data shows page not found error. Section can be specified in the error page as shown below. <customErrors mode = \ ... ... ... The tag property is set mode On. Related properties described in Table 11-14 below. Table 11-14 customErrors section related properties attribute Description mode whether to start a custom error function, On the custom error handling for the start, then need to specify the defaultRedirect property, Off for the abolition of the custom error handling, RemoteOnly specify a custom error handling is only displayed on the remote client end, the local computer still shows the default ASP . NET error page, this is the default value defaultRedirect specified URL address, when an error is generated to redirect the page to this site, this example is shown Ch11-7error. htm page customErrors section have more than one error in the sub-tags, each tag could error HTTP error codes defined custom error page as shown below. use of the above error statusCode attribute tag specifies HTTP error code 404, if the error occurs, to redirect to redirect property value NotFoundError.htm page. |
All times are GMT. The time now is 11:08 PM. |
Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum