search for: local_var

Displaying 8 results from an estimated 8 matches for "local_var".

2006 Apr 22
7
Instance variables versus local variables
This novice coder roughly understands the difference between instance and local variables thanks to David Black''s excellent book, but I''m still unclear as to when and why a either is more desirable to use. In general, I use instance variables in my controller and local in my views, but I''m not sure as to why or if this is correct. Thanks Joe Kowalski
2014 Dec 05
6
[LLVMdev] instruction/intrinsic for segmented adressing
Hi, would like to use LLVM as backend for a compiler. One of the features I would like to implement is segment based addressing for position independent data. For some it may sound strange, for others the opposite. No need to write complex story. Imagine you have a custom alocator that manages an area of 1GB of memory. Your application uses a custom allocator to allocate memory inside this area,
2010 Mar 24
3
Build warnings
Hi all, I've recently decided to take a look at Theora for the first time. The 1.1.1 release compiles fine, but the compiler generates a fairly large number of warnings about "suggest parentheses around + or - inside shift". I've had a look at a few of these and sometimes it isn't obvious what is meant to happen. I guess the code is all correct though as I'm sure
2006 Feb 18
5
Model methods and partial view templates
I have a method in a controller that invokes a render :partial => ''some_partial_view'' In that view, I''m trying to access a method defined in a model, like this; <% for view in @an_array %> <% local_var = view.some_method() %> <% another_var = view.a_column_name %> etc.. I am getting an undefined method error but the model is accessible because the variable ''another_var'' is accessed correctly. I have tried the following definitions in my ''View'' mo...
2007 Apr 12
11
Test if view renders appropriate partial?
Hello, I am testing out a partial that calls another, general purpose partial as part of its processing. Is there a class I can mock in Rails views to accomplish what I need? That is, could I do something like the following: SomeClass.should_receive(:render).with(:partial => "foo", :locals => { :bars => bars }) I tried breakpointing the view, and it looks like I am greeted
2006 Jan 19
1
partials and instance variables for file_column
Hi, Sebastian Kanthak of the file_column-Plugin wrote once: "is the photo object inside a local variable or an instance variable (e.g. photo or @photo)? url_for_file_column only works with instance variables, like all other active record form helpers. Could this be the problem?" So I''m using file_column in a partial, e.g. <%= render (:partial => "product",
2014 Dec 06
2
[LLVMdev] instruction/intrinsic for segmented adressing
...heavy LLVM > modifications), so you need a way to distinguish stack accesses from > heap. Without source annotation that's reducible to the halting > problem. For example: > > int load_address(int *addr) { > return addr; > } > > int evil(int *heap_addr) { > int local_var = 42; > return load_address(rand() % 2 ? heap_addr : &local_var); > } > > Should the code emitted for load_address use gs or not? > the stack should not be in this address space and this addressing should not apply to stack. The framework would make any kind of C++ constructo...
2018 Sep 25
3
[cfe-dev] New warnings when building trunk with GCC 9
+ Erik, who implemented DR1579 Originally, I had the warning similar to GCC's warning, but took it out due to not having DR1579 implemented in clang (warning changed in r243594) Erik in r274291 implemented DR1579, although PR27785 didn't mention anything about std::move It looks like what's happening is that Clang and GCC handles the return differently. Clang needs the std::move