Search Results

Search found 11238 results on 450 pages for 'miserable variable'.

Page 42/450 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • undefined local variable or method `user', using CarrierWave for profile images

    - by Amar H-V
    I've been following Ryan Bates' Railscasts tutorial on CarrierWave, which you can find here Everything works fine, except for when I go to view my profile, it gives me this error: undefined local variable or method `user' I don't know why it is telling me this, as I am using Devise for my authentication, and that is the name of my model. Below are some of the files which may be useful: https://gist.github.com/amarh21/7439421 I am using Rails 4.0.1 and ruby 2.0.0

    Read the article

  • RewriteRule to disregard a url variable

    - by tridat
    I have some pages indexed by Google, for example: /product.html?affiliateid=142 I want a rewrite rule to 301 redirect to the same page if there's an affiliateid=xxx So far I have this: RewriteCond %{QUERY_STRING} ^affiliateid=[0-9]+$ RewriteRule ^$ /test.html$ [L,R=301] But its not working, I need to get rid of the variable and get the page name somehow.

    Read the article

  • Does variable = null set it for garbage collection

    - by manyxcxi
    Help me settle a dispute with a coworker: Does setting a variable or collection to null in Java aid in garbage collection and reducing memory usage? If I have a long running program and each function may be iteratively called (potentially thousands of times): Does setting all the variables in it to null before returning a value to the parent function help reduce heap size/memory usage?

    Read the article

  • procedure that swaps the bytes (low/high) of a Word variable

    - by Altar
    Hi. I have this procedure that swaps the bytes (low/high) of a Word variable (It does the same stuff as System.Swap function). The procedure works when the compiler optimization is OFF but not when it is ON. Can anybody help me with this? { UNSAFE! IT IS NOW WORKING WHEN COMPILER OPTIMIZATION IS ON ! } procedure SwapWord_NotWorking(VAR TwoBytes: word); asm Mov EBX, TwoBytes Mov AX, [EBX] XCHG AL,AH Mov [EBX], AX end;

    Read the article

  • Does variable name length matter for performance C#?

    - by MadBoy
    I've been wondering if using long descriptive variable names in WinForms C# matters for performance? I'm asking this question since in AutoIt v3 (interpreted language) it was brought up that having variables with short names like aa instead of veryLongVariableName is much much faster (when program is bigger then 5 liner). I'm wondering if it's the same in C#?

    Read the article

  • Creating "GDP in 1960" variable from GDP variables for different years

    - by Tom Smith
    Hi all, I'm pretty new to stata... I have a set of observations of the form "Country GDP Year". I want to create a new variable GDP1960, which gives the GDP in 1960 of each country for each year: USA $100m 1960 USA $100m 1960 $100m USA $200m 1965 --> USA $200m 1965 $100m Canada $60m 1960 Canada $60m 1960 $60m What's the right syntax to make this happen? (I assume egen is involved in some mysterious way)

    Read the article

  • Variable name as a string in Javascript

    - by fish potato
    Is there a way to get a variable name as a string in Javascript? (like NSStringFromSelector in Cocoa) I would like to do like this: var myFirstName = 'John'; alert(variablesName(myFirstName) + ":" + myFirstName); --> myFirstName:John -- added I'm trying to connect a browser and another program using JavaScript. I would like to send instance names from a browser to another program for callback method.

    Read the article

  • Hot to remove text from variable? (php)

    - by Glister
    I have a variable $link_item, it's used with echo and gives the strings like <span class="name">Google</span>http://google.com How to remove "<span class="name">Google</span>" from string? It should give just "http://google.com". Heard it can be done with regex(), please help.

    Read the article

  • extern and static variable storage ???

    - by Riyaz
    when will memory created for extern and static variable. Is it in stack or heap. Since its life time is till the program end, it cant be in stack it must be in heap. But size of the heap will known only at the run time. So somewhat confusion here ......

    Read the article

  • text from a file turned into a variable?

    - by b3y4z1d
    If I made a program that stores strings on a text file using the "list"-function(#include ), and then I want to copy all of the text from that file and call it something(so I can tell the program to type in all of the text I copied somewhere by using that one variable to refer to the text), do I use a string,double,int or what do I declare that chunk of text as? I'm making the program using c++ in a simple console application.

    Read the article

  • VBA Variable from msgbox to report

    - by user1789785
    I have a macro which runs several Sql queries. One of these queries is run based off a date which in input in a msgbox within the macro (only companies after the date entered are generated). Is it possible to put the value entered in the msgbox at the time the macro is run in a table by itself? (my ultimate goal is to put the value on a report to indicate that values displayed are after the following date: variable) Thanks

    Read the article

  • Cygwin environment variable case

    - by Michael
    For some reason on one pc, when variable names are going from batch file to Cygwin environment, they are capitalizing. On other the case stay intact. @set aa=bb %BASH% --login -c "set" so the output in one case will show AA=bb in other case aa=bb How to control the case of the exported variables?

    Read the article

  • Pass a variable to new page

    - by Anon
    I am trying to pass a variable from one page, load another and enter that information. something Like this: When 127.0.0.1/test.html&ID=1234 location.href = "127.0.0.1/newpage.html" if (location.href == newpage.html){ var e = document.GetElementById("Loginbx"); e.Value = ID } I don't have access to modify 127.0.0.1/test.html nor newpage.html but would like to pass variables to them from another. Is this possible?

    Read the article

  • Set time part of datetime variable to 18:00

    - by maxt3r
    Hi. I need to set datetime variable to two days from now but it's time part must be 18:00. For example if i call getdate() now i'll get 2010-05-17 13:18:07.260. I need to set it to 2010-05-19 18:00:00.000. Does anybody have a good snippet for that or any ideas how to do it right?

    Read the article

  • Accessing property of object vs variable in javascript

    - by Samuel
    Why when I try to access a variable that don't exist, javascript throw an exception but when I try to access a property that don't exist in an object, javascript returns an undefined object? For example, this case returns an undefined object: function Foo(){ console.log(this.bar); } Foo(); But, in this other example, javascript throw an exception: function Foo(){ console.log(bar); } Foo(); ReferenceError: bar is not defined

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >