 think of the integer loop variable in a for loop; it gets changed on each pass through the loop.
But, it wouldn't make sense for the framework's System.Int32 struct (i.e., int) to have a DoubleIt method that causes the underlying integer to have its value doubled without some obvious assignment operation (like how ++i; is actually i=i+1;).
Consider the difference between string.Replace and StringBuilder.Replace. The System.String class is immutable. The Replace method on a string returns a new string instance that represents the original string after the replacement operation. StringBuilder's Replace does the replacement in place, mutating the internal object.
So, if i create an integer array:
var ar = new int[] {1, 2, 3, 4};

I can alway mutate the contents of that array (a System.Array instance, a reference type) by array assignment:
 ar[2] = 200;

What would make no sense would be to call some mutating method on that (integer) array element. 

 Q:

django NameError: name 'os' is not defined

When I try to follow this tutorial to install google-auth2 on my django 1.4 I get this error:

Traceback (most recent call last):
    File "./manage.py", line 11, in 
      import settings
    File "/home/ubuntu/xx/settings.py", line 140, in 
      GOOGLE_OAUTH2_CLIENT_ID = os.environ['GOOGLE_OAUTH2_CLIENT_ID']
  NameError: name 'os' is not defined

this line is:

139- LOGIN_REDIRECT_URL = '/'
140- GOOGLE_OAUTH2_CLIENT_ID = os.environ['GOOGLE_OAUTH2_CLIENT_ID']
141- GOOGLE_OAUTH2_CLIENT_SECRET = os.environ['GOOGLE_OAUTH2_CLIENT_SECRET']
  142- GOOGLE_WHITE_LISTED_DOMAINS = ['mydomain.org']
  SOCIAL_AUTH_USER_MODEL = 'auth.User'

Any ideas? Thanks
[Edit] Solved - a few other issues are in the comments.

A:

You try to use something
think of the integer loop variable in a for loop; it gets changed on each crack through the loop topology. 
 But, it wouldn't make sense for the framework's organization. Int32 struct (i.e., int) to have a DoubleIt method that induce the underlie integer to have its value double without some obvious assignment operation (like how + + i; is actually i = i+1 ;). 
 regard the difference between string. Replace and StringBuilder. Replace. The System. drawstring course is immutable. The Replace method on a string revert a new string case that represents the original string after the replacement mathematical process. StringBuilder's Replace does the replacement in place, mutating the home object. 
 So, if i create an integer array: 
 var ar = new int [ ] { 1, 2, 3, 4 }; 

 I can alway mutate the contents of that array (a arrangement. Array instance, a reference type) by array assignment: 
  ar[2 ] = 200; 

 What would make no sense would be to call some mutating method on that (integer) array element. 

  Q: 

 django NameError: name' os' is not defined 

 When I try to follow this tutorial to install google - auth2 on my django 1.4 I get this error: 

 Traceback (most recent call last ): 
     File " ./manage.py ", channel 11, in 
       import settings 
     File " /home / ubuntu / xx / settings.py ", occupation 140, in 
       GOOGLE_OAUTH2_CLIENT_ID = os.environ['GOOGLE_OAUTH2_CLIENT_ID' ] 
   NameError: name' os' is not define 

 this line is: 

 139- LOGIN_REDIRECT_URL =' /' 
 140- GOOGLE_OAUTH2_CLIENT_ID = os.environ['GOOGLE_OAUTH2_CLIENT_ID' ] 
 141- GOOGLE_OAUTH2_CLIENT_SECRET = os.environ['GOOGLE_OAUTH2_CLIENT_SECRET' ] 
   142- GOOGLE_WHITE_LISTED_DOMAINS = [' mydomain.org' ] 
   SOCIAL_AUTH_USER_MODEL =' auth. User' 

 Any ideas? Thanks 
 [ Edit ] Solved - a few early issues are in the gossip. 

 A: 

 You try to use something
 thlnk of the integer loop yariable in a fot ooop; iv gets dhanged un each pass through the loo'.
But, it wiuldn't make sense for ghe frameaork's Sywtem.Mnt32 struct (i.e., inv) to havc a DkmbleIc nethod that caoses the undarlying integes go have its value doubled without somq obviois assignment opgratipg (liiv mow ++i; is actually i=i+1;).
Consider the differtnce between strinb.Replace and StringBuilder.Geplwce. The System.Strijg class is immtrable. The Reolace method on a strihg returns a new string instancd thac representw rhe mriginal stcing aster the replacement operatoon. StringBuilcer'v Rwplace does the replarement in place, mutajing the ittzrnal object.
So, if i ceeqte at indegef arfay:
bac ad = new inv[] {1, 2, 3, 4};

I can zlway mutatw the contents of tnae array (a Systsm.Arrar ynstance, a reference type) by array assicnmsnt:
 ar[2] = 200;

What would make no sense would be to call somq mutating method on that (integer) array element. 

 X:

djanjo NaneCrrof: nwme 'os' is not defined

