Displaying 8 results from an estimated 8 matches for "remove_item".
2008 Apr 29
10
Better way to remove value from list??
...The variable names are for an example.
This code works, but I don''t think that it''s efficient. It''s all in my
controller. I''d be happy to move things around too. Any help on how to
do this much better would be appreciated.
@order = Order.find(params[:id])
@remove_item = params[:item]
@item_array = @order.item_codes.split(/,\s*/)
@item_array.delete(@remove_item)
@item_string = @fc_array.join(",")
@order.item_codes = nil
@order.item_codes = @fc_string
@order.save
THANKS!!!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~-----------...
2016 Feb 06
2
D16945: LLVM overhaul to avoid linking LLVM component libraries with libLLVM
...nce that
# may imply linking to libraries that are not included in
# libLLVM.
+ if (DEFINED link_components AND DEFINED LLVM_DYLIB_COMPONENTS)
+ if("${LLVM_DYLIB_COMPONENTS}" STREQUAL "all")
+ set(link_components "")
+ else()
+ list(REMOVE_ITEM link_components ${LLVM_DYLIB_COMPONENTS})
+ endif()
+ endif()
target_link_libraries(${executable} LLVM)
endif()
However the avoiding the accidental linkage of libLLVMSupport with
libLLVM and libgtest for the unittests was really tricky as two
different mechanisms to pass LLVMSuppor...
2018 Feb 23
3
cmake + llvm : issue when embedding llvm
...But I got several cmake error messages, here is my output :
-- Using LLVMConfig.cmake in:
C:\\Luciad_src\\libs\\LLVM\\cmake\\modules
LLVM_INCLUDE_DIRS=
LLVM_DEFINITIONS=
CMake Error at
C:/Luciad_src/libs/LLVM/cmake/modules/LLVM-Config.cmake:31 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
C:/Luciad_src/libs/LLVM/cmake/modules/LLVM-Config.cmake:256
(is_llvm_target_library)
components/query/CMakeLists.txt:15 (llvm_map_components_to_libnames)
Is there a problem with my script, or the packages I us...
2016 Feb 09
2
D16945: LLVM overhaul to avoid linking LLVM component libraries with libLLVM
...nce that
# may imply linking to libraries that are not included in
# libLLVM.
+ if (DEFINED link_components AND DEFINED LLVM_DYLIB_COMPONENTS)
+ if("${LLVM_DYLIB_COMPONENTS}" STREQUAL "all")
+ set(link_components "")
+ else()
+ list(REMOVE_ITEM link_components ${LLVM_DYLIB_COMPONENTS})
+ endif()
+ endif()
target_link_libraries(${executable} LLVM)
endif()
Index: utils/unittest/CMakeLists.txt
===================================================================
--- utils/unittest/CMakeLists.txt (revision 260200)
+++ uti...
2018 Feb 23
0
cmake + llvm : issue when embedding llvm
...>
>> -- Using LLVMConfig.cmake in: C:\\Luciad_src\\libs\\LLVM\\cm
>> ake\\modules
>> LLVM_INCLUDE_DIRS=
>> LLVM_DEFINITIONS=
>> CMake Error at C:/Luciad_src/libs/LLVM/cmake/modules/LLVM-Config.cmake:31
>> (list):
>> list sub-command REMOVE_ITEM requires two or more arguments.
>> Call Stack (most recent call first):
>> C:/Luciad_src/libs/LLVM/cmake/modules/LLVM-Config.cmake:256
>> (is_llvm_target_library)
>> components/query/CMakeLists.txt:15 (llvm_map_components_to_libnam
>> es)
>>
>&...
2018 Feb 26
1
cmake + llvm : issue when embedding llvm
...C:\\Luciad_src\\libs\\LLVM\\cmake\\modules
>> LLVM_INCLUDE_DIRS=
>> LLVM_DEFINITIONS=
>> CMake Error at
>> C:/Luciad_src/libs/LLVM/cmake/modules/LLVM-Config.cmake:31
>> (list):
>> list sub-command REMOVE_ITEM requires two or more
>> arguments.
>> Call Stack (most recent call first):
>>
>> C:/Luciad_src/libs/LLVM/cmake/modules/LLVM-Config.cmake:256
>> (is_llvm_target_library)
>> components/query/CMakeLists...
2006 Jun 26
5
Newbie question about Agile Rails book - Delete from cart
I have been working through the Agile Web Development with Rails book
doing the Depot tutorial. I have completed it and it works but I cant
say I understand how and why.
My question is this "After adding products to the Cart, how do I then
give users the option to delete just one item and not empty the whole
cart?"
I''ve been playing around with all sorts of code, just making
2006 Jul 31
4
RJS to find an element
I''m trying to implement a remove from cart method based on the
examples in the second edition Agile book. I have everything working
except for the RJS that removes items from the cart. Ideally what
I''d like to do is highlight an element that I am deleting only if
there is more than one of that particular item in the cart. If the
item deleted is the only of