similar to: String manipulation

Displaying 20 results from an estimated 900 matches similar to: "String manipulation"

2009 Apr 13
4
Creating Methods in the Model?
Hey Everyone. First day diving in to ROR and Ruby... My question is how do you define methods with in the model class and/or should I even be doing this? It is my understanding that you should put as much of the business logic into the model as possible. I want to do some data manipulation before I things are submitted to the database IE (Create a variable out of two submitted via form, as
2023 May 06
1
Change DEFAULTDEPARSE to DEFAULTDEPARSE | SHOWATTRIBUTES ?
The deparse options used by default by 'deparse' and 'dput' are c("keepNA", "keepInteger", "niceNames", "showAttributes") but Defn.h still has #define DEFAULTDEPARSE 1089 /* KEEPINTEGER | KEEPNA | NICE_NAMES, used for calls */ i.e., with the SHOWATTRIBUTES bit turned off. Is that on purpose? Note that this leads to weird
2006 Mar 18
3
Weird stylesheet_link_tag issue after moving servers
Dear experts, I am in the process of switching servers for my application. Before the move everything was working properly. After the move <%= stylesheet_link_tag ''/stylesheets/styles.css'' %> generates <link href="//stylesheets/styles.css" media="screen" rel="Stylesheet" type="text/css" />
2006 Mar 24
6
Chinese characters in the title
Dear experts, In my application, Chinese characters work great in the body of the page. However, in the title, they appear as boxes instead of something like " ???????? ". I also noticed CNET having the same issue: http://www.cnetnews.com.cn/news/net/story/0,3800050307,39438403,00.htm So my question to experts here is that is it possible to show Chinese
2006 Mar 19
2
After Migration dispatch.fcgi not doing its job? Keep gettting the home page
I recently migrated a Rails application. After migration no matter what URL I access within the application, I keep getting the home page. so http://domain.com shows the home page. and so does http://domain.com/blog and also http://domain.com/some/other/url I have routes.rb properly set up (it was working on the old server). I am using RHEL 4 ES with Apache 2 and Fast CGI.
2006 Feb 20
46
Ruby + Apache Lucene using XMLRPC?
Please excuse me if this has been answered before. Is there a "how-to" guide or a walkthrough on integrating Lucene with ROR via XMLRPC? I got Ferret to work but I am worried that it''s not going to be as scalable. I highly appreciate your assistance. Thanks Frank --------------------------------- Relax. Yahoo! Mail virus
2006 Feb 13
11
ROR code syntax highlighting on blog?
I am interested in putting the cool syntax highlighting for ROR code. What''s the best way to do that? Is it using textilize or another formatting language? Or do I need special stylesheets? Any assistance is appreciated. Thanks Frank --------------------------------- Yahoo! Mail Use Photomail to share photos without annoying attachments. -------------- next part
2007 Jul 01
1
ActiveRecord: why does 'self.name' and 'name' both work?
I''m trying to figure out why both ''self.name'' and ''name'' work in a model class. For example: class Category < ActiveRecord::Base before_save :set_permalink private def set_permalink # both work self.permalink = name self.permalink = self.name # doesn''t work permalink = name @permalink = name @permalink =
2006 Mar 24
1
To Open Source Or Not To Open Source?
I have been receviving a lot of feedback on Adoppt.com and based on the feedback, I have one question: Should I open source my project? What are benefits / drawbacks? Adoppt employs many principles that I have learned over the years. Alongwith my upcoming Pro Rails book, it will be something nice to give back to the community. So far I think I would like to Open Source the
2008 Apr 30
3
pretty url
I want to write a permalink like /year/month/day/title, code is as follows: self.permalink = "#{now.year}/#{now.month}/#{now.day}/#{title}" in the view, I use restful url post_path(@post). And in the html source code, the url is /posts/2008%2F4%2F30%2FTest You can see, the ''/'' is replaced by "%2F", which is not I expect. How not to replace the
2006 Apr 11
4
wrong number of arguments (2 for 1)
Hi, Im having trouble figuring out how to query my database in ruby and i''m hoping someone can help me out. I''d like to find all my departments that match a permalink passed from the url. The department must also match a particular category, also passed through the url. I have written the following code. But unfortunatley I get an error "wrong number of arguments (2 for
2006 Jun 16
1
sortable acts_as_tree with heirarchy
I''ve been stumbling on the tut at oriontransfer (http://wiki.oriontransfer.co.nz/main/show/SortableTree) I''ve got it working in a one dimensional list and I''ve got the drag and drop working on children, but as can''t get it to save the tree. Here''s my view: <h2>Menu Prototype 2</h2> <%= flash[:notice] %> <ul
2010 Jun 12
2
Redirections, Duplicate Content & Permalinks
Hi, Recently I''ve looked at trying to get a permalink system up to increase my site''s ranking in google (and to have nice looking URLs); however I''ve been very worried about google and duplicate content. I currently already have a "flaw" in my site, in which if you go to mysite.com/tutorials/ID it will bring you to the same place as
2015 Mar 11
5
[LLVMdev] [RFC] Raise minimum required CMake version to 3.0
> We don't require users to compile their own gcc. Are you saying it's > impossible to get pre-built CMake 2.8.12 and gcc 4.7 on either Mac or > Windows? And we wouldn't be requiring it for cmake. My point was that cmake is always easier to install: * From binaries: a bit easier, since they are provided in http://www.cmake.org/ * From source: way easier than gcc. Gosh, from
2006 Mar 13
5
Displaying related entries by tags - HELP!
Ok, my site is setup like pretty much every other blog out there. A list of the most recent 5 posts, then by clicking one, you go to an individual post page, displaying the full context of that post. Now, what I would like to do is to display the related entries in the side column, which is part of the layout, based on the tags belonging to that specific entry. Here''s my coding so
2018 Mar 30
0
Nice names in deparse
I am raising this again. As as.character(list(c(one = "1"))) is still "1" in R 3.5.0 alpha, could as.character(list(c(one = 1))) be "1" , too, as before? The case here is the list component is atomic with length 1. -------------------------------------------- On Sat, 16/12/17, Suharto Anggono Suharto Anggono <suharto_anggono at yahoo.com> wrote: Subject:
2006 Mar 25
1
routes mapping, subdomains and page-caching
Each of its own is no problem, but the combination of them is confusing my head ! I want to to map in routes.rb an url for an article which is identified by its permalink. The permalink is unique per subdomain. Has anybody done that and can post an example ? Should I do subdomain filtering in routes.rb so I can get page-cachabled URLs (and URL rewriting in Lighttpd form subdomain-urls to
2012 Aug 13
8
Xen 4.2.0-rc2: make tools fails on Fedora 17, ipxe isa.c problem
Hello, I just grabbed http://bits.xensource.com/oss-xen/release/4.2.0-rc2/xen-4.2.0-rc2.tar.gz and tried to build it on Fedora 17 x86_64 host (gcc 4.7.0): make tools: .. make[5]: Entering directory `/root/xen/xen-4.2.0-rc2/tools/firmware'' make -C etherboot all make[6]: Entering directory `/root/xen/xen-4.2.0-rc2/tools/firmware/etherboot'' make -C ipxe/src bin/rtl8139.rom
2012 Aug 15
6
State of nocow file attribute
Hello, some time ago we discussed on #btrfs that the nocow attribute for files wasn''t working (around 3.3 or 3.4 kernels). That was evident by files fragmenting even with the attribute set. Chris mentioned to find a fix quickly for that, and posted some lines of change into irc. But recently someone mentioned that 3.6-rc looks like still not respecting nocow for files. Is there really
2011 Jun 10
2
Problem with a web page at gmane.
http://permalink.gmane.org/gmane.comp.search.xapian.general/6933 For some reason the links on that page include the trailing periods so clicking on them will give you a 404 error. Can this be fixed? Thanks, Jim.