search for: new_nam

Displaying 20 results from an estimated 69 matches for "new_nam".

Did you mean: new_name
2019 Feb 14
1
Proposed function file.backup
...created.") warning(MESSG) return(NULL) } dir.source <- dirname(normalizePath(name)) date_cr <- base::format(base::file.info(name)$mtime, "%Y%m%d-%H%M") ext_name <- tools::file_ext(name) noext_name <- tools::file_path_sans_ext(name) new_name <- paste0(noext_name, "-", date_cr, if(!ext_name == "") {paste0( ".", ext_name)}) ## Abort if new file name already exists if (file.exists(new_name)){ MESSG <- paste("backup file already exists. No new backup created....
2015 Oct 20
1
[PATCH v3 01/13] v2v: factor out opening input VM
...= - let { s_nics = nics } = source in - let nics = List.map ( - fun ({ s_vnet_type = t; s_vnet = vnet } as nic) -> - try - (* Look for a --network or --bridge parameter which names this - * network/bridge (eg. --network in:out). - *) - let new_name = List.assoc (t, vnet) network_map in - { nic with s_vnet = new_name } - with Not_found -> - try - (* Not found, so look for a default mapping (eg. --network out). *) - let new_name = List.assoc (t, "") network_map in - { nic w...
2023 Jul 05
1
textual analysis - transforming several pdf to txt - naming the files
...;- list.files(dirpath, pattern = "Consoli.*\\.pdf$", full.names = TRUE) files <- chartr("\\", "/", files) x <- lapply(files, function(x){ pdftools::pdf_text(x) %>% paste0(collapse = " ") %>% stringr::str_squish() }) new_names <- tools::file_path_sans_ext(files) new_names <- paste(new_names, "txt", sep = ".") setNames(x, new_names) } # apply function # note that my test files are in "~/Temp" txts <- convertpdf2txt(here::here("~", "Temp")) names(txts) T...
2015 Aug 11
0
[PATCH v2 02/17] v2v: factor out opening input VM
...fun ({ s_vnet_type = t; s_vnet = vnet } as nic) -> + let nics = List.map ( + fun ({ s_vnet_type = t; s_vnet = vnet } as nic) -> + try + (* Look for a --network or --bridge parameter which names this + * network/bridge (eg. --network in:out). + *) + let new_name = List.assoc (t, vnet) network_map in + { nic with s_vnet = new_name } + with Not_found -> try - (* Look for a --network or --bridge parameter which names this - * network/bridge (eg. --network in:out). - *) - let new_name = List.assoc...
2008 Mar 06
1
dictionary lookup
...; dict$V2, but some values may be undefined (NA). I suppose this is a very basic task, but I tried in vain to make it more efficient than below. In particular I would like to avoid the explicit (and slow) loop Any help is very much welcome. Thank you, TM ============================================ new_names = old_names m = match(old_names, dict$V3) N = length(old_names) for (i in 1:N) { if (is.na(m[i])) { next ; } nn = as.vector(dict$V2)[m[i]]; if (nn == "" ) { next; } new_names[i] = nn }
2011 Nov 17
2
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
Nick, Thanks for this info, though this didn't help my problem at all. On Wed, Nov 16, 2011 at 7:21 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > Never create a Twine as a local variable. > > V->setName(Twine("new_name")); > > should work fine, however. Note that Twine itself has an implicit > constructor from const char *, so this code: > > V->setName("new_name"); > > should also work fine. > > Nick > > Ryan Taylor wrote: > >> Basically I have two sep...
2011 Nov 17
2
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
...d, Nov 16, 2011 at 5:23 PM Subject: Re: [LLVMdev] Problem getting LoopInfo inside non-LoopPass To: llvmdev at cs.uiuc.edu LLVMers, So, I'm trying to write a pass that changes the names of the basic blocks through the use of Value, so: Value *V = *BasicBlockPtr; const Twine Tname("new_name"); V->setName(Tname); But when I run the opt and look at the IR output nothing is changed? Not sure what I'm doing wrong. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111116/9db6b5...
2011 Nov 17
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
Never create a Twine as a local variable. V->setName(Twine("new_name")); should work fine, however. Note that Twine itself has an implicit constructor from const char *, so this code: V->setName("new_name"); should also work fine. Nick Ryan Taylor wrote: > Basically I have two separate passes (first is a loop pass) which are > two d...
2011 Nov 17
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
...t; wrote: > Nick, > > Thanks for this info, though this didn't help my problem at all. > > > On Wed, Nov 16, 2011 at 7:21 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > >> Never create a Twine as a local variable. >> >> V->setName(Twine("new_name")); >> >> should work fine, however. Note that Twine itself has an implicit >> constructor from const char *, so this code: >> >> V->setName("new_name"); >> >> should also work fine. >> >> Nick >> >> Ryan Taylor w...
2024 Apr 11
1
[External] Re: Repeated library() of one package with different include.only= entries
...ace() with a new include.only specification. This is the "quite hard to accomplish" I alluded to, admittedly I hadn't forced myself to write it all out -- maybe it's not as bad as all that. After some iterations, today I think we'd want to do... modify_attach = function(pkg, new_names) { if (!startsWith(pkg, "package:")) pkg <- paste0("package:", pkg) old <- tryCatch(ls(pkg, all.names=TRUE), error=\(c) character()) if (length(old)) detach(pkg) attachNamespace(.rmpkg(pkg), include.only=c(new_names, old)) } Perhaps detach() could invisibly retu...
2016 Apr 11
0
[PATCH] v2v: Reject duplicate -b/-n parameters on the command line (RHBZ#1325825).
...-git a/v2v/v2v.ml b/v2v/v2v.ml index f0c118e..4d0d525 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -189,12 +189,12 @@ and amend_source cmdline source = (* Look for a --network or --bridge parameter which names this * network/bridge (eg. --network in:out). *) - let new_name = List.assoc (t, vnet) cmdline.network_map in + let new_name = NetworkMap.find (t, Some vnet) cmdline.network_map in { nic with s_vnet = new_name } with Not_found -> try (* Not found, so look for a default mapping (eg. --network out). *) - let...
2024 Apr 15
1
[External] Re: Repeated library() of one package with different include.only= entries
...ion. > This is the "quite hard to accomplish" I alluded to, admittedly I hadn't > forced myself to write it all out -- maybe it's not as bad as all that. > After some iterations, today I think we'd want to do... > modify_attach <- function(pkg, new_names) { > if (!startsWith(pkg, "package:")) pkg <- paste0("package:", pkg) > old <- tryCatch(ls(pkg, all.names=TRUE), error=\(c) character()) > if (length(old)) detach(pkg) > attachNamespace(.rmpkg(pkg), include.only=c(new_names, old))...
2020 Aug 25
2
Re: [RFC nbdkit PATCH] protocol: Alter .list_exports, add .default_export
...gt;so you can just store it there, unless I'm misunderstanding something. > > Plugins cannot access the TCP connection except through public APIs ;) Sure, plugins can't, but there's some code in the server which you've written which could be doing: GET_CONN; const char *new_name; ... new_name = plugin->default_export (...); if (conn->default_exportname != NULL) free (conn->default_exportname); conn->default_exportname = strdup (new_name); > I've got the patch working (it passes 'make check-valgrind'), so > I'll post it later...
2023 Jul 05
1
textual analysis - transforming several pdf to txt - naming the files
I am taking my first steps in textual analysis with R. I have pdf files consisting of company reports for several years (1 file corresponds to 1 company and 1 year). My idea is to start by transforming all my pdf files into txt files for further treatment and analysis (this will allow me to group the files by company or by year, depending on the future analysis to be performed). I do not have
2023 Jan 30
2
[PATCH libnbd v2 3/4] generator: Add APIs to get/set the socket activation socket name
...t;tls_username); free (h->tls_psk_file); @@ -200,6 +202,60 @@ nbd_unlocked_get_handle_name (struct nbd_handle *h) return copy; } +int +nbd_unlocked_set_socket_activation_name (struct nbd_handle *h, + const char *name) +{ + size_t i, len; + char *new_name; + + len = strlen (name); + + /* Setting it to empty string stores NULL in the handle. */ + if (len == 0) { + free (h->sa_name); + h->sa_name = NULL; + return 0; + } + + /* Check the proposed name is short and alphanumeric. */ + if (len > 32) { + set_error (ENAMETOOLONG,...
2012 Nov 02
10
[PATCH 0/9] elflink fixes
From: Matt Fleming <matt.fleming at intel.com> Here are the patches that I've got queued up based on the very helpful feedback I received from people testing Syslinux 5.00-pre9. Unless anyone has any concerns these will make it into Syslinux 5.00-pre10. Matt Fleming (9): pxe: Don't call open_config() from the pxe core ldlinux: Print a warning if no config file is found
2012 May 15
2
Renaming names in R matrix
....7574657 0.2104075 0.02922241 0.002705617 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 and given this: > new_names <- c("k0","k1","k2,"k3","k4","k5"); How can I get this? [,1] [,2] [,3] [,4] k0 0.7574657 0.2104075 0.02922241 0.002705617 k1 0.0000000 0.0000000 0.00000000 0.000000000 k2 0.0000000 0.0000000 0.00...
2006 Aug 15
5
Hard time understanding the differences between "def self.foo" and "def foo"
Hi guys, I''m having a little trouble understanding the differences and knowing when to use "def foo" and "def self.foo" in my models. I don''t quite understand them and was hoping someone could explain or give me examples on how to use the "self." properly. For example, I had "def foo" in my model "Account" and in one of
2007 Jun 17
2
Branch 'as' - libswfdec/swfdec_as_interpret.c
libswfdec/swfdec_as_interpret.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) New commits: diff-tree 38fbc1389267e593b44041018cbb1750bdcce0fb (from aaca94203d8a0ccb8feb32c0d57df3401fca0350) Author: Benjamin Otte <otte at gnome.org> Date: Sun Jun 17 14:19:45 2007 +0200 actually convert the values to a string when comparing strings diff --git
2020 Aug 25
0
Re: [RFC nbdkit PATCH] protocol: Alter .list_exports, add .default_export
...ss I'm misunderstanding something. >> >> Plugins cannot access the TCP connection except through public APIs ;) > > Sure, plugins can't, but there's some code in the server which you've > written which could be doing: > > GET_CONN; > const char *new_name; > ... > new_name = plugin->default_export (...); > if (conn->default_exportname != NULL) > free (conn->default_exportname); > conn->default_exportname = strdup (new_name); So you're suggesting that the signature for .default_export should return &...