similar to: Reading files from dir

Displaying 20 results from an estimated 8000 matches similar to: "Reading files from dir"

2006 Feb 08
7
DRY methodology
because I am a grasshopper... Now that I can sort my ''list''...is there a logical way of not repeating myself to having essentially the same list view with multiple sorts? i.e. def list_cl # ordered by clients last name @placement_pages, @placements = paginate( :placements, :include => [:client], :order_by =>
2006 Feb 13
10
Clearing browser history?
Hello everyone, I''ve got an app where, when a user logs out, I want the browser history to be cleared so no-one can go back and see what the user was doing. I remember seeing info on how to do this before - can''t find it in Google (the search terms "clear", "browser" and "history" aren''t that great!), which means I can''t remember
2006 Feb 26
5
Plugins? Components?
Hi, Newbie here :) Can someone help explain the difference between "plugins" (put in the /vendor/plugins directory) and "components" (put into the /components directory)? Is it just that "plugins" have an init.rb file that is automatically loaded? Also, how can I dynamically find out which files/controllers are available in the /components directory? Thanks,
2006 Feb 06
3
linked table confusion
placement.rb has_one :client has_one :case_manager client.rb belongs_to :case_manager has_many :placements case_manager.rb has_many :clients has_many :placements I am trying to create a view file for placements. I can pull columns from clients table in this view by using... <%= @placement.client.wholename %> but if I use <% @placement.case_manager.wholename %>
2006 Feb 13
9
Please e-mail (not only post) the Forum Instructions URL
Am I just blind, or are there no links to the instructions, e.g. the Search syntax or how to get back to a thread I started on RoR? Or do those links, buttons, whatever only show / work in IE? Thanks for any help; sorry if I can''t figure out something I should be able to. jandjharris (at) gmail.com -- Posted via http://www.ruby-forum.com/.
2006 Feb 02
8
How to get all selected rows in the mutli-selection listbox?
Hi, I have created a multiple selection listbox with rails, when I try to get the rows selected by user, rails send back only the first one, how can I get the other selected rows???? I created the listbox with the following function: select_tag("form__list1", options_for_select(["A","B","C","D"], selected = "A"), html_options =
2006 Feb 16
6
session usage
Clearly I have the session and can see that session[:user_id] = 7 Now I want to use the results of this...in a page...so I am trying to use the instance variable @sess_user and at the top of the application controller, I have either... @sess_user = User.find([:first, "id = ?", session[:user_id]) or @sess_user = User.find([:first, "id = ?", session[:user_id]) gives me an
2006 Feb 07
11
Possible Rails Security Issue?
I have an e-commerce site and users check out with a form. The results of that form are sent to a "confirm your order" page via POST. I take great pains to NEVER store the full credit card number on my server--just the last 4 digits. I was very surprised to find that by default Rails will record POST requests with parameters in the production.log. And those parameters
2006 Jun 19
13
PNG and Alpha-Transparency
Is there a prototype / extension which will assist in cross-browser support of PNG images? http://www.alistapart.com/articles/pngopacity/ It seems to me that a class could be developed which would zip through the DOM and make changes where needed for IE 5.5 / IE 6.0 to handle PNG images. I don''t want to write one if it''s been done before. Sam
2006 Jan 26
21
pagination_links help
I want append custom query parameters to my pagination links, like ?page=1&foo=bar. I can''t quite figure out how to do this with the pagination_links helper, although I believe the API says you should be able to: pagination_links(paginator, options={}, html_options={}) options are: :params: any additional routing parameters for page URLs Has anyone tried this? thanks, jeff --
2006 Feb 06
2
Globalize plugin, now I have two classes with the same name
Hi, newbie here. I''m using the Globalize plugin, which defines a model with the same name as one of my existing models. We both use a model called Country. The Globalize Country model (within vendors/...) is wrapped in module like this... module Globalize class Country < ActiveRecord::Base ... end end And this is my Country model (within app/models)... class Country <
2012 Apr 02
3
booting a dos floppy from a disk image over pxe
Hello, I'm trying to boot a dos floppy stored on a disk image which is initially loaded over pxe using memdisk. I've created the disk image as follows: dd if=/dev/zero of=$IMGLOCATION/$IMGNAME bs=$(( 1024 * 1024 )) count=20 LOOPDEV=$(losetup --show -f $IMGLOCATION/$IMGNAME) MAJOR_MINOR=$(ls -l $LOOPDEV|awk '{print $5$6}'|sed 's/,/:/') DMSIZE=$(( $(ls -l
2011 Oct 27
1
minimizing device-dependent code in graphics scripts
Here is a common scenario that I and probably others often face: - I write a script, test.R, to produce some graphs, viewing them on-screen and tinkering until they look right - I want to save image files (e.g., .png), so I wrap each plot in device driver calls, e.g., png(file='test01.png', width=600, height=600); plot(1:10) dev.off() png(file='test02.png', width=600,
2009 Dec 03
2
adding bmp/jpg/gif to an existing plot
Hi, all. I searched a lot at mailing list, installed EBImage and gtk packages, but I couldn't make this simple work: How to add a image file (jpg or bmp ou gif) to an existing plot window (not plot over the image), like the code below (pseudo function add.image): plot(1:10,1:10,main="test") image = read.X("myimage.jpg") add.image(image, x.left=2, y.bottom=4,
2006 Jul 14
2
watermark with file_colum
Is this possible? I see rmajick allows for a image.stenago( watermark=>''myimage.gif'') Anyone have any ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060714/6e9af7a6/attachment.html
2013 Nov 25
0
Sysinux 6 will not boot ISOs on BIOS (i.e. pre-UEFI) systems
> > these are the cmds I'm using now, which are working with syslinux4 just > fine: > > xorriso -as mkisofs ${_qflag} \ > -iso-level 3 -rock -joliet \ > -max-iso9660-filenames -omit-period \ > -omit-version-number \ > -relaxed-filenames -allow-lowercase \ > -volid "${LABEL}" \ >
2017 Feb 13
4
CentOS 7, systemd, NetworkMangler, oh, my
On 13 February 2017 at 16:17, peter.winterflood <peter.winterflood at ossi.co.uk> wrote: > > > > there's a really good solution to this. > > yum remove NetworkManager* > > chkconfig network on > > service network start > > and yes thats all under fedora 25, and centos 7. > > works like a charm. > > sometimes removing NM leaves resolv.conf
2006 Feb 15
9
Liquid - form helpers? multiple liquid templates?
Hi, Its taking me a long time to get my head around the Liquid plugin. I have a couple of questions which hopefully someone can help me with... - How difficult would it be to add some kind of Filter or Tag which would allow other Liquid templates to be included into the current Liquid template (eg. similar to render(:file => "filename") - How difficult would it be to add
2017 May 08
2
Latest AMD CPUs and AM4 Motherboards
Has anyone used the new AMD CPUs and AM4 motherboards with CentOS 6 / 7? Any reservations or warnings? -- Eugene Poole Woodstock, Georgia
2013 Nov 24
2
Sysinux 6 will not boot ISOs on BIOS (i.e. pre-UEFI) systems
On 11/24/2013 09:56 AM, Ady wrote: >> The very early code that emits this message is *identical* between >> Syslinux 4 and Syslinux 6. The biggest difference is the size of >> isolinux.bin, so it is possible that that might be the source of the >> problem. >> >> -hpa > > I wonder if isolinux.bin should be limited to max. 16 sectors (of > 2KiB