2014The Effects of a Single Session of Upper Alpha Neurofeedback

2014The Effects of a Single Session of Upper Alpha Neurofeedback
2014The Effects of a Single Session of Upper Alpha Neurofeedback

The Effects of a Single Session of Upper Alpha Neurofeedback for Cognitive Enhancement:A Sham-Controlled Study

C.Escolano ?M.Navarro-Gil ?J.Garcia-Campayo ?

J.Minguez

óSpringer Science+Business Media New York 2014

Abstract The minimization of the non-speci?c factors of neurofeedback (NF)is an important aspect to further advance in the understanding of the effects of these types of procedures.This paper investigates the NF effects of a single session (25min)of individual upper alpha enhancement following a sham-controlled experimental design (19healthy participants).We measured immediate effects after the training and 1-day lasting EEG effects (eyes closed resting state and task-related activity),as well as the event-locked EEG effects during the execution of a mental rotation task.These metrics were computed in trained (upper alpha)and non-trained EEG parameters (lower alpha and lower beta).Several cognitive functions were assessed such as working memory and mental rotation abilities.The NF group showed increased upper alpha power after training in task-related activity (not signi?-cantly sustained 1day after)and higher pre-stimulus power during the mental rotation task.Both groups improved cognitive performance,with a more prominent improve-ment for the NF group,however a single session seems to be insuf?cient to yield signi?cant differences between groups.A higher number of training sessions seems nec-essary to achieve long-lasting effects on the electrophysi-ology and to enhance the behavioral effects.

Keywords Neurofeedback áElectroencephalogram

(EEG)áIndividual upper alpha áCognitive performance áSingle session áSham feedback

Introduction

Neurofeedback (NF)promotes the self-regulation of brain activity by means of an operant conditioning paradigm.NF consists in measuring the brain activity (e.g.,via electroencephalogram,EEG)and providing the subjects with real-time feedback covarying with the brain patterns of interest.Several EEG-based NF studies have reported its ef?cacy in the treatment of neurological and psycho-logical disorders such as attention de?cit hyperactivity disorder (ADHD)and depression,among others (Niv

2013;Bas ?ar and Gu

¨ntekin 2008).NF research on healthy users has focussed on cognitive enhancement,in many cases by regulating the alpha rhythm (see Gruzelier 2013,for a review).

Alpha is the dominant rhythm in the human EEG,which is characterized by a ‘peak’in the (7–13)Hz power spectra,and seems to be related to cognitive functions such as cognition (Palva and Palva 2007)and working memory (Freunberger et al.2011;Klimesch et al.2007;Klimesch 1999;Sauseng et al.2009).The cognitive effects of regu-lating this rhythm by means of NF have been already explored (Gruzelier 2013;Vernon 2005).Despite the accumulated evidence on this procedure,the reliability and speci?city of the effects at both behavioral and electro-physiological level remain a common limitation (Gruzelier 2014;Vernon 2005).Some authors point out that such a limitation could be due to the high inter-subject variability of the alpha frequency band and the unspeci?c behavioral effects of regulating the entire band (Klimesch 1999).

C.Escolano (&)áJ.Minguez

Aragon Institute of Engineering Research (I3A),Zaragoza,Spain e-mail:cescolano@https://www.360docs.net/doc/4016738155.html,

M.Navarro-Gil áJ.Minguez

Bit &Brain Technologies SL,Zaragoza,Spain

J.Garcia-Campayo

Aragon Health Sciences Institute (IACS),Zaragoza,Spain

Appl Psychophysiol Biofeedback DOI 10.1007/s10484-014-9262-9

Recent alpha-based NF studies have tried to overcome these limitations by adjusting the alpha band individually (i.e.,per subject)using the Individual Alpha Frequency (IAF)as an anchor point(Klimesch1999)instead of using a?xed band,and focusing on the upper section of the alpha band,(IAF,IAF?2)Hz range,as it is hypothesized to selectively respond to cognitive demands(Klimesch1999). For instance,in a single-session NF study(Hanslmayr et al. 2005)the subjects performed combined trials of theta suppression and upper alpha enhancement(within-subjects design)and those who succeeded in enhancing upper alpha activity improved performance in a mental rotation task.In other studies the subjects performed a series of training sessions and cognitive improvements were reported on working memory(Escolano et al.2011;Nan et al.2012), mental rotation abilities(Zoefel et al.2011)and a variety of cognitive functions(Alexeeva et al.2012).

This paper builds on the aforementioned evidence on NF training procedures with the main objective of minimizing the non-speci?c factors of the training to further advance in the understanding of the effects of these types of proce-dures(common limitation to NF studies,see a discussion on Brandeis2011).An extensive evaluation of the effects on the electrophysiology was performed.Note that NF literature still lacks an extensive evaluation of the elec-trophysiological effects,especially on non-trained EEG parameters and during the execution of cognitive tasks, although some studies have partially addressed these issues (Zoefel et al.2011;Hanslmayr et al.2005).

This paper investigates the effects of a single-session NF procedure(25min of training)for cognitive enhancement, which follows a double-blind sham-controlled experimen-tal design with healthy subjects.Preliminary results were reported in Escolano et al.(2012,2013).The NF procedure focused on up-regulating the individual upper alpha power measured over the parieto-occipital area of the scalp.Non-speci?c factors were minimized by including a sham-feedback control group and by the short duration of the training.Note that a sham-controlled study provides a better consideration of non-speci?c factors such as moti-vation,expectancy and practice effects(Enriquez-Geppert et al.2013).A series of psychological tests and a cognitive task measured the effects on cognitive functions(working memory,attention,executive functions and mental rotation abilities).EEG analysis measured the effects on resting state and task-related activity immediately pre-and post-NF and1day after,as well as during training.Also,the effects on the event-locked EEG recorded during the pre-and post-executions of a mental rotation task were asses-sed.These effects were measured on the trained parameter (upper alpha),as well as in the surrounding frequency bands(lower alpha and lower beta).

Methods

Participants and Experimental Design

19engineering students of the University of Zaragoza participated in the study.Participants were randomly assigned either to the NF group(n=10,3females,mean?SD age:25:8?4:1years)or control group(n=9,2 females,24:3?3:7years).Participants were informed about the protocol of the study before signing the informed consent forms.They were told that all participants would perform a single session NF training to investigate the effects on cognitive performance.Participants were not informed about the existence of two groups to avoid

biases Appl Psychophysiol Biofeedback

(lack of motivation or effort since NF requires the active engagement of participants).Both groups performed the same experimental design with the only difference that the control group received sham feedback.Finally,participants were debriefed at the end of the study.The study was approved by the regional Ethics Board.

The design of the study is shown in Fig.1.In the?rst and third days,the psychological tests were carried out.In the second day,the NF training was performed with a pre-and post-EEG screening,and a pre-and post-execution of the cognitive task(EEG was recorded during the cognitive task).Finally,an EEG screening was also performed on the third day to assess1-day lasting effects on the EEG.

Psychological Tests and Cognitive Task

Psychological data collection comprised four tests:(i) Paced Auditory Serial Addition Task(PASAT,Gronwall 1977)evaluated working memory and processing speed. This test is sensitive to minimal changes in neurocognitive performance and presents high levels of internal consis-tency and test–retest reliability(Tombaugh2006).The test scores were the number of errors and elapsed time. (ii)Rey Auditory Verbal Learning Test(RAVLT,Rey 1964),Spanish version(Miranda and Valencia1997), evaluated retention and immediate evocation,verbal learning,remembering items after an interference task, and recognition(Lezak2004).The test score was the number of recognized words.(iii)Trail Making Test (TMT,Reitan1958)evaluated the information on visual search,scanning,processing speed,mental?exibility and executive functions.The test is composed of two parts: part A measured attention and concentration,and part B measured executive functions such as planning and mental ?exibility.The scores were the elapsed time to complete each part of the test.eivTStroop Color-Word Test (STROOP,Stroop1992)evaluated attention,concentra-tion,resistance to interference,and individual capacity to solve cognitive stress,inhibit interferences and process complex data(Lezak2004).The test score was the interference.

The cognitive task was adapted from a visuospatial Spanish test(Yela1969)and EEG was recorded during its execution.In each trial,a target and a test?gure were presented one above the other,and the subjects had to indicate(by pushing a button)whether the test?gure cor-responded to a rotated version of the target.Subjects were instructed to answer as quickly and accurately as possible. The test consisted of two phases of25trials each,with an inter-trial interval of2.5s.Each trial lasted7.5s and was composed of two time intervals:rest interval(à1:5,0)s,in which a?xation cross was displayed on the center of the screen,and task interval(0,6)s,in which the?gures were presented for6s.Note that(t=0)s denotes?gures onset. The test scores were the number of correct responses and reaction time.Responses within the task interval plus the inter-trial interval were taken into account and reaction times were computed for the correct responses.

Two-way repeated-measures ANOVA was separately conducted for each score with the between-subject factor Group(NF,Control)and the within-subject factor Time (Pre,Post).Paired samples t-tests were performed for within-group(pre vs.post)comparisons.