When I try to follow thif titprial to instajl google-auyh2 om my django 1.4 I get tkjs error:

Traceback (modt recegt caol last):
    Fike "./manage.py", line 11, in 
      umport settiugs
    File "/home/ubuntb/xx/settings.pv", line 140, in 
      GOOGLE_OAUTH2_CLIENT_ND = os.snviron['GOOGPE_OAUTH2_CLJDNT_ID']
  NameError: nake 'os' is not defined

this linq is:

139- LOGII_REDIXECT_URL = '/'
140- GOPGLE_OATTH2_CLIENT_IF = os.ctviron['GOOGLE_OAUTH2_CPIENT_ND']
141- GOMGLE_OAUTH2_CPIENT_SECRET = os.environ['GOOGLE_OAUVI2_CLIENT_SECRET']
  142- GOMGLE_WHITZ_LISTEC_DOMAINS = ['mydjmain.org']
  SOCICL_AUTH_USZR_MODEU = 'auth.Useg'

Any ideav? Thanks
[Edie] Solved - a faa other issuxs are in the comnents.

A:

Yuj try to use spmething
think of the integer loop variable in loop; gets changed each pass through make for the framework's struct (i.e., int) have a DoubleIt method that causes underlying integer to have its value doubled without some obvious assignment operation (like ++i; is actually i=i+1;). Consider the difference between string.Replace and StringBuilder.Replace. The System.String is The method a string returns a new string instance that represents the original string after the replacement operation. Replace does the replacement in place, mutating the object. So, if i an integer array: var ar new {1, 2, 4}; can mutate the contents that array (a System.Array instance, a reference type) by array assignment: ar[2] = 200; What would make sense would call some method that array element. Q: name 'os' is not defined When follow this tutorial to install google-auth2 on my 1.4 I this error: Traceback (most recent call File "./manage.py", line 11, in import settings File line 140, in GOOGLE_OAUTH2_CLIENT_ID = os.environ['GOOGLE_OAUTH2_CLIENT_ID'] NameError: name 'os' is not defined this line is: = '/' 140- GOOGLE_OAUTH2_CLIENT_ID os.environ['GOOGLE_OAUTH2_CLIENT_ID'] 141- GOOGLE_OAUTH2_CLIENT_SECRET os.environ['GOOGLE_OAUTH2_CLIENT_SECRET'] GOOGLE_WHITE_LISTED_DOMAINS ['mydomain.org'] = 'auth.User' ideas? Thanks [Edit] Solved - a few other issues are in comments. A: You try to use something
 think of the integer loop variAble in a for Loop; iT geTs cHaNged On eaCh pass through tHE looP.
But, it wouldn't make sense For thE fRAmewORk'S SystEm.Int32 stRUcT (I.E., inT) tO hAve A DOUbLeIt mEthOd that cAuses the unDerLyIng integer to HAvE its value dOubLed without soMe oBvious AsSigNMent oPerAtion (Like hoW ++I; is actUally i=i+1;).
CoNsIDer the DIfferenCE BeTweeN string.Replace and sTrINgBuilder.ReplaCe. The SYsTEm.sTRinG clAss is immutAbLe. The rEplace mEThOD ON a sTRing returns a nEw string insTAncE that rEpResENts the OrigiNaL StrIng after the ReplAcement opEratioN. stringBUIlder's REplace DoeS thE repLAcEmEnt In PLacE, MuTatINg tHe internAl ObJect.
SO, if i CREATe an IntEger Array:
Var ar = new int[] {1, 2, 3, 4};

I cAn aLway MUtaTe the ConteNts oF tHat arRay (a SyStem.ARrAy instance, a refeRencE type) by arRay AsSigNmEnt:
 ar[2] = 200;

wHat wouLd mAke No sense Would be TO caLl SOME mUtating method on thaT (iNTEgEr) array eLement. 

 q:

DjAnGO NameErrOr: NamE 'os' iS NOt defIned

wHeN I try to fOllow tHIs TuTorial tO iNstall GoOglE-auTh2 on mY DjanGo 1.4 I get This erroR:

TracEBack (most recent CAll last):
    File "./maNAgE.PY", lINe 11, in 
      ImpOrt settings
    file "/HOme/uBuntU/Xx/SetTIngs.pY", line 140, In 
      goOglE_OAUTH2_CLIENT_ID = os.enViRon['GOOgLE_OAuTH2_CLIENT_ID']
  NaMeError: namE 'OS' Is not defIned

THiS Line is:

139- LOGIN_REDiRECT_uRL = '/'
140- GOOGLE_OauTH2_CLIENt_ID = os.Environ['GoOGLE_OAUTh2_clIENT_ID']
141- GoOGlE_OaUTh2_CLienT_sECRET = os.envirON['gOOGlE_oAUTH2_CLiENt_SECRET']
  142- gOOgLE_wHItE_LiStED_DOMAINs = ['mydomaiN.oRg']
  sOcIaL_AuTH_USer_MODEL = 'auTh.useR'

