search for: starts_with

Displaying 20 results from an estimated 23 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
2024 Sep 17
1
(no subject)
...) > > > colnames(test) <-c("cp1","cp2","role","groupid") > > > > > > What I have done so far is the following, that works: > > > test %>% > > > group_by(groupid) %>% > > > mutate(across(starts_with("cp"), list(mean = mean))) > > > > > > But the problem is with NA: everytime the mean encounters a NA, it > > creates > > > NA for all group members. > > > I need the software to calculate the mean ignoring NA. So when the group > > is >...
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
2024 Oct 18
1
DPLYR Multiple Mutate Statements On Same DataFrame
...0L, 0L, 1L, 0L, 1L, 0L, 0L, 1L, 1L, 1L, > 1L, 0L, 1L, 1L), Resp = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, > 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)), row.names = c(NA, > 20L), class = "data.frame") > > ???????????? > df1<-df0 %>% > mutate(across(starts_with('P'),~ifelse(.x==0, 0, > ifelse(.x==1, 25, > ???????????????????????????????????????????????? ifelse(.x==2, 75, > ???????????????????????????????????????????????? ifelse(.x==3, 150, > ???????????????????????????????????????????????? i...
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
2024 Sep 16
2
(no subject)
...an (12+18)/2 and then I replace in the new dataframe, but in the same positions, instead of 12 and 18, the values of the corresponding mean. I found this solution, where db10_means is the output dataset, db10 is my initial data. db10_means<-db10 %>% group_by(groupid) %>% mutate(across(starts_with("cp"), list(mean = mean))) It works perfectly, except that for NA values, where it replaces to all group members the NA, while in some cases, the group is made of some NA and some values. So, when I have a group of two values and one NA, I would like that for those with a value, the mean...
2024 Oct 17
2
DPLYR Multiple Mutate Statements On Same DataFrame
...AWAPAR = c(1L, 1L, 1L, 1L, 1L, 0L, 0L, 0L, 1L, 0L, 1L, 0L, 0L, 1L, 1L, 1L, 1L, 0L, 1L, 1L), Resp = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)), row.names = c(NA, 20L), class = "data.frame") ???????????? df1<-df0 %>% mutate(across(starts_with('P'),~ifelse(.x==0, 0, ifelse(.x==1, 25, ???????????????????????????????????????????????? ifelse(.x==2, 75, ???????????????????????????????????????????????? ifelse(.x==3, 150, ???????????????????????????????????????????????? ifelse(.x==4, 350, ??...
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") > +...