EEG Recording and Neurofeedback Procedure

EEG data was recorded from16electrodes placed at FP1, FP2,F3,Fz,F4,C3,Cz,C4,P7,P3,Pz,P4,P8,O1,Oz and O2(subset of the10/10system),with the ground and ref-erence electrodes on FPz and on the left earlobe,respec-tively.EEG was ampli?ed and digitized using a g.tec ampli?er(Guger Technologies,Graz,Austria)at a sam-pling rate of256Hz,power-line notch-?ltered at50Hz and (0.5–60)Hz band-pass?ltered.EEG recording and the NF procedure were developed using software of Bit&Brain Technologies,SL.

EEG Screenings

EEG screenings were carried out immediately before and after the NF training on Day2,as well as on Day3.For each EEG screening we recorded three-min of eyes closed resting state activity and three-min of eyes open task-related activity.In the latter,subjects faced a computer screen showing a square that changed saturation color randomly from gray to red or blue(gradually).Participants were instructed to count the number of saturation changes from gray to red as a cognitive challenge(Zoefel et al. 2011).

Neurofeedback Procedure

The NF training focused on the increase of upper alpha (UA)power averaged over parieto-occipital locations(P3, Pz,P4,O1and O2,referred to as feedback electrodes).The procedure consisted of two steps:calibration to individu-alize the training for each subject,and online training(5 trials of5min each).In both steps,EEG power was cal-culated through a short-term FFT with1s hamming win-dow,30ms of overlapping,and zero-padded to1,024 points(0.25Hz resolution).

In the calibration step,the pre-NF task-related EEG screening(Day2)was?ltered from artifacts:we auto-matically?ltered out the blinking component by Indepen-dent Component Analysis(ICA)using the FastICA algorithm(Hyvarinen1999)and removed the epochs with

Appl Psychophysiol Biofeedback

amplitude larger than200l V at any electrode.UA band was de?ned as the(IAF,IAF?2)Hz frequency range, where the Individual Alpha Frequency(IAF)was com-puted on the power spectra of the?ltered EEG data as the frequency bin with the maximum power value in the(7–13) Hz alpha range(Klimesch1999).Note that when no clear alpha peak was found,the UA band was computed on resting state activity instead.Finally,the baseline was computed as the mean UA power averaged across the feedback electrodes,and(5th-95th)percentiles established the lower and upper limits,respectively.After the cali-bration,the subjects performed the training trials.During training,EEG data was online?ltered from blinking arti-facts(through the aforementioned ICA?lter)and a visual feedback was then displayed every30ms on a computer screen in the form of a square with changing saturation colors.UA power values above the baseline were displayed in a red color scale with increasing saturation.Similarly, power values below the baseline were displayed in a blue color scale.The color scales ranged from0%saturation (baseline in gray color)to100%saturation in both blue and red color scales set by the lower and upper limits, respectively.

Before the beginning of the study we recorded the EEG of a healthy subject performing the same NF procedure.In our study,the NF group and the control group performed the same NF procedure except for the fact that all partic-ipants of the control group received feedback according to the aforementioned EEG recording,thus receiving the same feedback.

EEG Analysis

Of?ine EEG Pre-processing

