search for: starts_with

Displaying 19 results from an estimated 19 matches for "starts_with".

2008 Dec 04
3
Patch: Allow args with spaces
Hi, the first attached patch extends the argument parsing code to allow (shell like) spaces. A config like LABEL BIOSupdate KERNEL dmiselect.c32 APPEND "ESPRIMO P5925" "memdisk initrd=/dos/FSC-E5925.img raw" will result in args[]: ESPRIMO P5925 memdisk initrd=/dos/FSC-E5925.img raw instead of (current code): "ESPRIMO P5925" "memdisk
2008 Aug 19
6
redirect with application add
There are groups within our app that people can be invited too. If a user recieves an invite to a group and hasn''t yet added the application the filter chain ends up redirecting them to the main canvas page instead of the the group page directly. Is there a way to handle this if the user hasn''t installed the app, I tried redirect_back_or_default in one of my controllers but it
2012 Apr 11
0
F5 SLB iRule - POP3 TLS Offload & Add Realm
...; set debug 0 set loggedin 0 } when SERVER_CONNECTED { TCP::collect } when CLIENTSSL_HANDSHAKE { SSL::collect set secure 1 } when CLIENTSSL_DATA { if { $debug } { log local0. "CLIENT DATA: [SSL::payload]" } set lcpayload [string tolower [SSL::payload]] if { $lcpayload starts_with "user" } { scan [SSL::payload] {%s%s} command user set pos [string first $user [SSL::payload] 0] SSL::payload replace $pos [string length $user] "$user@$realm" if { $debug } { log local0. [SSL::payload] } } SSL::release if { $loggedin == 0 } { SSL::col...
2023 Oct 10
5
[PATCH libnbd 0/4] Miscellaneous Rust cleanups
Add an overview libnbd-rust(3) man page pointing to the real documentation. This is like OCaml & Golang. When reviewing the real rustdocs I noticed they basically converted the man pages into plain text, resulting in lots of problems such as internal links not working, no `code` annotations, etc. So I wrote a simple POD to rustdoc translator. It is by no means perfect, but it fixes many of
2007 Feb 07
2
Quick XPath question (REXML)
All, If I have the following (assume that xml contains a valid REXML Document and that the root of the xml is way above any <tr> elements in the document): just_rows = xml.elements["//tr[starts_with(@id, ''xdgDataRow_grid_container_'')]"] shouldn''t just_rows contain _all_ of the <tr> elements whose id attributes start_with "xdgDataRow_grid_container_"? It''s only getting the first one. Do I need to add something to the XPath to pull all...
2007 Aug 24
1
How to download any file using send_file() method
...if @f=="file" redirect_to :action=>''download_files'' else @dirEntries = Dir.entries(@path) @dirEntries.reject! { |filename| filename.starts_with? ''.'' } end end def download_files send_file(''D:/hr/xyz.doc'', :filename => params[:filename] ,...
2006 Aug 03
1
routeset mapper problem
...39;'' # if it maps to the root site URI, name it content_root named_route( ''content_root'', "#{path}/*page", opts ) else connect( "#{path}/*page", opts ) end end end def method_missing( name, *args ) if name.to_s.starts_with?( '''' ) opts = (args.last.is_a?(Hash)) ? args.pop : {} opts[:named_route] = name.to_s #[9..-1] content_root( *(args << opts) ) else (1..2).include?(args.length) ? named_route(name, *args) : super(name, *args) end end end and in /lib/supp...
2006 Jul 22
4
Visible elements in RJS
How can I know if a an element is visible or hidden in RJS I''m trying to hide/show some data but it does not work Error => parse error, unexpected $undefined. #show_doctor.rjs if($("#{@element}").visible()) page.hide "hide_#{@element}" end Any ideas? @element contains the value of the html element -- Posted via http://www.ruby-forum.com/.
2006 Aug 21
3
strange problem with system call
Hi, I am using backgroundrb to create a automated system of typo blogs.So, users can create new typo applications using web interface and all that jazz. Now..its working perfectly except one minor glitch. Since latest version of typo has a command called "typo", i simply use that command to install new typo app.And it works. def do_work(args) DIR =
2007 Dec 27
3
RSpec on Ruby 1.9: before(:all) (Not Yet Implemented) pending messages instead of tests
On Dec 27, 2007 3:18 PM, Shot (Piotr Szotkowski) <shot at hot.pl> wrote: > Shot (Piotr Szotkowski): > > > I happily hand-compiled Ruby 1.9.0-0 into /home/shot/opt/ruby today > > and I''m running into a strange error with RSpec ? all my examples work > > perfectly with Ruby 1.8 but are considered peding on Ruby 1.9. > > FWIW, I get the same result with
2023 Jan 14
1
Removing variables from data frame with a wile card
You rang sir? library(tidyverse) xx = 1:10 yr1 = yr2 = yr3 = rnorm(10) dat1 <- data.frame(xx , yr1, yr2, y3) dat1 %>% select(!starts_with("yr")) or for something a bit more exotic as I have been trying to learn a bit about the "data.table package library(data.table) xx = 1:10 yr1 = yr2 = yr3 = rnorm(10) dat2 <- data.table(xx , yr1, yr2, yr3) dat2[, !names(dat2) %like% "yr", with=FALSE ] On Sat, 14...
2018 Jan 02
0
Identifying Official CentOS AWS AMIs
...value is transient or specific to one or more AWS regions. Is there a maintainer lurking here that can confirm or deny? Here's the base query I'm testing: aws ec2 describe-images \ --owners 410186602215 \ --output text \ --query 'reverse(sort_by(Images, &CreationDate))[?starts_with(Description, `CentOS Linux 7`)].[ImageId, CreationDate, Description]' -- Paul Heinlein heinlein at madboa.com 45?38' N, 122?6' W
2008 Nov 28
3
name space and before filter
is it possible to have a before filter apply to all controllers in a name space, or do you have to do it separate for each individual controller. for example, an admin name space with a require_admin before filter. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2006 Aug 16
7
Forward of moderated message
OK I know whats happening. Your while loop completes and calls kill on the worker before your task_progress controller method ever gets called> So the worker is deleted and when you try to access it from rails you get an error because there is no longer a worker at that job key. The kill method is meant to be used within a worker that you fire and forget. If you want to get the
2023 Jan 27
0
Resumen de R-help-es, Vol 167, Envío 10
...tras. > > *colcompare <- function(df)* { > + > + nam_val <- names(df) %>% stri_sub(from = 1, to = 2) %>% unique() > + res_df <- data.table() > + for (i in 1:length(nam_val)) { > + cols_tmp <- nam_val[i] > + df_tmp <- df %>% select.(starts_with(cols_tmp)) %>% > + rename.( a = 1) %>% > + rename.( b = 2) %>% > + mutate.( c = if_else.( a == 1 | b == 1, 1, 0)) %>% > + select.(c) %>% > + as.data.table() > + names(df_tmp) <- paste0(cols_tmp, "c") > +...
2023 Jan 28
0
Resumen de R-help-es, Vol 167, Envío 10
...tras. > > *colcompare <- function(df)* { > + > + nam_val <- names(df) %>% stri_sub(from = 1, to = 2) %>% unique() > + res_df <- data.table() > + for (i in 1:length(nam_val)) { > + cols_tmp <- nam_val[i] > + df_tmp <- df %>% select.(starts_with(cols_tmp)) %>% > + rename.( a = 1) %>% > + rename.( b = 2) %>% > + mutate.( c = if_else.( a == 1 | b == 1, 1, 0)) %>% > + select.(c) %>% > + as.data.table() > + names(df_tmp) <- paste0(cols_tmp, "c") > +...
2023 Jan 14
3
Removing variables from data frame with a wile card
Steven, Just want to add a few things to what people wrote. In base R, the methods mentioned will let you make a copy of your original DF that is missing the items you are selecting that match your pattern. That is fine. For some purposes, you want to keep the original data.frame and remove a column within it. You can do that in several ways but the simplest is something where you sat the
2008 Sep 17
13
Capturing the sql from a statement without executing it?
Hi guys, Is there an elegant way to capture the sql that would have been executed by an ActiveRecord statement, without actually executing it? :) I''m imagining something like sql = User.find(1).groups.to_sql or perhaps sql = ActiveRecord::Base.capture_sql { User.find(1).groups } resulting in sql = ''SELECT * FROM groups INNER JOIN memberships.... WHERE users.id =
2017 Jun 21
6
RFC: Cleaning up the Itanium demangler
...>= size()) to = size() - 1; + if (from >= size()) from = size() - 1; + return string_ref(first + from, first + to); + } + + string_ref drop_front(size_t n) const { + if (n >= size()) n = size() - 1; + return string_ref(first + n, last); + } + + bool starts_with(string_ref str) const { + if (str.size() > size()) + return false; + return std::equal(str.begin(), str.end(), begin()); + } + + const char& operator[](size_t idx) const { return *(begin() + idx); } + + const char* begin() const { return first; } + const...