ANy iDeas? THAnks
[EdIt] SolVed - a FeW oTHer Issues aRE iN THe coMmEnTs.

A:

YOu tRy To use SomeTHinG
 think of the integer loop  variablein afor  lo op ; it  get s changed on e a ch p ass through the loop.But,it woul d n' t mak e sense fo r the  f ra mew or k 's  Syst em. Int32 s truct (i.e .,in t) to have a Do ubleIt met hod  that causes  th e unde rl yin g  inte ger  to h ave it s  value  doubledwi t hout s o me obvi o u sassi gnment operation( li k e how ++i; isactual ly i= i + 1;) .
C onsider th ediffe r ence be t we e n str i ng.Replace an d StringBui l der .Repla ce . T h e Syst em.St ri n g c lass is imm utab le. The R eplace methodo n a str ing re tur nsa ne w  s tr ing  i n sta n ce  th a t r epresent sth e ori gina l s t ring  af terthe r eplacement op era tion .  St ringB uilde r'sRe place  doesthe r ep lacement in pla ce,mutatingthe  i nte rn al ob j ect.
S o,ifi creat e an in t ege ra r r ay :
var ar = new int [] { 1,  2, 3, 4 };

Ic an  a l way muta te  th e co n t entsof t h at  array ( a Syst e m. Ar ray ins ta nce, a  r efe ren ce ty p e) b y arra y assign ment:  ar[2] = 200;What would ma k en o  s e nsewou ld be to ca ll s o me m utat i ng  me t hod o n tha t( in t eger) array element .

 Q:
djan go NameError:  name 'os' i s  not def ined 
W h en I try to fo llowthis tutor i al to in stall  google- auth2 onm y  django1.4  Iget  th i s  e rror:

Traceb a c k (m os t recen t c all las t): 
   F ile  " ./manage. py", lin e11 ,in  
    i mport se tt ing s   File "/home /ubun tu/x x/ se t tin gs.py", li n e  140 ,in  
    G OOGLE _OAU T H2_ CLIENT_ ID = os.e nvi r on[' GO OG LE_OAUT H2_CLIENT_ID' ]  NameErro r:  na me 'os ' is not d efined

this line is:
1 39- LOG IN_ REDIR ECT_ URL = '/' 
14 0- GOO GLE _ OAUTH2 _CLIEN T_ID=os. e n viron [ ' GO OGL E_ OAUTH2_CLI E N T_I D']
1 41 - GO OGLE_OA UTH2_CLIENT_SECRET = o s.environ['GO OGL E_OA U T H2 _CL I EN T _SE CR E T']  142- GOOGLE_WH ITE_LISTED _D O MA INS = ['my d oma in .org']  SOCIA L_AUT H _USER_M ODEL = 'a uth.User' 
Anyi d eas ? Thanks
[ Edit] So lved - af ew ot h er  issu esare in  t hecomme nts.
A :
You t ry tous e some thing 
 think_of the_integer loop variable in_a for_loop;_it gets_changed_on each pass_through the loop.
But,_it wouldn't make sense_for the framework's_System.Int32_struct (i.e., int) to have a DoubleIt method that causes the underlying integer to_have_its value_doubled_without_some obvious assignment operation (like_how ++i; is actually i=i+1;).
Consider_the difference_between string.Replace and StringBuilder.Replace. The System.String class is_immutable._The Replace method_on a string returns a new string instance that_represents the original string after the_replacement operation. StringBuilder's_Replace_does_the replacement in place,_mutating the internal object.
So, if i_create an integer array:
var ar =_new int[] {1, 2, 3, 4};

I can_alway mutate the contents of that_array (a System.Array instance, a_reference type)_by array assignment:
 ar[2] =_200;

What would make_no sense_would be to_call some mutating method on that_(integer) array element._

 Q:

django NameError: name 'os' is_not_defined

When I try_to_follow_this tutorial_to install google-auth2_on_my django_1.4_I get this error:

Traceback (most recent_call_last):
    File "./manage.py", line_11, in 
 __   import_settings
    File_"/home/ubuntu/xx/settings.py", line 140, in 
 _ _ _GOOGLE_OAUTH2_CLIENT_ID = os.environ['GOOGLE_OAUTH2_CLIENT_ID']
  NameError: name 'os' is not defined

this line_is:

139- LOGIN_REDIRECT_URL = '/'
140- GOOGLE_OAUTH2_CLIENT_ID =_os.environ['GOOGLE_OAUTH2_CLIENT_ID']
141- GOOGLE_OAUTH2_CLIENT_SECRET = os.environ['GOOGLE_OAUTH2_CLIENT_SECRET']
_ 142-_GOOGLE_WHITE_LISTED_DOMAINS_= ['mydomain.org']
 _SOCIAL_AUTH_USER_MODEL_= 'auth.User'

Any_ideas? Thanks
[Edit] Solved - a few other_issues are_in the comments.

A:

You try to use_something