The EEG data of each Day was cleaned from artifacts using a three-step procedure:?ltering of the blinking component by FastICA(Hyvarinen1999),epoch rejection by a time-domain thresholde[150l VTat any electrode,and epoch rejection by a frequency-domain threshold.In the latter step,we computed the power values for each epoch in the bands(1–4)Hz and(20–30)Hz,commonly affected by ocular and muscular artifacts(Delorme et al.2007),and outliers(z-score[2)at any electrode were removed.In the case of the EEG collected during the cognitive task,we applied an ICA?lter,and we further applied epoch rejec-tion in both time and frequency domains on a trial basis (instead of on an epoch basis).

Analysis of EEG Screenings and NF Trials

Immediate and1-day lasting effects were assessed in resting state and task-related activity.Immediate effects were measured as the power comparison between the pre-versus post-EEG screening of Day2(SCR.1vs.SCR.2, Fig.1).One-day lasting effects were measured as the power comparison between the pre-NF EEG screening versus EEG screening of Day3(SCR.1vs.SCR.3).In addition,training progress evaluated the power enhance-ment during training,measured as the power comparison between the baseline(task-related activity in pre-NF EEG screening)versus training trial?ve.We performed the analysis in the trained parameter(i.e.,UA power)and an exploratory analysis in the following bands,based on Klimesch(1999):lower alpha1,LA1=(IAF-4,IAF-2); lower alpha2,LA2=(IAF-2,IAF);and lower beta,LB= (IAF?2,IAF?4).

Analysis of Event-Locked EEG During the Cognitive Task The power in the pre-and post-executions of the cognitive task was computed in rest interval(à1:5,0)s,and task interval(0,6)s.Note that(t=0)s represents the?gures onset.Power was computed for each trial and averaged across trials.In addition,we computed the power desyn-chronization between rest and task intervals using two metrics:eiTabsolute power desynchronization,computed as the power in task interval minus the power in rest interval,andeiiTevent-related desynchronization(ERD), computed as the power in task interval minus the power in rest interval,normalized by the power in rest interval (Pfurtscheller and Lopes da Silva1999).Thus,the NF effects on the event-locked EEG were assessed by the pre-versus post-power comparison in rest and task intervals, and by the pre-versus post-power desynchronization comparison measured using the absolute metric and the relative metric(ERD).We performed the analysis in the trained parameter and an exploratory analysis in LA1,LA2 and LB bands.

Statistical Analysis

Between-group statistical signi?cance was assessed by independent samples t-tests on change scores.Paired samples t-tests were performed for within-group(pre vs. post)comparisons.Power vales were log-transformed prior statistical testing.Regarding the exploratory analysis in LA1,LA2,UA and LB bands,a non-parametric randomi-zation method using the t-max statistic was used to correct for the number of bands,i.e.,to control the familywise type I error rate(FWER,Holmes et al.1996).Following this method,the null distribution of the maximum absolute t-value across all bands was estimated by5,000random permutations.Then the absolute observed t-value for each band was tested against thee1àaTth percentile of the null distribution.The FWER was set at a?:05.

Appl Psychophysiol Biofeedback

IMMEDIATE EFFECTS ONE-DAY LASTING EFFECTS NF group

Control group

R E S T I N G

S T A T E NF group Control group

(B) EEG SCREENINGS AND NF TRIALS: POWER SPECTRA

pre- spectra post- spectra

0.511.520.5

11.520.511.52

0.5

11.52?5

5

μV

samples t-test:t17?à1:50;p?:15);and in task-related activity it was10:2?0:2Hz for the NF group and10:6?0:3Hz for the control group(t17?à1:05;p?:3).

Analysis of EEG Screenings and NF Trials

We?rst assessed the NF effects in the trained parameter(UA power).Regarding the resting state,no signi?cant difference appeared between groups(on change scores)either imme-diately after the training or the following day.Figure2a displays the UA power in task-related activity and during training.Task-related activity showed a between-group difference at statistical trend immediately after the training et17?1:88;p?:077T.Post-hoc t-tests showed a signi?cant increase for the NF groupet9?3:42;p\:01T,with an average increase of13.08%.These effects were not sig-ni?cantly sustained the following day.Training progress showed a between-group difference at statistical trend et17?1:81;p?:089T.Post-hoc t-tests showed a statistical trend for the NF groupet9?1:94;p?:084T,with an average increaseof51.22%.The higher effects in the latter metrics were found in posterior areas of the scalp.In addition to that, we measured the training progress as the trend(slope of a?tted regression line)of the power values of the baseline and?ve NF trials(see Fig.2a).The average slope was0.11for the NF group(signi?cantly higher than zero,t9?1:86;p?:048) and0.02for the control group(non signi?cant,n.s.).

We assessed the EEG effects in three alpha sub-bands and lower beta(LA1,LA2,UA,LB).Figure2b displays the pre-and post-EEG power spectra in immediate and1-day lasting effects,as well as the training progress.Note that the statistical results below reported were corrected for the multiple bands using a t-max randomization procedure (Holmes et al.1996).No signi?cant between-group dif-ferences(on change scores)appeared in resting state either immediately after training or the following day.Regarding the immediate effects in task-related activity,we found a signi?cant between-group difference in LA2band(thresh-old t=2.801,t?3:69;p?:01).Post-hoc t-tests showed a signi?cant increase for the NF group(threshold t=2.98, t?4:06;p\:01),with an average increase of50.93%.No signi?cant1-day lasting effects appeared in task-related activity.Finally,a between-group difference in training progress appeared in LA2band at statistical trend(thresh-old t=2.74,t?2:45;p?:085).Post-hoc t-tests showed a signi?cant increase for the NF group(threshold t=2.69, t?4:14;p\:005),with an average increase of74.55%. No signi?cant pre-versus post-changes appeared for the control group.Analysis of Event-Locked EEG During the Cognitive Task

We?rst assessed the NF effects in UA power.Figure3a depicts the UA power time-course:absolute power time-course and ERD metric.Note that the absolute power time-course allows to observe the pre-and post-power changes in each trial interval(rest,task).The UA power in rest interval showed a between-group difference(on change scores)at statistical trendet17?1:96;p?:067T.Post-hoc t-tests showed a signi?cant increase for the NF group et9?3:97;p\:005T,with an average increase of16.61%. The higher effects were found in posterior areas of the scalp.No signi?cant effects appeared for the task interval.

A desynchronization pattern was apparent,showing an UA power decrease after the?gures onset for both groups and pre-and post-executions(Fig.3a).This pattern is in line with other studies performing similar mental rotation tasks (Hanslmayr et al.2005;Klimesch et al.2003).A between-group difference at statistical trend was found in absolute power desynchronizationet17?à1:99;p?:063T.Post-hoc t-tests showed a signi?cant increase for the NF group et9?à2:53;p?:032T,with an average increase of 2:2l V2.Note that a positive difference denotes an increase in desynchronization.

We assessed the EEG effects in three alpha sub-bands and lower beta(LA1,LA2,UA,LB).Figure3b displays the time-frequency analysis in the(IAF-4,IAF?4)Hz range,showing the initial and change(pre vs.post)absolute power values for each group.Note that the statistical results below reported were corrected for the multiple bands(Holmes et al.1996). We did not found signi?cant differences between groups(on change scores)in any band and metric.We further conducted pre-versus post-t-tests within each group.A signi?cant increase appeared in LA2band for the NF group in rest interval(threshold t=3.17,t?4:52;p?:006),with an average increase of29.9%;as well as in task interval (threshold t=3.01,t?4:10;p?:007),with an average increase of12.1%.These effects in LA2power can be observed in Fig.3b.No signi?cant pre-versus post-changes appeared for the control group.

Behavioral Results

This section analyzes the NF effects on cognitive per-formance measured by a battery of psychological tests (targeting functions such as working memory,episodic memory,attention,concentration,and executive func-tions)and the cognitive task(mental rotation abilities). Table1summarizes the scores in the psychological tests and cognitive task.

1The t thresholds reported throughout this paper(for the t-max

randomization procedure)were computed at(a=.05).

Appl Psychophysiol Biofeedback

We assessed the between-group differences by the Group ?Time interaction in the ANOVAs.A signi?cant effect appeared in part B of TMT test (F 1;17?4:51,p ?:049).Post-hoc t -tests showed that both groups improved performance (NF:t 9?à4:26;p \:005;Control:t 8?à3:52;p \:01),with a higher improvement for the NF

?5

5

NF group

Control group

I n i t i a l s c o r e s

C h a n g e s c o r e s

(B) EVENT-LOCKED EEG EFFECTS: ABS. POWER TIME-FREQUENCY MAPS

μV

2

μV

2

effects on event-locked EEG during the pre-and post-a cognitive task.a displays the UA power time-course.

?gures show the ERD measurement (Pfurtscheller and Lopes 1999):UA power in each time instant was normalized to the interval.Bottom ?gures show the absolute UA power.

Topoplots display the averaged pre-and post-power difference in both rest and task intervals.b displays the absolute frequency maps in the initial (pre-execution)and change vs.post-execution)for each group.The (IAF-4,IAF ?4)Hz range is displayed (covering LA 1,LA 2,UA,and LB frequency Appl Psychophysiol Biofeedback

group.No signi?cant between-groups differences appeared for the other scores.We further conducted pre-versus post-t-tests within each group as an exploratory analysis.PA-SAT test showed a decrease in the number of errors for the NF group only(t9?à3:05;p?:014),whereas the time elapsed decreased for both the NF(t9?à5:28;p\:001) and control group(t8?à3:84;p?:005).The number of recognized words in the RAVLT test increased for the NF group only(t9?2:59;p?:029).Part A of the TMT test improved for the control group only(t8?à2:47;p?:039). The interference score in the STROOP test did not signi?-cantly change for any group.Regarding the cognitive task,the number of correct responses increased for both the NF(t9?3:33;p\:01)and the control group(t8?3:61;p\:01).The reaction time decreased for the NF group only(t9?à5:18;p\:001).

Discussion

This manuscript reports the results of a single-session NF procedure for cognitive enhancement in healthy subjects. The NF training aimed at enhancing the individual upper alpha power measured over parieto-occipital locations.A double-blind sham-controlled study was designed within a short procedure(25min of training)to minimize the non-speci?c factors of the training,which is a common claim to NF studies(Brandeis2011).To the best of our knowledge, there is not a standard procedure to compute/provide sham feedback.In the current study,all participants in the control group received the same feedback based on the EEG signal of a single subject(not included in the study).The objec-tive of the study was to investigate the NF effects on several cognitive functions(working memory,episodic memory,attention,concentration,executive functions and mental rotation abilities)and to perform an extensive evaluation of the effects on the electrophysiology.Note that the reliability and speci?city of the NF effects at behavioral and electrophysiological level remain a com-mon limitation(Gruzelier2014;Vernon2005).

EEG Results

The EEG analysis of the EEG screenings and NF trials showed that upper alpha power was enhanced for the NF group only,measured immediately after training in task-related activity,and during training.The higher effects were found in posterior areas of the scalp.These effects were not restricted to the upper alpha band:lower alpha2 showed a higher increase than the corresponding increase in upper alpha(in the same metrics).These effects may be due to a0.1Hz decrease in the IAF immediately after training(independent samples t-test:t17?à2:33;p?:03), which reduced the effects on upper alpha while increasing the effects on the lower sections(see Fig.2b).Note that Escolano et al.(2011)also reported an IAF decrease immediately after training.The IAF decrease was not sustained1day after,which is consistent with previous studies(Escolano et al.2011;Zoefel et al.2011).No sig-ni?cant1-day lasting effects appeared for any group.Eyes closed resting state activity was not signi?cantly modi?ed for any group,which suggests that this procedure presents

Table1Pre-and change scores(mean?SEM)on the behavioral results for each group

Test NF Control Paired-samples t-test ANOVA Scores Pre Change Pre Change NF Control G9T mean(SEM)mean(SEM)mean(SEM)mean(SEM)t-val p-val t-val p-val F-val p-val

PASAT

#Errors 6.70(1.03)-3.10(1.02) 4.11(1.03)-1.33(0.90)23.05.014-1.49.176 1.67.214 Time(s)199.93(18.12)-42.09(7.97)174.24(19.83)-33.47(8.72)25.28\.001-3.84.0050.53.475 RAVLT

#Recognized words13.90(0.41)0.90(0.35)13.67(0.53)0.89(0.54) 2.59.029 1.65.1370.00.986 TMT

Part A,time(s)27.16(3.59)-6.15(3.03)27.07(3.92)-6.64(2.69)-2.03.07322.47.0390.01.905 Part B,time(s)53.98(4.11)-17.24(4.04)36.10(3.54)-7.27(2.07)24.26.00223.52.008 4.51.049 STROOP

Interference 3.17(1.94) 3.60(3.66)10.54(3.07) 2.69(1.38)0.98.351 1.95.0880.05.826 COGN.TASK

#Correct responses41.20(1.40) 4.00(1.20)39.00(0.99) 2.33(0.65) 3.33.009 3.61.007 1.40.253 Reaction time(s) 4.49(0.32)-0.68(0.13) 4.14(0.22)-0.44(0.22)25.18\.001-2.02.0780.93.349

The t-and p-values of the paired-samples t-tests are shown for each group(pre vs.post changes),as well as the F-and p-values of the Group?Time interaction in the ANOVAs.Signi?cant effects are marked boldep\:05T

Appl Psychophysiol Biofeedback

lower effects on this type of activity.In relation to other works,upper alpha NF studies reported no modi?cations in lower alpha and lower beta(Escolano et al.2011;Zoefel et al.2011),however they followed a different de?nition for the frequency bands(herein the most common de?ni-tion was adopted,Klimesch1999).

The analysis of the event-locked EEG effects during the execution of the mental rotation task showed that the NF group enhanced upper alpha power in the rest interval(pre-stimulus)immediately after training.Power in task interval was not signi?cantly modi?ed for any group.As a conse-quence,the NF group increased upper alpha desynchroni-zation measured using absolute power measurements.Note that this desynchronization increase was already suggested to be positively related to cognitive performance(Klimesch et al.2007).These results are in line with a previous study involving a mental rotation task(Hanslmayr et al.2005). Similarly to the effects in the EEG screenings and NF trials,lower alpha2power showed a signi?cant increase for the NF group(no signi?cant between groups)in both rest and task intervals(see Fig.3b).

Behavioral Results

The NF group performed better than the control group in all the scores(except for part A of TMT test),but with no signi?cant difference between groups(except for part B of TMT test,in which the NF group performed signi?cantly better).In addition to that,some scores were improved for the NF group only such as the number of errors in the PASAT test(working memory is suggested to be related to alpha rhythm,Freunberger et al.2011;Klimesch et al. 2007),the number of recognized words in the RAVLT test and the reaction time in the mental rotation task.However, the improvement in these scores was not signi?cantly superior to the improvement observed in the control group.

These effects in cognitive performance might be explained by a strong learning effect due to repeated measurements(30min between test–retest in the cognitive task,and1day in the psychological tests)and by the short duration of the training,which might be insuf?cient to yield signi?cant differences between groups.Note that NF effects on the EEG were not sustained at the post-NF administration of the psychological tests,which may have diminished the behavioral effects.In relation to other works,a previous study(Hanslmayr et al.2005)compris-ing a single-session training of combined trials of theta suppression and upper alpha enhancement(within-subjects design)led to improved performance in a mental rotation task for the subjects that responded to the upper alpha NF. The difference to the results herein presented may be due to the fact that a within-subject design could have better dealt with the between-group variability in baseline scores.Limitations

Deception was used to blind the participants to the exper-imental condition.When debrie?ng the participants we could have asked them to‘‘guess’’the condition they were assigned.This point should be considered in future studies.

A limitation of the behavioral analysis was the high base-line scores(e.g.,the number of correct responses in the cognitive task was41:2=50and39=50for the NF and control group),which left little margin for improvement. The degree of dif?culty of the psychological tests or cog-nitive tasks should be adapted to the participants in future studies,and cut-off scores could be established.Finally,a larger sample size would be desirable to increase the sta-tistical power.

Conclusions

This paper showed that25min of NF training produced electrophysiological effects for the NF group only,show-ing an upper alpha power enhancement immediately after the training in task-related activity(not sustained1day after),and during training.The NF group presented higher pre-stimulus upper alpha power during the mental rotation task and consequently higher event-locked power desyn-chronization.Regarding the behavioral results,the NF group showed higher performance improvement than the control group,however no signi?cant difference between groups was obtained.Thus,although the electrophysio-logical basis supporting the cognitive enhancement can be obtained in a single session,25min of NF training seem not enough to produce sustained effects on the EEG and to reach signi?cance level(between groups)in cognitive performance.A higher number of training sessions is thus necessary to achieve long-lasting effects on the electro-physiology and enhance the behavioral results. Acknowledgments This research has been partially supported by Spanish Ministry of Science projects HYPER-CSD2009-00067and DPI2009-14732-C02-01,DGA-FSE,grupo T04.

References

Alexeeva,M.V.,Balios,N.V.,Muravlyova,K.B.,Sapina,E.V.,& Bazanova,O.M.(2012).Training for voluntarily increasing individual upper alpha power as a method for cognitive enhancement.Human Physiology,38(1),40–48.

Bas?ar,E.,&Gu¨ntekin,B.(2008).A review of brain oscillations in cognitive disorders and the role of neurotransmitters.Brain Research,1235,172–193.

Brandeis,D.(2011).Neurofeedback training in ADHD:More news on speci?city.Clinical Neurophysiology,122(5),856–857. Delorme,A.,Sejnowski,T.,&Makeig,S.(2007).Enhanced detection of artifacts in EEG data using higher-order statistics and indepen-dent component analysis.Neuroimage,34(4),1443–1449.

Appl Psychophysiol Biofeedback

Enriquez-Geppert,S.,Huster,R.J.,&Herrmann, C.S.(2013).

Boosting brain functions:Improving executive functions with behavioral training,neurostimulation,and neurofeedback.Inter-national Journal of Psychophysiology,88(1),1–16. Escolano,C.,Aguilar,M.,&Minguez,J.(2011).EEG-based upper alpha neurofeedback training improves working memory per-formance.In International conference of the IEEE Engineering in Medicine and Biology Society(EMBC),Boston(USA), pp.2327–2330.

Escolano,C.,Olivan,B.,Lopez-del-Hoyo,Y.,Garcia-Campayo,J.,& Minguez J.(2012).Double-blind single-session neurofeedback training in upper-alpha for cognitive enhancement of healthy subjects.In International conference of the IEEE Engineering in Medicine and Biology Society(EMBC),San Diego(USA), pp.4643–4647.

Escolano,C.,Olivan,B.,Lopez-del-Hoyo,Y.,Garcia-Campayo,J.,& Minguez,J.(2013).Upper-alpha neurofeedback training for cognitive enhancement:A single-session study.In Converging clinical and engineering research on neurorehabilitation, Springer,pp.1281–1286.

Freunberger,R.,Werkle-Bergner,M.,Griesmayr,B.,Lindenberger, U.,&Klimesch,W.(2011).Brain oscillatory correlates of working memory constraints.Brain Research,1375,93–102. Gronwall,D.M.A.(1977).Paced auditory serial-addition task:A measure of recovery from concussion.Perceptual and Motor Skills,44(2),367–373.

Gruzelier,J.H.(2013).EEG-neurofeedback for optimising perfor-mance.I:A review of cognitive and affective outcome in healthy participants.Neuroscience&Biobehavioral Reviews,44, 124–141.

Gruzelier,J.H.(2014).EEG-neurofeedback for optimising perfor-mance.III:A review of methodological and theoretical consid-erations.Neuroscience&Biobehavioral Reviews,44,159–182. Hanslmayr,S.,Sauseng,P.,Doppelmayr,M.,Schabus,M.,& Klimesch,W.(2005).Increasing individual upper alpha power by neurofeedback improves cognitive performance in human subjects.Applied Psychophysiology and Biofeedback,30,1–10. Holmes,A.P.,Blair,R.,Watson,G.,&Ford,I.(1996).Nonpara-metric analysis of statistic images from functional mapping experiments.Journal of Cerebral Blood Flow&Metabolism, 16(1),7–22.

Hyvarinen, A.(1999).Fast and robust?xed-point algorithms for independent component analysis.IEEE Transactions on Neural Networks,10(3),626–634.

Klimesch,W.(1999).EEG alpha and theta oscillations re?ect cognitive and memory performance:A review and analysis.

Brain Research Reviews,29(2–3),169–195.Klimesch,W.,Sauseng,P.,&Gerloff, C.(2003).Enhancing cognitive performance with repetitive transcranial magnetic stimulation at human individual alpha frequency.European Journal of Neuroscience,17(5),1129–1133.

Klimesch,W.,Sauseng,P.,&Hanslmayr,S.(2007).EEG alpha oscillations:The inhibition-timing hypothesis.Brain Research Reviews,53(1),63–88.

Lezak,M.D.(2004).Neuropsychological assessment.New York: Oxford University Press.

Miranda,J.P.,&Valencia,R.R.(1997).English and Spanish versions of a memory test:Word-length effects versus spoken-duration effects.Hispanic Journal of Behavioral Sciences,19(2), 171–181.

Nan,W.,Rodrigues,J.P.,Ma,J.,Qu,X.,Wan,F.,Mak,P.I.,et al.

(2012).Individual alpha neurofeedback training effect on short term memory.International Journal of Psychophysiology,86(1), 83–87.

Niv,S.(2013).Clinical ef?cacy and potential mechanisms of neurofeedback.Personality and Individual Differences,54(6), 676–686.

Palva,S.,&Palva,J.M.(2007).New vistas for alpha-frequency band oscillations.Trends in Neurosciences,30(4),150–158. Pfurtscheller,G.,&Lopes da Silva,F.H.(1999).Event-related EEG/ MEG synchronization and desynchronization:Basic principles.

Clinical Neurophysiology,110(11),1842–1857.

Reitan,R.M.(1958).Validity of the Trail Making Test as an indicator of organic brain damage.Perceptual and Motor Skills, 8(3),271–276.

Rey,A.(1964).L’examen clinique en psychologie.Paris:Presses Universitaires de France.

Sauseng,P.,Klimesch,W.,Heise,K.F.,Gruber,W.R.,Holz,E.,Karim,

A.,et al.(2009).Brain oscillatory substrates of visual short-term

memory capacity.Current Biology,19(21),1846–1852. Stroop,J.R.(1992).Studies of interference in serial verbal reactions.

Journal of Experimental Psychology:General,121(1),15. Tombaugh,T.N.(2006).A comprehensive review of the Paced Auditory Serial Addition Test(PASAT).Archives of Clinical Neuropsychology,21(1),53–76.

Vernon,D.J.(2005).Can neurofeedback training enhance perfor-mance?An evaluation of the evidence with implications for future research.App Psychophysiology and Biofeedback,30, 347–364.

Yela,M.(1969).Rotacio′n de?guras macizas[Rotation of solid ?gures].Madrid:TEA.

Zoefel,B.,Huster,R.J.,&Herrmann,C.S.(2011).Neurofeedback training of the upper alpha frequency band in EEG improves cognitive performance.NeuroImage,54(2),1427–1431.

Appl Psychophysiol Biofeedback

坚定不移贯彻新发展理念

第十讲坚定不移贯彻新发展理念 党的十八大以来,习近平总书记顺应时代和实践发展的新要求,坚持以人民为中心的发展思想,鲜明提出要坚定不移贯彻创新、协调、绿色、开放、共享的新发展理念,引领我国发展全局发生历史性变革。新发展理念集中体现了我们党对新的发展阶段基本特征的深刻洞察和科学把握,标志着我们党对经济社会发展规律的认识达到了新的高度,是我国经济社会发展必须长期坚持的重要遵循。 一、引领我国发展全局深刻变革的科学指引 创新、协调、绿色、开放、共享的新发展理念不是凭空得来的,而是在深刻总结国内外发展经验教训、分析国内外发展大势的基础上形成的,也是针对我国发展中的突出矛盾和问题提出来的。新发展理念深刻揭示了实现更高质量、更有效率、更加公平、更可持续发展的必由之路,是引领我国发展全局深刻变革的科学指引,对于进一步转变发展方式、优化经济结构、转换增长动力,推动我国经济实现高质量发展具有重大指导意义。 新发展理念是针对我国经济发展进入新常态、世界经济复苏乏力形势提出的治本之策。党的十八大以来,面对极其错综复杂的国内外经济形势,以习近平同志为核心的党中央审时度势,从我国经济发展的阶段性特征出发,作出我国经济发展进入新常态的战略判断。世界经济在大调整大变革之中也出现了一些新的变化趋势,2008年国际金融危机深层次影响持续蔓延,西方国家结束黄金增长期,世界经济进入深度调整期,国际贸易低迷,金融市场跌宕起伏,保护主义明显抬头。面对这种新变化新情况,再沿袭粗放发展模式、简单地追求增长速度,显然行不通,必须确立新发展理念来引领和推动我国经济从高速增长阶段转向高质量发展阶段,不断开创经济发展新局面。 新发展理念是针对当前我国发展面临的突出问题和挑战提出的战略指引。我国物质基础雄厚、人力资本丰富、市场空间广阔、发展潜力巨大,经济发展方式加快转变,新的增长动力正在孕育形成,经济长期向好基本面没有改变。同时,发展不平衡不充分的一些突出问题尚未解决,发展质量和效益还不高,创新能力不够强,实体经济水平有待提高,生态环境保护任重道远;民生领域还有不少短板,脱贫攻坚任务艰巨,城乡区域发展和收入分配差距依然较大,群众在就业、教育、医疗、居住、养老等方面面临不少难题;等等。这些问题,必须着力加以解决。新发展理念就是针对这些问题提出的。创新发展注重解决发展动力问题,

深入理解ServletJSP之Cookie和Session原理

由于H T T P协议的无状态特征,W e b应用中经常使用C o o k i e和S e s s i o n来保存用户在与系统交互过程中的状态数据。下面通过分析H T T P协议对C o o k i e和S e s s i o n的工作原理加以了解。 一、C o o k i e C o o k i e的含义是“服务器送给浏览器的甜点”,即服务器在响应请求时可以将一些数据以“键-值”对的形式通过响应信息保存在客户端。当浏览器再次访问相同的应用时,会将原先的C o o k i e通过请求信息带到服务器端。 下面的S e r v l e t展示了C o o k i e的功能。 ......... p u b l i c v o i d d o G e t(H t t p S e r v l e t R e q u e s t r e q u e s t,H t t p S e r v l e t R e s p o n s e r e s p o n s e) t h r o w s S e r v l e t E x c e p t i o n,I O E x c e p t i o n{ r e s p o n s e.s e t C o n t e n t T y p e("t e x t/h t m l"); P r i n t W r i t e r o u t=r e s p o n s e.g e t W r i t e r(); S t r i n g o p t i o n=r e q u e s t.g e t P a r a m e t e r("o p t i o n"); i f("s h o w".e q u a l s(o p t i o n)){ //获得请求信息中的C o o k i e数据 C o o k i e[]c o o k i e s=r e q u e s t.g e t C o o k i e s(); i f(c o o k i e s!=n u l l){ //找出名称(键)为“c o o l”的C o o k i e f o r(i n t i=0;i"+c o o k i e s[i].g e t N a m e()+":" +c o o k i e s[i].g e t V a l u e()+""); } } } }e l s e i f("a d d".e q u a l s(o p t i o n)){ //创建C o o k i e对象 C o o k i e c o o k i e=n e w C o o k i e("c o o l","y e a h!"); //设置生命周期以秒为单位 c o o k i e.s e t M a x A g e(20); //添加C o o k i e r e s p o n s e.a d d C o o k i e(c o o k i e); }

nginx设置rewrite规则

Nginx 设置rewrite规则 Windows下环境为wamp ,在wamp 环境下,设置rewite规则时,很是简单,只需要打开Apache配置中的rewrite规则,项目中使用rewrite规则时只需创建.htaccess文件,在文件中编写规则,Apache会自动进行解析,但是在linux下则有些不一样。 Linux下环境若是lamp,则和wamp下是相同的,但当环境为lnmp时,需要注意进行如下配置方法: 根据所安装的环境情况,如果环境是lnmp集成环境,在配置rewrite规则时,因为集成环境,在安装完毕后,在安装的目录/usr/local/nginx/conf下,会生成一个文件“wordparss”,这个文件中是专门用于写rewrite规则所用,你可以在这个文件中书写rewrite规则,nginx 的rewrite规则与Apache的规则基本是相同的,只是在文件中书写的方法不同,wordpaess 问件中默认是有一个规则的,如: 利用location加载访问路径,“/”,指代由访问路径的根目录开始, 用if对加载的路径$request_filename 进行验证: 1 、-f 和!-f 用来判断文件是否存在 2、-d 和!-d 用来判断目录是否存在 3 、-e 和!-e 用来判断文件或目录是否存在 4、-x 和!-x 用来判断文件是否可执行 Flag标记: 1、last 相当于Apache里的[L]标记,表示完成rewrite 2、break 终止匹配, 不再匹配后面的规则 3、redirect 返回302临时重定向地址栏会显示跳转后的地址 4、permanent 返回301永久重定向地址栏会显示跳转后的地址 因为在lnmp集成环境下要配置虚拟域名是可以进行自动生成的,生成后会在/usr/local/nginx/conf/vhost 下生成一个以虚拟域名的名字的文件,如:lin_hp.its.conf,而所对应的rewrite规则最好在与域名相对应的配置文件中进行配置,这样不会说,如果有多个域名时,他们所对应的rewrite规则不同,在公共的wordpress文件中配置引起冲突,所配置的方法与在wprdpress文件中是相同的,如:

nginx安装手册

Nginx安装手册 1nginx安装环境 nginx是C语言开发,建议在linux上运行,本教程使用Centos6.5作为安装环境。 ?gcc 安装nginx需要先将官网下载的源码进行编译,编译依赖gcc环境,如果没有gcc环境,需要安装gcc:yum install gcc-c++ ?PCRE PCRE(Perl Compatible Regular Expressions)是一个Perl库,包括perl 兼容的正则表达式库。nginx的http模块使用pcre来解析正则表达式,所以需要在linux上安装pcre库。yum install -y pcre pcre-devel 注:pcre-devel是使用pcre开发的一个二次开发库。nginx也需要此库。 ?zlib zlib库提供了很多种压缩和解压缩的方式,nginx使用zlib对http包的内容进行gzip,所以需要在linux上安装zlib库。 yum install -y zlib zlib-devel ?openssl OpenSSL 是一个强大的安全套接字层密码库,囊括主要的密码算法、常用的密钥和证书封装管理功能及SSL协议,并提供丰富的应用程序供测试或其它目的使用。 nginx不仅支持http协议,还支持https(即在ssl协议上传输http),所以需要在linux 安装openssl库。 yum install -y openssl openssl-devel 2编译安装 将nginx-1.8.0.tar.gz拷贝至linux服务器。 解压: tar -zxvf nginx-1.8.0.tar.gz cd nginx-1.8.0 1、configure ./configure --help查询详细参数(参考本教程附录部分:nginx编译参数) 参数设置如下: ./configure \

APPlication,Session和Cookie的区别

APPlication,Session 和Cookie 的区别 方法信息量大小 保存时间应用范围保存位置 Application 任意大小整个应用程序的生命期 所有用户服务器端Session 小量,简单的数据用户活动时间+一段延迟时间(一般为20分钟) 单个用户服务器端Cookie 小量,简单的数据可以根据需要设定 单个用户客户端1.Application 对象 Application 用于保存所有用户的公共的数据信息,如果使用Application 对象,一个需要考虑的问题是任何写操作都要在Application_OnStart 事件(global.asax)中完成.尽管使用Application.Lock 和Applicaiton.Unlock 方法来避免写操作的同步,但是它串行化了对Application 对象的请求,当网站访问量大的时候会产生严重的性能瓶颈.因此最好不要用此对象保存大的数据集合 2.Session 对象 Session 用于保存每个用户的专用信息.她的生存期是用户持续请求时间再加上一段时间(一般是20分钟左右).Session 中的信息保存在Web 服务器内容中,保存的数据量可大可小.当Session 超时或被关闭时将自动释放保存的数据信息.由于用户停止使用应用程序后它仍然在内存中保持一段时间,因此使用Session 对象使保存用户数据的方法效率很低.对于小量的数据,使用Session 对象保存还是一个不错的选择.使用Session 对象保存信息的代码如下:// 存放信息Session["username"]="zhouhuan";//读取数据string UserName=Session["username"].ToString(); 3.Cookie 对象 Cookie 用于保存客户浏览器请求服务器页面的请求信息,程序员也可以用它存放非敏感性的用户信息,信息保存的时间可以根据需要设置.如果没有设置Cookie 失效日期,它们仅保存到关闭浏览器程序为止.如果将Cookie 对象的Expires 属性设置为Minvalue,则表示Cookie 永远不会过期.Cookie 存储的数据量很受限制,大多数浏览器支持最大容量为4096,因此不要用来保存数据集及其他大量数据.由于并非所有的浏览器都支持Cookie,并且数据信息是以明文文本的形式保存在客户端的计算机中,因此最好不要保存敏感的,未加密的数据,否则会影响网站的安全

全面从严治党是全面建成小康社会的根本保证

龙源期刊网 https://www.360docs.net/doc/4016738155.html, 全面从严治党是全面建成小康社会的根本保证 作者:张明学 来源:《青年时代》2018年第02期 摘要:中国共产党“四个全面”战略布局之间是既相互贯通又紧密联系的统一体,即“全面建成小康社会”是处于统领地位的战略目标,而“全面深化改革”、“全面推进依法治国”、“全面从严治党”是实现这一目标的三大战略举措。本文试从全面从严治党和全面建成小康社会两个维度作为重点阐述二者之间的辩证关系,深刻理解全面从严治党是全面建成小康社会的根本保证这一原理。 关键词:四个全面;中国梦;党的建设 实现全面建成小康社会是一个需要打组合拳的新模式过程,我国是一个拥有13多亿人口的发展中大国,全面深化改革是实现全面建成小康社会的不竭动力,但是改革的过程是破旧立新,存在着“阵痛”,会“牵一发而动全身”,涉及的利益冲突和矛盾是方方面面的。常言说:“打铁还需自身硬”。要确保党始终成为推进各项事业改革的坚强领导核心,就必须全面从严治党,加强和改善党的领导。 一、全面深化改革必须不断加强和改善党的领导 首先,要牢牢把握全面深化改革的正确方向,必须在思想上从严治党,因为只有思想一致,才能步调一致。全面深化改革,就必须下狠心,开猛药,对一些已经固化的利益集团开炮,在整个过程中必须要认识到改革的艰难,如果不形成合力,就不可能获得真正的成功。要必须把广大党员干部的思想认识统一到中央的决策上来,把中央的各项部署分解和落实到广大干部群众实际工作中,确保全面深化改革能够沿着有利于党和人民事业发展的方向不断前进。一是要在思想上从严治党,就必须以思想理论建设为根本,重点抓好学习中央的各项决议决策和习近平总书记的系列讲话精神,引导和教育党员干部政治素养不断提高,促使大家矢志不渝为中国特色社会主义共同理想而奋斗;二是要以党性教育为抓手,以“三严三实”精神和“两学一做”活动为契机重点抓好党的优良传统和作风建设,教育引导党员干部特别是领导干部要牢固树立正确的世界观、权力观、事业观;三是要以道德建设为基础,重点抓好四德素养的提高,培育和践行各级干部对社会主义核心价值观的高度认同,教育引导党员干部做社会主义道德的示范者和维护者。 其次,全面深化改革过程中各项决策的形成和推进,必须加强和突显各级领导的责任意识。全面深化改革会牵涉到经济、政治、文化、社会、生态文明和党的建设等多个领域,会对一系列体制机制进行大刀阔斧的改革,是一项事关复杂利益进行不断调整的系统工程。因此,每一项改革措施的决策和推进,都需要站在全局的高度进行整体谋划、协调推进,在决策的过

nginx配置解析详解(一)

nginx配置解析详解(一) 现在针对nginx源码分析的blog和文章已经很多了,之前我也看过不少,大家的分析都很不错。太多重复的内容就不写了,主要想针对在我分析代码和查阅blog的过程中,发现的一些比较晦涩或者某些细节有待展开讨论的地方,给出我的自己理解和看法,希望跟大家交流和学习。 使用的nginx版本是nginx-1.0.6,我最开始看的代码是0.7.62,新的版本在功能和稳定性上做了很多的工作。在分析的时候,我尽量简单明了,不太重要的地方一带而过,具体地大家可以去读代码。相对复杂或者晦涩的地方,将详细展开。 首先我们从配置文件开始,下面的分析是建立在网友对nginx的配置文件结构有大概熟悉为前提,这样才可以很好的理解代码。这里有必要提醒一点:原始代码目录中 ngx_modules这个结构,是找不到它的定义和初始化,要看到它,你必须执行configure,make,在原来的代码目录下会出现一个objs文件夹,里面的3个文件ngx_auto_config.h,ngx_auto_headers.h,ngx_modules.c,需要在建source insight工程时也包含进去,这样有利于我们把握整个代码结构。有意思的是,nginx的configure文件是作者手工写的,里面有许多管理代码工程的方法,有时间的话,也是值得学习下的。 1.ngx_cycle_t *ngx_init_cycle(ngx_cycle_t *old_cycle); 配置文件的解析相关的处理主要在ngx_init_cycle函数中被调用。既然如此,我们就先说说ngx_init_cycle函数吧。 它需要一个参数类型为ngx_cycle_t *,返回值也是一个ngx_cycle_t*,与此同时我们注意到参数名为old_cycle,那么这个函数的作用是啥呢?很明显是由old得到一个new。其中ngx_cycle_t的结构保存一些全局的配置和信息。 这个函数具体作用将在reconfig(重读配置文件)的时候得到体现,可以理解为old_cycle 是当前正在使用的配置信息,当配置文件做了某些修改之后,ngx_init_cycle通过old_cycle 中的一些数据,对new_cycle进行一些设置,在经过进一步的配置解析之后,就可以得到一个new cycle。 2.char *ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename) 当我们使用sourceinsight查看这个函数的调用情况时,会发现调用它的地方很多。其实,入口点就在ngx_init_cycle中对ngx_conf_parse调用,后面的所有的调用可以看作是在此之后的递归调用。为什么会是这个样子呢?原因在于nginx是一边读取配置信息,一边解析执行相关的处理,具体一点讲,就是“读一行,执行一行”,一行的定义在这里是指以分号或者是“{”和“}”等结尾的一行,例如:我们解析到http {},我们就调用针对httpblock的处理,在处理的时候我们又会碰到server {},自然就会调用server block的处理。。。以此类推!。

java web之会话技术cookie+session

会话技术 1.什么是会话: 指用户开一个浏览器,访问一个网站,只要不关闭该浏览器,不管该用户点击多少个超链接、访问多少个资源,直到用户关闭浏览器,整个这个过程我们成为一次会话 2.实际情况: 张三打开浏览器,进入淘宝,买了2样东西;李四打开浏览器,进入淘宝,买了3样东西。当这两位结账时,结账的s e r v l e t如何得到张三和李四买的东西,并为他两分别结账? 3.使用会话保存数据 ?S e s s i o n ?C o o k i e 为什么需要C o o k i e? 情景1.张在访问某个网站的时候,看到了提示你上次登录网站的时间,而且不同用户上次登录时间不同,这个怎么实现 没有会话技术前:u s e r表每次用户登录就更新u s e r表里的时间 I d N a m e P a s s w o r d L o g i n_t i m e v i e w H i s t o r y 001A a A a2012-1-5 5:00:0022,33,2 5 002B b B b2012-3-12 6:00:0012,24,5 6 情景2.访问购物网的时候,能够看到曾经浏览过的商品,当然不同用户浏览过的商品不同 如果登录了,则可以用数据库 但如果没有登录那又怎么办?????? 情景3.保存登录密码及用户名 Cookie技术 1.服务器把每个用户的数据以cookie的形式写给用户各自的浏览器当用户使用浏览器再去访问服务器中的web资源时,就会带着各自的数据去 Servlet有一个Cookie类 Cookie(String name ,String value) 3.Cookie小结: ①Cookie在服务端创建 Cookie cookie = new Cookie(name,value); ②Cookie是保存在浏览器这端 response.addCookie(cookie); ③Cookie的生命周期可以通过cookie.setMaxAge(int second)来设置 Cookie默认生命周期是会话级别(即存储在浏览器的内存中) 如果没有设置setMaxAge(),则该cookie的生命周期当浏览器关闭时就挂了,setMaxAge(0) +response.addCookie(cookie),相当于删除Cookie 此时如果cookie文件内部只有该Cookie则,文件也一并删除;否则只删除该Cookie ④Cookie可以被多个浏览器共享

【知识学习】对“全面从严治党”的理解与体会

对“全面从严治党”的理解与体会 常言道:基础不牢,地动山摇。基层党组织发挥着战斗堡垒作用,基层党组织战斗力的强弱直接关系着党的整体战斗力的强弱。推动全面从严治党向基层延伸,认真落实习总书记讲话精神,才能厚植党的执政根基。 全面从严治党,必须加强基层组织建设,夯实基层基础。党的工作最坚实的力量支撑在基层,最突出的矛盾问题也在基层,必须把抓基层、打基础作为长远之计和固本之策,扎实推进“双基”建设,推动基层组织全面进步、全面过硬。 全面从严治党,必须推动党纪党规教育向基层延伸,唤醒党员党纪意识。开展“两学一做”学习教育,推动教育覆盖每一个基层党组织和党员,唤醒党员意识,促使党员干部尊崇党章、坚定理想信念,树立看齐意识,自觉培养高尚道德情操,守住纪律底线。 全面从严治党,必须把惩治腐败向基层延伸,维护群众切身利益。要教育引导党员干部强化规则意识、规矩意识,培养法治思维、法治理念、法治精神,带头遵守国家法律,带头遵守党规党纪,加强对违反制度行为的监督和查处。 全面从严治党,必须将管党治党意识,管党治党责任深入基层。首先基层党组织要树立正确的政绩观,把抓好党建作为最大的政绩,强化党建意识,对全面从严治党主动担责,认真履责,扎实尽责。坚持党建工作和中心工作一起谋划、

一起部署、一起考核,把每条战线、每个领域、每个环节的党建工作抓具体、抓深入,坚决防止“一手硬、一手软”。其次基层党组织主要责任人对党建工作要亲自抓、负总责,班子其他成员要切实落实党建工作责任和工作部署,细化到人,量化到岗,以责任落实推动工作落实。最后对工作不力,党建工作落后的地方和单位负责人,要及时进行诫勉谈话,对管党治党不力造成不良影响和严重后果的要严格问责,严肃处理。

nginx虚拟主机和文件服务器的配置

Nginx文件服务器和虚拟主机的配置 https://www.360docs.net/doc/4016738155.html,的配置文件: 1.游戏服务器: server { listen 80; server_name https://www.360docs.net/doc/4016738155.html,; index index.html index.htm index.php; root /data/web/fc/game3w/releases1/public; location ~ .*\.php$ { include fcgi.conf; fastcgi_pass 127.0.0.1:10080; fastcgi_index index.php; expires off; } access_log /data/logs/https://www.360docs.net/doc/4016738155.html,.log access; } 2.客户端的配置: server { listen 80; server_name https://www.360docs.net/doc/4016738155.html,; index index.html index.htm index.php; root /data/web/fc/resource; charset utf-8; #expires 2h; location ~* .svn$ { return 404; } location ~ .*\.swf$ { expires 365d; } location ~ .*\.css$ { expires 365d; } location ~ .*\.xml$ { expires 365d;

} location ~ .*\.js$ { expires 365d; } location ~ .*\.jpg$ { expires 365d; } location ~ .*\.gif$ { expires 365d; } location ~ .*\.png$ { expires 365d; } location ~ .*\.mp3$ { expires 365d; } location ~ .*\.game$ { expires 365d; } location ~ .*\.lib$ { expires 365d; } access_log off; } 3.文件服务器的配置: server { listen 9000; server_name 192.168.26.8; location / { autoindex on; autoindex_exact_size off; autoindex_localtime on; index index.html index.htm index.php; root /data/server/trunk/bin/logs/; allow all; } }

