search for: file_path

Displaying 20 results from an estimated 49 matches for "file_path".

2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
...lobal_document'' -e:4 Any ideas on how to fix this? If I change GlobalDocument to Document below, it works fine. Here is the relevant code: ** Models ** class Document < ActiveRecord::Base attr_accessor :uploaded_file def after_create if !File.exists?(File.dirname(self.file_path)) Dir.mkdir(File.dirname(self.file_path)) end if @uploaded_file.instance_of?(Tempfile) FileUtils.copy(@uploaded_file.local_path, self.file_path) else File.open(self.file_path, "wb") { |f| f.write(@uploaded_file.read) } end end def after_destro...
2006 Aug 14
2
after_create is not being called
Hi all I have the following model: class PhotoGallery < ActiveRecord::Base attr_accessible :title, :description, :file_path, :title_photo_id has_many :photos, :dependent => :destroy belongs_to :title_photo, :class_name => ''Photo'', :foreign_key => ''title_photo_id'' validates_presence_of :title, :description, :file_path def after_validation if...
2006 Jun 19
3
can''t dump anonymous class Class
...I try to save the document. can''t dump anonymous class Class Any ideas? ** Migration ** class CreateDocuments < ActiveRecord::Migration def self.up create_table :documents do |t| t.column :type, :string t.column :name, :string t.column :file_path, :string t.column :content_type, :string t.column :created_on, :timestamp # attributes for type="AssociationDocument" t.column :association_id, :integer # attributes for type="LocationDocument" t.column :location_id, :integer...
2018 Nov 18
1
[Bug 1301] New: Feature Request - "add set", "add element" - automatically import element members from a file
...er than always needing to use a subsequent command, as for instance "nft add element inet filter drop4 \{ $( tr '\n' ',' < etc/zones.conf.d/cn-aggregated.zone ) \}", in this example. The format might look something like "set <set_name> { ...; element = { <file_path>, <element>, ... }", such that the contents of the file are pulled-in literally as the elements that would otherwise be written to "elements = { <elements_list> }". Presumably, nft can easily distinguish a file path, beginning with "/", from any other kind o...
2012 Jul 10
2
Refresh not working with launchd service provider?
...r.example</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/example.sh</string> </array> </dict> </plist> Here''s the example.pp file: $service_name = ''net.davidlballenger.example'' $file_path = "/var/tmp/${service_name}" file { $file_path : content => $uptime_seconds , } service { $service_name : ensure => running, enable => true, subscribe => File[ $file_path ], } The File resource is updated with the facter variable $uptime_seconds each t...
2008 Jun 13
7
Rubyscript2exe undefined ''run'' method
...#39;rubygems'' rescue LoadError end require ''rubyscript2exe'' require ''Wx'' include Wx require ''random_frame.rb'' RUBYSCRIPT2EXE.bin = ["random.xrc"] RUBYSCRIPT2EXE.bin = ["random_frame.rb"] def random_process file = @file_path.split("\\") @file_path = file.join("\\\\") @file_path << "\\Random.txt" random_file = File.new(@file_path , "w") i = 0 max = @max_number.to_i b = 10 ** (@number_of_digits.to_i - 1) random_seed = 10 ** (@number_of_digits.to_i) g = 0 g_max =100 @p...
2017 Jan 03
0
[PATCH 4/5] mllib: add libosinfo DB reading helpers
...ys.readdir os_path) in + remove_duplicates ( + List.concat ( + List.map ( + fun distro -> + let distro_path = os_path // distro in + let os_files = Array.to_list (Sys.readdir distro_path) in + List.map ( + fun os_file -> + let file_path = distro_path // os_file in + let xml = read_whole_file file_path in + let doc = Xml.parse_memory xml in + let xpathctx = Xml.xpath_new_context doc in + filter xpathctx + ) os_files + ) distros + ) + ) + +let osinfo_db_read_flat...
2010 Feb 15
5
help on how append html tag
Dear all, @doc = Hpricot(open("#{RAILS_ROOT}" + "/public/server_exe/#{list.file_path}")) i need to add <img src = "/ScreenCapture/#{@file_name}"/> element to my @doc hpricot instance.. Please help me... how can i add the above img src element to the @doc hpricot instance.. Thank you -- Posted via http://www.ruby-forum.com/. -- You received this message be...
2020 May 27
2
Adobe digital editions?
...y understanding that you can use calibre to remove the drm encryption on a purchased ebook so you can read it with something like fbreader (which, as far as I know, can't read a drm-encrusted ebook). Calibre is also available as an appimage. https://bintray.com/probono/AppImages/download_file?file_path=Calibre-3.18.0.glibc2.14-x86_64.AppImage -- Can we uninstall 2020 and install it again? This one has a virus. MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
2020 Jun 29
0
A warning in gzcon but not in gzfile
...y(GCSConnection) > ## Download data from cloud > uri <- > "gs://gnomad-public/release/3.0/vcf/genomes/gnomad.genomes.r3.0.sites.chr1.vcf.bgz" > con <- gcs_connection(uri) > data <- readBin(con, raw(), 4*1024*1024) > close(con) > ## write data to a file > file_path <- tempfile() > writeBin(data, file_path) > ## Read the data using `gzfile` > con1 <- gzfile(file_path) > str(readLines(con1, 1000)) > ## Read the data using `gzcon` > ## We create a raw connection from the raw vector > con2 <- gzcon(rawConnection(data)) > str(r...
2013 May 11
1
Samba git: build error when upgrading
...e/gerryr/build/samba4/bin' symlink: samba/__init__.py -> python/samba/__init__.py /home/gerryr/build/samba4/wscript: error: Traceback (most recent call last): File "/home/gerryr/build/samba4/buildtools/wafadmin/Utils.py", line 647, in recurse exec(compile(txt, file_path, 'exec'), dc) File "/home/gerryr/build/samba4/wscript_build", line 43, in <module> bld.RECURSE('python') File "./buildtools/wafsamba/samba_utils.py", line 472, in RECURSE return ctx.add_subdirs(relpath) File "/home/ger...
2011 Oct 27
1
preceding X. and X
Hello, Why do I get preceding "X." (that is a and X followed by a period) for negative numbers and an "X" for positive numbers when I read a csv file? Am I stuck with this? If so, how do I convert it to normal numbers? dat=read.csv(file_path) > dat [1] X0.0 X.0.240432350374 X0.355468069625 X.0.211469972378 X1.1812797415 X.0.227975150826 X0.74834842067 X.1.04923922494 X0.566058942902 X.0.184077147931 [11] X.0.693389240029 X.0.474961946724 X.0.557555716654 X0.374198813899 X0.560620781209 X....
2007 Nov 25
1
Package Building under Windows with MikTeX 2.6
...unusable value) and no default available. at C:\Programme\Uni\R\share\perl/R/Utils.pm line 73 I looked at the path and Utils.pm shows: ... ### * R_tempfile sub R_tempfile { my $pat = "Rutils"; $pat = $_[0] if $_[0]; R::Vars::error("TMPDIR"); my $retval = file_path($R::Vars::TMPDIR, $pat . $$ . sprintf("%05d", rand(10**5))); my $n=0; while(-e $retval) { # was -f, but want to be able to create such a file $retval = file_path($R::Vars::TMPDIR, $pat . $$ . sprintf("%05d", rand(10**5))); cr...
2011 Jan 24
3
CSV::parse with named columns error on Heroku
The following code works locally (parsing a CSV with specific headers) but when on Heroku I get the following error on the ''next if'' row: TypeError (can''t convert String into Integer) CSV.parse(File.open(file_path, ''r'').read.gsub(/"/, ''''), :headers => true) do |row| next if row[''Customer''] && row[''Customer''].strip == ''. standard note format'' ... end So, before I rewrite my code and pull...
2010 Mar 17
3
Converting "factors" to "numeric" in a dataframe
...g or missing something essential (or both!)? I am using R version 2.9.0 at the moment, but this will change as soon as I have sorted this issue out. Below is the code I have put together, as you can see it is VERY brief but essential to allow my analysis to proceed: pcrdata<-read.csv("File_path",header=FALSE) pcrdata<-as.data.frame(t(pcrdata)) pcrdata[2:51]<-as.numeric(as.character(pcrdata)) Any help would be gratefully appreciated, Mike Glanville [[alternative HTML version deleted]]
2007 Apr 23
4
send_file pdf problem
Hi, I am using send_file to allow users to download files from my website, please see code beloe: def download_document send_file("#{RAILS_ROOT}/public/test_form.pdf", :filename => "test.pdf", :type => ''application/pdf'', :disposition => ''attachment'', :streaming
2020 May 27
3
Adobe digital editions?
"Robert Heller" <heller at deepsoft.com> wrote: > Are the books epub type files? If so, you can install fbreader from > epel. Can I second this suggestion? What kind of files are you trying to read? -- Yves Bellefeuille ?<yan at storm.ca>
2010 Jul 26
1
Help on Samba 4
...igure But at this stage itself we are getting the following error: /root/Samba/source4/wscript: error: Traceback (most recent call last): File "/root/Samba/buildtools/bin/.waf-1.5.17-164170d221747ffbb50f4a8b9ccc2b2a/waf admin/Utils.py", line 198, in load_module exec(compile(code,file_path,'exec'),module.__dict__) File "/root/Samba/source4/wscript", line 11, in ? import wafsamba, Options, samba_dist, Scripting File "../buildtools/wafsamba/wafsamba.py", line 53 @conf ^ SyntaxError: invalid syntax Can anybody kindly help us? Regards Ami...
2007 Oct 02
0
patch: allow R CMD build exclude patterns to match symlinks
...king copy) @@ -171,6 +171,24 @@ $log->message("removing junk files"); find(\&unlink_junk_files, $pkgdir); + chdir(dirname($pkgdir)); + my $filename = "${intname}_" . $description->{"Version"} . ".tar"; + my $filepath = &file_path($startdir, $filename); + R_system(join(" ", + ("$tar chf", + &shell_quote_file_path($filepath), + "$pkgname"))); + my $tmpdir = R_tempfile("Rbuild"); + rmtree($tmpdir) if(-d $tmpdir); + mkdir(&...
2014 Mar 02
0
3/2/2014 Samba4 git pull make clean error
...ba-master # gmake clean WAF_MAKE=1 python ./buildtools/bin/waf clean Selected embedded Heimdal build /usr/local/samba-master/wscript: error: Traceback (most recent call last): File "/usr/local/samba-master/buildtools/wafadmin/Utils.py", line 647, in recurse exec(compile(txt, file_path, 'exec'), dc) File "/usr/local/samba-master/wscript_build", line 140, in <module> bld.RECURSE('pidl') File "./buildtools/wafsamba/samba_utils.py", line 471, in RECURSE return ctx.add_subdirs(relpath) File "/usr/local/samba-master/buildtoo...