search for: svalue

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

Did you mean: value
2007 Aug 22
2
gWidgets (tcltk): problem extracting values from widgets in glayout grid
Hello, I haven't been able to find an example for the second case below -- or perhaps I didn't recognize it when I saw it. Is there a value for x such that svalue(x) will return "bbb", either by itself or as part of an array? Or do I need to do something else entirely? (R2.5.1; Windows XP) > #### gWidgets test > options("guiToolkit"="tcltk") > require(gWidgets) [1] TRUE > > ###### Case 1: this works ######## &gt...
2009 Jun 25
1
How do I define the method for gcheckboxgroup in gWidgets?
...ong different things to plot. I can get the widgets for scaling to work just fine. I am using gcheckboxgroup to make the (possibly multiple) selections. However, I can?t seem to figure out how to properly define the gcheckboxgroup; I can draw the widget properly, I think my handler would use the svalue right if it actually received it. Part of the problem is using the index of the possible values rather than the values themselves, but I'm pretty sure this is not all of the problem. I've been unable to find an example like this in any of the various resources I've come across. BTW,...
2010 Jun 01
2
[LLVMdev] How to create global string array? (user question)
..." #include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/Analysis/Verifier.h" #include <stdio.h> #include <vector> using namespace llvm; using namespace std; Constant* mk_string(Module *M, LLVMContext &Context, const string &svalue) { ArrayType *Ty = ArrayType::get(Type::getInt8Ty(Context),svalue.size()+1); GlobalVariable *GV = new llvm::GlobalVariable( *M, Ty, true, GlobalValue::InternalLinkage, ConstantArray::get(Context,svalue), "str", 0, false, 0); vector&lt...
2009 Dec 27
2
RGtk2 / gWidgets - addHandlerClicked Problem
...t it to be executed only once. Does someone know, why this happens and how I can change it? library(gWidgets) w <- gwindow() b <- gbutton("press", cont=w) tbl <- gtable(1:10, cont=w) addhandlerclicked(b, handler=function(h, ...){ cat("addhandlerclicked button\n") svalue(tbl, index=T) <- 1 # change the table value }) addhandlerclicked(tbl, handler=function(h, ...){ cat("addhandlerclicked table\n") }) Thanks! Mark ??????????????????????????????????????? Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstra?e 93 B01 28359 Bremen Blog: www.markheckman...
2008 Jan 21
3
Need suggestions about GUI
What I want to do is: 1, creat a text box, insert text into that box. 2, select chunk of of the text by mouse, and link it to a lable. so I would like a way to get that chunk of text. Can I do such job with tcltk? Any relavant tutorial materials? Thanks -- HUANG Ronggui Bachelor of Social Work, Fudan University, China Master of sociology, Fudan University, China Ph.D. Student , CityU of
2006 Jun 13
0
Code comments?
...some additional optimizations which could be made. There may be a way to use findAll or another equivalency operator to test for the innermost equality and perform the assignment if it''s true? Comments appreciated... Sam cssSelectorUpdate2: function(sSelector, sProperty, sValue) { // Update the property value for a specific sSelector in a stylesheet for(var i = 0; document.styleSheets.length > i; i++) { // Mozilla var oRules = document.styleSheets[i].rules || document.styleSheets[i].cssRules; for(var j = 0; oRules.length >...
2008 Dec 12
1
How to mimic select.list using RGtk2/gWidgetsRGtk2?
...t.list(), here is my preliminary version. select <- function(x,multiple=TRUE,...){ ans<-new.env() g <- gwindow(title=title,wid=200,heigh=500) x1<-ggroup(FALSE,con=g) x2<-gtable(x,multiple=multiple,con=x1,expand=TRUE) gbutton("OK",con=x1,handler=function(h,...){ value <- svalue(x2) if (length(value)==0) value="" assign("selected",value,env=h$action$env) dispose(x1) },action=list(env=ans)) ans } However, it doesn't behave as what I want. What I want is that: for {select(c("a","b")); foo()}, foo() only runs after I have clicked...
2015 Mar 01
0
[PATCH v2 1/3] New API: btrfstune_seeding
...| 2 +- 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 6b93973..d2d4492 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1929,3 +1929,31 @@ error: free (ret); return NULL; } + +int +do_btrfstune_seeding (const char *device, int svalue) +{ + const size_t MAX_ARGS = 64; + const char *argv[MAX_ARGS]; + size_t i = 0; + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; + int r; + const char *s_value = svalue ? "1" : "0"; + + ADD_ARG (argv, i, str_btrfstune); + ADD_ARG (argv, i, "-S&quot...
2012 May 14
2
[PATCH 1/2] TODO: add note for libblkid
Add the note about compatible in TODO for libblkid. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- TODO | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TODO b/TODO index 3955552..d604d10 100644 --- a/TODO +++ b/TODO @@ -192,6 +192,9 @@ would make more sense to just use libblkid for this. There are some places where we call out to the 'blkid' program. This
2015 Mar 01
5
[PATCH v2 0/3] btrfs: add support to btrfstune
This series adds new APIs to support btrfstune. v2: - merge btrfstune_S_[enable|disable] together - fix naming issue Chen Hanxiao (3): New API: btrfstune_seeding New API: btrfstune_enable_extended_inode_refs New API: btrfstune_enable_skinny_metadata_extent_refs daemon/btrfs.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/actions.ml | 47
2015 Jun 24
2
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...; + * We had to check it there. > + */ > + if (strstr (err, "-U") == NULL || strstr (err, "-u") == NULL) > + result = 0; > + else > + result = 1; > + > + return result; > +} > + > int > do_btrfs_set_seeding (const char *device, int svalue) > { > @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue) > return 0; > } > > +int > +btrfstune_set_uuid (const char *device, const char *uuid) Call it btrfs_set_uuid please, as the fact that it uses btrfstune is an implementation detail of it....
2015 Jul 22
1
[LLVMdev] prevent an SDValue from lower into an immediate field in load
Hi there, I am doing relocation in my backend by calling my function getAddrNonPic: SDValue getAddrNonPIC(NodeTy *N, SDLoc DL, EVT Ty, SelectionDAG &DAG)const{ SValue Hi=getTarget(N,Ty,DAG, MyBackend::Hi16); SValue Lo=getTarget(N,Ty,DAG, MyBackend::Lo16); return DAG.getNode(ISD::ADD, DL, Ty, DAG.getNode(MyBackend::Hi16, DL, Ty, Hi), DAG.getNode(MyBackend::Lo16, DL, Ty, Ho)); } But sometimes a load instruction is lowered into: (r2=lo16(symbol)) lw r...
2006 Oct 06
2
[R-pkg] New packages pmg, gWidgets, gWidgetsRGtk2
...make a dialog for selecting a CRAN mirror. << win = gwindow("Select a CRAN mirror") size(win) <- c(600,400) tbl = gtable(utils:::getCRANmirrors(), chosencol=4, filter.column=2, container=win, filter.column=2, handler = function(h,...) { URL = svalue(tbl) repos <- getOption("repos") repos["CRAN"] <- gsub("/$", "", URL[1]) options(repos = repos) dispose(win) }) >> Two widgets are created: a base window to be a container for the widget that displays a tabl...
2006 Oct 06
2
[R-pkg] New packages pmg, gWidgets, gWidgetsRGtk2
...make a dialog for selecting a CRAN mirror. << win = gwindow("Select a CRAN mirror") size(win) <- c(600,400) tbl = gtable(utils:::getCRANmirrors(), chosencol=4, filter.column=2, container=win, filter.column=2, handler = function(h,...) { URL = svalue(tbl) repos <- getOption("repos") repos["CRAN"] <- gsub("/$", "", URL[1]) options(repos = repos) dispose(win) }) >> Two widgets are created: a base window to be a container for the widget that displays a tabl...
2006 Jun 21
3
getElementsByClassName
...;'; $temp += ''<SELECT NAME="cboTOC" onChange="location=this.options[this.selectedIndex].value"> ''; $temp += ''<OPTION VALUE="">Table of Contents</OPTION>''; for($i = 0; $i < $aTOC.length; $i ++){ $sValue = $aTOC[$i].name; $sName = $aTOC[$i].innerHTML; $temp += ''<OPTION VALUE="'' + $sValue + ''">'' + $sName+ ''</OPTION>''; alert($sValue); } $temp += ''</SELECT> ''; $temp += ''&l...
2013 Apr 23
1
Automation of R input
Hi all, I have R script which during its run require an input like this: choose between one of the grouping factor available : c("Village", "Country") can I automate this part, in other word to pass for example Village when I am running the script. One more thing the script is the TimeSeriesAnalysis {ndvits}. Thanks in advance for any help or suggestion. Regards, Vahe
2015 Jun 24
0
[PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...nvalid options, it will print its usage + * in stderr. + * We had to check it there. + */ + if (strstr (err, "-U") == NULL || strstr (err, "-u") == NULL) + result = 0; + else + result = 1; + + return result; +} + int do_btrfs_set_seeding (const char *device, int svalue) { @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue) return 0; } +int +btrfstune_set_uuid (const char *device, const char *uuid) +{ + CLEANUP_FREE char *err = NULL; + int r; + int has_uuid_opts = test_btrftune_uuid_opt (); + + if (has_uuid_opts == 0) { + reply...
2012 May 15
1
[PATCH] NEW API: add new api btrfs-fsck
....ml | 11 +++++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index ab3babc..62f07f3 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -619,3 +619,20 @@ do_btrfs_set_seeding (const char *device, int svalue) free (err); return r; } + +int +do_btrfs_fsck (const char *device) +{ + char *err; + int r; + + r = commandr (NULL, &err, "btrfsck", device, NULL); + if (r == -1) { + reply_with_error ("%s: %s", device, err); + free (err); + return -1; + } + + free (er...
2015 Jun 26
0
[PATCH v3 1/4] uuid: add support to change uuid of btrfs partition
...nvalid options, it will print its usage + * in stderr. + * We had to check it there. + */ + if (strstr (err, "-U") == NULL || strstr (err, "-u") == NULL) + result = 0; + else + result = 1; + + return result; +} + int do_btrfs_set_seeding (const char *device, int svalue) { @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue) return 0; } +int +btrfs_set_uuid (const char *device, const char *uuid) +{ + CLEANUP_FREE char *err = NULL; + int r; + int has_uuid_opts = test_btrftune_uuid_opt (); + + if (has_uuid_opts <= 0) { + reply_...
2015 Jun 26
0
[PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...nvalid options, it will print its usage + * in stderr. + * We had to check it there. + */ + if (strstr (err, "-U") == NULL || strstr (err, "-u") == NULL) + result = 0; + else + result = 1; + + return result; +} + int do_btrfs_set_seeding (const char *device, int svalue) { @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue) return 0; } +int +btrfs_set_uuid (const char *device, const char *uuid) +{ + CLEANUP_FREE char *err = NULL; + int r; + int has_uuid_opts = test_btrfstune_uuid_opt (); + + if (has_uuid_opts <= 0) { + reply...