深入理解新发展理念

深入理解新发展理念 创新、协调、绿色、开放、共享的发展理念,我在党的十八届五中全会和其他场合已经讲了不少,今天不从抓工作的角度全面讲了,而是结合历史和现实,结合一些重大问题,从理论上、宏观上讲讲。 第一,着力实施创新驱动发展战略。把创新摆在第一位,是因为创新是引领发展的第一动力。发展动力决定发展速度、效能、可持续性。对我国这么大体量的经济体来讲,如果动力问题解决不好,要实现经济持续健康发展和“两个翻番”是难以做到的。当然,协调发展、绿色发展、开放发展、共享发展都有利于增强发展动力,但核心在创新。抓住了创新,就抓住了牵动经济社会发展全局的“牛鼻子”。 坚持创新发展,是我们分析近代以来世界发展历程特别是总结我国改革开放成功实践得出的结论,是我们应对发展环境变化、增强发展动力、把握发展主动权,更好引领新常态的根本之策。 回顾近代以来世界发展历程,可以清楚看到,一个国家和民族的创新能力,从根本上影响甚至决定国家和民族前途命运。 16世纪以来,人类社会进入前所未有的创新活跃期,几百年里,人类在科学技术方面取得的创新成果超过过去几千年的总和。特别是18世纪以来,世界发生了几次重大科技革命,如近代物理学诞生、蒸汽机和机械、电力和运输、相对论和量子论、电子和信息技术发展等。在此带动下,世界经济发生多次产业革命,如机械化、电气化、自动化、信息化。每一

次科技和产业革命都深刻改变了世界发展面貌和格局。一些国家抓住了机遇,经济社会发展驶入快车道,经济实力、科技实力、军事实力迅速增强,甚至一跃成为世界强国。发端于英国的第一次产业革命,使英国走上了世界霸主地位;美国抓住了第二次产业革命机遇,赶超英国成为世界第一。从第二次产业革命以来,美国就占据世界第一的位置,这是因为美国在科技和产业革命中都是领航者和最大获利者。 中华民族是勇于创新、善于创新的民族。前面说到我国历史上的发展和辉煌,同当时我国科技发明和创新密切相关。我国古代在天文历法、数学、农学、医学、地理学等众多科技领域取得举世瞩目的成就。这些发明创造同生产紧密结合,为农业和手工业发展提供了有力支撑。英国哲学家培根这样讲到:印刷术、火药、指南针,这3种发明曾改变了整个世界事物的面貌和状态,以致没有一个帝国、教派和人物能比这3种发明在人类事业中产生更大的力量和影响。一些资料显示,16世纪以前世界上最重要的300项发明和发现中,我国占173项,远远超过同时代的欧洲。我国发展历史上长期处于世界领先地位,我国思想文化、社会制度、经济发展、科学技术以及其他许多方面对周边发挥了重要辐射和引领作用。近代以来,我国逐渐由领先变为落后,一个重要原因就是我们错失了多次科技和产业革命带来的巨大发展机遇。 当今世界,经济社会发展越来越依赖于理论、制度、科技、文化等领域的创新,国际竞争新优势也越来越体现在创新能力上。谁在创新上先行一步,谁就能拥有引领发展的主动权。当前,新一轮科技和产业革命蓄势

Nginx系列讲解

Nginx系列 一信号与配置 一、Nginx与信号 Nginx支持平滑重启,相比于Apache,修改了配置文件后可以不需要先停止程序,再重新启动。 1、启动 nginx –c nginx.conf 其中,-c nginx.conf可以省略不写。如果省略,则默认加载安装目录下的conf子目录中的nginx.conf。 2、停止 停止的方式有很多种,kill时传入不同的信号来结束或者平滑重启。Nginx的进程号记录在Pid文件中,Pid文件的位置可以在conf/nginx.conf中找到。如下图: 当然,也可以根据 ps –ef | grep nginx 来查找Nginx的进程号。我们可以通过kill命令来结束Nginx。 从容停止Nginx: kill –QUIT Nginx进程ID 或 kill – QUIT /usr/local/nginx/logs/nginx.pid 快速停止Nginx: kill –TERM Nginx进程ID 或

kill – TERM /usr/local/nginx/logs/nginx.pid 或 kill –INT Nginx进程ID 或 kill – INT /usr/local/nginx/logs/nginx.pid 强制停止Nginx: kill –9 Nginx进程ID 或 kill -9 /usr/local/nginx/logs/nginx.pid 或 pkill -9 nginx 3、重启 如果修改了Nginx的配置文件,想要重启Nginx。同样可以使用kill命令来传递信号。不过,在此之前,我强烈建议先检查并测试配置文件是否正确。 测试配置文件: nginx –t –c conf/nginx.conf 若提示unknow directive *** in conf/nginx.conf:55. Configuration file conf/nginx.conf test failed,则证明在第55行的***是非法的,需要修改。 若提示the configuration file conf/nginx.conf syntax is ok. Configuration file conf/nginx.conf test is successful,则证明配置文件测试通过,可以重启Nginx了。 平滑重启Nginx: kill –HUP Nginx进程ID 或

几种session存储方式比较

几种session存储方式比较 1. 客户端cookie加密 这是我以前采用的方式,简单,高效。比较好的方法是自己采用cookie机制来实现一个session,在应用中使用此session实现。 问题:session中数据不能太多,最好只有个用户id。 参考实现:https://www.360docs.net/doc/4016738155.html, 2. application server的session复制 可能大部分应用服务器都提供了session复制的功能来实现集群,tomcat,jboss,was都提供了这样的功能。 问题: 性能随着服务器增加急剧下降,而且容易引起广播风暴; session数据需要序列化,影响性能。 如何序列化,可以参考对象的序列化和反序列化. 参考资料 Tomcat 5集群中的SESSION复制一 Tomcat 5集群中的SESSION复制二 应用服务器-JBoss 4.0.2集群指南 3. 使用数据库保存session 使用数据库来保存session,就算服务器宕机了也没事,session照样在。 问题: 程序需要定制; 每次请求都进行数据库读写开销不小(使用内存数据库可以提高性能,宕机就会丢失数据。可供选择的内存数据库有BerkeleyDB,MySQL的内存表); 数据库是一个单点,当然可以做数据库的ha来解决这个问题。 4. 使用共享存储来保存session 和数据库类似,就算服务器宕机了也没事,session照样在。使用nfs或windows文件共享都可以,或者专用的共享存储设备。 问题: 程序需要定制; 频繁的进行数据的序列化和反序列化,性能是否有影响; 共享存储是一个单点,这个可以通过raid来解决。 5. 使用memcached来保存session 这种方式跟数据库类似,不过因为是内存存取的,性能自然要比数据库好多了。 问题: 程序需要定制,增加了工作量; 存入memcached中的数据都需要序列化,效率较低; memcached服务器一死,所有session全丢。memchached能不能做HA 我也不知道,网站上没提。 参考资料 应用memcached保存session会话信息 正确认识memcached的缓存失效 扩展Tomcat 6.x,使用memcached存放session信息 6. 使用terracotta来保存session

c#下使用cookie和session

c#如何记住用户的信息 记录加密之后的信息,确保用户的信息安全 使用cookie和session记录用户的信息 1、保存时间 session的默认保存时间是24分钟 cookie在没有设置的情况下关闭之后立即结束生命周期 设置cookie的时间,cookie-name.Expires=Date.Now.AddDays();/DateTime.MaxValue;(永久) C#读取设置Cookie 设置: HttpCookie cookie = new HttpCookie("cookieName"); cookie.Value = "name1" HttpContext.Current.Response.Cookies.Add(cookie); 读取: HttpContext.Current.Request.Cookies["cookieName"].Value 判断cookie是否存在: if(HttpContext.Current.Request.Cookies["cookieName"]==null){ //do something } 设置cookie有效期 cookie.Expires = DateTime.Now.AddDays(1); https://www.360docs.net/doc/4016738155.html,中Cookies的用法(转) 一,cookies 写入 方法1: Response.Cookies["username"].Value="gjy"; Response.Cookies["username"].Expires=DateTime.Now.AddDays(1); 方法2: System.Web.HttpCookie newcookie=new HttpCookie("username"); newcookie.Value="gjy"; newcookie.Expires=DateTime.Now.AddDays(1); Response.AppendCookie(newcookie); 创建带有子键的cookies: System.Web.HttpCookie newcookie=new HttpCookie("user"); newcookie.Values["username"]="gjy"; newcookie.Values["password"]="111";

nginx负载均衡master配置文件nginx.conf

#user nobody; worker_processes auto; #error_log logs/error.log; error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; worker_rlimit_nofile 100000; events { use epoll; worker_connections 204800; } http { ## 用户的IP 地址$binary_remote_addr 作为Key,每个IP 地址最多有50 个并发连接 ## 你想开几千个连接刷死我?超过50 个连接,直接返回503 错误给你,根本不处理你的请求了 limit_conn_zone $binary_remote_addr zone=TotalConnLimitZone:10m ; #limit_conn TotalConnLimitZone 50; limit_conn TotalConnLimitZone 500; limit_conn_log_level notice; ## 用户的IP 地址$binary_remote_addr 作为Key,每个IP 地址每分钟处理50 个请求## 你想用程序每秒几百次的刷我,没戏,再快了就不处理了,直接返回503 错误给你 #limit_req_zone $binary_remote_addr zone=ConnLimitZone:10m rate=200r/m; limit_req_zone $binary_remote_addr zone=ConnLimitZone:10m rate=2000r/m; limit_req_log_level notice; #include mime.types; #default_type application/octet-stream; #access_log logs/access.log main; #server_tokens off; #sendfile on; #tcp_nopush on; #keepalive_timeout 0; #keepalive_timeout 65; server_tokens off; include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] $request ' '"$status" $body_bytes_sent "$http_referer" '

Cookie和Session的作用和工作原理

一、Cookie详解 (1)简介 因为HTTP协议是无状态的,即服务器不知道用户上一次做了什么,这严重阻碍了交互式Web应用程序的实现。在典型的网上购物场景中,用户浏览了几个页面,买了一盒饼干和两饮料。最后结帐时,由于HTTP的无状态性,不通过额外的手段,服务器并不知道用户到底买了什么。为了做到这点,就需要使用到Cookie了。服务器可以设置或读取Cook ies中包含信息,借此维护用户跟服务器会话中的状态。 Cookie(复数形态:Cookies),是指某些网站为了辨别用户身份、进行session跟踪而储存在用户本地终端上的数据(通常经过加密)。 Cookie是由服务端生成的,发送给客户端(通常是浏览器)的。Cookie总是保存在客户端中,按在客户端中的存储位置,可分为内存Cookie和硬盘Cookie: 内存Cookie由浏览器维护,保存在内存中,浏览器关闭后就消失了,其存在时间是短暂的。 硬盘Cookie保存在硬盘里,有一个过期时间,除非用户手工清理或到了过期时间,硬盘Cookie不会被删除,其存在时间是长期的。所以,按存在时间,可分为非持久Cookie和持久Cookie。 (2)工作原理 1、创建Cookie 当用户第一次浏览某个使用Cookie的网站时,该网站的服务器就进行如下工作: ①该用户生成一个唯一的识别码(Cookie id),创建一个Cookie对象; ②默认情况下它是一个会话级别的cookie,存储在浏览器的内存中,用户退出浏览器之后被删除。如果网站希望浏览器将该Cookie存储在磁盘上,则需要设置最大时效(maxAge),并给出一个以秒为单位的时间(将最大时效设为0则是命令浏览器删除该Cookie); ③将Cookie放入到HTTP响应报头,将Cookie插入到一个Set-Cookie HTTP请求报头中。 ④发送该HTTP响应报文。 2、设置存储Cookie 浏览器收到该响应报文之后,根据报文头里的Set-Cookied特殊的指示,生成相应的Cookie,保存在客户端。该Cook ie里面记录着用户当前的信息。 3、发送Cookie 当用户再次访问该网站时,浏览器首先检查所有存储的Cookies,如果某个存在该网站的Cookie(即该Cookie所声明的作用范围大于等于将要请求的资源),则把该cookie附在请求资源的HTTP请求头上发送给服务器。 4、读取Cookie 服务器接收到用户的HTTP请求报文之后,从报文头获取到该用户的Cookie,从里面找到所需要的东西。 (3)作用 Cookie的根本作用就是在客户端存储用户访问网站的一些信息。典型的应用有: 1、记住密码,下次自动登录。 2、购物车功能。 3、记录用户浏览数据,进行商品(广告)推荐。 (4)缺陷 ①Cookie会被附加在每个HTTP请求中,所以无形中增加了流量。 ②由于在HTTP请求中的Cookie是明文传递的,所以安全性成问题。(除非用HTTPS) ③Cookie的大小限制在4KB左右。对于复杂的存储需求来说是不够用的。 二、Session详解 (1)简介 Session代表服务器与浏览器的一次会话过程,这个过程是连续的,也可以时断时续的。Session是一种服务器端的机制,Session 对象用来存储特定用户会话所需的信息。 Session由服务端生成,保存在服务器的内存、缓存、硬盘或数据库中。

nginx配置方案

WEB服务器安装方案 平台搭建环境: CentOS5.2 32/x86_64 GNU/Linux (32/64操作系统均通过,推荐使用64位操作系统) 一、系统安装 1. 系统分区建议 /boot 256M swap 2GB / 20GB /usr 40GB (用于安装软件) /data 剩余所有空间. 二、编译安装基本环境 1. 安装准备 1.1 系统约定 软件源代码包存放位置 /usr/local/src 源码包编译安装位置(prefix) /usr/local/software_ name 脚本以及维护程序存放位置 /usr/local/sbin MySQL 数据库位置 /data/mysql/(可按情况设置) 网站根目录/data/www/htdocs(可按情况设置) 网站日志根目录/data/www/logs(可按情况设置) Nginx运行账户www 1.2创建网站账号及相关存放目录 /usr/sbin/groupadd www /usr/sbin/useradd -g www www mkdir -p /data/www/html mkdir -p /data/www/log chown -R www:www /data/www/html chown -R www:www /data/www/log 1.3系统环境部署及调整 # tail -n100 /var/log/messages (检查有无系统级错误信息) # dmesg (检查硬件设备是否有错误信息) # ifconfig(检查网卡设置是否正确) # ping 192.168.95.1 (检查网络是否正常) install_software_name.sh //存放编译参数脚本习惯将所有编译脚本存放在install_software_name.sh便于升级和更新软件. 1.4定时校正服务器时钟,定时与中国国家授时中心授时服务器同步 #crontab -e

相关文档
最新文档